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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@draw.io>2022-09-15 15:45:58 +0300
committerDavid Benson <david@draw.io>2022-09-15 15:45:58 +0300
commitea012baba6fb2e903797fa6306833ca4f31ab361 (patch)
treebc7b59ddc20dd6028a20f36678a1b0d09ba65e86
parent8f3f95a05b701175b639ba9572dc4e0fb7c46b02 (diff)
20.3.1 releasev20.3.1
-rw-r--r--ChangeLog12
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js3705
-rw-r--r--src/main/webapp/js/diagramly/App.js147
-rw-r--r--src/main/webapp/js/diagramly/Devel.js4
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js9
-rw-r--r--src/main/webapp/js/diagramly/Editor.js2
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js813
-rw-r--r--src/main/webapp/js/diagramly/Embed.js2
-rw-r--r--src/main/webapp/js/diagramly/Menus.js724
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js516
-rw-r--r--src/main/webapp/js/diagramly/mxFreehand.js6
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar.js36
-rw-r--r--src/main/webapp/js/embed.dev.js2
-rw-r--r--src/main/webapp/js/grapheditor/Actions.js17
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js13
-rw-r--r--src/main/webapp/js/grapheditor/Menus.js4
-rw-r--r--src/main/webapp/js/integrate.min.js3739
-rw-r--r--src/main/webapp/js/math-print.js2
-rw-r--r--src/main/webapp/js/viewer-static.min.js2961
-rw-r--r--src/main/webapp/js/viewer.min.js2961
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/resources/dia_de.txt2
-rw-r--r--src/main/webapp/resources/dia_fr.txt46
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
-rw-r--r--src/main/webapp/styles/grapheditor.css2
27 files changed, 8271 insertions, 7462 deletions
diff --git a/ChangeLog b/ChangeLog
index 936ce292..0d534deb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+15-SEP-2022: 20.3.1
+
+- Multiple commits preparing for live UI switch [DS-909]
+- Disables java proxy by default [DS-912]
+- Removes click to stop drawing freehand [1109]
+- NPE fix [DS-913]
+- NPE fix [DS-914]
+- [conf cloud] Diagram count restrictions on free tier [DFCC-57]
+- Fixes scroll issue for CMD key in Safari 16 [3017]
+- Enables autosize for multiple vertices [1116]
+- Adds ui/safe to fix possible XSS in math [CSP-733]
+
07-SEP-2022: 20.3.0
- Uses organic as default layout to fix possible NPE in CSV import [DS-910]
diff --git a/VERSION b/VERSION
index 695100c7..7639d857 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.3.0 \ No newline at end of file
+20.3.1 \ 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 6fec1d8a..79af176c 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2242,16 +2242,17 @@ EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=t
this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
-b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
+b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(0<b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
-this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);
+var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
+this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=
+f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
+e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");
+a&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -3502,20 +3503,20 @@ null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("imag
D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
-x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
-Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.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 m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.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 m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.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;e.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());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.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());e.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());
+try{for(var r=0;r<m.length;r++){var x=m[r];d.getModel().isVertex(x)&&(0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=
+d.getEditableCells(d.getSelectionCells()),x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==
+B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&
+(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);
+e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,
+x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();
+var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.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 m=d.pageFormat,
+r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.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 m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&
+0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.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;e.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());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});
+n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;
+e.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());e.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());
e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F],
@@ -3568,7 +3569,7 @@ this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0=
new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
@@ -3754,16 +3755,16 @@ Sidebar.prototype.electrical="LogicGates Resistors Capacitors Inductors Switches
{id:"pid2",prefix:"pid2",libs:"Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";")},{id:"signs",prefix:"signs",libs:Sidebar.prototype.signs},{id:"gcp",prefix:"gcp",libs:Sidebar.prototype.gcp},{id:"gcp2",prefix:"gcp2",libs:Sidebar.prototype.gcp2},{id:"gcpicons",prefix:"gcpicons",libs:Sidebar.prototype.gcpicons},
{id:"rack",prefix:"rack",libs:Sidebar.prototype.rack},{id:"electrical",prefix:"electrical",libs:Sidebar.prototype.electrical},{id:"aws2",prefix:"aws2",libs:Sidebar.prototype.aws2},{id:"aws3",prefix:"aws3",libs:Sidebar.prototype.aws3},{id:"aws4b",prefix:"aws4b",libs:Sidebar.prototype.aws4b},{id:"aws4",prefix:"aws4",libs:Sidebar.prototype.aws4},{id:"pid",prefix:"pid",libs:Sidebar.prototype.pids},{id:"cisco",prefix:"cisco",libs:Sidebar.prototype.cisco},{id:"cisco_safe",prefix:"cisco_safe",libs:Sidebar.prototype.cisco_safe},
{id:"office",prefix:"office",libs:Sidebar.prototype.office},{id:"veeam",prefix:"veeam",libs:Sidebar.prototype.veeam},{id:"veeam2",prefix:"veeam2",libs:Sidebar.prototype.veeam2},{id:"cabinets",libs:["cabinets"]},{id:"floorplan",libs:["floorplan"]},{id:"bootstrap",libs:["bootstrap"]},{id:"atlassian",libs:["atlassian"]},{id:"fluid_power",libs:["fluid_power"]},{id:"gmdl",prefix:"gmdl",libs:Sidebar.prototype.gmdl},{id:"archimate3",prefix:"archimate3",libs:Sidebar.prototype.archimate3},{id:"archimate",
-libs:["archimate"]},{id:"webicons",libs:["webicons","weblogos"]},{id:"sysml",prefix:"sysml",libs:Sidebar.prototype.sysml}];var a=Sidebar.prototype.addEntry;Sidebar.prototype.addEntry=function(h,k){return null!=this.currentSearchEntryLibrary&&null!=this.enabledLibraries&&0>mxUtils.indexOf(this.enabledLibraries,this.currentSearchEntryLibrary.id)?k:a.apply(this,arguments)};var c=Sidebar.prototype.refresh;Sidebar.prototype.refresh=function(){var h=this.editorUi;c.apply(this,arguments);null!=h.scratchpad&&
-h.loadLibrary(new StorageLibrary(h,h.scratchpad.getData(),".scratchpad"))};var d=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(h,k,l,m,n,p,q,t){if(null!=t&&1==m){var u=null;if(0<=mxUtils.indexOf(t,"text"))u="Double click anywhere in the diagram to insert text.";else for(var v="line lines arrow arrows connect connection connections connector connectors curve curves link links directed directional bidirectional".split(" "),w=0;w<v.length;w++)if(0<=mxUtils.indexOf(t,
-v[w])){u="Need help with connections?";break}if(null!=u&&!this.hideSearchHint){var r=document.createElement("a");r.setAttribute("href","https://youtu.be/Z0D96ZikMkc");r.setAttribute("target","_blank");r.className="geTitle";r.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;font-size:12px;";mxUtils.write(r,u);u=document.createElement("img");u.setAttribute("src",
-Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("hide"));u.className="geDialogClose";u.style.position="relative";u.style.cursor="default";u.style.top="1px";u.style.right="0px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(y){r.parentNode.removeChild(r);this.hideSearchHint=!0;mxEvent.consume(y)}));r.appendChild(u);h.appendChild(r);this.hideSearchHint=!0}}d.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(h,k){this.showPalettes(h,k)};Sidebar.prototype.togglePalette=
-function(h){this.showPalette(h)};Sidebar.prototype.showPalettes=function(h,k,l){for(var m=0;m<k.length;m++)this.showPalette(h+k[m],l)};Sidebar.prototype.showPalette=function(h,k){h=this.palettes[h];if(null!=h){k=null!=k?k?"block":"none":"none"==h[0].style.display?"block":"none";for(var l=0;l<h.length;l++)h[l].style.display=k}return h};Sidebar.prototype.getConfigurationById=function(h){for(var k=0;k<this.configuration.length;k++)if(this.configuration[k].id==h)return this.configuration[k];if(null!=
-this.customEntries)for(k=0;k<this.customEntries.length;k++)for(var l=this.customEntries[k],m=0;m<l.entries.length;m++){var n=l.entries[m];if(n.id==h)return{id:n.id,libs:n.libs}}return null};Sidebar.prototype.isEntryVisible=function(h){if(".scratchpad"==h)return null!=this.editorUi.scratchpad;var k=this.getConfigurationById(h);if(null!=k){var l=this.palettes[null!=k.libs?(k.prefix||"")+k.libs[0]:h];if(null!=l)return"none"!=l[0].style.display}if(null!=this.customEntries)for(k=0;k<this.customEntries.length;k++){l=
-this.customEntries[k];for(var m=0;m<l.entries.length;m++){var n=l.entries[m];if(n.id==h){if(null!=n.libs&&0<n.libs.length&&(l=this.palettes[n.id+".0"],null!=l))return"none"!=l[0].style.display;break}}}return!1};Sidebar.prototype.showEntries=function(h,k,l){var m=[];k&&(mxSettings.setLibraries(h),mxSettings.save());null!=h&&(l||0<h.length)?m.push(h):(h=!1,null!=urlParams.libs&&0<urlParams.libs.length&&(m.push(decodeURIComponent(urlParams.libs)),h="draw.io"==this.editorUi.getServiceName()),h||(null!=
-mxSettings&&null!=mxSettings.settings?m.push(mxSettings.getLibraries()):m.push(this.defaultEntries)));k=m.join(";").split(";");m={};for(h=0;h<k.length;h++)m[this.libAliases[k[h]]||k[h]]=!0;for(h=0;h<this.configuration.length;h++)"search"!=this.configuration[h].id&&this.showPalettes(this.configuration[h].prefix||"",this.configuration[h].libs||[this.configuration[h].id],1==m[this.configuration[h].id]);if(null!=this.customEntries)for(h=0;h<this.customEntries.length;h++)for(k=this.customEntries[h],l=
-0;l<k.entries.length;l++){var n=k.entries[l];if(null!=n.libs&&0<n.libs.length){for(var p=[],q=0;q<n.libs.length;q++)p.push(n.id+"."+q);this.showPalettes("",p,m[n.id])}}};Sidebar.prototype.init=function(){var h=[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),
-id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}];"1"==urlParams.sketch&&(h=[{title:mxResources.get("searchShapes"),id:"search"},{title:mxResources.get("scratchpad"),id:".scratchpad"}].concat(h));this.entries=[{title:mxResources.get("standard"),entries:h},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),
+libs:["archimate"]},{id:"webicons",libs:["webicons","weblogos"]},{id:"sysml",prefix:"sysml",libs:Sidebar.prototype.sysml}];var a=Sidebar.prototype.addEntry;Sidebar.prototype.addEntry=function(k,l){return null!=this.currentSearchEntryLibrary&&null!=this.enabledLibraries&&0>mxUtils.indexOf(this.enabledLibraries,this.currentSearchEntryLibrary.id)?l:a.apply(this,arguments)};var c=Sidebar.prototype.refresh;Sidebar.prototype.refresh=function(){var k=this.editorUi;c.apply(this,arguments);null!=k.scratchpad&&
+k.loadLibrary(new StorageLibrary(k,k.scratchpad.getData(),".scratchpad"))};var d=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(k,l,m,n,p,r,t,v){if(null!=v&&1==n){var u=null;if(0<=mxUtils.indexOf(v,"text"))u="Double click anywhere in the diagram to insert text.";else for(var w="line lines arrow arrows connect connection connections connector connectors curve curves link links directed directional bidirectional".split(" "),q=0;q<w.length;q++)if(0<=mxUtils.indexOf(v,
+w[q])){u="Need help with connections?";break}if(null!=u&&!this.hideSearchHint){var x=document.createElement("a");x.setAttribute("href","https://youtu.be/Z0D96ZikMkc");x.setAttribute("target","_blank");x.className="geTitle";x.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;font-size:12px;";mxUtils.write(x,u);u=document.createElement("img");u.setAttribute("src",
+Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("hide"));u.className="geDialogClose";u.style.position="relative";u.style.cursor="default";u.style.top="1px";u.style.right="0px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(y){x.parentNode.removeChild(x);this.hideSearchHint=!0;mxEvent.consume(y)}));x.appendChild(u);k.appendChild(x);this.hideSearchHint=!0}}d.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(k,l){this.showPalettes(k,l)};Sidebar.prototype.togglePalette=
+function(k){this.showPalette(k)};Sidebar.prototype.showPalettes=function(k,l,m){for(var n=0;n<l.length;n++)this.showPalette(k+l[n],m)};Sidebar.prototype.showPalette=function(k,l){k=this.palettes[k];if(null!=k){l=null!=l?l?"block":"none":"none"==k[0].style.display?"block":"none";for(var m=0;m<k.length;m++)k[m].style.display=l}return k};Sidebar.prototype.getConfigurationById=function(k){for(var l=0;l<this.configuration.length;l++)if(this.configuration[l].id==k)return this.configuration[l];if(null!=
+this.customEntries)for(l=0;l<this.customEntries.length;l++)for(var m=this.customEntries[l],n=0;n<m.entries.length;n++){var p=m.entries[n];if(p.id==k)return{id:p.id,libs:p.libs}}return null};Sidebar.prototype.isEntryVisible=function(k){if(".scratchpad"==k)return null!=this.editorUi.scratchpad;var l=this.getConfigurationById(k);if(null!=l){var m=this.palettes[null!=l.libs?(l.prefix||"")+l.libs[0]:k];if(null!=m)return"none"!=m[0].style.display}if(null!=this.customEntries)for(l=0;l<this.customEntries.length;l++){m=
+this.customEntries[l];for(var n=0;n<m.entries.length;n++){var p=m.entries[n];if(p.id==k){if(null!=p.libs&&0<p.libs.length&&(m=this.palettes[p.id+".0"],null!=m))return"none"!=m[0].style.display;break}}}return!1};Sidebar.prototype.showEntries=function(k,l,m){var n=[];l&&(mxSettings.setLibraries(k),mxSettings.save());null!=k&&(m||0<k.length)?n.push(k):(k=!1,null!=urlParams.libs&&0<urlParams.libs.length&&(n.push(decodeURIComponent(urlParams.libs)),k="draw.io"==this.editorUi.getServiceName()),k||(null!=
+mxSettings&&null!=mxSettings.settings?n.push(mxSettings.getLibraries()):n.push(this.defaultEntries)));l=n.join(";").split(";");n={};for(k=0;k<l.length;k++)n[this.libAliases[l[k]]||l[k]]=!0;for(k=0;k<this.configuration.length;k++)"search"!=this.configuration[k].id&&this.showPalettes(this.configuration[k].prefix||"",this.configuration[k].libs||[this.configuration[k].id],1==n[this.configuration[k].id]);if(null!=this.customEntries)for(k=0;k<this.customEntries.length;k++)for(l=this.customEntries[k],m=
+0;m<l.entries.length;m++){var p=l.entries[m];if(null!=p.libs&&0<p.libs.length){for(var r=[],t=0;t<p.libs.length;t++)r.push(p.id+"."+t);this.showPalettes("",r,n[p.id])}}};Sidebar.prototype.init=function(){var k=[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),
+id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}];"1"==urlParams.sketch&&(k=[{title:mxResources.get("searchShapes"),id:"search"},{title:mxResources.get("scratchpad"),id:".scratchpad"}].concat(k));this.entries=[{title:mxResources.get("standard"),entries:k},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),
id:"android",image:IMAGE_PATH+"/sidebar-android.png"},{title:"Atlassian",id:"atlassian",image:IMAGE_PATH+"/sidebar-atlassian.png"},{title:mxResources.get("bootstrap"),id:"bootstrap",image:IMAGE_PATH+"/sidebar-bootstrap.png"},{title:"C4",id:"c4",image:IMAGE_PATH+"/sidebar-c4.png"},{title:"Data Flow Diagram",id:"dfd",image:IMAGE_PATH+"/sidebar-dfd.png"},{title:mxResources.get("entityRelation"),id:"er",image:IMAGE_PATH+"/sidebar-er.png"},{title:mxResources.get("ios"),id:"ios",image:IMAGE_PATH+"/sidebar-ios.png"},
{title:mxResources.get("mockups"),id:"mockups",image:IMAGE_PATH+"/sidebar-mockups.png"},{title:"Sitemap",id:"sitemap",image:IMAGE_PATH+"/sidebar-sitemap.png"},{title:mxResources.get("uml")+" 2.5",id:"uml25",image:IMAGE_PATH+"/sidebar-uml25.png"},{title:mxResources.get("uml"),id:"uml",image:IMAGE_PATH+"/sidebar-uml.png"}]},{title:mxResources.get("networking"),entries:[{title:"Allied Telesis",id:"allied_telesis",image:IMAGE_PATH+"/sidebar-allied_telesis.png"},{title:"AWS17",id:"aws3",image:IMAGE_PATH+
"/sidebar-aws3.png"},{title:"AWS18",id:"aws4b",image:IMAGE_PATH+"/sidebar-aws4b.png"},{title:"AWS19",id:"aws4",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:mxResources.get("aws3d"),id:"aws3d",image:IMAGE_PATH+"/sidebar-aws3d.png"},{title:mxResources.get("azure"),id:"azure2",image:IMAGE_PATH+"/sidebar-azure.png"},{title:"Cloud & Enterprise",id:"mscae",image:IMAGE_PATH+"/sidebar-mscae.png"},{title:mxResources.get("cisco"),id:"cisco",image:IMAGE_PATH+"/sidebar-cisco.png"},{title:"Cisco19",id:"cisco19",
@@ -3772,36 +3773,37 @@ image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:
{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn")+" 2.0",id:"bpmn2",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"},{title:"Value Stream Mapping",id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",
id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:"Fluid Power (ISO 1219)",id:"fluid_power",image:IMAGE_PATH+"/sidebar-fluid_power.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},
{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Threat Modeling",id:"threatModeling",image:IMAGE_PATH+"/sidebar-threatmodeling.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&
-(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=k.getElementsByTagName("svg");
-var q=(Math.ceil(p.length/6)+1)*this.thumbHeight,t=Graph.createSvgNode(0,0,456,q,"#ffffff"),u=new mxSvgCanvas2D(t);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var v=h.childNodes,w=0;w<v.length;w++)if(v[w].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(v[w]));break}for(w=0;w<p.length;w++)u=p[w].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
-u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(w,6)),u.setAttribute("y",24+68*Math.floor(w/6)),t.appendChild(u);this.editorUi.editor.convertImages(t,mxUtils.bind(this,function(y){var x=document.createElement("canvas");x.width=456;x.height=q;var z=document.createElement("img");z.onload=mxUtils.bind(this,function(){x.getContext("2d").drawImage(z,0,0);this.editorUi.saveCanvas(x,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(t);z.src=Editor.createSvgDataUri(y)}))}else{if("none"==
-k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var r=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=r;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);
-mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=
-function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<
-k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<
-h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
-Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,
-C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(x.title))):
-(D.style.display="none",F.innerText="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerText="";mxUtils.write(C,mxResources.get("loading")+
-"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerText="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));
-else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?
-(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",
-";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+(Sidebar.prototype.addFoldingHandler=function(k,l,m){var n=!1;if(!mxClient.IS_IE||8<=document.documentMode)k.style.backgroundImage="none"==l.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="0% 50%";var p=document.createElement("button");p.style.marginLeft="4px";mxUtils.write(p,"Save");mxEvent.addListener(k,"click",mxUtils.bind(this,function(r){if("BUTTON"==mxEvent.getSource(r).nodeName){r=l.getElementsByTagName("svg");
+var t=(Math.ceil(r.length/6)+1)*this.thumbHeight,v=Graph.createSvgNode(0,0,456,t,"#ffffff"),u=new mxSvgCanvas2D(v);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var w=k.childNodes,q=0;q<w.length;q++)if(w[q].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(w[q]));break}for(q=0;q<r.length;q++)u=r[q].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
+u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(q,6)),u.setAttribute("y",24+68*Math.floor(q/6)),v.appendChild(u);this.editorUi.editor.convertImages(v,mxUtils.bind(this,function(y){var z=document.createElement("canvas");z.width=456;z.height=t;var A=document.createElement("img");A.onload=mxUtils.bind(this,function(){z.getContext("2d").drawImage(A,0,0);this.editorUi.saveCanvas(z,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(v);A.src=Editor.createSvgDataUri(y)}))}else{if("none"==
+l.style.display){if(n)k.appendChild(p);else if(n=!0,null!=m){null!=p.parentNode&&p.parentNode.removeChild(p);k.style.cursor="wait";var x=k.innerHTML;k.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){m(l);k.style.cursor="";k.innerHTML=x;k.appendChild(p)},0)}else k.appendChild(p);k.style.backgroundImage="url('"+this.expandedImage+"')";l.style.display="block"}else k.style.backgroundImage="url('"+this.collapsedImage+"')",l.style.display="none",null!=p.parentNode&&p.parentNode.removeChild(p);
+mxEvent.consume(r)}}))});Sidebar.prototype.extractShapeStyle=function(k){if(null!=k&&"shape="==k.substring(0,6)){var l=k.indexOf(";");0>l&&(l=k.length);return k.substring(6,l)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(k,l,m){var n=b.apply(this,arguments);null!=this.shapetags&&(k=k.toLowerCase(),l=l.toLowerCase(),null!=this.shapetags[k]&&n.push(this.shapetags[k]),l=k+"."+l,null!=this.shapetags[l]&&n.push(this.shapetags[l]));return n};Sidebar.prototype.addTagIndex=
+function(k){k=k.split("\n");for(var l=0;l<k.length;l++)if(null!=k[l]){var m=k[l].split("\t");if(1<m.length){var n=m[0].toLowerCase().replace(" ","_");m=mxUtils.trim(m.slice(1,m.length).join(" ").toLowerCase());0<m.length&&(this.shapetags[n]=m)}}};Sidebar.prototype.showPopupMenuForEntry=function(k,l,m){if(null!=l&&0<l.length){var n=mxUtils.getOffset(k);this.editorUi.showPopupMenu(mxUtils.bind(this,function(p,r){p.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var t=0;t<
+l.length;t++)mxUtils.bind(this,function(v){v=this.getConfigurationById(v.id);if(null!=v){this.showPalettes(v.prefix||"",v.libs||[v.id],!0);var u=this.showPalette(l[t].lib||l[t].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(m)}})(l[t])}))}),n.x,n.y+k.offsetHeight,m)}};Sidebar.prototype.addSearchIndex=function(k){if(null!=k)for(var l=0;l<
+k.length;l++)if(null!=k[l].style){var m=k[l].style,n=this.extractShapeStyle(m);if(null!=n){var p=n.lastIndexOf(".");if(0<p){var r=n.substring(0,p);n=n.substring(p+1,n.length);p=this.getTagsForStencil(r,n,k[l].tags);if(null!=p){var t=m.indexOf(";");m="shape="+r+"."+n.toLowerCase()+";"+(0>t?"":m.substring(t+1));this.setCurrentSearchEntryLibrary(k[l].id,k[l].lib);this.createVertexTemplateEntry(m,parseInt(k[l].w),parseInt(k[l].h),"",n.replace(/_/g," "),null,null,this.filterTags(p.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
+Sidebar.prototype.initPalettes=function(){var k=GRAPH_IMAGE_PATH,l=STENCIL_PATH,m=this.signs,n=this.rack,p=this.pids,r=this.cisco,t=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var v=0,u=0;u<this.customEntries.length;u++)for(var w=this.customEntries[u],q=0;q<w.entries.length;q++)for(var x=w.entries[q],y=0;y<x.libs.length;y++)mxUtils.bind(this,function(z){var A=null,D=null,G=null,F=null,L=mxUtils.bind(this,function(B,
+C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,B);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),H=mxUtils.bind(this,function(){null!=G&&null!=F&&(null!=D?(G.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(z.title)),L(D,G)):null!=A?(this.editorUi.addLibraryEntries(A,G),G.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(z.title))):
+(G.style.display="none",F.innerText="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==z.data&&null!=z.url&&!z.preload&&v>=this.maxPreloadCount)this.addPalette(x.id+"."+y,this.editorUi.getResource(z.title),!1,mxUtils.bind(this,function(B,C){var E=mxUtils.bind(this,function(I){this.setCurrentSearchEntryLibrary(x.id,x.id+"."+y);this.addEntries(I);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(I,B)});B.style.display="none";C.innerText="";mxUtils.write(C,mxResources.get("loading")+
+"...");var J=z.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(I){B.style.display="block";C.innerText="";mxUtils.write(C,this.editorUi.getResource(z.title));try{var M=mxUtils.parseXml(I);if("mxlibrary"==M.documentElement.nodeName){var N=JSON.parse(mxUtils.getTextContent(M.documentElement));E(N)}else L(mxResources.get("notALibraryFile"),B)}catch(O){L(mxResources.get("error")+": "+O.message,B)}}))}));
+else if(this.addPalette(x.id+"."+y,this.editorUi.getResource(z.title),!1,mxUtils.bind(this,function(B,C){G=B;F=C;H()})),null!=z.data)this.setCurrentSearchEntryLibrary(x.id,x.id+"."+y),this.addEntries(z.data),this.setCurrentSearchEntryLibrary(),A=z.data,H();else if(null!=z.url){v++;var K=z.url;this.editorUi.editor.isCorsEnabledForUrl(K)||(K=PROXY_URL+"?url="+encodeURIComponent(K));this.editorUi.editor.loadUrl(K,mxUtils.bind(this,function(B){try{var C=mxUtils.parseXml(B);"mxlibrary"==C.documentElement.nodeName?
+(A=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(A)):D=mxResources.get("notALibraryFile");H()}catch(E){D=mxResources.get("error")+": "+E.message,H()}}),mxUtils.bind(this,function(B){D=null!=B&&null!=B.message?B.message:B;H()}))}else D=mxResources.get("invalidInput"),H()})(x.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),l+"/arrows.xml",
+";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",k+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.setCurrentSearchEntryLibrary("clipart","finance");
-this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
-"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
+this.addImagePalette("finance","Clipart / Finance",k+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",k+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
+"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",k+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",
-Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
-this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",h+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
-this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(p,k);this.addCisco19Palette();this.addCiscoSafePalette();
-this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(m,k);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(q,k);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
-this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(n,k);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(l,k);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(h,k,l,m,n,p,q,t,u,v){e.apply(this,arguments);q=null!=q?q:1;mxStencilRegistry.loadStencilSet(l,
-mxUtils.bind(this,function(w,r,y,x,z){if(null!=this.createdSearchIndex&&null==n||0>mxUtils.indexOf(n,r))w={style:"shape="+w+r+m,w:Math.round(x*q),h:Math.round(z*q)},r=null!=t?t[r]:null,null!=r&&(w.tags=r),null!=v&&(w.id=v,w.lib=h),this.createdSearchIndex.push(w)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(h,k){for(var l=0;l<h.icons.length;l++){for(var m=h.icons[l].raster_sizes,n=m.length-1;0<n&&128<m[n].size;)n--;var p=m[n].size;m=m[n].formats[0].preview_url;null!=p&&null!=m&&mxUtils.bind(this,
-function(q,t){k.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+t,q,q,"")}))})(p,m)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(h,k,l,m,n){var p=m;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(m=mxUtils.bind(this,
-function(q,t,u,v){!this.editorUi.isOffline()&&q.length<=k/4?(u=l-Math.ceil((t-k/4)/k),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(h)+"&p="+u+"&c="+k,mxUtils.bind(this,function(w){try{if(200<=w.getStatus()&&299>=w.getStatus()&&null!=w.getText()&&0<w.getText().length)try{var r=JSON.parse(w.getText());null==r||null==r.icons?(p(q,t,!1,v),this.editorUi.handleError(r)):(this.extractIconsFromResponse(r,q),p(q,(l-1)*k+q.length,r.icons.length==k,v))}catch(y){p(q,t,!1,v),this.editorUi.handleError(y)}else p(q,
-t,!1,v)}catch(y){p(q,t,!1,v),this.editorUi.handleError(y)}},function(){p(q,t,!1,v)}))):p(q,t,u||!this.editorUi.isOffline(),v)}));f.apply(this,arguments)};var g=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(h,k,l){var m=this.editorUi.editor.graph,n=!1;if(null!=h&&1==m.getSelectionCount()&&m.getModel().isVertex(h[0])){var p=m.cloneCell(h[0]);if(m.getModel().isEdge(m.getSelectionCell())&&null==m.getModel().getTerminal(m.getSelectionCell(),!1)&&m.getModel().isVertex(p)){m.getModel().beginUpdate();
-try{var q=m.view.getState(m.getSelectionCell());if(null!=q){var t=m.view.translate,u=m.view.scale,v=q.absolutePoints[q.absolutePoints.length-1];p.geometry.x=v.x/u-t.x-p.geometry.width/2;p.geometry.y=v.y/u-t.y-p.geometry.height/2}m.addCell(p);m.getModel().setTerminal(m.getSelectionCell(),p,!1);null!=l&&mxEvent.isShiftDown(l)||m.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}catch(w){this.editorUi.handleError(w)}finally{m.getModel().endUpdate()}m.scrollCellToVisible(p);m.setSelectionCell(p);
-n=!0}}n||g.apply(this,arguments)}})();(function(){Sidebar.prototype.addActiveDirectoryPalette=function(){this.setCurrentSearchEntryLibrary("active_directory");var a=[this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/active_directory.svg;",50,42.5,"","Active Directory",!1,null,this.getTagsForStencil("ms active directory ","active directory","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cd_dvd.svg;",
+Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",k+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
+this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",k+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
+this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(r,l);this.addCisco19Palette();this.addCiscoSafePalette();
+this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(n,l);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(t,l);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
+this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(p,l);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(m,l);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(k,l,m,n,p,r,t,v,u,w){e.apply(this,arguments);t=null!=t?t:1;mxStencilRegistry.loadStencilSet(m,
+mxUtils.bind(this,function(q,x,y,z,A){if(null!=this.createdSearchIndex&&null==p||0>mxUtils.indexOf(p,x))q={style:"shape="+q+x+n,w:Math.round(z*t),h:Math.round(A*t)},x=null!=v?v[x]:null,null!=x&&(q.tags=x),null!=w&&(q.id=w,q.lib=k),this.createdSearchIndex.push(q)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(k,l){for(var m=0;m<k.icons.length;m++){for(var n=k.icons[m].raster_sizes,p=n.length-1;0<p&&128<n[p].size;)p--;var r=n[p].size;n=n[p].formats[0].preview_url;null!=r&&null!=n&&mxUtils.bind(this,
+function(t,v){l.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+v,t,t,"")}))})(r,n)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(k,l,m,n,p){var r=n;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(n=mxUtils.bind(this,
+function(t,v,u,w){!this.editorUi.isOffline()&&t.length<=l/4?(u=m-Math.ceil((v-l/4)/l),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(k)+"&p="+u+"&c="+l,mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()&&null!=q.getText()&&0<q.getText().length)try{var x=JSON.parse(q.getText());null==x||null==x.icons?(r(t,v,!1,w),this.editorUi.handleError(x)):(this.extractIconsFromResponse(x,t),r(t,(m-1)*l+t.length,x.icons.length==l,w))}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}else r(t,
+v,!1,w)}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}},function(){r(t,v,!1,w)}))):r(t,v,u||!this.editorUi.isOffline(),w)}));f.apply(this,arguments)};var g=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(k,l){if("sketch"==Editor.currentTheme||"min"==uiTheme){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.sketchPickerMenuElt,k)){var m=mxUtils.getOffset(this.editorUi.sketchPickerMenuElt);m.x+=this.editorUi.sketchPickerMenuElt.offsetWidth+
+4;m.y+=k.offsetTop-l.height/2+16;return m}var n=g.apply(this,arguments);m=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);n.x+=m.x-16;n.y+=m.y;return n}return g.apply(this,arguments)};var h=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(k,l,m){var n=this.editorUi.editor.graph,p=!1;if(null!=k&&1==n.getSelectionCount()&&n.getModel().isVertex(k[0])){var r=n.cloneCell(k[0]);if(n.getModel().isEdge(n.getSelectionCell())&&null==n.getModel().getTerminal(n.getSelectionCell(),
+!1)&&n.getModel().isVertex(r)){n.getModel().beginUpdate();try{var t=n.view.getState(n.getSelectionCell());if(null!=t){var v=n.view.translate,u=n.view.scale,w=t.absolutePoints[t.absolutePoints.length-1];r.geometry.x=w.x/u-v.x-r.geometry.width/2;r.geometry.y=w.y/u-v.y-r.geometry.height/2}n.addCell(r);n.getModel().setTerminal(n.getSelectionCell(),r,!1);null!=m&&mxEvent.isShiftDown(m)||n.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}catch(q){this.editorUi.handleError(q)}finally{n.getModel().endUpdate()}n.scrollCellToVisible(r);
+n.setSelectionCell(r);p=!0}}p||h.apply(this,arguments)}})();(function(){Sidebar.prototype.addActiveDirectoryPalette=function(){this.setCurrentSearchEntryLibrary("active_directory");var a=[this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/active_directory.svg;",50,42.5,"","Active Directory",!1,null,this.getTagsForStencil("ms active directory ","active directory","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cd_dvd.svg;",
50,50,"","CD / DVD",!1,null,this.getTagsForStencil("ms active directory ","cd dvd compact digital video disc","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cell_phone.svg;",21,50,"","Cell Phone",!1,null,this.getTagsForStencil("ms active directory ","cell phone","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cluster_server.svg;",
50,50,"","Cluster Server",!1,null,this.getTagsForStencil("ms active directory ","active","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/community_discussion.svg;",50,45,"","Community Discussion",!1,null,this.getTagsForStencil("ms active directory ","community discussion","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/data_jack.svg;",
50*.55,50,"","Data Jack",!1,null,this.getTagsForStencil("ms active directory ","data jack","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/database.svg;",50,37,"","Database",!1,null,this.getTagsForStencil("ms active directory ","database","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/database_cube.svg;",
@@ -5487,9 +5489,9 @@ b.vertex=!0;return a.createVertexTemplateFromCells([d,b],800,30,"Form grid")}),t
new mxGeometry(400,0,400,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");e.vertex=!0;var f=new mxCell("",new mxGeometry(405,30,395,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");f.vertex=!0;var g=new mxCell("Address",new mxGeometry(0,70,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");g.vertex=!0;var h=new mxCell("1234 Main St",
new mxGeometry(0,100,800,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");h.vertex=!0;var k=new mxCell("Address 2",new mxGeometry(0,140,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");k.vertex=!0;var l=new mxCell("Apartment, studio or floor",new mxGeometry(0,170,800,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
l.vertex=!0;var m=new mxCell("City",new mxGeometry(0,210,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");m.vertex=!0;var n=new mxCell("",new mxGeometry(0,240,390,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");n.vertex=!0;var p=new mxCell("State",new mxGeometry(410,210,220,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
-p.vertex=!0;var q=new mxCell("Choose...",new mxGeometry(410,240,270,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");q.vertex=!0;var t=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#212529;strokeColor=none;perimeter=none;");t.geometry.relative=!0;t.geometry.offset=new mxPoint(-17,-2.5);t.vertex=!0;q.insert(t);t=new mxCell("Zip",new mxGeometry(700,210,100,
-30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");t.vertex=!0;var u=new mxCell("",new mxGeometry(700,240,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");u.vertex=!0;var v=new mxCell("Check me out",new mxGeometry(0,290,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;checked=0;spacing=5;strokeColor=#999999;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;");
-v.vertex=!0;var w=new mxCell("Sign in",new mxGeometry(0,320,70,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;fontSize=14;fontColor=#FFFFFF;");w.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v,w],800,360,"Grid layout")}),this.addEntry("bootstrap horizontal form",function(){var d=new mxCell("Email",new mxGeometry(0,0,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
+p.vertex=!0;var r=new mxCell("Choose...",new mxGeometry(410,240,270,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");r.vertex=!0;var t=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#212529;strokeColor=none;perimeter=none;");t.geometry.relative=!0;t.geometry.offset=new mxPoint(-17,-2.5);t.vertex=!0;r.insert(t);t=new mxCell("Zip",new mxGeometry(700,210,100,
+30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");t.vertex=!0;var v=new mxCell("",new mxGeometry(700,240,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");v.vertex=!0;var u=new mxCell("Check me out",new mxGeometry(0,290,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;checked=0;spacing=5;strokeColor=#999999;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;");
+u.vertex=!0;var w=new mxCell("Sign in",new mxGeometry(0,320,70,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;fontSize=14;fontColor=#FFFFFF;");w.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u,w],800,360,"Grid layout")}),this.addEntry("bootstrap horizontal form",function(){var d=new mxCell("Email",new mxGeometry(0,0,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(200,0,600,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");b.vertex=!0;var e=new mxCell("Password",new mxGeometry(0,40,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");e.vertex=!0;var f=new mxCell("",new mxGeometry(200,40,600,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
f.vertex=!0;var g=new mxCell("Radios",new mxGeometry(0,80,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");g.vertex=!0;var h=new mxCell("First radio",new mxGeometry(200,90,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#666666;checked=1;spacing=5;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");
h.vertex=!0;var k=new mxCell("Second radio",new mxGeometry(200,110,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#666666;checked=0;spacing=5;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");k.vertex=!0;var l=new mxCell("Third disabled radio",new mxGeometry(200,130,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#D2D2D2;checked=0;spacing=5;fontColor=#7D868C;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");
@@ -5512,8 +5514,8 @@ new mxGeometry(270,0,100,30),"fillColor=none;strokeColor=none;align=left;fontSiz
"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacingLeft=50;fontSize=14;fontColor=#6C767D;");h.vertex=!0;var k=new mxCell("@",new mxGeometry(0,0,40,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.leftButton;rSize=5;strokeColor=#CED4DA;fillColor=#f0f0f0;whiteSpace=wrap;resizeHeight=1;fontColor=#495057;");k.geometry.relative=!0;k.vertex=!0;h.insert(k);k=new mxCell("City",new mxGeometry(0,80,100,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(0,110,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");l.vertex=!0;var m=new mxCell("State",new mxGeometry(400,80,100,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");m.vertex=!0;var n=new mxCell("Choose...",new mxGeometry(400,110,200,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
n.vertex=!0;var p=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=south;fillColor=#343A40;strokeColor=none;perimeter=none;");p.geometry.relative=!0;p.geometry.offset=new mxPoint(-17,1);p.vertex=!0;n.insert(p);p=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=north;fillColor=#343A40;strokeColor=none;perimeter=none;");p.geometry.relative=!0;p.geometry.offset=new mxPoint(-17,-4);p.vertex=!0;n.insert(p);p=new mxCell("Zip",new mxGeometry(610,80,190,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");
-p.vertex=!0;var q=new mxCell("",new mxGeometry(610,110,190,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");q.vertex=!0;var t=new mxCell("Agree to term and conditions",new mxGeometry(0,170,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#A6A6A6;checked=0;spacing=5;checkedFill=#0085FC;checkedStroke=#ffffff;");
-t.vertex=!0;var u=new mxCell("Submit form",new mxGeometry(0,200,120,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;spacing=15;fontSize=14;fontColor=#ffffff;");u.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u],800,240,"Help text")}),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#ffffff;fontColor=#212529;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",
+p.vertex=!0;var r=new mxCell("",new mxGeometry(610,110,190,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");r.vertex=!0;var t=new mxCell("Agree to term and conditions",new mxGeometry(0,170,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#A6A6A6;checked=0;spacing=5;checkedFill=#0085FC;checkedStroke=#ffffff;");
+t.vertex=!0;var v=new mxCell("Submit form",new mxGeometry(0,200,120,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;spacing=15;fontSize=14;fontColor=#ffffff;");v.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v],800,240,"Help text")}),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#ffffff;fontColor=#212529;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",
20,10,"Toggle this switch element","Switch",null,null,this.getTagsForStencil("mxgraph.bootstrap","switch","bootstrap switch").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#E9ECEF;fontColor=#7D868C;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",20,10,"Disabled switch element","Switch",null,
null,this.getTagsForStencil("mxgraph.bootstrap","switch","bootstrap switch").join(" ")),this.addEntry("bootstrap select menu",function(){var d=new mxCell("Open this select menu",new mxGeometry(0,0,800,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");d.vertex=!0;var b=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=south;fillColor=#343A40;strokeColor=none;perimeter=none;");
b.geometry.relative=!0;b.geometry.offset=new mxPoint(-17,1);b.vertex=!0;d.insert(b);b=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=north;fillColor=#343A40;strokeColor=none;perimeter=none;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(-17,-4);b.vertex=!0;d.insert(b);return a.createVertexTemplateFromCells([d],800,40,"Select menu")}),this.addEntry("bootstrap form controls",function(){var d=new mxCell("",new mxGeometry(0,0,800,100),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
@@ -6028,9 +6030,9 @@ this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=w
this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",20,350,"40x40","Panel Wiring System 40x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",30,350,"60x40","Panel Wiring System 60x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),
this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",40,350,"80x40","Panel Wiring System 80x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",50,350,"100x40","Panel Wiring System 100x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),
this.createVertexTemplateEntry(a+"cb_1p;",9,50,"","Circuit Breaker (1P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_1p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,9,50),a+"cb_1p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(9,0,9,50),a+"cb_1p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(18,0,9,50),a+"cb_1p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(27,0,9,50),a+"cb_1p;");h.vertex=!0;var k=new mxCell("",
-new mxGeometry(36,0,9,50),a+"cb_1p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(45,0,9,50),a+"cb_1p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(54,0,9,50),a+"cb_1p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(63,0,9,50),a+"cb_1p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(72,0,9,50),a+"cb_1p;");p.vertex=!0;var q=new mxCell("",new mxGeometry(81,0,9,50),a+"cb_1p;");q.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,q],90,50,"Circuit Breaker (1P x 10)")}),this.createVertexTemplateEntry(a+
+new mxGeometry(36,0,9,50),a+"cb_1p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(45,0,9,50),a+"cb_1p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(54,0,9,50),a+"cb_1p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(63,0,9,50),a+"cb_1p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(72,0,9,50),a+"cb_1p;");p.vertex=!0;var r=new mxCell("",new mxGeometry(81,0,9,50),a+"cb_1p;");r.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,r],90,50,"Circuit Breaker (1P x 10)")}),this.createVertexTemplateEntry(a+
"cb_2p;",18,50,"","Circuit Breaker (2P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_2p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,18,50),a+"cb_2p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(18,0,18,50),a+"cb_2p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(36,0,18,50),a+"cb_2p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(54,0,18,50),a+"cb_2p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(72,0,
-18,50),a+"cb_2p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(90,0,18,50),a+"cb_2p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(108,0,18,50),a+"cb_2p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(126,0,18,50),a+"cb_2p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(144,0,18,50),a+"cb_2p;");p.vertex=!0;var q=new mxCell("",new mxGeometry(162,0,18,50),a+"cb_2p;");q.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,q],180,50,"Circuit Breaker (2P x 10)")}),this.createVertexTemplateEntry(a+
+18,50),a+"cb_2p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(90,0,18,50),a+"cb_2p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(108,0,18,50),a+"cb_2p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(126,0,18,50),a+"cb_2p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(144,0,18,50),a+"cb_2p;");p.vertex=!0;var r=new mxCell("",new mxGeometry(162,0,18,50),a+"cb_2p;");r.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,r],180,50,"Circuit Breaker (2P x 10)")}),this.createVertexTemplateEntry(a+
"cb_3p;",27,50,"","Circuit Breaker (3P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_3p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,27,50),a+"cb_3p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(27,0,27,50),a+"cb_3p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(54,0,27,50),a+"cb_3p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(81,0,27,50),a+"cb_3p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(108,
0,27,50),a+"cb_3p;");k.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k],135,50,"Circuit Breaker (3P x 5)")}),this.createVertexTemplateEntry(a+"cb_4p;",36,50,"","Circuit Breaker (4P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_4p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,36,50),a+"cb_4p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(36,0,36,50),a+"cb_4p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(72,
0,36,50),a+"cb_4p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(108,0,36,50),a+"cb_4p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(144,0,36,50),a+"cb_4p;");k.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k],180,50,"Circuit Breaker (4P x 5)")}),this.createVertexTemplateEntry(a+"cb_auxiliary_contact;",4.5,50,"","Auxiliary Contact (Circuit Breaker)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_auxiliary_contact","cabinet ").join(" ")),this.createVertexTemplateEntry(a+
@@ -6500,8 +6502,8 @@ this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=ce
150,90,"","Message Store",null,null,this.getTagsForStencil("mxgraph.eip","message_store","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.smart_proxy;fillColor=#c0f5a9",70,90,"","Smart Proxy",null,null,this.getTagsForStencil("mxgraph.eip","smart_proxy","eip enterprise integration pattern system management ").join(" ")),
this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.test_message;fillColor=#c0f5a9",150,90,"","Test Message",null,null,this.getTagsForStencil("mxgraph.eip","test_message","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.wire_tap;fillColor=#c0f5a9",
150,90,"","Wire Tap",null,null,this.getTagsForStencil("mxgraph.eip","wire_tap","eip enterprise integration pattern system management ").join(" "))])}})();(function(){Sidebar.prototype.addElectricalPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;shadow=0;dashed=0;align=center;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_SHAPE,c=a+"=mxgraph.electrical.abstract.",d="pointerEvents=1;"+a+"=mxgraph.electrical.capacitors.",b="pointerEvents=1;fillColor=strokeColor;"+a+"=mxgraph.electrical.diodes.",e="pointerEvents=1;"+a+"=mxgraph.electrical.inductors.",f="pointerEvents=1;"+a+"=mxgraph.electrical.miscellaneous.",
-g="pointerEvents=1;"+a+"=mxgraph.electrical.electro-mechanical.",h=a+"=mxgraph.electrical.logic_gates.",k=a+"=mxgraph.electrical.mosfets1.",l=a+"=mxgraph.electrical.transistors.",m=a+"=mxgraph.electrical.opto_electronics.",n="pointerEvents=1;"+a+"=mxgraph.electrical.plc_ladder.",p=a+"=mxgraph.electrical.radio.",q="pointerEvents=1;"+a+"=mxgraph.electrical.resistors.",t="pointerEvents=1;"+a+"=mxgraph.electrical.signal_sources.",u=a+"=mxgraph.electrical.thermionic_devices.",v="pointerEvents=1;"+a+"=mxgraph.electrical.waveforms.",
-w="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",r=a+"=mxgraph.electrical.iec_logic_gates.",y=a+"=mxgraph.electrical.rot_mech.",x=a+"=mxgraph.electrical.transmission.";this.setCurrentSearchEntryLibrary("electrical","electricalLogicGates");this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(h+"logic_gate;operation=and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),
+g="pointerEvents=1;"+a+"=mxgraph.electrical.electro-mechanical.",h=a+"=mxgraph.electrical.logic_gates.",k=a+"=mxgraph.electrical.mosfets1.",l=a+"=mxgraph.electrical.transistors.",m=a+"=mxgraph.electrical.opto_electronics.",n="pointerEvents=1;"+a+"=mxgraph.electrical.plc_ladder.",p=a+"=mxgraph.electrical.radio.",r="pointerEvents=1;"+a+"=mxgraph.electrical.resistors.",t="pointerEvents=1;"+a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",u="pointerEvents=1;"+a+"=mxgraph.electrical.waveforms.",
+w="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",q=a+"=mxgraph.electrical.iec_logic_gates.",x=a+"=mxgraph.electrical.rot_mech.",y=a+"=mxgraph.electrical.transmission.";this.setCurrentSearchEntryLibrary("electrical","electricalLogicGates");this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(h+"logic_gate;operation=and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(h+"buffer2;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_flip-flop;",100,80,"","D Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_flip-flop_with_clear_2;",100,90,"","D Type Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
"d_type_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_rs_flip-flop;",100,100,"","D Type RS Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_rs_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"inverter_2",100,60,"","Inverter",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverter","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"inverting_contact;",
10,10,"","Inverting Contact",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverting_contact","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"jk_flip-flop;",100,80,"","JK Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"jk_flip-flop_with_clear_2;",100,90,"","JK Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
@@ -6509,18 +6511,18 @@ this.createVertexTemplateEntry(h+"buffer2;",100,60,"","Buffer",null,null,this.ge
"logic_gate;operation=or;",100,60,"","OR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","or","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=or;negating=1;negSize=0.15;",100,60,"","NOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"rs_latch;",100,80,"","RS Latch",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","rs_latch",
"electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"synchronous_rs_latch;",100,80,"","RS Latch (Synchronous)",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","synchronous_rs_latch","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"schmitt_trigger;",100,60,"","Schmitt Trigger",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","schmitt_trigger","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"t_type_flip-flop;",
100,80,"","T Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","t_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=xor;negating=1;negSize=0.15;",100,60,"","XNOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
-"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(r+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"nand_2;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"nor_2;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"not_2;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(q+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"nand_2;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"nor_2;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"not_2;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry("shadow=0;dashed=0;align=center;html=1;strokeWidth=1;shape=mxgraph.electrical.logic_gates.dual_inline_ic;labelNames=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;",100,200,"IC","Dual In-Line IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","dual inline in line ic integrated circuit","electrical logic gate ").join(" ")),this.createVertexTemplateEntry("shadow=0;dashed=0;align=center;html=1;strokeWidth=1;shape=mxgraph.electrical.logic_gates.qfp_ic;labelNames=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1;",
-200,200,"IC","Quad Flat Package IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","quad flat package qfp ic integrated circuit","electrical logic gate ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalResistors");this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(q+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"potentiometer_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_resistor_1;",
-100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"variable_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"variable_resistor_2;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","variable_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor_with_instrument_or_relay_shunt;",100,20,"","Resistor (Instrument/Relay Shunt)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_with_instrument_or_relay_shunt","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"attenuator;",100,60,"","Attenuator",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","attenuator","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor,_adjustable_contact;",100,40,"","Resistor (Adjustable Contact)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_adjustable_contact","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor,_shunt;",100,45,"","Resistor (Shunt)",null,
-null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_shunt","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"symmetrical_varistor;",100,60,"","Varistor (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_varistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"tapped_resistor;",100,40,"","Resistor (Tapped)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","tapped_resistor","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"nonlinear_resistor;",100,60,"","Resistor (Nonlinear)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","nonlinear_resistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"memristor_1;",100,20,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","memristor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"memristor_2;",100,24,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"memristor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"magnetoresistor;",100,60,"","Magnetoresistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","magnetoresistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"symmetrical_photoconductive_transducer;",100,40,"","Photoconductive Transducer (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_photoconductive_transducer","electrical resistor ").join(" "))]);
+200,200,"IC","Quad Flat Package IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","quad flat package qfp ic integrated circuit","electrical logic gate ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalResistors");this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(r+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"potentiometer_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_resistor_1;",
+100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"variable_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"variable_resistor_2;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","variable_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor_with_instrument_or_relay_shunt;",100,20,"","Resistor (Instrument/Relay Shunt)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_with_instrument_or_relay_shunt","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"attenuator;",100,60,"","Attenuator",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","attenuator","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor,_adjustable_contact;",100,40,"","Resistor (Adjustable Contact)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_adjustable_contact","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor,_shunt;",100,45,"","Resistor (Shunt)",null,
+null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_shunt","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"symmetrical_varistor;",100,60,"","Varistor (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_varistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"tapped_resistor;",100,40,"","Resistor (Tapped)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","tapped_resistor","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"nonlinear_resistor;",100,60,"","Resistor (Nonlinear)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","nonlinear_resistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"memristor_1;",100,20,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","memristor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"memristor_2;",100,24,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"memristor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"magnetoresistor;",100,60,"","Magnetoresistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","magnetoresistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"symmetrical_photoconductive_transducer;",100,40,"","Photoconductive Transducer (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_photoconductive_transducer","electrical resistor ").join(" "))]);
this.setCurrentSearchEntryLibrary("electrical","electricalCapacitors");this.addPaletteFunctions("electricalCapacitors","Electrical / Capacitors",!1,[this.createVertexTemplateEntry(d+"capacitor_1;",100,60,"","Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_1","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_2;",100,60,"","Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_2","electrical capacitor ").join(" ")),
this.createVertexTemplateEntry(d+"capacitor_3;",100,60,"","Electrolytic Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_3","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_4;",100,60,"","Capacitor (UK)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_4","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_5;",100,60,"","Electrolytic Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors",
"capacitor_5","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_6;",100,60,"","Capacitor",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_6","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"differential_capacitor;",100,80,"","Differential Capacitor",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","differential_capacitor","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"trimmer_capacitor_1;",
@@ -6661,33 +6663,33 @@ this.createVertexTemplateEntry(m+"9_segment_display;pointerEvents=1;",74.7,96.1,
"light-activated_scr","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-coupler;",99,60,"","Opto-coupler",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-coupler","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-transistor;",100,110,"","Opto-transistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-transistor","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photodiode;pointerEvents=1;",
100,70,"","Photodiode",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photodiode","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_1;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_1","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_2;pointerEvents=1;",100,50,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics",
"photo_resistor_2","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_3;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_3","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"solar_cell;pointerEvents=1;",100,70,"","Solar Cell",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","solar_cell","electrical optical ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical",
-"electricalVacuumTubes");this.addPaletteFunctions("electricalVacuumTubes","Electrical / Vacuum Tubes",!1,[this.createVertexTemplateEntry(u+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),
-this.createVertexTemplateEntry(u+"triode;",70,77,"","Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"tetrode;",70,77,"","Tetrode",null,
-null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell",
-"electrical thermionic thermo device vacuum tube ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalWaveforms");this.addPaletteFunctions("electricalWaveforms","Electrical / Waveforms",!1,[this.createVertexTemplateEntry(v+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
-"pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"slow_square_wave;",90,80,"","Chopped Square Wave",
-null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"square_wave;",90,80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+
+"electricalVacuumTubes");this.addPaletteFunctions("electricalVacuumTubes","Electrical / Vacuum Tubes",!1,[this.createVertexTemplateEntry(v+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),
+this.createVertexTemplateEntry(v+"triode;",70,77,"","Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"tetrode;",70,77,"","Tetrode",null,
+null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell",
+"electrical thermionic thermo device vacuum tube ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalWaveforms");this.addPaletteFunctions("electricalWaveforms","Electrical / Waveforms",!1,[this.createVertexTemplateEntry(u+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
+"pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"slow_square_wave;",90,80,"","Chopped Square Wave",
+null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"square_wave;",90,80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+
"step_2;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_2","electrical waveform signal ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalRotMech");this.addPaletteFunctions("electricalRotMech","Electrical / Rotating Equipment & Mechanical Functions",!1,[this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=32;perimeter=ellipsePerimeter;",
-100,100,"M","Rotating Machine",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotating machine","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"armature;pointerEvents=1;",100,100,"","Armature",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","armature","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"field;pointerEvents=1;",90,15,"","Field",null,null,
-this.getTagsForStencil("mxgraph.electrical.rot_mech","field","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(f+"permanent_magnet;pointerEvents=1;",20,70,"","Permanent Magnet",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","permanent magnet","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"winding_connection;",100,100,"","Winding Connection",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"winding connection","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"synchro;",80,100,"","Synchro",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","synchro","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=trapezoid;perimeter=none;",75,25,"","Brake",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"brake","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"gearing;pointerEvents=1;",100,64,"","Gearing",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","gearing","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=strokeColor;html=1;verticalAlign=top;strokeWidth=1;shape=mxgraph.electrical.rot_mech.rotation;",
-69,54,"","Rotation",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotation","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"clutch;pointerEvents=1;",100,20,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"clutch_2;pointerEvents=1;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"delayed_action;pointerEvents=1;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"manual_control;pointerEvents=1;",50,50,"","Manual Control",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"blocking_device;pointerEvents=1;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"latching_device;pointerEvents=1;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","latching device",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"mechanical_interlock;pointerEvents=1;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"automatic_return;pointerEvents=1;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"automatic_return","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"detent;pointerEvents=1;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalTransmission");var z=[this.createVertexTemplateEntry(x+"bus_width;pointerEvents=1;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"cable_group;pointerEvents=1;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
-10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"terminal_3_phase;pointerEvents=1;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
-130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"anticreepage_device;pointerEvents=1;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeWidth=1;endSize=20;",
-100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(x+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1",
+100,100,"M","Rotating Machine",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotating machine","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"armature;pointerEvents=1;",100,100,"","Armature",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","armature","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"field;pointerEvents=1;",90,15,"","Field",null,null,
+this.getTagsForStencil("mxgraph.electrical.rot_mech","field","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(f+"permanent_magnet;pointerEvents=1;",20,70,"","Permanent Magnet",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","permanent magnet","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"winding_connection;",100,100,"","Winding Connection",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"winding connection","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"synchro;",80,100,"","Synchro",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","synchro","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=trapezoid;perimeter=none;",75,25,"","Brake",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"brake","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"gearing;pointerEvents=1;",100,64,"","Gearing",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","gearing","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=strokeColor;html=1;verticalAlign=top;strokeWidth=1;shape=mxgraph.electrical.rot_mech.rotation;",
+69,54,"","Rotation",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotation","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"clutch;pointerEvents=1;",100,20,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"clutch_2;pointerEvents=1;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"delayed_action;pointerEvents=1;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"manual_control;pointerEvents=1;",50,50,"","Manual Control",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"blocking_device;pointerEvents=1;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"latching_device;pointerEvents=1;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","latching device",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"mechanical_interlock;pointerEvents=1;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"automatic_return;pointerEvents=1;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"automatic_return","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"detent;pointerEvents=1;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalTransmission");var z=[this.createVertexTemplateEntry(y+"bus_width;pointerEvents=1;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"cable_group;pointerEvents=1;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(y+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
+10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"terminal_3_phase;pointerEvents=1;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
+130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"anticreepage_device;pointerEvents=1;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeWidth=1;endSize=20;",
+100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(y+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1",
130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1;flipH=1;",130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+
-"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(B){for(var D=0;D<z.length;D++)B.appendChild(z[D](B))}));this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addErPalette=function(){function a(e,f,g){e=new mxCell("",new mxGeometry(0,0,0,0),e);e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;null!=f&&(f=new mxCell(f,new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=bottom;"),f.geometry.relative=!0,f.setConnectable(!1),f.vertex=!0,e.insert(f));null!=g&&(g=new mxCell(g,new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=bottom;"),
+this.createVertexTemplateEntry(y+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(y+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+
+"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(A){for(var D=0;D<z.length;D++)A.appendChild(z[D](A))}));this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addErPalette=function(){function a(e,f,g){e=new mxCell("",new mxGeometry(0,0,0,0),e);e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;null!=f&&(f=new mxCell(f,new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=bottom;"),f.geometry.relative=!0,f.setConnectable(!1),f.vertex=!0,e.insert(f));null!=g&&(g=new mxCell(g,new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=bottom;"),
g.geometry.relative=!0,g.setConnectable(!1),g.vertex=!0,e.insert(g));return e}var c=this,d=new mxCell("Item",new mxGeometry(0,0,40,30),"text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;");d.vertex=!0;this.setCurrentSearchEntryLibrary("er");var b=[this.addDataEntry("db database schema er entity relation table ",180,160,"Table 1","7Zhhb5swEIZ/DV8nwCNrvkK2blomTW33A9z4ApYcmxlnSfrrd8am2UJYUy1AW0Uiku98vuDnxa8EAclW22tNy+KbYiAC8jEgmVbKuNFqm4EQQRxyFpBZEMch/oL4U8dsVM+GJdUgzSkLYrfgFxVrcJk7ei/AZSuzEz5bFbS0Q1PPkrQyVJtb/mBzJMTEQklDuQSNiaiOhaBlxetylym4YHO6U2vTNGqidMm3wG7UpvK1Wm3m2MyGtvkSm9/6m7HTVPBc4niBu7T/mGqo8F7mtDK+wm8LtIFtJ5o65blcg1qB0Tss2XBmCl9x5fCFBfC8aJZNfJJWLpE/rt2TxoGHfRw8aYH/N3OEg9sqlOYPlrTwZP7UoY43fCWohM9A2UEqVWzX8ORCZEooK5ZUElp62SKmVXlHdQ7GJ0rFpam3nKR4IYQsfJcECd5rhnG0j/Gy5dpkSlZG43NhewDKswErUWpU6ZsKWDb9tUdsx/fKGLV6jpjxcTF3HreX7CltyRmkfd+S9vvXTnFxC4ZTcQMLQ2UunBRS2nAvxRG9jhJ8pHaI8/AAKYS5FPaRmhWcMZCnUiZPHhnSE9WkRfWH5D/X8GU2MtvGjFxtWpV0wWU+dysnB/CTHuBvux/xpCcxJhf3Osm9wvO412RA9/pwurTDnC9gvOn3X9Y1Gc26rlpI7XmIw+ilO9e5WY/gVNOLUw3pVNMBnSoK36pVTUezqijq8Kqx0fbnVR2wR/CqqP02fjGrHs0qiod0q2e88b8ut4o6KA9hV+13bWdX5M3aVRft/v0Kw/2HyXrur++WvwE="),
this.addDataEntry("db database schema er entity relation table ",180,160,"Table 2","7ZjbbqMwEIafhtsVhybb3EK3rdSstGr7Am48AUuOjYy7gT79jrFpDoSW1RbYVpGI5BmPJ/j74U/Ai5JNeaNInv2UFLgX/fCiREmp7WhTJsC5F/qMetGVF4Y+frzwumM2qGf9nCgQus+C0C74Tfgz2MwjeeJgs4WuuMsWGcnNUNezUVxoovQDezG5yMfESgpNmACFiaCOOSd5wepym8kYp0tSyWfdNGqieM1KoPdyW7haJbdLbGZC03yNzR/cyZhpwlkqcLzCXZpvjBUUeC5LUmhX4bYFSkPZiaZOOS43IDegVYUlW0Z15iouLT4/A5ZmzbK5S5LCJtLXtTvSOHCwT4OPWuDfZo5wcFuZVOzFkOaOzL4OdbxlG04E3AKhR6lY0qrhyThPJJdGLCEFtPQyRVTJ/JGoFLRL5JIJXW95FuOBEBL/28yb4bkmGAe7GA9TrnQiRaEVXhemB6A8WzASxVrmrimHddNfOcRm/CS1lhsX9BIzPC1m5XA7yd7TNvoAaS9a0v66QzbXd0GnxLgRzQi/h5UmIuVWECFMuBPkhGonOR6w24d6fBtJRLrm5sK6yhilIPqyjt69ceYDsZ212JobI/SnRts4kq2Ni5ysmEiXduX8iP1sAPblIff96zwcSIv52cJ6WVjv36O3LeyUtENZ2PcuC+uW+JNZ2HwyC7vssLCp0Y5nYR3sJ7CwxdnCxvwXthjRwgK/v7bj3GBAWdPvn6xrMZl1BUGHd0X/u3d9NOwJvCpoP6ufzWpAs3oVchS3+ov3AZ/LrYIOymPYVftJ3NrVxZe1qy7aw/sVhrvXlvXcwVvNPw=="),
this.addDataEntry("db database schema er entity relation table ",180,30,"Table Row 1","xZXBbqMwEIafhuuKQKn2DN22h/TS7gtM4wlYNR5kTwvp0+8Ym02TTbWp1KoSSJ7f42H8/QaysumnGwdDd0cKTVb+ysrGEXEc9VODxmRFrlVWXmVFkcudFdfvzK7m2XwAh5bPWVDEBS9gnjEqUfC8M0nwHQxhyPAYpNozOH7Qr0HLJd6QZdAWncSrOTYGBq/n7Kh02qg17OiZlzpLVG/1hOqeRp9yHY1rKeZT8a0Uf0i9hBiMbq2MN7K/8MTaoZdW1uA5FfDs6AkbMhQasmRxfooxR9Jhm6F2QoGOcXoX5ywlljdIPbLbScqoFXcp42dEnneo2y4tK5MGPsbt36V7c2SQ/DntVflBr4Sq7Kojp1+DRSZt89g/P+regMVbBHUk1aR2ixHnEFSOht/gWuQkDKQtz1uuarkEQpP/qLJKem0kXu1juUK644asWCgHKtRA8XXE4G3NNKSiBrdLfZcIh/EjMVP/ES+L7/Py4nwvpWPWYO5xw2BbE8lbG8I9+RP2nAR2AOktPVR6qRfeIhJ0WxMO0FWnlUJ7LtPyv0zLL0Ja/YM0vADfS3X5XMXc2g+w0bZdx5WXX8B5OuT59ihXn8Ndwv3vaZ47+Hv9AQ=="),
@@ -6752,9 +6754,9 @@ new mxGeometry(50,0,40,43),a+"office_chair;shadow=0;");b.vertex=!0;var e=new mxC
new mxGeometry(0,50,43,40),a+"office_chair;shadow=0;direction=north;");f.vertex=!0;var g=new mxCell("",new mxGeometry(277,50,43,40),a+"office_chair;shadow=0;direction=south");g.vertex=!0;var h=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;shadow=0;");h.vertex=!0;var k=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,
97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,d],320,140,"Large office table")}),this.addEntry("floorplan office table conference large huge",function(){var d=new mxCell("",new mxGeometry(20,20,520,100),"shape=ellipse;shadow=0;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(50,0,40,43),a+"office_chair;shadow=0;");b.vertex=!0;var e=new mxCell("",new mxGeometry(50,97,40,43),a+"office_chair;shadow=0;direction=west;");e.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,43,40),a+"office_chair;shadow=0;direction=north;");f.vertex=!0;var g=new mxCell("",new mxGeometry(517,50,43,40),a+"office_chair;shadow=0;direction=south");g.vertex=!0;var h=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;shadow=0;");h.vertex=!0;var k=
-new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;var q=new mxCell("",
-new mxGeometry(290,0,40,43),a+"office_chair;shadow=0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;shadow=0;direction=west;");t.vertex=!0;var u=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;shadow=0;");u.vertex=!0;var v=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;shadow=0;direction=west;");v.vertex=!0;var w=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;shadow=0;");w.vertex=!0;var r=new mxCell("",new mxGeometry(410,97,40,43),
-a+"office_chair;shadow=0;direction=west;");r.vertex=!0;var y=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;shadow=0;");y.vertex=!0;var x=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;shadow=0;direction=west;");x.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,q,t,u,v,w,r,y,x,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(d){for(var b=0;b<c.length;b++)d.appendChild(c[b](d))}));
+new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;var r=new mxCell("",
+new mxGeometry(290,0,40,43),a+"office_chair;shadow=0;");r.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;shadow=0;direction=west;");t.vertex=!0;var v=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;shadow=0;");v.vertex=!0;var u=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;shadow=0;direction=west;");u.vertex=!0;var w=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;shadow=0;");w.vertex=!0;var q=new mxCell("",new mxGeometry(410,97,40,43),
+a+"office_chair;shadow=0;direction=west;");q.vertex=!0;var x=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;shadow=0;");x.vertex=!0;var y=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;shadow=0;direction=west;");y.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,r,t,v,u,w,q,x,y,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(d){for(var b=0;b<c.length;b++)d.appendChild(c[b](d))}));
this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;shape=mxgraph.flowchart.",c=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;shape=";this.setCurrentSearchEntryLibrary("flowchart");this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_1;align=left;pointerEvents=1;",
50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry(c+"card;whiteSpace=wrap;size=20;arcSize=12;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card",
"").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart","collate","").join(" ")),this.createVertexTemplateEntry("shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0.23;",100,60,"","Data",null,null,this.getTagsForStencil("mxgraph.flowchart","data","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.database;whiteSpace=wrap;",
@@ -7716,14 +7718,14 @@ mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",k=a.replace("\n"," ");k=k.replace("- ",
l.insert(m);return g.createVertexTemplateFromCells([l],d,b,k)}))};Sidebar.prototype.addGCP2ExpandedProductCardSet=function(a,c,d,b,e){var f=this,g="sketch=0;dashed=0;connectable=0;html=1;fillColor=#5184F3;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",h=a.replace("\n"," ");h=h.replace("- ","-");e.push(this.addEntry(b,function(){var k=new mxCell("",new mxGeometry(0,0,d,70),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");k.vertex=!0;var l=new mxCell('<font color="#000000">Name</font><br>'+
h+'<hr><font style="font-size: 11px">Attribute Name</font>',new mxGeometry(0,0,44,39),g+c+";part=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=top;spacingLeft=5;fontColor=#999999;fontSize=12;spacingTop=-8;");l.geometry.relative=!0;l.geometry.offset=new mxPoint(5,7);l.vertex=!0;k.insert(l);return f.createVertexTemplateFromCells([k],k.geometry.width,k.geometry.height,h)}));e.push(this.addEntry(b,function(){var k=new mxCell("",new mxGeometry(0,0,d+8,78),"shape=mxgraph.gcp2.doubleRect;strokeColor=#dddddd;shadow=1;strokeWidth=1;");
k.vertex=!0;var l=new mxCell('<font color="#000000">Name</font><br>'+h+'<hr><font style="font-size: 11px">Attribute Name</font>',new mxGeometry(0,0,44,39),g+c+";part=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=top;spacingLeft=5;fontColor=#999999;fontSize=12;spacingTop=-8;");l.geometry.relative=!0;l.geometry.offset=new mxPoint(5,7);l.vertex=!0;k.insert(l);return f.createVertexTemplateFromCells([k],k.geometry.width,k.geometry.height,h)}))};Sidebar.prototype.addGCP2ExpandedMachineCard=
-function(a,c,d,b,e,f,g,h,k,l,m,n,p,q){var t=this,u="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",v=a.replace("\n"," ");v=v.replace("- ","-");q.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var r=new mxCell('<font color="#000000">'+v+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");
-r.geometry.relative=!0;r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,25*d,25*b),u+c+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+g+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(35,55);r.vertex=!0;w.insert(r);r=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
-r.geometry.relative=!0;r.geometry.offset=new mxPoint(24,69);r.vertex=!0;w.insert(r);r=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(50,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,18),u+k+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(75,56);r.vertex=!0;w.insert(r);r=new mxCell(l,new mxGeometry(0,0,18,
-18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(88,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+m+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(115,55);r.vertex=!0;w.insert(r);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,v)}));q.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,
-0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var r=new mxCell('<font color="#000000">'+v+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;connectable=0;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");r.geometry.relative=!0;r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,25*d,25*b),u+c+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));
-r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+g+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(35,55);r.vertex=!0;w.insert(r);r=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(24,69);r.vertex=!0;w.insert(r);r=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
-r.geometry.relative=!0;r.geometry.offset=new mxPoint(50,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,18),u+k+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(75,56);r.vertex=!0;w.insert(r);r=new mxCell("123",new mxGeometry(0,0,25,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(81,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,
-0,20,20),u+m+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(115,55);r.vertex=!0;w.insert(r);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,v)}))};Sidebar.prototype.addGCP2UserDeviceCard=function(a,c,d,b,e,f,g){var h=this,k="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",l=a.replace("\n"," ");l=l.replace("- ","-");g.push(this.addEntry(f,function(){var m=new mxCell(a,new mxGeometry(0,
+function(a,c,d,b,e,f,g,h,k,l,m,n,p,r){var t=this,v="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",u=a.replace("\n"," ");u=u.replace("- ","-");r.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var q=new mxCell('<font color="#000000">'+u+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");
+q.geometry.relative=!0;q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,25*d,25*b),v+c+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+g+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(35,55);q.vertex=!0;w.insert(q);q=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
+q.geometry.relative=!0;q.geometry.offset=new mxPoint(24,69);q.vertex=!0;w.insert(q);q=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(50,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,18),v+k+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(75,56);q.vertex=!0;w.insert(q);q=new mxCell(l,new mxGeometry(0,0,18,
+18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(88,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+m+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(115,55);q.vertex=!0;w.insert(q);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,u)}));r.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,
+0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var q=new mxCell('<font color="#000000">'+u+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;connectable=0;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");q.geometry.relative=!0;q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,25*d,25*b),v+c+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));
+q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+g+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(35,55);q.vertex=!0;w.insert(q);q=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(24,69);q.vertex=!0;w.insert(q);q=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
+q.geometry.relative=!0;q.geometry.offset=new mxPoint(50,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,18),v+k+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(75,56);q.vertex=!0;w.insert(q);q=new mxCell("123",new mxGeometry(0,0,25,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(81,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,
+0,20,20),v+m+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(115,55);q.vertex=!0;w.insert(q);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,u)}))};Sidebar.prototype.addGCP2UserDeviceCard=function(a,c,d,b,e,f,g){var h=this,k="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",l=a.replace("\n"," ");l=l.replace("- ","-");g.push(this.addEntry(f,function(){var m=new mxCell(a,new mxGeometry(0,
0,70,85+e),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=bottom;spacingLeft=0;fontColor=#999999;fontSize=12;whiteSpace=wrap;spacingBottom=2;");m.vertex=!0;var n=new mxCell("",new mxGeometry(.5,0,50*d,50*b),k+c+";part=1;");n.geometry.relative=!0;n.geometry.offset=new mxPoint(25*-d,10+25*(1-b));n.vertex=!0;m.insert(n);return h.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,
l)}))}})();(function(){Sidebar.prototype.addGCPIconsPalette=function(){this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsAI and Machine Learning");this.addGCPIconsAIandMachineLearningPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsAPI Management");this.addGCPIconsAPIManagementPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsCompute");this.addGCPIconsComputePalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsData Analytics");this.addGCPIconsDataAnalyticsPalette();
this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsDatabases");this.addGCPIconsDatabasesPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsDeveloper Tools");this.addGCPIconsDeveloperToolsPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsExpanded Product Card Icons");this.addGCPIconsExpandedProductCardIconsPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsGeneric");this.addGCPIconsGenericPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsHybrid and Multi Cloud");
@@ -8244,13 +8246,13 @@ e.vertex=!0;var f=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- cons
g.vertex=!0;var h=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(200,40,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");h.vertex=!0;var k=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
new mxGeometry(200,170,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");k.vertex=!0;var l=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(200,300,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
l.vertex=!0;var m=new mxCell("LABEL",new mxGeometry(400,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#AE4132;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");m.vertex=!0;var n=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,40,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-n.vertex=!0;var p=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,170,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");p.vertex=!0;var q=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(400,300,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");q.vertex=!0;var t=new mxCell("LABEL",new mxGeometry(600,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");t.vertex=!0;var u=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(600,40,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");u.vertex=!0;var v=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,170,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-v.vertex=!0;var w=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,300,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");w.vertex=!0;var r=new mxCell("LABEL",new mxGeometry(800,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#12AAB5;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");
-r.vertex=!0;var y=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,40,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");y.vertex=!0;var x=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(800,170,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");x.vertex=!0;var z=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,300,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-z.vertex=!0;return sb.createVertexTemplateFromCells([d,g,m,t,r,b,e,f,h,k,l,n,p,q,u,v,w,y,x,z],1E3,420,"Chevron list")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(0,0,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#10739E;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+n.vertex=!0;var p=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,170,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");p.vertex=!0;var r=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(400,300,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");r.vertex=!0;var t=new mxCell("LABEL",new mxGeometry(600,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");t.vertex=!0;var v=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(600,40,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");v.vertex=!0;var u=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,170,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
+u.vertex=!0;var w=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,300,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");w.vertex=!0;var q=new mxCell("LABEL",new mxGeometry(800,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#12AAB5;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");
+q.vertex=!0;var x=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,40,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");x.vertex=!0;var y=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(800,170,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");y.vertex=!0;var z=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,300,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
+z.vertex=!0;return sb.createVertexTemplateFromCells([d,g,m,t,q,b,e,f,h,k,l,n,p,r,v,u,w,x,y,z],1E3,420,"Chevron list")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(0,0,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#10739E;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,0,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");b.vertex=!0;var e=new mxCell("",new mxGeometry(0,80,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#F2931E;strokeColor=none;rounded=0;");e.vertex=!0;var f=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,80,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,160,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#AE4132;strokeColor=none;rounded=0;");g.vertex=!0;var h=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,160,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,240,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#23445D;strokeColor=none;rounded=0;");k.vertex=!0;var l=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
@@ -8265,17 +8267,17 @@ this.addEntry("list",function(){var d=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
90,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.25;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;");b.vertex=!0;var e=new mxCell("",new mxGeometry(210,90,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0.75;arcWidth=0.25;fillColor=#AE4132;strokeColor=none;");e.vertex=!0;var f=new mxCell("",new mxGeometry(315,90,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.25;arcWidth=0.25;fillColor=#23445D;strokeColor=none;");f.vertex=!0;var g=new mxCell("",new mxGeometry(420,90,120,120),
c+"partConcEllipse;startAngle=0.25;endAngle=0.75;arcWidth=0.25;fillColor=#15AA96;strokeColor=none;");g.vertex=!0;var h=new mxCell("1",new mxGeometry(35,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#10739E;fontSize=15;html=0;fontStyle=1;fontColor=#10739E;");h.vertex=!0;var k=new mxCell("2",new mxGeometry(140,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#F2931E;fontSize=15;html=0;fontStyle=1;fontColor=#F2931E;");k.vertex=!0;var l=new mxCell("3",new mxGeometry(245,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#AE4132;fontSize=15;html=0;fontStyle=1;fontColor=#AE4132;");
l.vertex=!0;var m=new mxCell("4",new mxGeometry(350,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#23445D;fontSize=15;html=0;fontStyle=1;fontColor=#23445D;");m.vertex=!0;var n=new mxCell("5",new mxGeometry(455,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#12AAB5;fontSize=15;html=0;fontStyle=1;fontColor=#12AAB5;");n.vertex=!0;var p=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(0,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");p.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(105,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-q.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(210,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");t.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(315,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");u.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(420,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],540,300,"Roadmap (horizontal)")}),this.addEntry("roadmap diagonal",function(){var d=new mxCell("",new mxGeometry(190,0,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#10739E;strokeColor=none;shadow=0;");d.vertex=!0;var b=new mxCell("",new mxGeometry(190,105,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;shadow=0;");b.vertex=
+new mxGeometry(0,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");p.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(105,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+r.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(210,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");t.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(315,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");v.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(420,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],540,300,"Roadmap (horizontal)")}),this.addEntry("roadmap diagonal",function(){var d=new mxCell("",new mxGeometry(190,0,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#10739E;strokeColor=none;shadow=0;");d.vertex=!0;var b=new mxCell("",new mxGeometry(190,105,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;shadow=0;");b.vertex=
!0;var e=new mxCell("",new mxGeometry(295,105,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#AE4132;strokeColor=none;shadow=0;");e.vertex=!0;var f=new mxCell("",new mxGeometry(295,210,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#23445D;strokeColor=none;shadow=0;");f.vertex=!0;var g=new mxCell("",new mxGeometry(400,210,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#12AAB5;strokeColor=none;shadow=0;");
g.vertex=!0;var h=new mxCell("1",new mxGeometry(225,35,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#10739E;fontSize=15;html=1;fontStyle=1;fontColor=#10739E;shadow=1;");h.vertex=!0;var k=new mxCell("2",new mxGeometry(225,140,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#F2931E;fontSize=15;html=1;fontStyle=1;fontColor=#F2931E;shadow=1;");k.vertex=!0;var l=new mxCell("3",new mxGeometry(330,140,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#AE4132;fontSize=15;html=1;fontStyle=1;fontColor=#AE4132;shadow=1;");
l.vertex=!0;var m=new mxCell("4",new mxGeometry(330,245,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#23445D;fontSize=15;html=1;fontStyle=1;fontColor=#23445D;shadow=1;");m.vertex=!0;var n=new mxCell("5",new mxGeometry(435,245,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#12AAB5;fontSize=15;html=1;fontStyle=1;fontColor=#12AAB5;shadow=1;");n.vertex=!0;var p=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(320,20,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");p.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
-q.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(425,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");t.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(105,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");u.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(530,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],710,330,"Roadmap (diagonal)")}),this.addEntry("arrow list",function(){var d=new mxCell("1",new mxGeometry(0,0,40,40),"html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(45,0,95,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#64BBE2;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
+new mxGeometry(320,20,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");p.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
+r.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(425,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");t.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(105,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");v.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(530,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],710,330,"Roadmap (diagonal)")}),this.addEntry("arrow list",function(){var d=new mxCell("1",new mxGeometry(0,0,40,40),"html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(45,0,95,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#64BBE2;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
b.vertex=!0;var e=new mxCell("2",new mxGeometry(0,45,40,40),"html=1;fillColor=#F2931E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");e.vertex=!0;var f=new mxCell("Label",new mxGeometry(45,45,115,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F8C382;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");f.vertex=!0;var g=new mxCell("3",new mxGeometry(0,90,40,40),"html=1;fillColor=#AE4132;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(45,90,135,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F08E81;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");h.vertex=!0;var k=new mxCell("4",new mxGeometry(0,135,40,40),"html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(45,135,155,40),
"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#5D7F99;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");l.vertex=!0;var m=new mxCell("5",new mxGeometry(0,180,40,40),"html=1;fillColor=#12AAB5;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(45,180,175,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#61C6CE;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
@@ -8300,9 +8302,9 @@ d.vertex=!0;var b=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicin
e.vertex=!0;var f=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(35,140,100,100),"html=1;fillColor=#444444;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");f.vertex=!0;var g=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(140,140,100,100),"html=1;fillColor=#777777;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
g.vertex=!0;var h=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(245,140,100,100),"html=1;fillColor=#909090;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");h.vertex=!0;var k=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(35,245,100,100),"html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
k.vertex=!0;var l=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(140,245,100,100),"html=1;fillColor=#2F5B7C;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");l.vertex=!0;var m=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(245,245,100,100),"html=1;fillColor=#5D7F99;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
-m.vertex=!0;var n=new mxCell("Label",new mxGeometry(0,35,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(0,140,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(0,245,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");
-q.vertex=!0;var t=new mxCell("Label",new mxGeometry(35,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");t.vertex=!0;var u=new mxCell("Label",new mxGeometry(140,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(245,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],345,345,"Matrix (3x3)")}),this.addEntry("hex loop",function(){var d=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(0,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#F5AB50;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");d.vertex=!0;var b=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",
+m.vertex=!0;var n=new mxCell("Label",new mxGeometry(0,35,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(0,140,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(0,245,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");
+r.vertex=!0;var t=new mxCell("Label",new mxGeometry(35,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");t.vertex=!0;var v=new mxCell("Label",new mxGeometry(140,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(245,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],345,345,"Matrix (3x3)")}),this.addEntry("hex loop",function(){var d=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(0,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#F5AB50;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");d.vertex=!0;var b=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",
new mxGeometry(0,153,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#E85642;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");b.vertex=!0;var e=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,102,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#12AAB5;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
e.vertex=!0;var f=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,0,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#1699D3;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");f.vertex=!0;var g=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(168,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#736CA8;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
g.vertex=!0;var h=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(168,153,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#2F5B7C;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");h.vertex=!0;var k=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,204,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#777777;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
@@ -8325,13 +8327,13 @@ new mxGeometry(150,0,50,50),"triangle;direction=north;strokeWidth=4;html=1;fillC
d.vertex=!0;var b=new mxCell("",new mxGeometry(70,10,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#B1DDF0;strokeColor=none;");b.vertex=!0;var e=new mxCell("",new mxGeometry(70,10,90,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#10739E;strokeColor=none;shadow=0;");e.vertex=!0;var f=new mxCell("75%",new mxGeometry(0,50,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
f.vertex=!0;var g=new mxCell("",new mxGeometry(70,60,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#FCE7CD;strokeColor=none;");g.vertex=!0;var h=new mxCell("",new mxGeometry(70,60,225,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#F2931E;strokeColor=none;shadow=0;");h.vertex=!0;var k=new mxCell("90%",new mxGeometry(0,100,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(70,110,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#FAD9D5;strokeColor=none;");l.vertex=!0;var m=new mxCell("",new mxGeometry(70,110,270,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#AE4132;strokeColor=none;shadow=0;");m.vertex=!0;var n=new mxCell("25%",new mxGeometry(0,150,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
-n.vertex=!0;var p=new mxCell("",new mxGeometry(70,160,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#BAC8D3;strokeColor=none;");p.vertex=!0;var q=new mxCell("",new mxGeometry(70,160,75,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;shadow=0;");q.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q],370,190,"Percentage list")}),this.addEntry("percent percentage list",function(){var d=new mxCell("",new mxGeometry(0,0,400,40),
+n.vertex=!0;var p=new mxCell("",new mxGeometry(70,160,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#BAC8D3;strokeColor=none;");p.vertex=!0;var r=new mxCell("",new mxGeometry(70,160,75,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;shadow=0;");r.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r],370,190,"Percentage list")}),this.addEntry("percent percentage list",function(){var d=new mxCell("",new mxGeometry(0,0,400,40),
"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell("65%",new mxGeometry(0,0,260,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#10739E;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");b.vertex=!0;var e=new mxCell("Label",new mxGeometry(320,0,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");f.vertex=!0;var g=new mxCell("45%",new mxGeometry(0,50,180,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F2931E;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");g.vertex=!0;var h=new mxCell("Label",new mxGeometry(320,50,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
h.vertex=!0;var k=new mxCell("",new mxGeometry(0,100,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");k.vertex=!0;var l=new mxCell("30%",new mxGeometry(0,100,120,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#AE4132;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(320,100,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-m.vertex=!0;var n=new mxCell("",new mxGeometry(0,150,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");n.vertex=!0;var p=new mxCell("60%",new mxGeometry(0,150,240,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(320,150,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-q.vertex=!0;var t=new mxCell("",new mxGeometry(0,200,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");t.vertex=!0;var u=new mxCell("85%",new mxGeometry(0,200,340,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#12AAB5;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(320,200,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,f,g,k,l,n,p,t,u,e,h,m,q,v],400,250,"Percentage list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,260,260),c+"partConcEllipse;fillColor=#10739E;strokeColor=#ffffff;startAngle=0.75;endAngle=0.08;arcWidth=0.16;strokeWidth=3;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,20,220,220),c+"partConcEllipse;fillColor=#F2931E;strokeColor=#ffffff;startAngle=0.91;endAngle=0.17;arcWidth=0.18;strokeWidth=3;");b.vertex=
+m.vertex=!0;var n=new mxCell("",new mxGeometry(0,150,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");n.vertex=!0;var p=new mxCell("60%",new mxGeometry(0,150,240,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(320,150,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
+r.vertex=!0;var t=new mxCell("",new mxGeometry(0,200,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");t.vertex=!0;var v=new mxCell("85%",new mxGeometry(0,200,340,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#12AAB5;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(320,200,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,f,g,k,l,n,p,t,v,e,h,m,r,u],400,250,"Percentage list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,260,260),c+"partConcEllipse;fillColor=#10739E;strokeColor=#ffffff;startAngle=0.75;endAngle=0.08;arcWidth=0.16;strokeWidth=3;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,20,220,220),c+"partConcEllipse;fillColor=#F2931E;strokeColor=#ffffff;startAngle=0.91;endAngle=0.17;arcWidth=0.18;strokeWidth=3;");b.vertex=
!0;var e=new mxCell("",new mxGeometry(40,40,180,180),c+"partConcEllipse;fillColor=#AE4132;strokeColor=#ffffff;startAngle=0.75;endAngle=0.11;arcWidth=0.22;strokeWidth=3;");e.vertex=!0;var f=new mxCell("",new mxGeometry(60,60,140,140),c+"partConcEllipse;fillColor=#12AAB5;strokeColor=#ffffff;startAngle=0.02;endAngle=0.25;arcWidth=0.29;strokeWidth=3;");f.vertex=!0;var g=new mxCell("",new mxGeometry(80,80,100,100),c+"partConcEllipse;fillColor=#CCCCCC;strokeColor=#ffffff;startAngle=0.75;endAngle=0.25;arcWidth=0.4;strokeWidth=3;");
g.vertex=!0;var h=new mxCell("2018",new mxGeometry(100,100,60,60),"html=1;shape=mxgraph.basic.pie;fillColor=#23445D;strokeColor=#ffffff;startAngle=0.75;endAngle=0.25;fontSize=16;fontColor=#FFFFFF;verticalAlign=top;fontStyle=1;strokeWidth=3;");h.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h],200,200,"Arc list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,250,250),"ellipse;fillColor=none;strokeColor=#444444;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,
20,210,210),"ellipse;fillColor=none;strokeColor=#444444;");b.vertex=!0;var e=new mxCell("",new mxGeometry(40,40,170,170),"ellipse;fillColor=none;strokeColor=#444444;");e.vertex=!0;var f=new mxCell("",new mxGeometry(60,60,130,130),"ellipse;fillColor=none;strokeColor=#444444;");f.vertex=!0;var g=new mxCell("",new mxGeometry(80,80,90,90),"ellipse;fillColor=none;strokeColor=#444444;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,250,250),c+"arc;fillColor=none;strokeColor=#10739E;startAngle=0.75;endAngle=0.08;strokeWidth=16;");
@@ -8365,9 +8367,9 @@ b.vertex=!0;var e=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicin
f.vertex=!0;var g=new mxCell("40%",new mxGeometry(110,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.4;arcWidth=0.4;strokeColor=none;fillColor=#F2931E;fontSize=22;fontColor=#F2931E;align=center;fontStyle=1;");g.vertex=!0;var h=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(110,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
h.vertex=!0;var k=new mxCell("Label",new mxGeometry(220,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#AE4132;align=center;fontStyle=1;");k.vertex=!0;var l=new mxCell("25%",new mxGeometry(220,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.25;arcWidth=0.4;strokeColor=none;fillColor=#AE4132;fontSize=22;fontColor=#AE4132;align=center;fontStyle=1;");
l.vertex=!0;var m=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(220,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(330,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#23445D;align=center;fontStyle=1;");
-n.vertex=!0;var p=new mxCell("60%",new mxGeometry(330,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.6;arcWidth=0.4;strokeColor=none;fillColor=#23445D;fontSize=22;fontColor=#23445D;align=center;fontStyle=1;");p.vertex=!0;var q=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(330,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
-q.vertex=!0;var t=new mxCell("Label",new mxGeometry(440,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#12AAB5;align=center;fontStyle=1;");t.vertex=!0;var u=new mxCell("80%",new mxGeometry(440,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.8;arcWidth=0.4;strokeColor=none;fillColor=#12AAB5;fontSize=22;fontColor=#12AAB5;align=center;fontStyle=1;");
-u.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(440,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");v.vertex=!0;return sb.createVertexTemplateFromCells([b,g,l,p,u,d,f,k,n,t,e,h,m,q,v],540,260,"Circular Dial List (horizontal)")}),
+n.vertex=!0;var p=new mxCell("60%",new mxGeometry(330,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.6;arcWidth=0.4;strokeColor=none;fillColor=#23445D;fontSize=22;fontColor=#23445D;align=center;fontStyle=1;");p.vertex=!0;var r=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(330,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
+r.vertex=!0;var t=new mxCell("Label",new mxGeometry(440,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#12AAB5;align=center;fontStyle=1;");t.vertex=!0;var v=new mxCell("80%",new mxGeometry(440,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.8;arcWidth=0.4;strokeColor=none;fillColor=#12AAB5;fontSize=22;fontColor=#12AAB5;align=center;fontStyle=1;");
+v.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(440,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");u.vertex=!0;return sb.createVertexTemplateFromCells([b,g,l,p,v,d,f,k,n,t,e,h,m,r,u],540,260,"Circular Dial List (horizontal)")}),
this.addEntry("circular dial list vertical",function(){var d=new mxCell("65%",new mxGeometry(0,0,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.65;arcWidth=0.4;strokeColor=none;fillColor=#10739E;fontSize=22;fontColor=#10739E;align=center;fontStyle=1;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
new mxGeometry(110,0,210,100),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=left;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=8;");b.vertex=!0;var e=new mxCell("40%",new mxGeometry(0,110,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.4;arcWidth=0.4;strokeColor=none;fillColor=#F2931E;fontSize=22;fontColor=#F2931E;align=center;fontStyle=1;");e.vertex=!0;var f=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
new mxGeometry(110,110,210,100),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=left;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=8;");f.vertex=!0;var g=new mxCell("25%",new mxGeometry(0,220,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.25;arcWidth=0.4;strokeColor=none;fillColor=#AE4132;fontSize=22;fontColor=#AE4132;align=center;fontStyle=1;");g.vertex=!0;var h=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
@@ -8401,12 +8403,12 @@ new mxPoint(150,-20);f.insert(h);h=new mxCell('<b>Heading</b><br><font style="fo
h=new mxCell("",new mxGeometry(50,152,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,240,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#AE4132;strokeColor=none;shadow=1;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(410,290,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");m.vertex=!0;m.geometry.relative=!0;m.geometry.offset=new mxPoint(150,-20);k.insert(m);m=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");m.vertex=!0;m.geometry.relative=!0;m.geometry.offset=new mxPoint(200,0);k.insert(m);m=new mxCell("",new mxGeometry(50,272,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");m.vertex=!0;var n=new mxCell("",new mxGeometry(0,360,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#23445D;strokeColor=none;shadow=1;");
-n.vertex=!0;var p=new mxCell("Label",new mxGeometry(410,410,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");p.vertex=!0;var q=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");q.vertex=!0;q.geometry.relative=!0;q.geometry.offset=
-new mxPoint(150,-20);n.insert(q);q=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");q.vertex=!0;q.geometry.relative=!0;q.geometry.offset=new mxPoint(200,0);n.insert(q);
-q=new mxCell("",new mxGeometry(50,392,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");q.vertex=!0;var t=new mxCell("",new mxGeometry(0,480,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#12AAB5;strokeColor=none;shadow=1;");t.vertex=!0;var u=new mxCell("Label",new mxGeometry(410,530,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
-u.vertex=!0;var v=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");v.vertex=!0;v.geometry.relative=!0;v.geometry.offset=new mxPoint(150,-20);t.insert(v);v=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
-100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");v.vertex=!0;v.geometry.relative=!0;v.geometry.offset=new mxPoint(200,0);t.insert(v);v=new mxCell("",new mxGeometry(50,512,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,
-u,v],550,590,"Ribbon List")}),this.addEntry("bar graph",function(){var d=new mxCell("Label",new mxGeometry(0,0,120,70),"html=1;shape=mxgraph.infographic.barCallout;dx=60;dy=30;fillColor=#10739E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");d.vertex=!0;var b=new mxCell("12",new mxGeometry(40,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#10739E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");b.vertex=
+n.vertex=!0;var p=new mxCell("Label",new mxGeometry(410,410,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");p.vertex=!0;var r=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");r.vertex=!0;r.geometry.relative=!0;r.geometry.offset=
+new mxPoint(150,-20);n.insert(r);r=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");r.vertex=!0;r.geometry.relative=!0;r.geometry.offset=new mxPoint(200,0);n.insert(r);
+r=new mxCell("",new mxGeometry(50,392,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");r.vertex=!0;var t=new mxCell("",new mxGeometry(0,480,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#12AAB5;strokeColor=none;shadow=1;");t.vertex=!0;var v=new mxCell("Label",new mxGeometry(410,530,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
+v.vertex=!0;var u=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");u.vertex=!0;u.geometry.relative=!0;u.geometry.offset=new mxPoint(150,-20);t.insert(u);u=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
+100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");u.vertex=!0;u.geometry.relative=!0;u.geometry.offset=new mxPoint(200,0);t.insert(u);u=new mxCell("",new mxGeometry(50,512,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,
+v,u],550,590,"Ribbon List")}),this.addEntry("bar graph",function(){var d=new mxCell("Label",new mxGeometry(0,0,120,70),"html=1;shape=mxgraph.infographic.barCallout;dx=60;dy=30;fillColor=#10739E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");d.vertex=!0;var b=new mxCell("12",new mxGeometry(40,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#10739E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");b.vertex=
!0;var e=new mxCell("Label",new mxGeometry(120,0,160,70),"html=1;shape=mxgraph.infographic.barCallout;dx=80;dy=30;fillColor=#F2931E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");e.vertex=!0;var f=new mxCell("16",new mxGeometry(180,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#F2931E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");f.vertex=!0;var g=new mxCell("Label",new mxGeometry(280,0,80,70),
"html=1;shape=mxgraph.infographic.barCallout;dx=40;dy=30;fillColor=#AE4132;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");g.vertex=!0;var h=new mxCell("8",new mxGeometry(300,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#AE4132;strokeWidth=6;fontSize=16;align=center;fontStyle=1");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(360,0,200,70),"html=1;shape=mxgraph.infographic.barCallout;dx=100;dy=30;fillColor=#23445D;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");
k.vertex=!0;var l=new mxCell("20",new mxGeometry(440,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#23445D;strokeWidth=6;fontSize=16;align=center;fontStyle=1");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(560,0,140,70),"html=1;shape=mxgraph.infographic.barCallout;dx=70;dy=30;fillColor=#12AAB5;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");m.vertex=!0;var n=new mxCell("14",new mxGeometry(610,75,
@@ -8420,16 +8422,16 @@ b,e,f],480,360,"Triangular Diagram")}),this.addEntry("roll",function(){var d=new
g.vertex=!0;var h=new mxCell("",new mxGeometry(125,125,150,150),"ellipse;html=1;strokeWidth=4;fillColor=#F8C382;strokeColor=none;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(150,150,100,100),"ellipse;html=1;strokeWidth=4;fillColor=#F5AB50;strokeColor=none;shadow=0;fontSize=20;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;spacing=10;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(200,
225,300,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F5AB50;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(200,250,340,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F8C382;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");m.vertex=!0;var n=
new mxCell("Label",new mxGeometry(200,275,380,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#FCE7CD;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(200,300,420,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#BAC8D3;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
-p.vertex=!0;var q=new mxCell("Label",new mxGeometry(200,325,460,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#5D7F99;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");q.vertex=!0;var t=new mxCell("Label",new mxGeometry(200,350,500,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#2F5B7C;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
-t.vertex=!0;var u=new mxCell("Label",new mxGeometry(200,375,540,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u],740,400,"Roll")}),this.addEntry("cylinder graph",function(){var d=new mxCell("",new mxGeometry(315,160,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#10739E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#10739E;");
+p.vertex=!0;var r=new mxCell("Label",new mxGeometry(200,325,460,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#5D7F99;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");r.vertex=!0;var t=new mxCell("Label",new mxGeometry(200,350,500,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#2F5B7C;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
+t.vertex=!0;var v=new mxCell("Label",new mxGeometry(200,375,540,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v],740,400,"Roll")}),this.addEntry("cylinder graph",function(){var d=new mxCell("",new mxGeometry(315,160,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#10739E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#10739E;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(315,180,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#F2931E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#F2931E;");b.vertex=!0;var e=new mxCell("",new mxGeometry(315,200,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#AE4132;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#AE4132;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(315,220,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#23445D;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#23445D;");f.vertex=!0;var g=new mxCell("",new mxGeometry(315,240,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#12AAB5;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#12AAB5;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(175,0,130,160),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#10739E;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(175,80,130,110),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#F2931E;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");
k.vertex=!0;var l=new mxCell("Label",new mxGeometry(175,160,130,50),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#AE4132;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(175,230,130,50),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=SW;callStyle=line;fontSize=17;fontColor=#23445D;align=left;verticalAlign=bottom;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");
m.vertex=!0;var n=new mxCell("Label",new mxGeometry(175,250,130,120),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=SW;callStyle=line;fontSize=17;fontColor=#12AAB5;align=left;verticalAlign=bottom;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");n.vertex=!0;var p=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,30,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");p.vertex=!0;var q=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,110,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");q.vertex=!0;var t=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,190,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");t.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,290,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");u.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,380,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");v.vertex=!0;return sb.createVertexTemplateFromCells([g,f,e,b,d,h,k,l,m,n,p,q,t,u,v],415,430,"Cylinder Graph")}),this.addEntry("swirl",function(){var d=new mxCell("",new mxGeometry(0,0,300,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#10739E;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
+new mxGeometry(0,30,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");p.vertex=!0;var r=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,110,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");r.vertex=!0;var t=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
+new mxGeometry(0,190,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");t.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,290,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");v.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
+new mxGeometry(0,380,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");u.vertex=!0;return sb.createVertexTemplateFromCells([g,f,e,b,d,h,k,l,m,n,p,r,t,v,u],415,430,"Cylinder Graph")}),this.addEntry("swirl",function(){var d=new mxCell("",new mxGeometry(0,0,300,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#10739E;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(0,79,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#F2931E;fontSize=12;fontColor=#3333FF;flipV=1;strokeWidth=4;");b.vertex=!0;var e=new mxCell("",new mxGeometry(70,158,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#AE4132;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(0,237,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#23445D;fontSize=12;fontColor=#3333FF;flipV=1;strokeWidth=4;");f.vertex=!0;var g=new mxCell("",new mxGeometry(70,316,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#12AAB5;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
g.vertex=!0;var h=new mxCell('<b style="font-size: 7px">LABEL</b><br style="font-size: 7px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',new mxGeometry(50,0,150,40),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=7;fontColor=#FFFFFF;align=left;html=1;spacingLeft=5;");h.vertex=!0;var k=new mxCell('<b style="font-size: 7px">LABEL</b><br style="font-size: 7px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
@@ -8440,20 +8442,20 @@ d.vertex=!0;var b=new mxCell("Label",new mxGeometry(30,15,150,15),"shape=manualI
0,130,130),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#10739E;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.23;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");f.vertex=!0;var g=new mxCell("",new mxGeometry(129,15,100,100),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#F2931E;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.3;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
g.vertex=!0;var h=new mxCell("",new mxGeometry(144,30,70,70),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#AE4132;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.43;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");h.vertex=!0;var k=new mxCell("",new mxGeometry(115,85,130,130),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#AE4132;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.23;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(130,100,100,100),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#F2931E;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.3;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");l.vertex=!0;var m=new mxCell("",new mxGeometry(145,115,70,70),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#10739E;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.43;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
-m.vertex=!0;var n=new mxCell("",new mxGeometry(179,170,181,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#10739E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(179,185,151,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#F2931E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");p.vertex=!0;var q=new mxCell("",new mxGeometry(179,
-200,121,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#AE4132;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");q.vertex=!0;var t=new mxCell("1",new mxGeometry(0,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#10739E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");t.vertex=!0;var u=new mxCell("2",new mxGeometry(40,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#F2931E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
-u.vertex=!0;var v=new mxCell("3",new mxGeometry(80,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#AE4132;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],360,215,"Swirl")}),this.addEntry("callout",function(){var d=new mxCell("Label",new mxGeometry(0,0,0,0),"endArrow=oval;html=1;fontSize=16;fontColor=#10739E;endFill=0;endSize=24;strokeWidth=5;labelBackgroundColor=none;verticalAlign=top;fontStyle=1;strokeColor=#10739E;");
+m.vertex=!0;var n=new mxCell("",new mxGeometry(179,170,181,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#10739E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(179,185,151,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#F2931E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");p.vertex=!0;var r=new mxCell("",new mxGeometry(179,
+200,121,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#AE4132;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");r.vertex=!0;var t=new mxCell("1",new mxGeometry(0,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#10739E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");t.vertex=!0;var v=new mxCell("2",new mxGeometry(40,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#F2931E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
+v.vertex=!0;var u=new mxCell("3",new mxGeometry(80,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#AE4132;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],360,215,"Swirl")}),this.addEntry("callout",function(){var d=new mxCell("Label",new mxGeometry(0,0,0,0),"endArrow=oval;html=1;fontSize=16;fontColor=#10739E;endFill=0;endSize=24;strokeWidth=5;labelBackgroundColor=none;verticalAlign=top;fontStyle=1;strokeColor=#10739E;");
d.geometry.setTerminalPoint(new mxPoint(0,100),!0);d.geometry.setTerminalPoint(new mxPoint(100,0),!1);d.geometry.x=-1;d.geometry.relative=!0;d.edge=!0;return sb.createVertexTemplateFromCells([d],100,100,"Callout")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(234,0,12,12),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;fillColor=none;strokeColor=#333333;fontSize=16;align=center;strokeWidth=2;");d.vertex=!0;var b=new mxCell("",new mxGeometry(234,498,12,12),
"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;fillColor=none;strokeColor=#333333;fontSize=16;align=center;strokeWidth=2;");b.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;strokeWidth=3;strokeColor=#CCCCCC;labelBackgroundColor=none;fontSize=16");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);b.insertEdge(e,!1);var f=new mxCell("",new mxGeometry(0,30,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#10739E;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
f.vertex=!0;var g=new mxCell("",new mxGeometry(234,100,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#F2931E;labelPosition=center;align=center;fontColor=#F2931E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,170,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#AE4132;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
h.vertex=!0;var k=new mxCell("",new mxGeometry(234,240,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#23445D;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,310,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#12AAB5;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(234,380,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#56517E;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(70,20,160,30),"fillColor=#10739E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");n.vertex=!0;var p=new mxCell("Label",
-new mxGeometry(250,85,160,30),"fillColor=#F2931E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(70,160,160,30),"fillColor=#AE4132;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");q.vertex=!0;var t=new mxCell("Label",new mxGeometry(250,225,160,30),"fillColor=#23445D;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");t.vertex=!0;
-var u=new mxCell("Label",new mxGeometry(70,300,160,30),"fillColor=#12AAB5;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(250,365,160,30),"fillColor=#56517E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");v.vertex=!0;var w=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(70,70,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");w.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,140,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-r.vertex=!0;var y=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,210,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");y.vertex=!0;var x=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(250,280,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");x.vertex=!0;var z=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,350,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-z.vertex=!0;var B=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#56517E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,420,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");B.vertex=!0;return sb.createVertexTemplateFromCells([e,d,b,f,g,h,k,l,m,n,p,q,t,u,v,w,r,y,x,z,B],480,510,"Roadmap (vertical)")}),
+new mxGeometry(250,85,160,30),"fillColor=#F2931E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(70,160,160,30),"fillColor=#AE4132;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");r.vertex=!0;var t=new mxCell("Label",new mxGeometry(250,225,160,30),"fillColor=#23445D;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");t.vertex=!0;
+var v=new mxCell("Label",new mxGeometry(70,300,160,30),"fillColor=#12AAB5;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(250,365,160,30),"fillColor=#56517E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");u.vertex=!0;var w=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(70,70,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");w.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,140,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+q.vertex=!0;var x=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,210,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");x.vertex=!0;var y=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(250,280,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");y.vertex=!0;var z=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,350,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+z.vertex=!0;var A=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#56517E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,420,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");A.vertex=!0;return sb.createVertexTemplateFromCells([e,d,b,f,g,h,k,l,m,n,p,r,t,v,u,w,q,x,y,z,A],480,510,"Roadmap (vertical)")}),
this.addEntry("roadmap horizontal",function(){var d=new mxCell("",new mxGeometry(0,90,840,30),"fillColor=#dddddd;rounded=0;strokeColor=none;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(40,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");b.vertex=!0;var e=new mxCell("Label",new mxGeometry(200,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F2931E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
e.vertex=!0;var f=new mxCell("Label",new mxGeometry(360,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#AE4132;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");f.vertex=!0;var g=new mxCell("Label",new mxGeometry(520,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(680,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#12AAB5;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");h.vertex=!0;var k=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,0,200,70),
@@ -10677,28 +10679,28 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(f){this.sync.cleanup(b,e,f)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=l?this.mergeFile(l,b,e,c):this.reloadFile(b,
e))}catch(m){null!=e&&e(m)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),x=b.getShadowPages();if(null!=x&&0<x.length){var y=[this.ui.diffPages(null!=c?c:m,x)],D=this.ignorePatches(y);this.setShadowPages(x);if(D)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",D);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};D={};var d=this.ui.patchPages(m,y[0]),g=this.ui.getHashValueForPages(d,
-c),k=this.ui.getHashValueForPages(x,D);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",y,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.compressReportData(this.getAnonymizedXmlForPages(d)),p=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(f,y,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(D)+"\nFrom: "+p+"\nTo: "+A+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+q,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var E=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==E||mxUtils.isEmptyObject(E)||y.push(E)}this.patch(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(J);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var z=this.getCurrentUser(),B=null!=z?z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,J)}}catch(M){}}};
+DrawioFile.prototype.mergeFile=function(b,e,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),v=b.getShadowPages();if(null!=v&&0<v.length){var x=[this.ui.diffPages(null!=c?c:m,v)],E=this.ignorePatches(x);this.setShadowPages(v);if(E)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",E);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};E={};var d=this.ui.patchPages(m,x[0]),g=this.ui.getHashValueForPages(d,
+c),k=this.ui.getHashValueForPages(v,E);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",x,"backup",this.backupPatch,"checksum",g,"current",k,"valid",g==k,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=g&&g!=k){var n=this.compressReportData(this.getAnonymizedXmlForPages(v)),q=this.compressReportData(this.getAnonymizedXmlForPages(d)),p=this.ui.hashValue(b.getCurrentEtag()),y=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(f,x,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+g+"\nCurrent: "+k+"\nCurrent Details: "+JSON.stringify(E)+"\nFrom: "+p+"\nTo: "+y+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+q,null,"mergeFile",g,k,b.getCurrentRevisionId());return}if(null!=this.sync){var A=this.sync.patchRealtime(x,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==A||mxUtils.isEmptyObject(A)||x.push(A)}this.patch(x,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(I);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var C=this.getCurrentUser(),B=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,I)}}catch(M){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,x,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var D=0;D<e.length;D++)this.ui.anonymizePatch(e[D]);var d=mxUtils.bind(this,function(A){var E=this.compressReportData(JSON.stringify(e,null,2));A=null==A?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(A.data)),
-25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+E+(null!=A?"\n\nRemote:\n"+A:""),null,7E4)});null==c?d(null):this.getLatestVersion(mxUtils.bind(this,function(A){null!=A&&A.getCurrentEtag()==c?d(A):d(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",q=JSON.stringify(e).length,p=null;if(null!=e&&this.constructor==DriveFile&&400>q){for(D=0;D<e.length;D++)this.ui.anonymizePatch(e[D]);
-p=JSON.stringify(e);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(A){try{var E=null!=p?"Report":"Error",z=this.ui.getHashValueForPages(A.getShadowPages());EditorUi.logError("Checksum "+E+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=x?"-current_"+x:"")+(null!=y?
-"-rev_"+this.ui.hashValue(y):"")+(null!=z?"-latest_"+z:"")+(null!=A?"-latestRev_"+this.ui.hashValue(A.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(A){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),y=null!=x?this.ui.hashValue(x.id):"unknown",D=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),g=d.lastIndexOf(".");x="xml";0<g&&(x=d.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+y+D+"\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:
+DrawioFile.prototype.checksumError=function(b,e,f,c,l,m,v,x){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var E=0;E<e.length;E++)this.ui.anonymizePatch(e[E]);var d=mxUtils.bind(this,function(y){var A=this.compressReportData(JSON.stringify(e,null,2));y=null==y?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(y.data)),
+25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+A+(null!=y?"\n\nRemote:\n"+y:""),null,7E4)});null==c?d(null):this.getLatestVersion(mxUtils.bind(this,function(y){null!=y&&y.getCurrentEtag()==c?d(y):d(null)}),function(){})}else{var g=this.getCurrentUser(),k=null!=g?g.id:"unknown",n=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",q=JSON.stringify(e).length,p=null;if(null!=e&&this.constructor==DriveFile&&400>q){for(E=0;E<e.length;E++)this.ui.anonymizePatch(e[E]);
+p=JSON.stringify(e);p=null!=p&&250>p.length?Graph.compress(p):null}this.getLatestVersion(mxUtils.bind(this,function(y){try{var A=null!=p?"Report":"Error",C=this.ui.getHashValueForPages(y.getShadowPages());EditorUi.logError("Checksum "+A+" in "+l+" "+n,null,this.getMode()+"."+this.getId(),"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+(null!=p?"-json_"+p:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=v?"-current_"+v:"")+(null!=x?
+"-rev_"+this.ui.hashValue(x):"")+(null!=C?"-latest_"+C:"")+(null!=y?"-latestRev_"+this.ui.hashValue(y.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+n,action:l,label:"user_"+k+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+q+"-patches_"+e.length+"-size_"+this.getSize()})}catch(B){}}),b)}}catch(y){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),v=this.getCurrentUser(),x=null!=v?this.ui.hashValue(v.id):"unknown",E=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),g=d.lastIndexOf(".");v="xml";0<g&&(v=d.substring(g));var k=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+v+")\nUser="+x+E+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+k+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(n){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),x=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(x,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var y=this.ui.getCurrentFile();null!=y&&(y.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),v=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(v,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var x=this.ui.getCurrentFile();null!=x&&(x.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):
f()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,f){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=e&&e()}),f)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
-DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,x=this.ui.editor.graph;x.container.style.visibility="hidden";var y=this.changeListenerEnabled;this.changeListenerEnabled=f;var D=x.foldingEnabled,d=x.mathEnabled,g=x.cellRenderer.redraw;x.cellRenderer.redraw=function(k){k.view.graph.isEditing(k.cell)&&(k.view.graph.scrollCellToVisible(k.cell),k.view.graph.cellEditor.resize());g.apply(this,arguments)};x.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{x.container.style.visibility="";x.model.endUpdate();x.cellRenderer.redraw=g;this.changeListenerEnabled=y;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=x.mathEnabled?
-(this.ui.editor.updateGraphComponents(),x.refresh()):(D!=x.foldingEnabled?x.view.revalidate():x.view.validate(),x.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};
+DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,v=this.ui.editor.graph;v.container.style.visibility="hidden";var x=this.changeListenerEnabled;this.changeListenerEnabled=f;var E=v.foldingEnabled,d=v.mathEnabled,g=v.cellRenderer.redraw;v.cellRenderer.redraw=function(k){k.view.graph.isEditing(k.cell)&&(k.view.graph.scrollCellToVisible(k.cell),k.view.graph.cellEditor.resize());g.apply(this,arguments)};v.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{v.container.style.visibility="";v.model.endUpdate();v.cellRenderer.redraw=g;this.changeListenerEnabled=x;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=v.mathEnabled?
+(this.ui.editor.updateGraphComponents(),v.refresh()):(E!=v.foldingEnabled?v.view.revalidate():v.view.validate(),v.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};
DrawioFile.prototype.save=function(b,e,f,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=f)f(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+else throw Error(mxResources.get("readOnly"));}catch(v){if(null!=f)f(v);else throw v;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,f){};
DrawioFile.prototype.saveFile=function(b,e,f,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,f){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -10735,431 +10737,431 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(x){this.handleFileError(x,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+DrawioFile.prototype.handleConflictError=function(b,e){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(v){this.handleFileError(v,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,l):this.invalidChecksum?this.showRefreshDialog(f,c,this.getErrorMessage(b)):e?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(f,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(D){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=c&&c(D);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,D);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),y,D)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.fileSaved=function(b,e,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,e,f,c,l)}catch(E){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=c&&c(E);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,E);else{var v=this.getCurrentUser(),x=null!=v?v.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),x,E)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision();
-m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(x){this.autosaveCompleted();null!=f&&f(x)}),mxUtils.bind(this,function(x){null!=c&&c(x)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(v){this.autosaveCompleted();null!=f&&f(v)}),mxUtils.bind(this,function(v){null!=c&&c(v)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=e.lastIndexOf(".");return b===(0<f?e.substring(f):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,l,m){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,f){this.saveAs(this.title,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var x=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),D=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var v=this.getData(),x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),E=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var g=mxUtils.bind(this,
function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);this.desc.lastModified==q.lastModified?n.write(m?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var A=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(x,A,y,g);this.removeDraft()}catch(E){g(E)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;g(q)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,m?"image/png":"text/xml",m);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));y()}});m?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){D(d)}),c,this.ui.getCurrentFile()!=this?x:null,e.scale,e.border)):D(x)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){try{var y=this.desc;this.savingFile=!1;this.desc=p;this.fileSaved(v,y,x,g);this.removeDraft()}catch(A){g(A)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;g(q)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,m?"image/png":"text/xml",m);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));x()}});m?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){E(d)}),c,this.ui.getCurrentFile()!=this?v:null,e.scale,e.border)):E(v)};
LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};StorageFile.prototype.saveAs=function(b,e,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,f)};
-StorageFile.insertFile=function(b,e,f,c,l){var m=mxUtils.bind(this,function(x){var y=function(){var D=new StorageFile(b,f,e);D.saveFile(e,!1,function(){c(D)},l)};x?b.confirm(mxResources.get("replaceIt",[e]),y,l):y()});StorageFile.getFileContent(b,e,function(x){m(null!=x)},function(){m(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};
+StorageFile.insertFile=function(b,e,f,c,l){var m=mxUtils.bind(this,function(v){var x=function(){var E=new StorageFile(b,f,e);E.saveFile(e,!1,function(){c(E)},l)};v?b.confirm(mxResources.get("replaceIt",[e]),x,l):x()});StorageFile.getFileContent(b,e,function(v){m(null!=v)},function(){m(!1)})};StorageFile.getFileContent=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,f):null!=c&&c()}),"files")};
StorageFile.getFileInfo=function(b,e,f,c){b.getDatabaseItem(e,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(l){f(null!=l?{title:e}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,e,f,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var x=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:x.length,lastModified:Date.now(),type:this.type},{title:this.title,data:x}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-x,m):null!=c&&c()}),["filesInfo","files"])}catch(y){null!=c&&c(y)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()};
+StorageFile.prototype.saveFile=function(b,e,f,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var v=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:v.length,lastModified:Date.now(),type:this.type},{title:this.title,data:v}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+v,m):null!=c&&c()}),["filesInfo","files"])}catch(x){null!=c&&c(x)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()};
StorageFile.prototype.rename=function(b,e,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),m,f):m()}),f):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(new StorageFile(this.ui,f,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),x=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||x)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e};
+StorageFile.listLocalStorageFiles=function(b){for(var e=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),v=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||v)&&e.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return e};
StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;c<e.length;c++){var l=e[c],m=localStorage.getItem(l.title);b.add({title:l.title,data:m});f.add(l)}};
-StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var m=[];if(null!=l)for(var x=0;x<l.length;x++)"."==l[x].title.charAt(0)||null!=e&&l[x].type!=e||m.push(l[x]);f(m)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var m=[];if(null!=l)for(var v=0;v<l.length;v++)"."==l[v].title.charAt(0)||null!=e&&l[v].type!=e||m.push(l[v]);f(m)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(k,n,q,p,A,E){function z(){mxEvent.addListener(B,"click",null!=E?E:function(){q!=App.MODE_GOOGLE||b.isDriveDomain()?q==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()})):q==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()}),
-function(G){b.spinner.stop();b.handleError(G)}):(b.setMode(q,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}y++;++x>f&&(mxUtils.br(D),x=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height=
-"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,n);B.appendChild(J);if(null!=k){var M=document.createElement("img");M.setAttribute("src",k);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";B.appendChild(M)}else J.style.paddingTop=
-"5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=A)for(k=0;k<A.length;k++)mxUtils.br(J),mxUtils.write(J,A[k]);if(null!=p&&null==b[p]){M.style.visibility="hidden";mxUtils.setOpacity(J,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(B);
-var u=window.setTimeout(function(){null==b[p]&&(v.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(G,I){null!=b[p]&&I.getProperty("client")==b[p]&&(window.clearTimeout(u),mxUtils.setOpacity(J,100),M.style.visibility="",v.stop(),z(),"drive"==p&&null!=d.parentNode&&d.parentNode.removeChild(d))}))}else z();D.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
-"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var x=0,y=0,D=document.createElement("div");D.style.paddingTop="2px";m.appendChild(D);var d=document.createElement("p"),g=document.createElement("p");g.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");l.appendChild(g);l.appendChild(m);x=0;"function"===typeof window.DriveClient&&
+var StorageDialog=function(b,e,f){function c(k,n,q,p,y,A){function C(){mxEvent.addListener(B,"click",null!=A?A:function(){q!=App.MODE_GOOGLE||b.isDriveDomain()?q==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()})):q==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(q,!0);e()}),
+function(u){b.spinner.stop();b.handleError(u)}):(b.setMode(q,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}x++;++v>f&&(mxUtils.br(E),v=1);var B=document.createElement("a");B.style.overflow="hidden";B.style.display="inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="8px";B.style.marginBottom="0px";B.style.padding="8px 10px 8px 10px";B.style.width="88px";B.style.height=
+"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",n);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,n);B.appendChild(I);if(null!=k){var M=document.createElement("img");M.setAttribute("src",k);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";B.appendChild(M)}else I.style.paddingTop=
+"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=y)for(k=0;k<y.length;k++)mxUtils.br(I),mxUtils.write(I,y[k]);if(null!=p&&null==b[p]){M.style.visibility="hidden";mxUtils.setOpacity(I,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(B);
+var S=window.setTimeout(function(){null==b[p]&&(G.stop(),B.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(u,z){null!=b[p]&&z.getProperty("client")==b[p]&&(window.clearTimeout(S),mxUtils.setOpacity(I,100),M.style.visibility="",G.stop(),C(),"drive"==p&&null!=d.parentNode&&d.parentNode.removeChild(d))}))}else C();E.appendChild(B)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
+"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var v=0,x=0,E=document.createElement("div");E.style.paddingTop="2px";m.appendChild(E);var d=document.createElement("p"),g=document.createElement("p");g.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");l.appendChild(g);l.appendChild(m);v=0;"function"===typeof window.DriveClient&&
c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");m=document.createElement("span");m.style.position="absolute";m.style.cursor="pointer";m.style.bottom="27px";m.style.color="gray";m.style.userSelect="none";m.style.textAlign="center";m.style.left="50%";mxUtils.setPrefixedStyle(m.style,
"transform","translate(-50%,0)");mxUtils.write(m,mxResources.get("decideLater"));l.appendChild(m);mxEvent.addListener(m,"click",function(){b.hideDialog();var k=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=k});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(d.style.padding="7px",d.style.fontSize="9pt",d.style.marginTop="-14px",
d.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(d))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=
b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=
IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):
-(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var x=document.createElement("table"),
-y=document.createElement("tbody"),D=document.createElement("tr"),d=document.createElement("td"),g=document.createElement("td");x.setAttribute("align","center");d.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);D.appendChild(d);D.appendChild(g);y.appendChild(D);x.appendChild(y);e.appendChild(x);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var v=document.createElement("table"),
+x=document.createElement("tbody"),E=document.createElement("tr"),d=document.createElement("td"),g=document.createElement("td");v.setAttribute("align","center");d.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);g.style.textAlign="left";g.appendChild(c);E.appendChild(d);E.appendChild(g);x.appendChild(E);v.appendChild(x);e.appendChild(v);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
"18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(q){m.style.marginBottom="24px";var p=document.createElement("a");p.style.display="inline-block";p.style.color="gray";p.style.cursor="pointer";p.style.marginTop="6px";mxUtils.write(p,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(p,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){q()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)x=document.createElement("option"),mxUtils.write(x,k[f].displayName),x.value=f,n.appendChild(x),
-x=document.createElement("option"),x.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(x,"<"+k[f].email+">"),x.setAttribute("disabled","disabled"),n.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=k.length;n.appendChild(x);mxEvent.addListener(n,"change",function(){var q=n.value,p=k.length!=q;p&&b.drive.setUser(k[q]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
+function(){q()})});l.appendChild(p)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var k=b.drive.getUsersList();if(0<k.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var n=document.createElement("select");n.style.marginLeft="4px";n.style.width="140px";for(f=0;f<k.length;f++)v=document.createElement("option"),mxUtils.write(v,k[f].displayName),v.value=f,n.appendChild(v),
+v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(v,"<"+k[f].email+">"),v.setAttribute("disabled","disabled"),n.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=k.length;n.appendChild(v);mxEvent.addListener(n,"change",function(){var q=n.value,p=k.length!=q;p&&b.drive.setUser(k[q]);b.drive.authorize(p,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(y){b.handleError(y,null,function(){b.hideDialog();
b.showSplash()})},!0)});l.appendChild(n)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,x,y,D){x=null!=x?x:"Check out the diagram I made using @drawio";c=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
+null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,m,v,x,E){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var d=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>e.length?d?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(e.length));c.appendChild(m);var g=document.createElement("textarea");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.marginTop="10px";g.style.resize="none";g.style.height="150px";g.style.width="440px";g.style.border=
"1px solid gray";g.value=mxResources.get("updatingDocument");c.appendChild(g);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(g.value=e,g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)):(g.setAttribute("readonly","true"),g.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var k=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=y?y:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var q=5E5>e.length?g.value:e;if(null!=l)l(q);else if(d)try{var p=b.openLink(q);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=q.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(E){}}),
-f||500)}catch(E){b.handleError({message:E.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!d||7500<e.length)y=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=D?D:"embed.txt","txt",e,"text/plain")}),y.className="geBtn",m.appendChild(y);if(d&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var q="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height",
-"18");y.setAttribute("border","0");n.appendChild(y);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var q="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
-y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",n.appendChild(y),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>e.length&&(n=mxUtils.button("",function(){try{var q="mailto:?subject="+encodeURIComponent(D||
-b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",n.appendChild(y),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n));
-y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(y);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",y.className="geBtn"):(m.appendChild(k),
-y.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var G=null!=u&&null!=u.getTitle()?u.getTitle():this.defaultFilename;if(M.checked&&""!=n.value){var I="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=G&&(I+="&title="+encodeURIComponent(G));0<v.length&&(I+="&s="+v);""!=q.value&&"0"!=q.value&&(I+="&border="+q.value);""!=k.value&&(I+="&height="+k.value);I+="&pan="+(p.checked?"1":"0");I+="&zoom="+(A.checked?"1":"0");I+="&fit="+(J.checked?"1":"0");
-I+="&resize="+(B.checked?"1":"0");I+="&x0="+Number(g.value);I+="&y0="+D;l.mathEnabled&&(I+="&math=1");z.checked?I+="&edit=_blank":E.checked&&(I+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=I}else u.constructor==DriveFile||u.constructor==DropboxFile?(I="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?I+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(I+=u.getHash().substring(1),I=u.constructor==DropboxFile?I+"&type=2":I+"&type=1"),null!=
-G&&(I+="&title="+encodeURIComponent(G)),""!=k.value&&(G=parseInt(k.value)+parseInt(g.value),I+="&height="+G),d.value=I):d.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),x=l.view.scale,y=Math.floor(m.x/x-l.view.translate.x),D=Math.floor(m.y/x-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
-c.appendChild(d);mxUtils.br(c);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=y;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text");
-k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(m.height/x);c.appendChild(k);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","28");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";n.value=e||"";c.appendChild(n);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,mxResources.get("zoom")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";E.setAttribute("title",window.location.href);c.appendChild(E);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft=
-"8px";c.appendChild(M);mxUtils.write(c,mxResources.get("embed")+" ");var v=b.getBasenames().join(";"),u=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(M,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(n,"change",f);f();
+mxClient.IS_CHROMEAPP&&!d||navigator.standalone||!(d||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(k=mxUtils.button(null!=x?x:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var q=5E5>e.length?g.value:e;if(null!=l)l(q);else if(d)try{var p=b.openLink(q);null!=p&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=p&&null!=p.location.href&&p.location.href.substring(0,8)!=q.substring(0,8)&&(p.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),
+f||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var y=window.open();y=null!=y?y.document:null;null!=y?(y.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),y.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),k.className="geBtn",m.appendChild(k));if(!d||7500<e.length)x=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=E?E:"embed.txt","txt",e,"text/plain")}),x.className="geBtn",m.appendChild(x);if(d&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var n=mxUtils.button("",function(){try{var q="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}});x=document.createElement("img");x.setAttribute("src",Editor.facebookImage);x.setAttribute("width","18");x.setAttribute("height",
+"18");x.setAttribute("border","0");n.appendChild(x);n.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");n.style.verticalAlign="bottom";n.style.paddingTop="4px";n.style.minWidth="46px";n.className="geBtn";m.appendChild(n)}7168>e.length&&(n=mxUtils.button("",function(){try{var q="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),
+x=document.createElement("img"),x.setAttribute("src",Editor.tweetImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",n.appendChild(x),n.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n))}!b.isOffline()&&5E5>e.length&&(n=mxUtils.button("",function(){try{var q="mailto:?subject="+encodeURIComponent(E||
+b.defaultFilename)+"&body="+encodeURIComponent(g.value);b.openLink(q)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),x=document.createElement("img"),x.className="geAdaptiveAsset",x.setAttribute("src",Editor.mailImage),x.setAttribute("width","18"),x.setAttribute("height","18"),x.setAttribute("border","0"),x.style.marginBottom="5px",n.appendChild(x),n.style.verticalAlign="bottom",n.style.paddingTop="4px",n.style.minWidth="46px",n.className="geBtn",m.appendChild(n));
+x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(x);n=mxUtils.button(mxResources.get("copy"),function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?x.className="geBtn gePrimaryBtn":(m.appendChild(n),n.className="geBtn gePrimaryBtn",x.className="geBtn"):(m.appendChild(k),
+x.className="geBtn",k.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,e){function f(){var u=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;if(M.checked&&""!=n.value){var z="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(n.value));null!=u&&(z+="&title="+encodeURIComponent(u));0<G.length&&(z+="&s="+G);""!=q.value&&"0"!=q.value&&(z+="&border="+q.value);""!=k.value&&(z+="&height="+k.value);z+="&pan="+(p.checked?"1":"0");z+="&zoom="+(y.checked?"1":"0");z+="&fit="+(I.checked?"1":"0");
+z+="&resize="+(B.checked?"1":"0");z+="&x0="+Number(g.value);z+="&y0="+E;l.mathEnabled&&(z+="&math=1");C.checked?z+="&edit=_blank":A.checked&&(z+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));d.value=z}else S.constructor==DriveFile||S.constructor==DropboxFile?(z="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=n.value?z+=encodeURIComponent(mxUtils.htmlEntities(n.value))+"&type=3":(z+=S.getHash().substring(1),z=S.constructor==DropboxFile?z+"&type=2":z+"&type=1"),null!=
+u&&(z+="&title="+encodeURIComponent(u)),""!=k.value&&(u=parseInt(k.value)+parseInt(g.value),z+="&height="+u),d.value=z):d.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),v=l.view.scale,x=Math.floor(m.x/v-l.view.translate.x),E=Math.floor(m.y/v-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";
+c.appendChild(d);mxUtils.br(c);this.init=function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=x;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var k=document.createElement("input");k.setAttribute("type","text");
+k.setAttribute("size","4");k.style.marginLeft="4px";k.value=Math.ceil(m.height/v);c.appendChild(k);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","28");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";n.value=e||"";c.appendChild(n);
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";c.appendChild(q);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var y=document.createElement("input");
+y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";c.appendChild(I);mxUtils.write(c,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft=
+"8px";c.appendChild(M);mxUtils.write(c,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),S=b.getCurrentFile();mxEvent.addListener(p,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(M,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(n,"change",f);f();
mxEvent.addListener(d,"click",function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";e.appendChild(m);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
-function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var x="curved=1;";m.cellRenderer.installCellOverlayListeners=
-function(A,E,z){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(z.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(z.node,"touchstart",function(B){E.fireEvent(new mxEventObject("pointerdown","event",B,"state",A))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
-!1;m.connectionHandler.createEdgeState=function(A){A=m.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var y=m.getDefaultParent(),D=mxUtils.bind(this,function(A){var E=new mxCellOverlay(this.connectImage,"Add outgoing");E.cursor="hand";E.addListener(mxEvent.CLICK,function(z,B){m.connectionHandler.reset();m.clearSelection();var J=m.getCellGeometry(A),M;k(function(){M=m.insertVertex(y,null,"Entry",J.x,J.y,80,30,"rounded=1;");D(M);m.view.refresh(M);
-m.insertEdge(y,null,"",A,M,x)},function(){m.scrollCellToVisible(M)})});E.addListener("pointerdown",function(z,B){z=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var J=mxUtils.convertPoint(m.container,mxEvent.getClientX(z),mxEvent.getClientY(z));m.connectionHandler.start(B,J.x,J.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(z);mxEvent.consume(z)});m.addCellOverlay(A,E)});m.getModel().beginUpdate();try{var d=m.insertVertex(y,null,"Start",
-0,0,80,30,"ellipse");D(d)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==f?g=new mxCircleLayout(m):(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80);if(null!=g){var k=function(A,E){m.getModel().beginUpdate();try{null!=A&&A(),g.execute(m.getDefaultParent(),d)}catch(z){throw z;}finally{A=new mxMorphing(m),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=E&&E()})),A.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(A,E,
-z,B,J){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);var p=mxUtils.button(mxResources.get("insert"),function(A){m.clearCellOverlays();
-var E=m.getModel().getChildren(m.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(E,!0));E=b.editor.graph.importCells(E,A.x,A.y);A=b.editor.graph.view;var z=A.getBounds(E);z.x-=A.translate.x;z.y-=A.translate.y;b.editor.graph.scrollRectToVisible(z);b.editor.graph.setSelectionCells(E);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";
+function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var v="curved=1;";m.cellRenderer.installCellOverlayListeners=
+function(y,A,C){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(C.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(B){A.fireEvent(new mxEventObject("pointerdown","event",B,"state",y))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(C.node,"touchstart",function(B){A.fireEvent(new mxEventObject("pointerdown","event",B,"state",y))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
+!1;m.connectionHandler.createEdgeState=function(y){y=m.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,y,this.graph.getCellStyle(y))};var x=m.getDefaultParent(),E=mxUtils.bind(this,function(y){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(C,B){m.connectionHandler.reset();m.clearSelection();var I=m.getCellGeometry(y),M;k(function(){M=m.insertVertex(x,null,"Entry",I.x,I.y,80,30,"rounded=1;");E(M);m.view.refresh(M);
+m.insertEdge(x,null,"",y,M,v)},function(){m.scrollCellToVisible(M)})});A.addListener("pointerdown",function(C,B){C=B.getProperty("event");B=B.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var I=mxUtils.convertPoint(m.container,mxEvent.getClientX(C),mxEvent.getClientY(C));m.connectionHandler.start(B,I.x,I.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(C);mxEvent.consume(C)});m.addCellOverlay(y,A)});m.getModel().beginUpdate();try{var d=m.insertVertex(x,null,"Start",
+0,0,80,30,"ellipse");E(d)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var g=new mxCompactTreeLayout(m);g.edgeRouting=!1;g.levelDistance=30;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(g=new mxCompactTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=30,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(g=new mxRadialTreeLayout(m,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+f?g=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==f?g=new mxCircleLayout(m):(g=new mxFastOrganicLayout(m,!1),g.forceConstant=80);if(null!=g){var k=function(y,A){m.getModel().beginUpdate();try{null!=y&&y(),g.execute(m.getDefaultParent(),d)}catch(C){throw C;}finally{y=new mxMorphing(m),y.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=A&&A()})),y.startAnimation()}},n=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(y,A,
+C,B,I){n.apply(this,arguments);k()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);k()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){k()})}var q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&c.appendChild(q);var p=mxUtils.button(mxResources.get("insert"),function(y){m.clearCellOverlays();
+var A=m.getModel().getChildren(m.getDefaultParent());y=mxEvent.isAltDown(y)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,y.x,y.y);y=b.editor.graph.view;var C=y.getBounds(A);C.x-=y.translate.x;C.y-=y.translate.y;b.editor.graph.scrollRectToVisible(C);b.editor.graph.setSelectionCells(A);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(q)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var y=document.createElement("input");
-y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","geBackgroundImageDialogOption");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginBottom="8px";D.style.width="360px";D.value=m||null==f?"":f.src;var d=document.createElement("select");d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()||
-mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);d.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(x.style.display="none",y.style.display="none",d.style.display="none");var n=document.createElement("option"),q=!1,p=!1,A=function(M,v){q||null!=M&&p||(y.checked?null!=v&&v(n.selected?null:
-d.value):""==D.value||b.isOffline()?(z.value="",B.value="",null!=v&&v("")):(D.value=mxUtils.trim(D.value),b.loadImage(D.value,function(u){z.value=u.width;B.value=u.height;null!=v&&v(D.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));z.value="";B.value="";null!=v&&v(null)})))},E=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(v,u,G,I,F,L){D.value=v;A();D.focus()},function(){},function(v){return"image/"==v.type.substring(0,
-6)},function(v){for(var u=0;u<v.length;u++)v[u]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?d.focus():D.focus();mxEvent.addListener(d,"focus",function(){x.removeAttribute("checked");y.setAttribute("checked","checked");y.checked=!0});mxEvent.addListener(D,"focus",function(){y.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});if(Graph.fileSupport){D.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=c.parentNode,v=null;mxEvent.addListener(M,
-"dragleave",function(u){null!=v&&(v.parentNode.removeChild(v),v=null);u.stopPropagation();u.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(u){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=b.highlightElement(M));u.stopPropagation();u.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(u){null!=v&&(v.parentNode.removeChild(v),v=null);if(0<u.dataTransfer.files.length)E(u.dataTransfer.files);else if(0<=mxUtils.indexOf(u.dataTransfer.types,
-"text/uri-list")){var G=u.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(G)&&(D.value=decodeURIComponent(G),A())}u.stopPropagation();u.preventDefault()}),!1)}};c.appendChild(x);c.appendChild(D);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var z=document.createElement("input");z.setAttribute("type","text");z.style.width="60px";z.style.marginLeft="8px";z.style.marginRight="16px";
-z.value=null==f||m?"":f.width;c.appendChild(z);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(D,"change",A);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],
-null!=M&&(D.value=M.url,A()));D.focus()};c.appendChild(y);c.appendChild(d);mxUtils.br(c);m?(y.setAttribute("checked","checked"),y.checked=!0):(x.setAttribute("checked","checked"),x.checked=!0);!l&&y.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),d.appendChild(n),mxEvent.addListener(d,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){D.value="";z.value="";B.value="";x.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type",
-"file");mxEvent.addListener(J,"change",function(M){null!=J.files&&(E(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";c.appendChild(J);g=mxUtils.button(mxResources.get("open"),function(){J.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(M){e(""!=M&&null!=M?new mxImage(M,z.value,B.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(q,p,A){var E=q.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var z=function(U,T,V,W,t){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,t));var C=null;B.getModel().beginUpdate();try{C="txt"==T?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y,
-W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(C,"plantUmlData",JSON.stringify({data:U,format:T},null,2))}finally{B.getModel().endUpdate()}null!=C&&(B.setSelectionCell(C),B.scrollCellToVisible(C))},B=b.editor.graph,J="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-q&&"svg"==J?window.setTimeout(function(){b.spinner.stop();z(q,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(q,J,function(U,T,V){b.spinner.stop();z(q,J,U,T,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(q,J,function(U,T,V){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(new mxRectangle(0,0,T,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,T,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:q,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var M=[],v=0,u={},G=0;G<E.length;G++){var I=mxUtils.trim(E[G]);if("primary key"==I.substring(0,11).toLowerCase()){var F=I.match(/\((.+)\)/);F&&F[1]&&(u[F[1]]=!0);E.splice(G,1)}else 0<I.toLowerCase().indexOf("primary key")&&(u[I.split(" ")[0]]=
-!0,E[G]=mxUtils.trim(I.replace(/primary key/i,"")))}for(G=0;G<E.length;G++)if(I=mxUtils.trim(E[G]),"create table"==I.substring(0,12).toLowerCase())I=mxUtils.trim(I.substring(12)),"("==I.charAt(I.length-1)&&(I=mxUtils.trim(I.substring(0,I.length-1))),p=new mxCell(I,new mxGeometry(v,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,M.push(p),I=b.editor.graph.getPreferredSizeForCell(L),null!=
-I&&(p.geometry.width=I.width+10);else if(null!=p&&")"==I.charAt(0))v+=p.geometry.width+40,p=null;else if("("!=I&&null!=p){I=I.substring(0,","==I.charAt(I.length-1)?I.length-1:I.length);F=u[I.split(" ")[0]];var L=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(F?"1":"0")+";");L.vertex=!0;var K=new mxCell(F?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(F?"fontStyle=1;":""));K.vertex=!0;L.insert(K);I=new mxCell(I,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(F?"fontStyle=5;":""));I.vertex=!0;L.insert(I);I=b.editor.graph.getPreferredSizeForCell(I);null!=I&&p.geometry.width<I.width+30&&(p.geometry.width=Math.min(320,
-Math.max(p.geometry.width,I.width+30)));p.insert(L,F?0:null);p.geometry.height+=30}0<M.length&&(B=b.editor.graph,m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),B.setSelectionCells(B.importCells(M,m.x,m.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==p){if(0<E.length){B=b.editor.graph;L=null;M=[];for(G=p=0;G<E.length;G++)";"!=E[G].charAt(0)&&(0==E[G].length?L=null:null==L?(L=new mxCell(E[G],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;"),
-L.vertex=!0,M.push(L),I=B.getPreferredSizeForCell(L),null!=I&&L.geometry.width<I.width+10&&(L.geometry.width=I.width+10),p+=L.geometry.width+40):"--"==E[G]?(I=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;"),I.vertex=!0,L.geometry.height+=I.geometry.height,L.insert(I)):0<E[G].length&&(v=new mxCell(E[G],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;"),
-v.vertex=!0,I=B.getPreferredSizeForCell(v),null!=I&&v.geometry.width<I.width&&(v.geometry.width=I.width),L.geometry.width=Math.max(L.geometry.width,v.geometry.width),L.geometry.height+=v.geometry.height,L.insert(v)));if(0<M.length){m=mxEvent.isAltDown(A)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0));B.getModel().beginUpdate();try{M=B.importCells(M,m.x,m.y);I=[];for(G=0;G<M.length;G++)I.push(M[G]),I=I.concat(M[G].children);B.fireEvent(new mxEventObject("cellsInserted","cells",I))}finally{B.getModel().endUpdate()}B.setSelectionCells(M);
-B.scrollCellToVisible(B.getSelectionCell())}}}else{L=function(U){var T=H[U];null==T&&(T=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),T.vertex=!0,H[U]=T,M.push(T));return T};var H={};M=[];for(G=0;G<E.length;G++)if(";"!=E[G].charAt(0)){var Q=E[G].split("->");2<=Q.length&&(F=L(Q[0]),K=L(Q[Q.length-1]),Q=new mxCell(2<Q.length?Q[1]:"",new mxGeometry),Q.edge=!0,F.insertEdge(Q,!0),K.insertEdge(Q,!1),M.push(Q))}if(0<M.length){E=document.createElement("div");E.style.visibility="hidden";
-document.body.appendChild(E);B=new Graph(E);B.getModel().beginUpdate();try{M=B.importCells(M);for(G=0;G<M.length;G++)B.getModel().isVertex(M[G])&&(I=B.getPreferredSizeForCell(M[G]),M[G].geometry.width=Math.max(M[G].geometry.width,I.width),M[G].geometry.height=Math.max(M[G].geometry.height,I.height));G=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(B,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),M),G=!1):"circle"==p?
-(new mxCircleLayout(B)).execute(B.getDefaultParent()):(v=new mxFastOrganicLayout(B),v.disableEdgeStyle=!1,v.forceConstant=180,v.execute(B.getDefaultParent()));G&&(u=new mxParallelEdgeLayout(B),u.spacing=30,u.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();I=[];b.editor.graph.getModel().beginUpdate();try{M=B.getModel().getChildren(B.getDefaultParent()),m=mxEvent.isAltDown(A)?m:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),I=b.editor.graph.importCells(M,
-m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",I))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(I);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();E.parentNode.removeChild(E)}}}function l(){return"list"==y.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"==y.value?
-"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.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"==y.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"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize=
-"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var y=document.createElement("select");if("formatSql"==f||"mermaid"==f)y.style.display="none";var D=document.createElement("option");D.setAttribute("value","list");mxUtils.write(D,mxResources.get("list"));"plantUml"!=f&&y.appendChild(D);null!=f&&"fromText"!=f||D.setAttribute("selected","selected");D=document.createElement("option");D.setAttribute("value","table");mxUtils.write(D,mxResources.get("formatSql"));"formatSql"==
-f&&(y.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","mermaid");mxUtils.write(D,mxResources.get("formatSql"));"mermaid"==f&&(y.appendChild(D),D.setAttribute("selected","selected"));D=document.createElement("option");D.setAttribute("value","diagram");mxUtils.write(D,mxResources.get("diagram"));var d=document.createElement("option");d.setAttribute("value","circle");mxUtils.write(d,mxResources.get("circle"));var g=document.createElement("option");
-g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(y.appendChild(D),y.appendChild(d),y.appendChild(g),y.appendChild(k));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected",
-"selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(y.appendChild(D),y.appendChild(d),y.appendChild(g));var n=l();x.value=n;e.appendChild(x);this.init=function(){x.focus()};
-Graph.fileSupport&&(x.addEventListener("dragover",function(q){q.stopPropagation();q.preventDefault()},!1),x.addEventListener("drop",function(q){q.stopPropagation();q.preventDefault();if(0<q.dataTransfer.files.length){q=q.dataTransfer.files[0];var p=new FileReader;p.onload=function(A){x.value=A.target.result};p.readAsText(q)}},!1));e.appendChild(y);mxEvent.addListener(y,"change",function(){var q=l();if(0==x.value.length||x.value==n)n=q,x.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(D=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),D.className="geBtn",e.appendChild(D));D=mxUtils.button(mxResources.get("close"),function(){x.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});D.className="geBtn";b.editor.cancelFirst&&e.appendChild(D);d=mxUtils.button(mxResources.get("insert"),function(q){b.hideDialog();c(x.value,y.value,q)});e.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(D);this.container=e},NewDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p,A,E,z){function B(ka){null!=ka&&(Fa=Ga=ka?135:140);ka=!0;if(null!=la)for(;H<la.length&&(ka||0!=mxUtils.mod(H,30));){var ta=la[H++];ta=v(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs);ka&&ta.click();ka=!1}}function J(){if(aa&&null!=q)f||b.hideDialog(),q(aa,Z,K.value);else if(c)f||b.hideDialog(),c(S,K.value,Y,O);else{var ka=K.value;null!=ka&&
-0<ka.length&&b.pickFolder(b.mode,function(ta){b.createFile(ka,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ta,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(ka,ta,ra,wa,ca,fa,da){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");S=ta;O=ra;P=fa;X=ka;aa=wa;Y=da;Z=ca;X.style.backgroundColor=y;X.style.border=D}function v(ka,ta,ra,wa,ca,fa,da,ha,
-ja,sa,oa){function Ca(La,Ta){null==Ja?(Na=La,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ja=Va.getText());Ta(Ja,Na)}))):Ta(Ja,Na)}function Aa(La,Ta,Va){if(null!=La&&mxUtils.isAncestorNode(document.body,qa)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Wa=new mxCodec(La.ownerDocument),$a=new mxGraphModel;
-Wa.decode(La,$a);La=$a.root.getChildAt(0).children;b.sidebar.createTooltip(qa,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ra?mxResources.get(ra,null,ra):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(qa,null,null,ka,da,oa)},!0,!1)}}function ua(La,Ta){null==ka||Ra||
-b.sidebar.currentElt==qa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ka?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ka.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ka.naturalWidth+'" height="'+Ka.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Aa(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
-qa,Ra=!0,Ca(ka,function(Va){Ra&&b.sidebar.currentElt==qa&&Aa(Va,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var qa=document.createElement("div");qa.className="geTemplate geAdaptiveAsset";qa.style.position="relative";qa.style.height=Fa+"px";qa.style.width=Ga+"px";var Ja=null,Na=ka;null!=ra?qa.setAttribute("title",mxResources.get(ra,null,ra)):null!=wa&&0<wa.length&&qa.setAttribute("title",wa);var Ra=!1,Ka=null;if(null!=fa){qa.style.display="inline-flex";qa.style.justifyContent="center";
-qa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",fa);ca.setAttribute("alt",wa);ca.style.maxWidth=Fa+"px";ca.style.maxHeight=Ga+"px";Ka=ca;var Pa=fa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");qa.appendChild(ca);ca.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){M(qa,null,null,ka,da,oa)}),null,null);mxEvent.addListener(qa,"dblclick",function(La){J();
-mxEvent.consume(La)})}else if(!sa&&null!=ka&&0<ka.length){var Qa=function(La){U.setAttribute("disabled","disabled");qa.style.backgroundColor="transparent";qa.style.border="1px solid transparent";Q.spin(ba);Ca(ka,function(Ta,Va){Q.stop();null!=Ta&&(M(qa,Ta,ta,null,null,oa,Va),La&&J())})};ca=ja||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";qa.style.backgroundImage="url("+ca+")";qa.style.backgroundPosition="center center";qa.style.backgroundRepeat="no-repeat";if(null!=ra){wa=document.createElement("table");
-wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";fa=document.createElement("tbody");ja=document.createElement("tr");sa=document.createElement("td");sa.setAttribute("align","center");sa.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius=
-"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Fa-34+"px";mxUtils.write(Oa,mxResources.get(ra,null,ra));sa.appendChild(Oa);ja.appendChild(sa);fa.appendChild(ja);wa.appendChild(fa);qa.appendChild(wa)}mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){Qa()}),null,null);mxEvent.addListener(qa,"dblclick",function(La){Qa(!0);mxEvent.consume(La)})}else wa=document.createElement("table"),wa.setAttribute("width",
-"100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",fa=document.createElement("tbody"),ja=document.createElement("tr"),sa=document.createElement("td"),sa.setAttribute("align","center"),sa.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth=
-Fa-34+"px",mxUtils.write(Oa,mxResources.get(ra,null,ra)),sa.appendChild(Oa),ja.appendChild(sa),fa.appendChild(ja),wa.appendChild(fa),qa.appendChild(wa),ca&&M(qa),mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(La){M(qa,null,null,ka,da)}),null,null),null!=ha?mxEvent.addListener(qa,"click",ha):(mxEvent.addListener(qa,"click",function(La){M(qa,null,null,ka,da)}),mxEvent.addListener(qa,"dblclick",function(La){J();mxEvent.consume(La)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";qa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(La){Ua=b.sidebar.currentElt==qa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(La){Ua||ua(La,Sa);mxEvent.consume(La)}))}ba.appendChild(qa);return qa}function u(){function ka(ua,
-qa){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+qa.length+")"}function ta(ua,qa,Ja){mxEvent.addListener(qa,"click",function(){za!=qa&&(za.style.backgroundColor="",za=qa,za.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",H=0,la=Ja?Ma[ua][Ja]:xa[ua],V=null,B(!1))})}Ba&&(Ba=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))}));
-if(0<Ea){var ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));na.appendChild(ra);for(var wa in va){var ca=document.createElement("div"),fa=wa;ra=va[wa];18<fa.length&&(fa=fa.substring(0,18)+"&hellip;");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title",
-fa+" ("+ra.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=d&&(ca.style.padding=d);na.appendChild(ca);(function(ua,qa){mxEvent.addListener(ca,"click",function(){za!=qa&&(za.style.backgroundColor="",za=qa,za.style.backgroundColor=x,ba.scrollTop=0,ba.innerText="",H=0,la=va[ua],V=null,B(!1))})})(wa,ca)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");na.appendChild(ra)}for(wa in xa){fa=
-Ma[wa];var da=ca=document.createElement(fa?"ul":"div");ra=xa[wa];var ha=ka(wa,ra);if(null!=fa){var ja=document.createElement("li"),sa=document.createElement("div");sa.className="geTempTreeCaret";sa.setAttribute("title",ha);mxUtils.write(sa,ha);da=sa;ja.appendChild(sa);ha=document.createElement("ul");ha.className="geTempTreeNested";ha.style.visibility="hidden";for(var oa in fa){var Ca=document.createElement("li"),Aa=ka(oa,fa[oa]);Ca.setAttribute("title",Aa);mxUtils.write(Ca,Aa);ta(wa,Ca,oa);ha.appendChild(Ca)}ja.appendChild(ha);
-ca.className="geTempTree";ca.appendChild(ja);(function(ua,qa){mxEvent.addListener(qa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);qa.classList.toggle("geTempTreeCaret-down")})})(ha,sa)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ca.setAttribute("title",ha),mxUtils.write(ca,ha);null!=d&&(ca.style.padding=d);na.appendChild(ca);null==za&&0<ra.length&&(za=ca,za.style.backgroundColor=x,la=ra);ta(wa,da)}B(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;x=null!=x?x:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var I=document.createElement("div");
-I.style.userSelect="none";I.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";f&&I.appendChild(F);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||G||!f||F.appendChild(L);f&&mxUtils.write(F,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?L=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+L);K.style.marginLeft="10px";K.style.width=e||
-G?"144px":"244px";this.init=function(){f&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};f&&(F.appendChild(K),z?K.style.width=e||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),z.style.marginLeft=
-"6px",z.style.width=e||G?"80px":"180px",F.appendChild(z)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),G.style.marginTop="12px",F.appendChild(G))));F=!1;var H=0,Q=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(A||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");J();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";
-if(k||n){var T=[],V=null,W=null,t=null,C=function(ka){U.setAttribute("disabled","disabled");for(var ta=0;ta<T.length;ta++)T[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};F=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";I.appendChild(A);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){na.style.display="";ea.style.display="";ba.style.left="160px";C(0);ba.scrollTop=0;ba.innerText="";H=0;V!=la&&(la=V,xa=W,Ea=t,na.innerText="",u(),V=null)});
-T.push(G);A.appendChild(G);var N=function(ka){na.style.display="none";ea.style.display="none";ba.style.left="30px";C(ka?-1:1);null==V&&(V=la);ba.scrollTop=0;ba.innerText="";Q.spin(ba);var ta=function(ra,wa,ca){H=0;Q.stop();la=ra;ca=ca||{};var fa=0,da;for(da in ca)fa+=ca[da].length;if(wa)ba.innerText=wa;else if(0==ra.length&&0==fa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<fa){na.style.display="";ba.style.left="160px";na.innerText="";Ea=0;xa={"draw.io":ra};
-for(da in ca)xa[da]=ca[da];u()}else B(!0)};ka?n(R.value,ta):k(ta)};k&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){N()}),A.appendChild(G),T.push(G));if(n){G=document.createElement("span");G.style.marginLeft="10px";G.innerText=mxResources.get("search")+":";A.appendChild(G);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ka){13==ka.keyCode&&N(!0)});A.appendChild(R);G=mxUtils.button(mxResources.get("search"),
-function(){N(!0)});G.className="geBtn";A.appendChild(G)}C(0)}var O=null,P=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";A=(f?72:40)+(F?30:0);ba.style.top=A+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ea=document.createElement("div");ea.style.cssText="position:absolute;left:30px;width:128px;top:"+
-A+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");ea.appendChild(ma);var ia=document.createElement("img"),pa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",pa);ia.setAttribute("title",mxResources.get("search"));
-ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",pa),ia.setAttribute("title",mxResources.get("search")),ma.value="",null!=Da&&(Da.click(),Da=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ta=ma.value;if(""==ta)null!=Da&&(Da.click(),
-Da=null);else{if(null==NewDialog.tagsList[g]){var ra={};for(oa in xa)for(var wa=xa[oa],ca=0;ca<wa.length;ca++){var fa=wa[ca];if(null!=fa.tags)for(var da=fa.tags.toLowerCase().split(";"),ha=0;ha<da.length;ha++)null==ra[da[ha]]&&(ra[da[ha]]=[]),ra[da[ha]].push(fa)}NewDialog.tagsList[g]=ra}var ja=ta.toLowerCase().split(" ");ra=NewDialog.tagsList[g];if(0<Ea&&null==ra.__tagsList__){for(oa in va)for(wa=va[oa],ca=0;ca<wa.length;ca++)for(fa=wa[ca],da=fa.title.split(" "),da.push(oa),ha=0;ha<da.length;ha++){var sa=
-da[ha].toLowerCase();null==ra[sa]&&(ra[sa]=[]);ra[sa].push(fa)}ra.__tagsList__=!0}var oa=[];wa={};for(ca=da=0;ca<ja.length;ca++)if(0<ja[ca].length){sa=ra[ja[ca]];var Ca={};oa=[];if(null!=sa)for(ha=0;ha<sa.length;ha++)fa=sa[ha],0==da==(null==wa[fa.url])&&(Ca[fa.url]=!0,oa.push(fa));wa=Ca;da++}ba.scrollTop=0;ba.innerText="";H=0;ra=document.createElement("div");ra.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ra,mxResources.get(0==oa.length?"noResultsFor":
-"resultsFor",[ta]));ba.appendChild(ra);null!=za&&null==Da&&(za.style.backgroundColor="",Da=za,za=ra);la=oa;V=null;B(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(ia.setAttribute("src",pa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));A+=23;var na=document.createElement("div");na.style.cssText="position:absolute;left:30px;width:128px;top:"+
-A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Fa=140,Ga=140,xa={},Ma={},va={},Ea=0,Ba=!0,za=null,Da=null;xa.basic=[{title:"blankDiagram",select:!0}];var la=xa.basic;if(!e){var Ha=function(){mxUtils.get(Ia,function(ka){if(!ya){ya=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),wa=
-ka.getElementsByTagName("add"),ca=[],fa=0;fa<wa.length;fa++)ca.push(encodeURIComponent(mxUtils.getTextContent(wa[fa])));null!=ra&&0<ca.length&&(ta[ra]=ca.join(";"))}else if(ca=ka.getAttribute("url"),null!=ca){wa=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==wa&&(fa=ca.indexOf("/"),wa=ca.substring(0,fa),null==ra)){var da=ca.indexOf("/",fa+1);-1<da&&(ra=ca.substring(fa+1,da))}fa=xa[wa];null==fa&&(fa=[],xa[wa]=fa);ca=ka.getAttribute("clibs");null!=ta[ca]&&(ca=ta[ca]);ca={url:ka.getAttribute("url"),
-libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:ca,tags:ka.getAttribute("tags")};fa.push(ca);null!=ra&&(fa=Ma[wa],null==fa&&(fa={},Ma[wa]=fa),wa=fa[ra],null==wa&&(wa=[],fa[ra]=wa),wa.push(ca))}ka=ka.nextSibling}Q.stop();u()}})};I.appendChild(ea);I.appendChild(na);I.appendChild(ba);var ya=!1,Ia=g;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia));
-Q.spin(ba);null!=E?E(function(ka,ta){va=ka;t=Ea=ta;Ha()},Ha):Ha();W=xa}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==I&&13==ka.keyCode&&J()});E=document.createElement("div");E.style.marginTop=e?"4px":"16px";E.style.textAlign="right";E.style.position="absolute";E.style.left="40px";E.style.bottom="24px";E.style.right="40px";e||b.isOffline()||!f||null!=c||l||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",E.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||l&&null==m||E.appendChild(A);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){S=
-ra;O=null;templateRealURl=ta;b.hideDialog();J()},function(ra){b.handleError(ra)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",E.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0);
-ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),p.className="geBtn",E.appendChild(p));E.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||E.appendChild(A);I.appendChild(E);this.container=I};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p,A,E){function z(F,L,K,H){function Q(){mxEvent.addListener(U,"click",function(){var C=K;if(x){var N=M.value,R=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>R){C=null!=C?C:I.value;var O="";C==App.MODE_GOOGLE?O=b.drive.extension:C==App.MODE_GITHUB?O=b.gitHub.extension:C==App.MODE_GITLAB?O=b.gitLab.extension:C==App.MODE_TRELLO?O=b.trello.extension:C==App.MODE_DROPBOX?O=b.dropbox.extension:C==App.MODE_ONEDRIVE?O=b.oneDrive.extension:C==App.MODE_DEVICE&&
-(O=".drawio");0<=R&&(N=N.substring(0,R));M.value=N+O}}B(K)})}var U=document.createElement("a");U.style.overflow="hidden";var T=document.createElement("img");T.src=F;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(T);U.style.color=
-"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,L);if(null!=H&&null==b[H]){T.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(U);var t=window.setTimeout(function(){null==b[H]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(t),
-mxUtils.setOpacity(V,100),T.style.visibility="",W.stop(),Q())}))}else Q();u.appendChild(U);++G==k&&(mxUtils.br(u),G=0)}function B(F){var L=M.value;if(null==F||null!=L&&0<L.length)E&&b.hideDialog(),f(L,F,M)}g="1"==urlParams.noDevice?!1:g;x=null!=x?x:!0;y=null!=y?y:!0;k=null!=k?k:4;E=null!=E?E:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom=
-"24px";m.appendChild(J);mxUtils.write(m,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",e);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};m.appendChild(M);null!=A&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),
-l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,M,A)));A=null;if("1"!=urlParams.noDevice&&null!=n&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";l=document.createElement("img");var v=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+q+";base64,"+v);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=q||(A=mxUtils.button(mxResources.get("copy"),function(F){F=b.base64ToBlob(v,"image/png");F=new ClipboardItem({"image/png":F,"text/html":new Blob(['<img src="data:'+q+";base64,"+v+'">'],{type:"text/html"})});navigator.clipboard.write([F]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(L){b.handleError(L)}))}),
-A.style.marginTop="6px",A.className="geBtn");D&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(F){mxEvent.isPopupTrigger(F)||B("_blank")}))}mxUtils.br(m);var u=document.createElement("div");u.style.textAlign="center";var G=0;u.style.marginTop="6px";m.appendChild(u);var I=document.createElement("select");I.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),I.appendChild(n),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),I.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),I.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),I.appendChild(n),z(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITLAB),mxUtils.write(n,mxResources.get("gitlab")),I.appendChild(n),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_TRELLO),mxUtils.write(n,mxResources.get("trello")),I.appendChild(n),z(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)n=document.createElement("option"),n.setAttribute("value",App.MODE_DEVICE),mxUtils.write(n,mxResources.get("device")),I.appendChild(n),b.mode!=App.MODE_DEVICE&&y||n.setAttribute("selected","selected"),g&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),
-y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),I.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(d)}),g.className="geBtn",y.appendChild(g));g=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
-function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(g);null==c&&(n=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),n.className="geBtn",y.appendChild(n));D&&Editor.popupsAllowed&&(D=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),D.className="geBtn",y.appendChild(D));CreateDialog.showDownloadButton&&(D=mxUtils.button(mxResources.get("download"),
-function(){B("download")}),D.className="geBtn",y.appendChild(D),null!=A&&(D.style.marginTop="6px",y.style.marginTop="6px"));null!=A&&(mxUtils.br(y),y.appendChild(A));b.editor.cancelFirst&&null==c||y.appendChild(g);mxEvent.addListener(M,"keypress",function(F){13==F.keyCode?B(App.MODE_DEVICE):27==F.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(y);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";m.appendChild(x);mxUtils.br(m);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=x.style.width;m.appendChild(y);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,x,y){function D(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var d=b.editor.graph,g=document.createElement("div");mxUtils.write(g,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
+var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geBackgroundImageDialogOption");var x=document.createElement("input");
+x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geBackgroundImageDialogOption");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginBottom="8px";E.style.width="360px";E.value=m||null==f?"":f.src;var d=document.createElement("select");d.style.width="360px";if(null!=b.pages)for(var g=0;g<b.pages.length;g++){var k=document.createElement("option");mxUtils.write(k,b.pages[g].getName()||
+mxResources.get("pageWithNumber",[g+1]));k.setAttribute("value","data:page/id,"+b.pages[g].getId());b.pages[g]==b.currentPage&&k.setAttribute("disabled","disabled");null!=f&&f.originalSrc==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0);d.appendChild(k)}m||null!=b.pages&&1!=b.pages.length||(v.style.display="none",x.style.display="none",d.style.display="none");var n=document.createElement("option"),q=!1,p=!1,y=function(M,G){q||null!=M&&p||(x.checked?null!=G&&G(n.selected?null:
+d.value):""==E.value||b.isOffline()?(C.value="",B.value="",null!=G&&G("")):(E.value=mxUtils.trim(E.value),b.loadImage(E.value,function(S){C.value=S.width;B.value=S.height;null!=G&&G(E.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));C.value="";B.value="";null!=G&&G(null)})))},A=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(G,S,u,z,F,J){E.value=G;y();E.focus()},function(){},function(G){return"image/"==G.type.substring(0,
+6)},function(G){for(var S=0;S<G.length;S++)G[S]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?d.focus():E.focus();mxEvent.addListener(d,"focus",function(){v.removeAttribute("checked");x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(E,"focus",function(){x.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){E.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=c.parentNode,G=null;mxEvent.addListener(M,
+"dragleave",function(S){null!=G&&(G.parentNode.removeChild(G),G=null);S.stopPropagation();S.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(S){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(M));S.stopPropagation();S.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(S){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<S.dataTransfer.files.length)A(S.dataTransfer.files);else if(0<=mxUtils.indexOf(S.dataTransfer.types,
+"text/uri-list")){var u=S.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(u)&&(E.value=decodeURIComponent(u),y())}S.stopPropagation();S.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(E);mxUtils.br(c);g=document.createElement("span");g.style.marginLeft="30px";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var C=document.createElement("input");C.setAttribute("type","text");C.style.width="60px";C.style.marginLeft="8px";C.style.marginRight="16px";
+C.value=null==f||m?"":f.width;c.appendChild(C);mxUtils.write(c,mxResources.get("height")+":");var B=document.createElement("input");B.setAttribute("type","text");B.style.width="60px";B.style.marginLeft="8px";B.style.marginRight="16px";B.value=null==f||m?"":f.height;c.appendChild(B);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(E,"change",y);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],
+null!=M&&(E.value=M.url,y()));E.focus()};c.appendChild(x);c.appendChild(d);mxUtils.br(c);m?(x.setAttribute("checked","checked"),x.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!l&&x.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),d.appendChild(n),mxEvent.addListener(d,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));f=document.createElement("div");
+f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){q=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);g=mxUtils.button(mxResources.get("reset"),function(){E.value="";C.value="";B.value="";v.checked=!0;q=!1});mxEvent.addGestureListeners(g,function(){q=!0});g.className="geBtn";g.width="100";f.appendChild(g);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
+"file");mxEvent.addListener(I,"change",function(M){null!=I.files&&(A(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";c.appendChild(I);g=mxUtils.button(mxResources.get("open"),function(){I.click()});g.className="geBtn";f.appendChild(g)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();y(null,function(M){e(""!=M&&null!=M?new mxImage(M,C.value,B.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){p=!0});applyBtn.className="geBtn gePrimaryBtn";
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(q,p,y){var A=q.split("\n");if("plantUmlPng"==p||"plantUmlSvg"==p||"plantUmlTxt"==p){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var C=function(U,Q,V,W,t){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(new mxRectangle(0,0,W,t));var D=null;B.getModel().beginUpdate();try{D="txt"==Q?b.insertAsPreText(V,m.x,m.y):B.insertVertex(null,null,null,m.x,m.y,
+W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),B.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:U,format:Q},null,2))}finally{B.getModel().endUpdate()}null!=D&&(B.setSelectionCell(D),B.scrollCellToVisible(D))},B=b.editor.graph,I="plantUmlTxt"==p?"txt":"plantUmlPng"==p?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+q&&"svg"==I?window.setTimeout(function(){b.spinner.stop();C(q,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(q,I,function(U,Q,V){b.spinner.stop();C(q,I,U,Q,V)},function(U){b.handleError(U)})}}else if("mermaid"==p)b.spinner.spin(document.body,mxResources.get("inserting"))&&(B=b.editor.graph,b.generateMermaidImage(q,I,function(U,Q,V){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(new mxRectangle(0,0,Q,V));b.spinner.stop();var W=null;B.getModel().beginUpdate();try{W=B.insertVertex(null,null,null,m.x,m.y,Q,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+U+";"),B.setAttributeForCell(W,"mermaidData",JSON.stringify({data:q,config:EditorUi.defaultMermaidConfig},null,2))}finally{B.getModel().endUpdate()}null!=W&&(B.setSelectionCell(W),B.scrollCellToVisible(W))},function(U){b.handleError(U)}));else if("table"==p){p=null;for(var M=[],G=0,S={},u=0;u<A.length;u++){var z=mxUtils.trim(A[u]);if("primary key"==z.substring(0,11).toLowerCase()){var F=z.match(/\((.+)\)/);F&&F[1]&&(S[F[1]]=!0);A.splice(u,1)}else 0<z.toLowerCase().indexOf("primary key")&&(S[z.split(" ")[0]]=
+!0,A[u]=mxUtils.trim(z.replace(/primary key/i,"")))}for(u=0;u<A.length;u++)if(z=mxUtils.trim(A[u]),"create table"==z.substring(0,12).toLowerCase())z=mxUtils.trim(z.substring(12)),"("==z.charAt(z.length-1)&&(z=mxUtils.trim(z.substring(0,z.length-1))),p=new mxCell(z,new mxGeometry(G,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),p.vertex=!0,M.push(p),z=b.editor.graph.getPreferredSizeForCell(J),null!=
+z&&(p.geometry.width=z.width+10);else if(null!=p&&")"==z.charAt(0))G+=p.geometry.width+40,p=null;else if("("!=z&&null!=p){z=z.substring(0,","==z.charAt(z.length-1)?z.length-1:z.length);F=S[z.split(" ")[0]];var J=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(F?"1":"0")+";");J.vertex=!0;var K=new mxCell(F?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(F?"fontStyle=1;":""));K.vertex=!0;J.insert(K);z=new mxCell(z,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(F?"fontStyle=5;":""));z.vertex=!0;J.insert(z);z=b.editor.graph.getPreferredSizeForCell(z);null!=z&&p.geometry.width<z.width+30&&(p.geometry.width=Math.min(320,
+Math.max(p.geometry.width,z.width+30)));p.insert(J,F?0:null);p.geometry.height+=30}0<M.length&&(B=b.editor.graph,m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),B.setSelectionCells(B.importCells(M,m.x,m.y)),B.scrollCellToVisible(B.getSelectionCell()))}else if("list"==p){if(0<A.length){B=b.editor.graph;J=null;M=[];for(u=p=0;u<A.length;u++)";"!=A[u].charAt(0)&&(0==A[u].length?J=null:null==J?(J=new mxCell(A[u],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+J.vertex=!0,M.push(J),z=B.getPreferredSizeForCell(J),null!=z&&J.geometry.width<z.width+10&&(J.geometry.width=z.width+10),p+=J.geometry.width+40):"--"==A[u]?(z=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),z.vertex=!0,J.geometry.height+=z.geometry.height,J.insert(z)):0<A[u].length&&(G=new mxCell(A[u],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+G.vertex=!0,z=B.getPreferredSizeForCell(G),null!=z&&G.geometry.width<z.width&&(G.geometry.width=z.width),J.geometry.width=Math.max(J.geometry.width,G.geometry.width),J.geometry.height+=G.geometry.height,J.insert(G)));if(0<M.length){m=mxEvent.isAltDown(y)?m:B.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0));B.getModel().beginUpdate();try{M=B.importCells(M,m.x,m.y);z=[];for(u=0;u<M.length;u++)z.push(M[u]),z=z.concat(M[u].children);B.fireEvent(new mxEventObject("cellsInserted","cells",z))}finally{B.getModel().endUpdate()}B.setSelectionCells(M);
+B.scrollCellToVisible(B.getSelectionCell())}}}else{J=function(U){var Q=H[U];null==Q&&(Q=new mxCell(U,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),Q.vertex=!0,H[U]=Q,M.push(Q));return Q};var H={};M=[];for(u=0;u<A.length;u++)if(";"!=A[u].charAt(0)){var N=A[u].split("->");2<=N.length&&(F=J(N[0]),K=J(N[N.length-1]),N=new mxCell(2<N.length?N[1]:"",new mxGeometry),N.edge=!0,F.insertEdge(N,!0),K.insertEdge(N,!1),M.push(N))}if(0<M.length){A=document.createElement("div");A.style.visibility="hidden";
+document.body.appendChild(A);B=new Graph(A);B.getModel().beginUpdate();try{M=B.importCells(M);for(u=0;u<M.length;u++)B.getModel().isVertex(M[u])&&(z=B.getPreferredSizeForCell(M[u]),M[u].geometry.width=Math.max(M[u].geometry.width,z.width),M[u].geometry.height=Math.max(M[u].geometry.height,z.height));u=!0;"horizontalFlow"==p||"verticalFlow"==p?((new mxHierarchicalLayout(B,"horizontalFlow"==p?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(B.getDefaultParent(),M),u=!1):"circle"==p?
+(new mxCircleLayout(B)).execute(B.getDefaultParent()):(G=new mxFastOrganicLayout(B),G.disableEdgeStyle=!1,G.forceConstant=180,G.execute(B.getDefaultParent()));u&&(S=new mxParallelEdgeLayout(B),S.spacing=30,S.execute(B.getDefaultParent()))}finally{B.getModel().endUpdate()}B.clearCellOverlays();z=[];b.editor.graph.getModel().beginUpdate();try{M=B.getModel().getChildren(B.getDefaultParent()),m=mxEvent.isAltDown(y)?m:b.editor.graph.getCenterInsertPoint(B.getBoundingBoxFromGeometry(M,!0)),z=b.editor.graph.importCells(M,
+m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",z))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(z);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());B.destroy();A.parentNode.removeChild(A)}}}function l(){return"list"==x.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==x.value?
+"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==x.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==x.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
+"plantUmlSvg"==x.value||"plantUmlTxt"==x.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize=
+"none";v.style.width="100%";v.style.height="354px";v.style.marginBottom="16px";var x=document.createElement("select");if("formatSql"==f||"mermaid"==f)x.style.display="none";var E=document.createElement("option");E.setAttribute("value","list");mxUtils.write(E,mxResources.get("list"));"plantUml"!=f&&x.appendChild(E);null!=f&&"fromText"!=f||E.setAttribute("selected","selected");E=document.createElement("option");E.setAttribute("value","table");mxUtils.write(E,mxResources.get("formatSql"));"formatSql"==
+f&&(x.appendChild(E),E.setAttribute("selected","selected"));E=document.createElement("option");E.setAttribute("value","mermaid");mxUtils.write(E,mxResources.get("formatSql"));"mermaid"==f&&(x.appendChild(E),E.setAttribute("selected","selected"));E=document.createElement("option");E.setAttribute("value","diagram");mxUtils.write(E,mxResources.get("diagram"));var d=document.createElement("option");d.setAttribute("value","circle");mxUtils.write(d,mxResources.get("circle"));var g=document.createElement("option");
+g.setAttribute("value","horizontalFlow");mxUtils.write(g,mxResources.get("horizontalFlow"));var k=document.createElement("option");k.setAttribute("value","verticalFlow");mxUtils.write(k,mxResources.get("verticalFlow"));"plantUml"!=f&&(x.appendChild(E),x.appendChild(d),x.appendChild(g),x.appendChild(k));E=document.createElement("option");E.setAttribute("value","plantUmlSvg");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&E.setAttribute("selected",
+"selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(x.appendChild(E),x.appendChild(d),x.appendChild(g));var n=l();v.value=n;e.appendChild(v);this.init=function(){v.focus()};
+Graph.fileSupport&&(v.addEventListener("dragover",function(q){q.stopPropagation();q.preventDefault()},!1),v.addEventListener("drop",function(q){q.stopPropagation();q.preventDefault();if(0<q.dataTransfer.files.length){q=q.dataTransfer.files[0];var p=new FileReader;p.onload=function(y){v.value=y.target.result};p.readAsText(q)}},!1));e.appendChild(x);mxEvent.addListener(x,"change",function(){var q=l();if(0==v.value.length||v.value==n)n=q,v.value=n});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(E=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),E.className="geBtn",e.appendChild(E));E=mxUtils.button(mxResources.get("close"),function(){v.value==n?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});E.className="geBtn";b.editor.cancelFirst&&e.appendChild(E);d=mxUtils.button(mxResources.get("insert"),function(q){b.hideDialog();c(v.value,x.value,q)});e.appendChild(d);d.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p,y,A,C){function B(ka){null!=ka&&(Ga=Fa=ka?135:140);ka=!0;if(null!=ta)for(;H<ta.length&&(ka||0!=mxUtils.mod(H,30));){var da=ta[H++];da=G(da.url,da.libs,da.title,da.tooltip?da.tooltip:da.title,da.select,da.imgUrl,da.info,da.onClick,da.preview,da.noImg,da.clibs);ka&&da.click();ka=!1}}function I(){if(Z&&null!=q)f||b.hideDialog(),q(Z,aa,K.value);else if(c)f||b.hideDialog(),c(R,K.value,Y,O);else{var ka=K.value;null!=ka&&
+0<ka.length&&b.pickFolder(b.mode,function(da){b.createFile(ka,R,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,da,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(ka,da,ca,na,la,qa,ha){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");U.removeAttribute("disabled");R=da;O=ca;P=qa;X=ka;Z=na;Y=ha;aa=la;X.style.backgroundColor=x;X.style.border=E}function G(ka,da,ca,na,la,qa,ha,ia,
+pa,va,za){function Ea(Ka,Ta){null==Ha?(Na=Ka,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Na)}))):Ta(Ha,Na)}function Ba(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,sa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
+Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ca?mxResources.get(ca,null,ca):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(sa,null,null,ka,ha,za)},!0,!1)}}function ua(Ka,Ta){null==ka||Ra||
+b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ia?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ia.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ia.naturalWidth+'" height="'+Ia.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",Ba(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt=
+sa,Ra=!0,Ea(ka,function(Va){Ra&&b.sidebar.currentElt==sa&&Ba(Va,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Ra=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Ga+"px";sa.style.width=Fa+"px";var Ha=null,Na=ka;null!=ca?sa.setAttribute("title",mxResources.get(ca,null,ca)):null!=na&&0<na.length&&sa.setAttribute("title",na);var Ra=!1,Ia=null;if(null!=qa){sa.style.display="inline-flex";sa.style.justifyContent="center";
+sa.style.alignItems="center";la=document.createElement("img");la.setAttribute("src",qa);la.setAttribute("alt",na);la.style.maxWidth=Ga+"px";la.style.maxHeight=Fa+"px";Ia=la;var Pa=qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(la);la.onerror=function(){this.src!=Pa?this.src=Pa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){M(sa,null,null,ka,ha,za)}),null,null);mxEvent.addListener(sa,"dblclick",function(Ka){I();
+mxEvent.consume(Ka)})}else if(!va&&null!=ka&&0<ka.length){var Qa=function(Ka){U.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";N.spin(ba);Ea(ka,function(Ta,Va){N.stop();null!=Ta&&(M(sa,Ta,da,null,null,za,Va),Ka&&I())})};la=pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";sa.style.backgroundImage="url("+la+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ca){na=document.createElement("table");
+na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";qa=document.createElement("tbody");pa=document.createElement("tr");va=document.createElement("td");va.setAttribute("align","center");va.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";Oa.style.userSelect="none";Oa.style.borderRadius=
+"3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ga-34+"px";mxUtils.write(Oa,mxResources.get(ca,null,ca));va.appendChild(Oa);pa.appendChild(va);qa.appendChild(pa);na.appendChild(qa);sa.appendChild(na)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(sa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else na=document.createElement("table"),na.setAttribute("width",
+"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",qa=document.createElement("tbody"),pa=document.createElement("tr"),va=document.createElement("td"),va.setAttribute("align","center"),va.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",Oa.style.maxWidth=
+Ga-34+"px",mxUtils.write(Oa,mxResources.get(ca,null,ca)),va.appendChild(Oa),pa.appendChild(va),qa.appendChild(pa),na.appendChild(qa),sa.appendChild(na),la&&M(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ka){M(sa,null,null,ka,ha)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(Ka){M(sa,null,null,ka,ha)}),mxEvent.addListener(sa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src",
+Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ua(Ka,Sa);mxEvent.consume(Ka)}))}ba.appendChild(sa);return sa}function S(){function ka(ua,
+sa){var Ha=mxResources.get(ua);null==Ha&&(Ha=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+sa.length+")"}function da(ua,sa,Ha){mxEvent.addListener(sa,"click",function(){Aa!=sa&&(Aa.style.backgroundColor="",Aa=sa,Aa.style.backgroundColor=v,ba.scrollTop=0,ba.innerText="",H=0,ta=Ha?Ma[ua][Ha]:ya[ua],V=null,B(!1))})}oa&&(oa=!1,mxEvent.addListener(ba,"scroll",function(ua){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(B(),mxEvent.consume(ua))}));
+if(0<Ca){var ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var na in xa){var la=document.createElement("div"),qa=na;ca=xa[na];18<qa.length&&(qa=qa.substring(0,18)+"&hellip;");la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";la.setAttribute("title",
+qa+" ("+ca.length+")");mxUtils.write(la,la.getAttribute("title"));null!=d&&(la.style.padding=d);ma.appendChild(la);(function(ua,sa){mxEvent.addListener(la,"click",function(){Aa!=sa&&(Aa.style.backgroundColor="",Aa=sa,Aa.style.backgroundColor=v,ba.scrollTop=0,ba.innerText="",H=0,ta=xa[ua],V=null,B(!1))})})(na,la)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(na in ya){qa=
+Ma[na];var ha=la=document.createElement(qa?"ul":"div");ca=ya[na];var ia=ka(na,ca);if(null!=qa){var pa=document.createElement("li"),va=document.createElement("div");va.className="geTempTreeCaret";va.setAttribute("title",ia);mxUtils.write(va,ia);ha=va;pa.appendChild(va);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var za in qa){var Ea=document.createElement("li"),Ba=ka(za,qa[za]);Ea.setAttribute("title",Ba);mxUtils.write(Ea,Ba);da(na,Ea,za);ia.appendChild(Ea)}pa.appendChild(ia);
+la.className="geTempTree";la.appendChild(pa);(function(ua,sa){mxEvent.addListener(sa,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,va)}else la.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+la.setAttribute("title",ia),mxUtils.write(la,ia);null!=d&&(la.style.padding=d);ma.appendChild(la);null==Aa&&0<ca.length&&(Aa=la,Aa.style.backgroundColor=v,ta=ca);da(na,ha)}B(!1)}var u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;v=null!=v?v:"#ebf2f9";x=null!=x?x:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";E=null!=E?E:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";g=null!=g?g:EditorUi.templateFile;var z=document.createElement("div");
+z.style.userSelect="none";z.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";f&&z.appendChild(F);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||F.appendChild(J);f&&mxUtils.write(F,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+J);K.style.marginLeft="10px";K.style.width=e||
+u?"144px":"244px";this.init=function(){f&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};f&&(F.appendChild(K),C?K.style.width=e||u?"350px":"450px":(null!=b.editor.diagramFileTypes&&(C=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),C.style.marginLeft=
+"6px",C.style.width=e||u?"80px":"180px",F.appendChild(C)),null!=b.editor.fileExtensions&&(u=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),u.style.marginTop="12px",F.appendChild(u))));F=!1;var H=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(y||mxResources.get("create"),function(){U.setAttribute("disabled","disabled");I();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";
+if(k||n){var Q=[],V=null,W=null,t=null,D=function(ka){U.setAttribute("disabled","disabled");for(var da=0;da<Q.length;da++)Q[da].className=da==ka?"geBtn gePrimaryBtn":"geBtn"};F=!0;y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";z.appendChild(y);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ea.style.display="";ba.style.left="160px";D(0);ba.scrollTop=0;ba.innerText="";H=0;V!=ta&&(ta=V,ya=W,Ca=t,ma.innerText="",S(),V=null)});
+Q.push(u);y.appendChild(u);var L=function(ka){ma.style.display="none";ea.style.display="none";ba.style.left="30px";D(ka?-1:1);null==V&&(V=ta);ba.scrollTop=0;ba.innerText="";N.spin(ba);var da=function(ca,na,la){H=0;N.stop();ta=ca;la=la||{};var qa=0,ha;for(ha in la)qa+=la[ha].length;if(na)ba.innerText=na;else if(0==ca.length&&0==qa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<qa){ma.style.display="";ba.style.left="160px";ma.innerText="";Ca=0;ya={"draw.io":ca};
+for(ha in la)ya[ha]=la[ha];S()}else B(!0)};ka?n(T.value,da):k(da)};k&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),y.appendChild(u),Q.push(u));if(n){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";y.appendChild(u);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(ka){13==ka.keyCode&&L(!0)});y.appendChild(T);u=mxUtils.button(mxResources.get("search"),
+function(){L(!0)});u.className="geBtn";y.appendChild(u)}D(0)}var O=null,P=null,R=null,X=null,Z=null,Y=null,aa=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";y=(f?72:40)+(F?30:0);ba.style.top=y+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ea=document.createElement("div");ea.style.cssText="position:absolute;left:30px;width:128px;top:"+
+y+"px;height:22px;margin-top: 6px;white-space: nowrap";var ja=document.createElement("input");ja.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ja.setAttribute("placeholder",mxResources.get("search"));ja.setAttribute("type","text");ea.appendChild(ja);var fa=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";fa.setAttribute("src",ra);fa.setAttribute("title",mxResources.get("search"));
+fa.style.position="relative";fa.style.left="-18px";fa.style.top="1px";fa.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(fa);mxEvent.addListener(fa,"click",function(){fa.getAttribute("src")==Dialog.prototype.closeImage&&(fa.setAttribute("src",ra),fa.setAttribute("title",mxResources.get("search")),ja.value="",null!=La&&(La.click(),La=null));ja.focus()});mxEvent.addListener(ja,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var da=ja.value;if(""==da)null!=La&&(La.click(),
+La=null);else{if(null==NewDialog.tagsList[g]){var ca={};for(za in ya)for(var na=ya[za],la=0;la<na.length;la++){var qa=na[la];if(null!=qa.tags)for(var ha=qa.tags.toLowerCase().split(";"),ia=0;ia<ha.length;ia++)null==ca[ha[ia]]&&(ca[ha[ia]]=[]),ca[ha[ia]].push(qa)}NewDialog.tagsList[g]=ca}var pa=da.toLowerCase().split(" ");ca=NewDialog.tagsList[g];if(0<Ca&&null==ca.__tagsList__){for(za in xa)for(na=xa[za],la=0;la<na.length;la++)for(qa=na[la],ha=qa.title.split(" "),ha.push(za),ia=0;ia<ha.length;ia++){var va=
+ha[ia].toLowerCase();null==ca[va]&&(ca[va]=[]);ca[va].push(qa)}ca.__tagsList__=!0}var za=[];na={};for(la=ha=0;la<pa.length;la++)if(0<pa[la].length){va=ca[pa[la]];var Ea={};za=[];if(null!=va)for(ia=0;ia<va.length;ia++)qa=va[ia],0==ha==(null==na[qa.url])&&(Ea[qa.url]=!0,za.push(qa));na=Ea;ha++}ba.scrollTop=0;ba.innerText="";H=0;ca=document.createElement("div");ca.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ca,mxResources.get(0==za.length?"noResultsFor":
+"resultsFor",[da]));ba.appendChild(ca);null!=Aa&&null==La&&(Aa.style.backgroundColor="",La=Aa,Aa=ca);ta=za;V=null;B(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ja,"keyup",mxUtils.bind(this,function(ka){""==ja.value?(fa.setAttribute("src",ra),fa.setAttribute("title",mxResources.get("search"))):(fa.setAttribute("src",Dialog.prototype.closeImage),fa.setAttribute("title",mxResources.get("reset")))}));y+=23;var ma=document.createElement("div");ma.style.cssText="position:absolute;left:30px;width:128px;top:"+
+y+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ga=140,Fa=140,ya={},Ma={},xa={},Ca=0,oa=!0,Aa=null,La=null;ya.basic=[{title:"blankDiagram",select:!0}];var ta=ya.basic;if(!e){var Da=function(){mxUtils.get(Ja,function(ka){if(!wa){wa=!0;ka=ka.getXml().documentElement.firstChild;for(var da={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var ca=ka.getAttribute("name"),na=
+ka.getElementsByTagName("add"),la=[],qa=0;qa<na.length;qa++)la.push(encodeURIComponent(mxUtils.getTextContent(na[qa])));null!=ca&&0<la.length&&(da[ca]=la.join(";"))}else if(la=ka.getAttribute("url"),null!=la){na=ka.getAttribute("section");ca=ka.getAttribute("subsection");if(null==na&&(qa=la.indexOf("/"),na=la.substring(0,qa),null==ca)){var ha=la.indexOf("/",qa+1);-1<ha&&(ca=la.substring(qa+1,ha))}qa=ya[na];null==qa&&(qa=[],ya[na]=qa);la=ka.getAttribute("clibs");null!=da[la]&&(la=da[la]);la={url:ka.getAttribute("url"),
+libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:la,tags:ka.getAttribute("tags")};qa.push(la);null!=ca&&(qa=Ma[na],null==qa&&(qa={},Ma[na]=qa),na=qa[ca],null==na&&(na=[],qa[ca]=na),na.push(la))}ka=ka.nextSibling}N.stop();S()}})};z.appendChild(ea);z.appendChild(ma);z.appendChild(ba);var wa=!1,Ja=g;/^https?:\/\//.test(Ja)&&!b.editor.isCorsEnabledForUrl(Ja)&&(Ja=PROXY_URL+"?url="+encodeURIComponent(Ja));
+N.spin(ba);null!=A?A(function(ka,da){xa=ka;t=Ca=da;Da()},Da):Da();W=ya}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==z&&13==ka.keyCode&&I()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||l||(y=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+y.className="geBtn",A.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});y.className="geBtn";!b.editor.cancelFirst||l&&null==m||A.appendChild(y);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(da){null!=da&&0<da.length&&b.editor.loadUrl(b.editor.getProxiedUrl(da),function(ca){R=
+ca;O=null;templateRealURl=da;b.hideDialog();I()},function(ca){b.handleError(ca)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(da){b.openFiles(ka.files,!0);
+ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),p.className="geBtn",A.appendChild(p));A.appendChild(U);b.editor.cancelFirst||null!=c||l&&null==m||A.appendChild(y);z.appendChild(A);this.container=z};NewDialog.tagsList={};
+var CreateDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p,y,A){function C(F,J,K,H){function N(){mxEvent.addListener(U,"click",function(){var D=K;if(v){var L=M.value,T=L.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>T){D=null!=D?D:z.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
+(O=".drawio");0<=T&&(L=L.substring(0,T));M.value=L+O}}B(K)})}var U=document.createElement("a");U.style.overflow="hidden";var Q=document.createElement("img");Q.src=F;Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.width="60px";Q.style.height="60px";Q.style.paddingBottom="6px";U.style.display="inline-block";U.className="geBaseButton";U.style.position="relative";U.style.margin="4px";U.style.padding="8px 8px 10px 8px";U.style.whiteSpace="nowrap";U.appendChild(Q);U.style.color=
+"gray";U.style.fontSize="11px";var V=document.createElement("div");U.appendChild(V);mxUtils.write(V,J);if(null!=H&&null==b[H]){Q.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(U);var t=window.setTimeout(function(){null==b[H]&&(W.stop(),U.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(t),
+mxUtils.setOpacity(V,100),Q.style.visibility="",W.stop(),N())}))}else N();S.appendChild(U);++u==k&&(mxUtils.br(S),u=0)}function B(F){var J=M.value;if(null==F||null!=J&&0<J.length)A&&b.hideDialog(),f(J,F,M)}g="1"==urlParams.noDevice?!1:g;v=null!=v?v:!0;x=null!=x?x:!0;k=null!=k?k:4;A=null!=A?A:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var I=document.createElement("h2");mxUtils.write(I,l||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
+"24px";m.appendChild(I);mxUtils.write(m,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",e);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};m.appendChild(M);null!=y&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),
+l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,M,y)));y=null;if("1"!=urlParams.noDevice&&null!=n&&null!=q&&"image/"==q.substring(0,6)&&("image/svg"!=q.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";l=document.createElement("img");var G=p?n:btoa(unescape(encodeURIComponent(n)));l.setAttribute("src","data:"+q+";base64,"+G);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=q||(y=mxUtils.button(mxResources.get("copy"),function(F){F=b.base64ToBlob(G,"image/png");F=new ClipboardItem({"image/png":F,"text/html":new Blob(['<img src="data:'+q+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([F]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
+y.style.marginTop="6px",y.className="geBtn");E&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(F){mxEvent.isPopupTrigger(F)||B("_blank")}))}mxUtils.br(m);var S=document.createElement("div");S.style.textAlign="center";var u=0;S.style.marginTop="6px";m.appendChild(S);var z=document.createElement("select");z.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(n=document.createElement("option"),n.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(n,mxResources.get("googleDrive")),z.appendChild(n),C(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(n,mxResources.get("oneDrive")),z.appendChild(n),b.mode==App.MODE_ONEDRIVE&&n.setAttribute("selected","selected"),C(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(n,mxResources.get("dropbox")),z.appendChild(n),b.mode==App.MODE_DROPBOX&&n.setAttribute("selected","selected"),C(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITHUB),mxUtils.write(n,mxResources.get("github")),z.appendChild(n),C(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_GITLAB),mxUtils.write(n,mxResources.get("gitlab")),z.appendChild(n),C(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_TRELLO),mxUtils.write(n,mxResources.get("trello")),z.appendChild(n),C(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)n=document.createElement("option"),n.setAttribute("value",App.MODE_DEVICE),mxUtils.write(n,mxResources.get("device")),z.appendChild(n),b.mode!=App.MODE_DEVICE&&x||n.setAttribute("selected","selected"),g&&C(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);x&&isLocalStorage&&"0"!=urlParams.browser&&(x=document.createElement("option"),
+x.setAttribute("value",App.MODE_BROWSER),mxUtils.write(x,mxResources.get("browser")),z.appendChild(x),b.mode==App.MODE_BROWSER&&x.setAttribute("selected","selected"),C(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));x=document.createElement("div");x.style.marginTop="26px";x.style.textAlign="center";null!=d&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(d)}),g.className="geBtn",x.appendChild(g));g=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&null==c&&x.appendChild(g);null==c&&(n=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),n.className="geBtn",x.appendChild(n));E&&Editor.popupsAllowed&&(E=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),E.className="geBtn",x.appendChild(E));CreateDialog.showDownloadButton&&(E=mxUtils.button(mxResources.get("download"),
+function(){B("download")}),E.className="geBtn",x.appendChild(E),null!=y&&(E.style.marginTop="6px",x.style.marginTop="6px"));null!=y&&(mxUtils.br(x),x.appendChild(y));b.editor.cancelFirst&&null==c||x.appendChild(g);mxEvent.addListener(M,"keypress",function(F){13==F.keyCode?B(App.MODE_DEVICE):27==F.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(x);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";m.appendChild(v);mxUtils.br(m);var x=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
+null!=f&&f();b.openLink(e,null,!0)});x.className="geBtn gePrimaryBtn";x.style.width=v.style.width;m.appendChild(x);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,e,f,c,l,m,v,x){function E(){0<k.value.length?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}m=null!=m?m:!0;var d=b.editor.graph,g=document.createElement("div");mxUtils.write(g,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor=
"transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",f);k.setAttribute("type","text");k.setAttribute("spellcheck","false");k.setAttribute("autocorrect","off");k.setAttribute("autocomplete","off");k.setAttribute("autocapitalize","off");k.style.marginTop="6px";k.style.width=(Graph.fileSupport?460:340)-20+"px";k.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){k.value="";k.focus()});
-e.appendChild(k);e.appendChild(f);g.appendChild(e);var n=y,q,p,A=function(J,M,v,u){var G="data:"==J.substring(0,5);!b.isOffline()||G&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(I){b.spinner.stop();b.hideDialog();var F=!1===u?1:null!=M&&null!=v?Math.max(M/I.width,v/I.height):Math.min(1,Math.min(520/I.width,520/I.height));m&&(J=b.convertDataUri(J));c(J,Math.round(Number(I.width)*F),Math.round(Number(I.height)*F),n,q,p)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(J,null,null,n,q,p)):(J=b.convertDataUri(J),M=null==M?120:M,v=null==v?100:v,b.hideDialog(),c(J,M,v,n,q,p))},E=function(J,M){if(null!=J){var v=l?null:d.getModel().getGeometry(d.getSelectionCell());null!=v?A(J,v.width,v.height,M):A(J,null,null,M)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var J=g.parentNode,M=null;mxEvent.addListener(J,"dragleave",function(v){null!=M&&(M.parentNode.removeChild(M),M=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<v.dataTransfer.files.length)b.importFiles(v.dataTransfer.files,
-0,0,b.maxImageSize,function(G,I,F,L,K,H,Q,U){E(G,U)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var I=0;I<G.length;I++)G[I]()},!mxEvent.isControlDown(v),null,null,!0);else if(0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")){var u=v.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(u)&&E(decodeURIComponent(u))}v.stopPropagation();v.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
-"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&y.appendChild(f);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(k.value=J.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type",
-"file");mxEvent.addListener(z,"change",function(J){null!=z.files&&(b.importFiles(z.files,0,0,b.maxImageSize,function(M,v,u,G,I,F){E(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var v=0;v<M.length;v++)M[v]()},!0),z.type="",z.type="file",z.value="")});z.style.display="none";document.body.appendChild(z);b.imgDlgFileInputElt=z}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";y.appendChild(e)}mxEvent.addListener(k,
-"keypress",function(J){13==J.keyCode&&E(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,k.value,n,function(M,v,u){n=M;q=v;p=u});b.showDialog(J.container,300,390,!0,!0)});x&&(B.className="geBtn",y.appendChild(B));mxEvent.addListener(k,"change",function(J){n=null;D()});D();x=mxUtils.button(mxResources.get("apply"),function(){E(k.value)});x.className="geBtn gePrimaryBtn";y.appendChild(x);b.editor.cancelFirst||y.appendChild(f);Graph.fileSupport&&(y.style.marginTop=
-"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),g.appendChild(x));g.appendChild(y);this.container=g},LinkDialog=function(b,e,f,c,l,m,x){function y(J,M,v){v=mxUtils.button("",v);
-v.className="geBtn";v.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",J);v.style.minWidth="42px";v.style.verticalAlign="middle";v.appendChild(M);B.appendChild(v)}var D=document.createElement("div");D.style.height="100%";mxUtils.write(D,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=
+e.appendChild(k);e.appendChild(f);g.appendChild(e);var n=x,q,p,y=function(I,M,G,S){var u="data:"==I.substring(0,5);!b.isOffline()||u&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(z){b.spinner.stop();b.hideDialog();var F=!1===S?1:null!=M&&null!=G?Math.max(M/z.width,G/z.height):Math.min(1,Math.min(520/z.width,520/z.height));m&&(I=b.convertDataUri(I));c(I,Math.round(Number(z.width)*F),Math.round(Number(z.height)*F),n,q,p)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(I,null,null,n,q,p)):(I=b.convertDataUri(I),M=null==M?120:M,G=null==G?100:G,b.hideDialog(),c(I,M,G,n,q,p))},A=function(I,M){if(null!=I){var G=l?null:d.getModel().getGeometry(d.getSelectionCell());null!=G?y(I,G.width,G.height,M):y(I,null,null,M)}else b.hideDialog(),c(null)};this.init=function(){k.focus();if(Graph.fileSupport){k.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var I=g.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(G){null!=M&&(M.parentNode.removeChild(M),M=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(G){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));G.stopPropagation();G.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(G){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,
+0,0,b.maxImageSize,function(u,z,F,J,K,H,N,U){A(u,U)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var z=0;z<u.length;z++)u[z]()},!mxEvent.isControlDown(G),null,null,!0);else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var S=G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(S)&&A(decodeURIComponent(S))}G.stopPropagation();G.preventDefault()}),!1)}};x=document.createElement("div");x.style.marginTop="14px";x.style.textAlign=
+"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&x.appendChild(f);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(k.value=I.url));k.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type",
+"file");mxEvent.addListener(C,"change",function(I){null!=C.files&&(b.importFiles(C.files,0,0,b.maxImageSize,function(M,G,S,u,z,F){A(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var G=0;G<M.length;G++)M[G]()},!0),C.type="",C.type="file",C.value="")});C.style.display="none";document.body.appendChild(C);b.imgDlgFileInputElt=C}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";x.appendChild(e)}mxEvent.addListener(k,
+"keypress",function(I){13==I.keyCode&&A(k.value)});var B=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,k.value,n,function(M,G,S){n=M;q=G;p=S});b.showDialog(I.container,300,390,!0,!0)});v&&(B.className="geBtn",x.appendChild(B));mxEvent.addListener(k,"change",function(I){n=null;E()});E();v=mxUtils.button(mxResources.get("apply"),function(){A(k.value)});v.className="geBtn gePrimaryBtn";x.appendChild(v);b.editor.cancelFirst||x.appendChild(f);Graph.fileSupport&&(x.style.marginTop=
+"120px",g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.backgroundPosition="center 65%",g.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),g.appendChild(v));g.appendChild(x);this.container=g},LinkDialog=function(b,e,f,c,l,m,v){function x(I,M,G){G=mxUtils.button("",G);
+G.className="geBtn";G.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",I);G.style.minWidth="42px";G.style.verticalAlign="middle";G.appendChild(M);B.appendChild(G)}var E=document.createElement("div");E.style.height="100%";mxUtils.write(E,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow=
"clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("dragUrlsHere"));g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="97%";g.style.boxSizing="border-box";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";g.style.marginBottom="4px";var k=document.createElement("div");k.setAttribute("title",
mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geLinkDialogOption");
-var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);x=null!=x?x:"_blank";A.setAttribute("title",x);m&&(g.style.width="340px");if(l&&
-null!=b.pages){null!=e&&Graph.isPageLink(e)?(q.setAttribute("checked","checked"),q.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);d.appendChild(g);d.appendChild(k);m&&(d.appendChild(A),mxUtils.write(d,mxResources.get("openInNewWindow")));mxUtils.br(d);d.appendChild(q);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value",
-"data:page/id,"+b.pages[m].getId()),e==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&q.checked){var E=document.createElement("option");mxUtils.write(E,mxResources.get("pageNotFound"));E.setAttribute("disabled","disabled");E.setAttribute("selected","selected");E.setAttribute("value","pageNotFound");p.appendChild(E);mxEvent.addListener(p,"change",function(){null==E.parentNode||E.selected||E.parentNode.removeChild(E)})}d.appendChild(p)}else g.setAttribute("value",
-e),d.appendChild(g),d.appendChild(k);D.appendChild(d);var z=mxUtils.button(f,function(){b.hideDialog();c(q.checked?"pageNotFound"!==p.value?p.value:e:g.value,LinkDialog.selectedDocs,A.checked?x:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){q.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked",
-"checked");q.checked=!0});mxEvent.addListener(g,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var J=D.parentNode,M=null;mxEvent.addListener(J,"dragleave",function(v){null!=M&&(M.parentNode.removeChild(M),M=null);v.stopPropagation();v.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(v){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(J));v.stopPropagation();v.preventDefault()}));
-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(v){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(v.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(v.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,z.click());v.stopPropagation();v.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(J){if(J.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=J.docs;var M=J.docs[0].url;"application/mxe"==J.docs[0].mimeType||null!=J.docs[0].mimeType&&
-"application/vnd.jgraph."==J.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+J.docs[0].id:"application/vnd.google-apps.folder"==J.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+J.docs[0].id);g.value=M;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var J=b.drive.createLinkPicker();b.linkPicker=J.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(J){g.value=J[0].link;g.focus()}})});null!=b.oneDrive&&y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(J,M){g.value=M.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(J){if(null!=J){J=J.split("/");var M=J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value="https://github.com/"+M+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});null!=b.gitLab&&y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(J){if(null!=J){J=J.split("/");var M=
-J[0],v=J[1],u=J[2];J=J.slice(3,J.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+M+"/"+v+"/blob/"+u+"/"+J;g.focus()}})});mxEvent.addListener(g,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),c(q.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(z);b.editor.cancelFirst||B.appendChild(f);D.appendChild(B);this.container=D},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
-"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var x=document.createElement("input");x.setAttribute("type","text");x.style.marginTop="6px";x.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(d.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;k.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
-":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className="geBtn gePrimaryBtn";if(!f){y.setAttribute("disabled","disabled");var D=/^(([^<>()[\]\\.,;:\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(x,
-"change",function(){0<x.value.length&&0<D.test(x.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&D.test(x.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")})}l.appendChild(x);this.init=function(){x.focus()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";
+var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");var p=document.createElement("select");p.style.width="520px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.margin="0 6p 0 6px";null!=v&&(y.setAttribute("checked","checked"),y.defaultChecked=!0);v=null!=v?v:"_blank";y.setAttribute("title",v);m&&(g.style.width="340px");if(l&&
+null!=b.pages){null!=e&&Graph.isPageLink(e)?(q.setAttribute("checked","checked"),q.defaultChecked=!0):(g.setAttribute("value",e),n.setAttribute("checked","checked"),n.defaultChecked=!0);d.appendChild(n);d.appendChild(g);d.appendChild(k);m&&(d.appendChild(y),mxUtils.write(d,mxResources.get("openInNewWindow")));mxUtils.br(d);d.appendChild(q);l=!1;for(m=0;m<b.pages.length;m++)k=document.createElement("option"),mxUtils.write(k,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),k.setAttribute("value",
+"data:page/id,"+b.pages[m].getId()),e==k.getAttribute("value")&&(k.setAttribute("selected","selected"),l=!0),p.appendChild(k);if(!l&&q.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");p.appendChild(A);mxEvent.addListener(p,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}d.appendChild(p)}else g.setAttribute("value",
+e),d.appendChild(g),d.appendChild(k);E.appendChild(d);var C=mxUtils.button(f,function(){b.hideDialog();c(q.checked?"pageNotFound"!==p.value?p.value:e:g.value,LinkDialog.selectedDocs,y.checked?v:null)});C.style.verticalAlign="middle";C.className="geBtn gePrimaryBtn";this.init=function(){q.checked?p.focus():(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){n.removeAttribute("checked");q.setAttribute("checked",
+"checked");q.checked=!0});mxEvent.addListener(g,"focus",function(){q.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){var I=E.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(G){null!=M&&(M.parentNode.removeChild(M),M=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(G){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));G.stopPropagation();G.preventDefault()}));
+mxEvent.addListener(I,"drop",mxUtils.bind(this,function(G){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(g.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),n.setAttribute("checked","checked"),n.checked=!0,C.click());G.stopPropagation();G.preventDefault()}),!1)}};var B=document.createElement("div");B.style.marginTop="18px";B.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+f.style.verticalAlign="middle";f.className="geBtn";B.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&B.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var M=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
+"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+I.docs[0].id);g.value=M;g.focus()}else LinkDialog.selectedDocs=null;g.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){g.value=I[0].link;g.focus()}})});null!=b.oneDrive&&x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(I,M){g.value=M.value[0].webUrl;g.focus()},!0)});null!=b.gitHub&&x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var M=I[0],G=I[1],S=I[2];I=I.slice(3,I.length).join("/");g.value="https://github.com/"+M+"/"+G+"/blob/"+S+"/"+I;g.focus()}})});null!=b.gitLab&&x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var M=
+I[0],G=I[1],S=I[2];I=I.slice(3,I.length).join("/");g.value=DRAWIO_GITLAB_URL+"/"+M+"/"+G+"/blob/"+S+"/"+I;g.focus()}})});mxEvent.addListener(g,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),c(q.checked?p.value:g.value,LinkDialog.selectedDocs))});B.appendChild(C);b.editor.cancelFirst||B.appendChild(f);E.appendChild(B);this.container=E},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
+"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var v=document.createElement("input");v.setAttribute("type","text");v.style.marginTop="6px";v.style.width="600px";var x=mxUtils.button(mxResources.get("sendMessage"),function(){var k=g.value+(d.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;k.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
+":\n"+k),function(n){b.spinner.stop();200<=n.getStatus()&&299>=n.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});x.className="geBtn gePrimaryBtn";if(!f){x.setAttribute("disabled","disabled");var E=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(v,
+"change",function(){0<v.value.length&&0<E.test(v.value)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")});mxEvent.addListener(v,"keyup",function(){0<v.value.length&&E.test(v.value)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")})}l.appendChild(v);this.init=function(){v.focus()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("checked","checked");d.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";
f.appendChild(d);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxEvent.addListener(m,"click",function(k){d.checked=!d.checked;mxEvent.consume(k)});l.appendChild(f);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));l.appendChild(m);var g=document.createElement("textarea");g.style.resize="none";g.style.width="600px";g.style.height="140px";g.style.marginTop="6px";g.setAttribute("placeholder",mxResources.get("comments"));
-l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(y)):(f.appendChild(y),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
+l.appendChild(g);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(x)):(f.appendChild(x),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px";
-m.style.overflow="hidden";var x=document.createElement("div");x.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(x);mxEvent.disableContextMenu(m);c.appendChild(m);var y=new Graph(m);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var D=0,d=null,g=0,k=y.getGlobalVariable;
-y.getGlobalVariable=function(X){return"page"==X&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=d?d.length:1:k.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},q=new Spinner(n),p=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),E={};for(n=0;n<A.length;n++)E[A[n].getAttribute("id")]=A[n];var z=null,B=null,J=null,M=null,v=mxUtils.button("",function(){null!=J&&y.zoomIn()});v.className="geSprite geSprite-zoomin";v.setAttribute("title",mxResources.get("zoomIn"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");
-mxUtils.setOpacity(v,20);var u=mxUtils.button("",function(){null!=J&&y.zoomOut()});u.className="geSprite geSprite-zoomout";u.setAttribute("title",mxResources.get("zoomOut"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var G=mxUtils.button("",function(){null!=J&&(y.maxFitScale=8,y.fit(8),y.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
-"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var I=mxUtils.button("",function(){null!=J&&(y.zoomActual(),y.center())});I.className="geSprite geSprite-actualsize";I.setAttribute("title",mxResources.get("actualSize"));I.style.outline="none";I.style.border="none";I.style.margin="2px";I.setAttribute("disabled","disabled");mxUtils.setOpacity(I,20);var F=mxUtils.button("",function(){});F.className="geSprite geSprite-middle";F.setAttribute("title",mxResources.get("compare"));
-F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var L=m.cloneNode(!1);L.style.pointerEvent="none";m.parentNode.appendChild(L);var K=new Graph(L);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(F,function(X){X=E[d[D].getAttribute("id")];mxUtils.setOpacity(F,20);x.innerText="";null==X?mxUtils.write(x,
-mxResources.get("pageNotFound")):(H.style.display="none",m.style.display="none",L.style.display="",L.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,K.getModel()),K.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);x.innerText="";"none"==m.style.display&&(H.style.display="",m.style.display="",L.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var Q=mxUtils.button(mxResources.get("download"),function(){if(null!=J){var X=mxUtils.getXml(J.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});Q.className="geBtn";Q.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=M&&(mxEvent.isShiftDown(X)?null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(aa)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(aa){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
-U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";var V=null;mxEvent.addListener(T,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=J&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(T.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",U.className="geBtn gePrimaryBtn");A=document.createElement("div");
-A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var N=null;if(null!=e&&0<e.length){m.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%";
-var O=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(D=mxUtils.indexOf(b.pages,b.currentPage));for(n=e.length-1;0<=n;n--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(ea){q.stop();x.innerText="";var ma=mxUtils.parseXml(ea),ia=b.editor.extractGraphModel(ma.documentElement,!0);if(null!=ia){var pa=function(Fa){null!=Fa&&(Fa=na(Editor.parseDiagramNode(Fa)));return Fa},na=function(Fa){var Ga=Fa.getAttribute("background");
-if(null==Ga||""==Ga||Ga==mxConstants.NONE)Ga=y.defaultPageBackgroundColor;m.style.backgroundColor=Ga;(new mxCodec(Fa.ownerDocument)).decode(Fa,y.getModel());y.maxFitScale=1;y.fit(8);y.center();return Fa};T.style.display="none";T.innerText="";J=ma;M=ea;d=parseSelectFunction=null;g=0;if("mxfile"==ia.nodeName){ma=ia.getElementsByTagName("diagram");d=[];for(ea=0;ea<ma.length;ea++)d.push(ma[ea]);g=Math.min(D,d.length-1);0<d.length&&pa(d[g]);if(1<d.length)for(T.removeAttribute("disabled"),T.style.display=
-"",ea=0;ea<d.length;ea++)ma=document.createElement("option"),mxUtils.write(ma,d[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),ma.setAttribute("value",ea),ea==g&&ma.setAttribute("selected","selected"),T.appendChild(ma);V=function(){try{var Fa=parseInt(T.value);g=D=Fa;pa(d[Fa])}catch(Ga){T.value=D,b.handleError(Ga)}}}else na(ia);ea=X.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerText="";mxUtils.write(H,(null!=ea?ea+" ":"")+aa.toLocaleDateString()+
-" "+aa.toLocaleTimeString());H.setAttribute("title",Y.getAttribute("title"));v.removeAttribute("disabled");u.removeAttribute("disabled");G.removeAttribute("disabled");I.removeAttribute("disabled");F.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),Q.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(I,60);
-mxUtils.setOpacity(F,60)}else T.style.display="none",T.innerText="",H.innerText="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===P?mxUtils.write(ba,
-aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ea){B!=X&&(q.stop(),null!=z&&(z.style.backgroundColor=""),B=X,z=Y,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=J=null,H.removeAttribute("title"),
-H.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=y.defaultPageBackgroundColor,x.innerText="",y.getModel().clear(),U.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),T.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(I,20),mxUtils.setOpacity(F,20),q.spin(m),X.getXml(function(ma){if(B==X)try{Z(ma)}catch(ia){H.innerText=mxResources.get("error")+": "+ia.message}},function(ma){q.stop();T.style.display="none";T.innerText="";H.innerText="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(Y,"dblclick",function(ea){t.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);O.appendChild(Y)}return Y}(e[n]);null!=S&&n==e.length-1&&(N=S)}R.appendChild(O);l.appendChild(R)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",C.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",C.style.display="none",mxUtils.write(l,
-mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";C.appendChild(T);C.appendChild(v);C.appendChild(u);C.appendChild(I);C.appendChild(G);C.appendChild(F);b.editor.cancelFirst?(A.appendChild(l),A.appendChild(Q),A.appendChild(W),A.appendChild(U),A.appendChild(t)):(A.appendChild(Q),A.appendChild(W),A.appendChild(U),A.appendChild(t),A.appendChild(l));c.appendChild(A);c.appendChild(C);c.appendChild(H);
-this.container=c},DraftDialog=function(b,e,f,c,l,m,x,y,D){var d=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,e);d.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(D[k.value].data);J=b.editor.extractGraphModel(B.documentElement,!0);M=0;this.init()});if(null!=D){k.style.marginLeft="4px";for(e=0;e<D.length;e++){var q=
-document.createElement("option");q.setAttribute("value",e);var p=new Date(D[e].created),A=new Date(D[e].modified);mxUtils.write(q,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());k.appendChild(q)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=D[0].data);var E=document.createElement("div");E.style.position="absolute";E.style.border="1px solid lightGray";E.style.marginTop="10px";E.style.left=
-"40px";E.style.right="40px";E.style.top="46px";E.style.bottom="74px";E.style.overflow="hidden";mxEvent.disableContextMenu(E);d.appendChild(E);var z=new Graph(E);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var B=mxUtils.parseXml(f),J=b.editor.extractGraphModel(B.documentElement,!0),M=0,v=null,u=z.getGlobalVariable;z.getGlobalVariable=function(I){return"page"==I&&null!=v&&null!=v[M]?
-v[M].getAttribute("name"):"pagenumber"==I?M+1:"pagecount"==I?null!=v?v.length:1:u.apply(this,arguments)};z.getLinkForCell=function(){return null};f=mxUtils.button("",function(){z.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){z.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut"));
-g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);q=mxUtils.button("",function(){z.zoomActual();z.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline=
-"none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);x=mxUtils.button(x||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});x.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign=
-"bottom";G.style.marginRight="6px";G.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[k.value])});m.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
-function(){function I(H){if(null!=H){var Q=H.getAttribute("background");if(null==Q||""==Q||Q==mxConstants.NONE)Q=Editor.isDarkMode()?"transparent":"#ffffff";E.style.backgroundColor=Q;(new mxCodec(H.ownerDocument)).decode(H,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return H}function F(H){null!=H&&(H=I(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(G,"change",function(H){M=parseInt(G.value);F(v[M]);mxEvent.consume(H)});if("mxfile"==J.nodeName){var L=J.getElementsByTagName("diagram");
-v=[];for(var K=0;K<L.length;K++)v.push(L[K]);0<v.length&&F(v[M]);G.innerText="";if(1<v.length)for(G.style.display="",K=0;K<v.length;K++)L=document.createElement("option"),mxUtils.write(L,v[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),L.setAttribute("value",K),K==M&&L.setAttribute("selected","selected"),G.appendChild(L);else G.style.display="none"}else I(J)};A.appendChild(G);A.appendChild(f);A.appendChild(g);A.appendChild(q);A.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=y&&p.appendChild(y),p.appendChild(x),p.appendChild(m)):(p.appendChild(m),p.appendChild(x),null!=y&&p.appendChild(y),p.appendChild(f));d.appendChild(p);d.appendChild(A);this.container=d},FindWindow=function(b,e,f,c,l,m){function x(V,W,t,C){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
-for(var N=0;N<W.length;N++)if("label"!=W[N].nodeName){var R=mxUtils.trim(W[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=R.indexOf(t)||!C&&R.substring(0,t.length)===t)||null!=V&&V.test(R))return!0}}return!1}function y(){q&&v.value?(Q.removeAttribute("disabled"),U.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));v.value&&M.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function D(V,
-W,t){K.innerText="";var C=g.model.getDescendants(g.model.getRoot()),N=M.value.toLowerCase(),R=u.checked?new RegExp(N):null,O=null;A=null;k!=N&&(k=N,n=null,p=!1);var P=null==n;if(0<N.length){if(p){p=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;n=null;do p=!1,C=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(C),g.model.setRoot(C.root),V=(V+1)%b.pages.length;while(!D(!0,W,t)&&V!=S);n&&(n=null,t?b.editor.graph.model.execute(new SelectPage(b,
-C)):b.selectPage(C));p=!1;g=b.editor.graph;return D(!0,W,t)}for(X=0;X<C.length;X++){S=g.view.getState(C[X]);W&&null!=R&&(P=P||S==n);if(null!=S&&null!=S.cell.value&&(P||null==O)&&(g.model.isVertex(S.cell)||g.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(I.innerHTML=g.sanitizeHtml(g.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([I])):label=g.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;W&&m&&null!=R&&S==n&&(label=label.substr(E),
-aa=E);var Y=""==v.value,Z=Y;if(null==R&&(Z&&0<=label.indexOf(N)||!Z&&label.substring(0,N.length)===N||Y&&x(R,S.cell,N,Z))||null!=R&&(R.test(label)||Y&&x(R,S.cell,N,Z)))if(m&&(null!=R?(Y=label.match(R),null!=Y&&0<Y.length&&(A=Y[0].toLowerCase(),E=aa+Y.index+A.length)):(A=N,E=A.length)),P){O=S;break}else null==O&&(O=S)}P=P||S==n}}if(null!=O){if(X==C.length&&G.checked)return n=null,p=!0,D(!0,W,t);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?t||g.getSelectionCell()==n.cell&&
-1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&G.checked)return p=!0,D(!0,W,t);g.isEnabled()&&!t&&g.clearSelection()}q=null!=O;m&&!V&&y();return 0==N.length||null!=O}var d=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,q=!1,p=!1,A=null,E=0,z=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var J=m?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder",
-mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=J;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";B.appendChild(M);mxUtils.br(B);if(m){var v=document.createElement("input");v.setAttribute("placeholder",mxResources.get("replaceWith"));v.setAttribute("type","text");v.style.marginTop="4px";v.style.marginBottom="6px";v.style.width=J;v.style.fontSize="12px";v.style.borderRadius="4px";v.style.padding="6px";
-B.appendChild(v);mxUtils.br(B);mxEvent.addListener(v,"input",y)}var u=document.createElement("input");u.setAttribute("id","geFindWinRegExChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");B.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));B.appendChild(J);J=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft=
-"6px";J.style.top="-1px";B.appendChild(J);mxUtils.br(B);var G=document.createElement("input");G.setAttribute("id","geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";B.appendChild(G);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");B.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));B.appendChild(J);var I=document.createElement("div");mxUtils.br(B);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop=
-"6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";B.appendChild(J);var F=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";m&&(v.value="",y());k=n=null;p=!1;M.focus()});F.setAttribute("title",mxResources.get("reset"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";m||J.appendChild(F);var L=mxUtils.button(mxResources.get("find"),
-function(){try{M.style.backgroundColor=D()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});L.setAttribute("title",mxResources.get("find")+" (Enter)");L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";J.appendChild(L);var K=document.createElement("div");K.style.marginTop="10px";if(m){var H=function(V,W,t,C,N){if(null==N||"1"!=N.html)return C=V.toLowerCase().indexOf(W,
-C),0>C?V:V.substr(0,C)+t+V.substr(C+W.length);var R=V;W=mxUtils.htmlEntities(W);N=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)N.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");C=V.toLowerCase().indexOf(W,C);if(0>C)return R;R=C+W.length;t=mxUtils.htmlEntities(t);V=V.substr(0,C)+t+V.substr(R);for(var P=0,S=0;S<N.length;S++){if(N[S]-P<C)V=V.substr(0,N[S])+O[S]+V.substr(N[S]);else{var X=N[S]-P<R?C+P:N[S]+(t.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}P+=O[S].length}return V.replace(/\n/g,
-"<br>")},Q=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,H(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));M.style.backgroundColor=D(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});Q.setAttribute("title",mxResources.get("replFind"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow=
-"ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");J.appendChild(Q);mxUtils.br(J);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=n&&v.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,H(W,A,v.value,E-A.length,g.getCurrentCellStyle(V)));Q.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
-U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");J.appendChild(U);var T=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(v.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var t=0,C={};D(!1,!0,!0)&&100>t;){var N=n.cell,R=g.getLabel(N),O=C[N.id];if(O&&O.replAllMrk==
-z&&O.replAllPos>=E)break;C[N.id]={replAllMrk:z,replAllPos:E};g.isCellEditable(N)&&(g.model.setValue(N,H(R,A,v.value,E-A.length,g.getCurrentCellStyle(N))),t++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(K,mxResources.get("matchesRepl",[t]))}catch(P){b.handleError(P)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}z++}});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";
-T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(F);F=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));F.setAttribute("title",mxResources.get("close"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow=
-"ellipsis";F.className="geBtn";J.appendChild(F);mxUtils.br(J);J.appendChild(K)}else F.style.width="90px",L.style.width="90px";mxEvent.addListener(M,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)d.funct();else if(k!=M.value.toLowerCase()||13==V.keyCode)try{M.style.backgroundColor=D()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70==
+m.style.overflow="hidden";var v=document.createElement("div");v.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(v);mxEvent.disableContextMenu(m);c.appendChild(m);var x=new Graph(m);x.setTooltips(!1);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var E=0,d=null,g=0,k=x.getGlobalVariable;
+x.getGlobalVariable=function(X){return"page"==X&&null!=d&&null!=d[g]?d[g].getAttribute("name"):"pagenumber"==X?g+1:"pagecount"==X?null!=d?d.length:1:k.apply(this,arguments)};x.getLinkForCell=function(){return null};Editor.MathJaxRender&&x.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(x.container)}));var n={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},q=new Spinner(n),p=b.getCurrentFile(),y=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(n=0;n<y.length;n++)A[y[n].getAttribute("id")]=y[n];var C=null,B=null,I=null,M=null,G=mxUtils.button("",function(){null!=I&&x.zoomIn()});G.className="geSprite geSprite-zoomin";G.setAttribute("title",mxResources.get("zoomIn"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");
+mxUtils.setOpacity(G,20);var S=mxUtils.button("",function(){null!=I&&x.zoomOut()});S.className="geSprite geSprite-zoomout";S.setAttribute("title",mxResources.get("zoomOut"));S.style.outline="none";S.style.border="none";S.style.margin="2px";S.setAttribute("disabled","disabled");mxUtils.setOpacity(S,20);var u=mxUtils.button("",function(){null!=I&&(x.maxFitScale=8,x.fit(8),x.center())});u.className="geSprite geSprite-fit";u.setAttribute("title",mxResources.get("fit"));u.style.outline="none";u.style.border=
+"none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var z=mxUtils.button("",function(){null!=I&&(x.zoomActual(),x.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var F=mxUtils.button("",function(){});F.className="geSprite geSprite-middle";F.setAttribute("title",mxResources.get("compare"));
+F.style.outline="none";F.style.border="none";F.style.margin="2px";mxUtils.setOpacity(F,60);var J=m.cloneNode(!1);J.style.pointerEvent="none";m.parentNode.appendChild(J);var K=new Graph(J);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(F,function(X){X=A[d[E].getAttribute("id")];mxUtils.setOpacity(F,20);v.innerText="";null==X?mxUtils.write(v,
+mxResources.get("pageNotFound")):(H.style.display="none",m.style.display="none",J.style.display="",J.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,K.getModel()),K.view.scaleAndTranslate(x.view.scale,x.view.translate.x,x.view.translate.y))},null,function(){mxUtils.setOpacity(F,60);v.innerText="";"none"==m.style.display&&(H.style.display="",m.style.display="",J.style.display="none")});var H=document.createElement("div");H.style.position=
+"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var N=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),Z=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,Z,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Z)+"&format=xml"+X)).simulate(document,"_blank"))}});N.className="geBtn";N.setAttribute("disabled","disabled");var U=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=M&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(Z){if(0<Z.length)try{b.confirm(mxResources.get("areYouSure"),function(){p.patch([JSON.parse(Z)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(Z){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(Z){b.spinner.stop();b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)})}))});
+U.className="geBtn";U.setAttribute("disabled","disabled");U.setAttribute("title","Shift+Click for Diff");var Q=document.createElement("select");Q.setAttribute("disabled","disabled");Q.style.maxWidth="80px";Q.style.position="relative";Q.style.top="-2px";Q.style.verticalAlign="bottom";Q.style.marginRight="6px";Q.style.display="none";var V=null;mxEvent.addListener(Q,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=B&&b.openLink(B.getUrl(Q.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",U.className="geBtn gePrimaryBtn");y=document.createElement("div");
+y.style.position="absolute";y.style.top="482px";y.style.width="640px";y.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var L=null;if(null!=e&&0<e.length){m.style.cursor="move";var T=document.createElement("table");T.style.border="1px solid lightGray";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";
+var O=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(E=mxUtils.indexOf(b.pages,b.currentPage));for(n=e.length-1;0<=n;n--){var R=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var aa=function(ea){q.stop();v.innerText="";var ja=mxUtils.parseXml(ea),fa=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=fa){var ra=function(Ga){null!=Ga&&(Ga=ma(Editor.parseDiagramNode(Ga)));return Ga},ma=function(Ga){var Fa=Ga.getAttribute("background");
+if(null==Fa||""==Fa||Fa==mxConstants.NONE)Fa=x.defaultPageBackgroundColor;m.style.backgroundColor=Fa;(new mxCodec(Ga.ownerDocument)).decode(Ga,x.getModel());x.maxFitScale=1;x.fit(8);x.center();return Ga};Q.style.display="none";Q.innerText="";I=ja;M=ea;d=parseSelectFunction=null;g=0;if("mxfile"==fa.nodeName){ja=fa.getElementsByTagName("diagram");d=[];for(ea=0;ea<ja.length;ea++)d.push(ja[ea]);g=Math.min(E,d.length-1);0<d.length&&ra(d[g]);if(1<d.length)for(Q.removeAttribute("disabled"),Q.style.display=
+"",ea=0;ea<d.length;ea++)ja=document.createElement("option"),mxUtils.write(ja,d[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),ja.setAttribute("value",ea),ea==g&&ja.setAttribute("selected","selected"),Q.appendChild(ja);V=function(){try{var Ga=parseInt(Q.value);g=E=Ga;ra(d[Ga])}catch(Fa){Q.value=E,b.handleError(Fa)}}}else ma(fa);ea=X.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerText="";mxUtils.write(H,(null!=ea?ea+" ":"")+Z.toLocaleDateString()+
+" "+Z.toLocaleTimeString());H.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");S.removeAttribute("disabled");u.removeAttribute("disabled");z.removeAttribute("disabled");F.removeAttribute("disabled");null!=p&&p.isRestricted()||(b.editor.graph.isEnabled()&&U.removeAttribute("disabled"),N.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(G,60);mxUtils.setOpacity(S,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(z,60);
+mxUtils.setOpacity(F,60)}else Q.style.display="none",Q.innerText="",H.innerText="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ba,mxResources.get("current")):Z.toDateString()===P?mxUtils.write(ba,
+Z.toLocaleTimeString()):mxUtils.write(ba,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ea){B!=X&&(q.stop(),null!=C&&(C.style.backgroundColor=""),B=X,C=Y,C.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=I=null,H.removeAttribute("title"),
+H.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=x.defaultPageBackgroundColor,v.innerText="",x.getModel().clear(),U.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),Q.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(S,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(F,20),q.spin(m),X.getXml(function(ja){if(B==X)try{aa(ja)}catch(fa){H.innerText=mxResources.get("error")+": "+fa.message}},function(ja){q.stop();Q.style.display="none";Q.innerText="";H.innerText="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(Y,"dblclick",function(ea){t.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);O.appendChild(Y)}return Y}(e[n]);null!=R&&n==e.length-1&&(L=R)}T.appendChild(O);l.appendChild(T)}else null==p||null==b.drive&&p.constructor==window.DriveFile||null==b.dropbox&&p.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l,
+mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(Q);D.appendChild(G);D.appendChild(S);D.appendChild(z);D.appendChild(u);D.appendChild(F);b.editor.cancelFirst?(y.appendChild(l),y.appendChild(N),y.appendChild(W),y.appendChild(U),y.appendChild(t)):(y.appendChild(N),y.appendChild(W),y.appendChild(U),y.appendChild(t),y.appendChild(l));c.appendChild(y);c.appendChild(D);c.appendChild(H);
+this.container=c},DraftDialog=function(b,e,f,c,l,m,v,x,E){var d=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";g.style.lineHeight="normal";mxUtils.write(g,e);d.appendChild(g);var k=document.createElement("select"),n=mxUtils.bind(this,function(){B=mxUtils.parseXml(E[k.value].data);I=b.editor.extractGraphModel(B.documentElement,!0);M=0;this.init()});if(null!=E){k.style.marginLeft="4px";for(e=0;e<E.length;e++){var q=
+document.createElement("option");q.setAttribute("value",e);var p=new Date(E[e].created),y=new Date(E[e].modified);mxUtils.write(q,p.toLocaleDateString()+" "+p.toLocaleTimeString()+" - "+(p.toDateString(),y.toDateString(),y.toLocaleDateString())+" "+y.toLocaleTimeString());k.appendChild(q)}g.appendChild(k);mxEvent.addListener(k,"change",n)}null==f&&(f=E[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left=
+"40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);d.appendChild(A);var C=new Graph(A);C.setEnabled(!1);C.setPanning(!0);C.panningHandler.ignoreCell=!0;C.panningHandler.useLeftButtonForPanning=!0;C.minFitScale=null;C.maxFitScale=null;C.centerZoom=!0;var B=mxUtils.parseXml(f),I=b.editor.extractGraphModel(B.documentElement,!0),M=0,G=null,S=C.getGlobalVariable;C.getGlobalVariable=function(z){return"page"==z&&null!=G&&null!=G[M]?
+G[M].getAttribute("name"):"pagenumber"==z?M+1:"pagecount"==z?null!=G?G.length:1:S.apply(this,arguments)};C.getLinkForCell=function(){return null};f=mxUtils.button("",function(){C.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);g=mxUtils.button("",function(){C.zoomOut()});g.className="geSprite geSprite-zoomout";g.setAttribute("title",mxResources.get("zoomOut"));
+g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){C.maxFitScale=8;C.fit(8);C.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);q=mxUtils.button("",function(){C.zoomActual();C.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline=
+"none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);v=mxUtils.button(v||mxResources.get("discard"),function(){l.apply(this,[k.value,mxUtils.bind(this,function(){null!=k.parentNode&&(k.options[k.selectedIndex].parentNode.removeChild(k.options[k.selectedIndex]),0<k.options.length?(k.value=k.options[0].value,n()):b.hideDialog(!0))})])});v.className="geBtn";var u=document.createElement("select");u.style.maxWidth="80px";u.style.position="relative";u.style.top="-2px";u.style.verticalAlign=
+"bottom";u.style.marginRight="6px";u.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[k.value])});m.className="geBtn gePrimaryBtn";p=document.createElement("div");p.style.position="absolute";p.style.bottom="30px";p.style.right="40px";p.style.textAlign="right";y=document.createElement("div");y.className="geToolbarContainer";y.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
+function(){function z(H){if(null!=H){var N=H.getAttribute("background");if(null==N||""==N||N==mxConstants.NONE)N=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=N;(new mxCodec(H.ownerDocument)).decode(H,C.getModel());C.maxFitScale=1;C.fit(8);C.center()}return H}function F(H){null!=H&&(H=z(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(u,"change",function(H){M=parseInt(u.value);F(G[M]);mxEvent.consume(H)});if("mxfile"==I.nodeName){var J=I.getElementsByTagName("diagram");
+G=[];for(var K=0;K<J.length;K++)G.push(J[K]);0<G.length&&F(G[M]);u.innerText="";if(1<G.length)for(u.style.display="",K=0;K<G.length;K++)J=document.createElement("option"),mxUtils.write(J,G[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),J.setAttribute("value",K),K==M&&J.setAttribute("selected","selected"),u.appendChild(J);else u.style.display="none"}else z(I)};y.appendChild(u);y.appendChild(f);y.appendChild(g);y.appendChild(q);y.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";x=null!=x?mxUtils.button(mxResources.get("ignore"),x):null;null!=x&&(x.className="geBtn");b.editor.cancelFirst?(p.appendChild(f),null!=x&&p.appendChild(x),p.appendChild(v),p.appendChild(m)):(p.appendChild(m),p.appendChild(v),null!=x&&p.appendChild(x),p.appendChild(f));d.appendChild(p);d.appendChild(y);this.container=d},FindWindow=function(b,e,f,c,l,m){function v(V,W,t,D){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
+for(var L=0;L<W.length;L++)if("label"!=W[L].nodeName){var T=mxUtils.trim(W[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=T.indexOf(t)||!D&&T.substring(0,t.length)===t)||null!=V&&V.test(T))return!0}}return!1}function x(){q&&G.value?(N.removeAttribute("disabled"),U.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));G.value&&M.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function E(V,
+W,t){K.innerText="";var D=g.model.getDescendants(g.model.getRoot()),L=M.value.toLowerCase(),T=S.checked?new RegExp(L):null,O=null;y=null;k!=L&&(k=L,n=null,p=!1);var P=null==n;if(0<L.length){if(p){p=!1;for(var R,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){R=X;break}V=(R+1)%b.pages.length;n=null;do p=!1,D=b.pages[V],g=b.createTemporaryGraph(g.getStylesheet()),b.updatePageRoot(D),g.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!E(!0,W,t)&&V!=R);n&&(n=null,t?b.editor.graph.model.execute(new SelectPage(b,
+D)):b.selectPage(D));p=!1;g=b.editor.graph;return E(!0,W,t)}for(X=0;X<D.length;X++){R=g.view.getState(D[X]);W&&null!=T&&(P=P||R==n);if(null!=R&&null!=R.cell.value&&(P||null==O)&&(g.model.isVertex(R.cell)||g.model.isEdge(R.cell))){null!=R.style&&"1"==R.style.html?(z.innerHTML=g.sanitizeHtml(g.getLabel(R.cell)),label=mxUtils.extractTextWithWhitespace([z])):label=g.getLabel(R.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;W&&m&&null!=T&&R==n&&(label=label.substr(A),
+Z=A);var Y=""==G.value,aa=Y;if(null==T&&(aa&&0<=label.indexOf(L)||!aa&&label.substring(0,L.length)===L||Y&&v(T,R.cell,L,aa))||null!=T&&(T.test(label)||Y&&v(T,R.cell,L,aa)))if(m&&(null!=T?(Y=label.match(T),null!=Y&&0<Y.length&&(y=Y[0].toLowerCase(),A=Z+Y.index+y.length)):(y=L,A=y.length)),P){O=R;break}else null==O&&(O=R)}P=P||R==n}}if(null!=O){if(X==D.length&&u.checked)return n=null,p=!0,E(!0,W,t);n=O;g.scrollCellToVisible(n.cell);g.isEnabled()&&!g.isCellLocked(n.cell)?t||g.getSelectionCell()==n.cell&&
+1==g.getSelectionCount()||g.setSelectionCell(n.cell):g.highlightCell(n.cell)}else{if(!V&&u.checked)return p=!0,E(!0,W,t);g.isEnabled()&&!t&&g.clearSelection()}q=null!=O;m&&!V&&x();return 0==L.length||null!=O}var d=b.actions.get("findReplace"),g=b.editor.graph,k=null,n=null,q=!1,p=!1,y=null,A=0,C=1,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var I=m?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder",
+mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=I;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";B.appendChild(M);mxUtils.br(B);if(m){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=I;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";
+B.appendChild(G);mxUtils.br(B);mxEvent.addListener(G,"input",x)}var S=document.createElement("input");S.setAttribute("id","geFindWinRegExChck");S.setAttribute("type","checkbox");S.style.marginRight="4px";B.appendChild(S);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");B.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));B.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
+"6px";I.style.top="-1px";B.appendChild(I);mxUtils.br(B);var u=document.createElement("input");u.setAttribute("id","geFindWinAllPagesChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";B.appendChild(u);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");B.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));B.appendChild(I);var z=document.createElement("div");mxUtils.br(B);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
+"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";B.appendChild(I);var F=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";m&&(G.value="",x());k=n=null;p=!1;M.focus()});F.setAttribute("title",mxResources.get("reset"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn";m||I.appendChild(F);var J=mxUtils.button(mxResources.get("find"),
+function(){try{M.style.backgroundColor=E()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";I.appendChild(J);var K=document.createElement("div");K.style.marginTop="10px";if(m){var H=function(V,W,t,D,L){if(null==L||"1"!=L.html)return D=V.toLowerCase().indexOf(W,
+D),0>D?V:V.substr(0,D)+t+V.substr(D+W.length);var T=V;W=mxUtils.htmlEntities(W);L=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)L.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return T;T=D+W.length;t=mxUtils.htmlEntities(t);V=V.substr(0,D)+t+V.substr(T);for(var P=0,R=0;R<L.length;R++){if(L[R]-P<D)V=V.substr(0,L[R])+O[R]+V.substr(L[R]);else{var X=L[R]-P<T?D+P:L[R]+(t.length-W.length);V=V.substr(0,X)+O[R]+V.substr(X)}P+=O[R].length}return V.replace(/\n/g,
+"<br>")},N=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=y&&null!=n&&G.value){var V=n.cell,W=g.getLabel(V);g.isCellEditable(V)&&g.model.setValue(V,H(W,y,G.value,A-y.length,g.getCurrentCellStyle(V)));M.style.backgroundColor=E(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});N.setAttribute("title",mxResources.get("replFind"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
+"ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");I.appendChild(N);mxUtils.br(I);var U=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=y&&null!=n&&G.value){var V=n.cell,W=g.getLabel(V);g.model.setValue(V,H(W,y,G.value,A-y.length,g.getCurrentCellStyle(V)));N.setAttribute("disabled","disabled");U.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});U.setAttribute("title",mxResources.get("replace"));U.style.float="none";U.style.width="120px";
+U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn gePrimaryBtn";U.setAttribute("disabled","disabled");I.appendChild(U);var Q=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(G.value){k=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;g.getModel().beginUpdate();try{for(var t=0,D={};E(!1,!0,!0)&&100>t;){var L=n.cell,T=g.getLabel(L),O=D[L.id];if(O&&O.replAllMrk==
+C&&O.replAllPos>=A)break;D[L.id]={replAllMrk:C,replAllPos:A};g.isCellEditable(L)&&(g.model.setValue(L,H(T,y,G.value,A-y.length,g.getCurrentCellStyle(L))),t++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(K,mxResources.get("matchesRepl",[t]))}catch(P){b.handleError(P)}finally{g.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}C++}});Q.setAttribute("title",mxResources.get("replaceAll"));Q.style.float="none";Q.style.width="120px";
+Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");I.appendChild(Q);mxUtils.br(I);I.appendChild(F);F=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));F.setAttribute("title",mxResources.get("close"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow=
+"ellipsis";F.className="geBtn";I.appendChild(F);mxUtils.br(I);I.appendChild(K)}else F.style.width="90px",J.style.width="90px";mxEvent.addListener(M,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)d.funct();else if(k!=M.value.toLowerCase()||13==V.keyCode)try{M.style.backgroundColor=E()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"keydown",function(V){70==
V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(d.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),B,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):(G.checked=!1,G.setAttribute("disabled","disabled"))):g.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,m){var x=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(m){var D=document.createElement("input");D.setAttribute("id","geFreehandBrush");D.setAttribute("type",
-"checkbox");D.checked=x.freehand.isPerfectFreehandMode();D.style.margin="10px 5px 0px 10px";D.style.float="left";y.appendChild(D);var d=document.createElement("label");d.setAttribute("for","geFreehandBrush");d.style.float="left";d.style.marginTop="10px";y.appendChild(d);mxUtils.write(d,mxResources.get("brush"));y.appendChild(d);mxUtils.br(y);var g=document.createElement("input");g.setAttribute("type","range");g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",x.freehand.getBrushSize());
-g.style.width="90%";g.style.visibility="hidden";y.appendChild(g);mxUtils.br(y);d=function(){x.freehand.setPerfectFreehandMode(D.checked);g.style.visibility=D.checked?"visible":"hidden"};mxEvent.addListener(D,"change",d);d();mxEvent.addListener(g,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));
-k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";y.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),y,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);x.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,
-mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(x.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(x.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,e,f,c,l){var m=b.editor.graph,
-x=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(D,d){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],q=0;q<k.length;q++){var p=mxUtils.trim(k[q]);""!=p&&0>mxUtils.indexOf(D,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?d(D.concat(n)):m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
-")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),y=x.div;this.window=new mxWindow(mxResources.get("tags"),y,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){x.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign=
-"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var x="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(x=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
-e==b.oneDrive?(x=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):e==b.trello&&(x=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var D=document.createElement("input");D.setAttribute("type",
-"checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){c(D.checked)});x.insertBefore(y,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(x);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(D),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),l.appendChild(f),D.checked=!0,D.defaultChecked=!0,mxEvent.addListener(m,
-"click",function(d){D.checked=!D.checked;mxEvent.consume(d)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var x=b.sidebar.customEntries[m],y={title:b.getResource(x.title),entries:[]},D=0;D<x.entries.length;D++){var d=x.entries[D];y.entries.push({id:d.id,title:b.getResource(d.title),desc:b.getResource(d.desc),image:d.preview})}l.push(y)}for(m=
-0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{y={title:f[m].title,entries:[]};for(D=0;D<f[m].entries.length;D++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[D].id)&&y.entries.push(f[m].entries[D]);0<y.entries.length&&l.push(y)}f=l;if(e){m=mxUtils.bind(this,function(u){for(var G=0;G<u.length;G++)(function(I){var F=p.cloneNode(!1);F.style.fontWeight="bold";F.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";F.style.padding="6px 0px 6px 20px";mxUtils.write(F,
-I.title);g.appendChild(F);for(var L=0;L<I.entries.length;L++)(function(K){var H=p.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",K.title+" ("+K.id+")");var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=b.sidebar.isEntryVisible(K.id);Q.defaultChecked=Q.checked;H.appendChild(Q);mxUtils.write(H," "+K.title);g.appendChild(H);var U=function(T){if(null==
-T||"INPUT"!=mxEvent.getSource(T).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=K.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,K.desc);k.appendChild(V)}null!=K.imageCallback?K.imageCallback(k):null!=K.image?k.innerHTML+='<img border="0" src="'+K.image+'"/>':null==K.desc&&(k.style.padding="20px",k.style.color=
-"rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=H;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(H,"click",U);mxEvent.addListener(H,"dblclick",function(T){Q.checked=!Q.checked;mxEvent.consume(T)});q.push(function(){return Q.checked?K.id:null});0==G&&0==L&&U()})(I.entries[L])})(u[G])});D=document.createElement("div");D.className="geDialogTitle";mxUtils.write(D,mxResources.get("shapes"));
-D.style.position="absolute";D.style.top="0px";D.style.left="0px";D.style.lineHeight="40px";D.style.height="40px";D.style.right="0px";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";
-k.style.textAlign="center";var n=null,q=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(D);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;f.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(u){A.checked=!A.checked;mxEvent.consume(u)});var E=document.createElement("input");E.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),
-m.style.paddingRight="20px",m.appendChild(E),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),E.style.position="relative",E.style.top="1px",E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(u){mxEvent.getSource(u)!=E&&(E.checked=!E.checked,mxEvent.consume(u))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var u=[],G=0;G<q.length;G++){var I=
-q[G].apply(this,arguments);null!=I&&u.push(I)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(G=mxUtils.indexOf(u,".scratchpad"),null!=b.scratchpad!=(0<=G&&0<u.splice(G,1).length)&&b.toggleScratchpad(),G=mxUtils.indexOf(u,"search"),mxSettings.settings.search=0<=G&&0<u.splice(G,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),E.checked&&mxSettings.save());b.sidebar.showEntries(u.join(";"),E.checked,!0);b.setSidebarTitles(A.checked,E.checked)});D.className="geBtn gePrimaryBtn"}else{var z=
-document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";D=document.createElement("tr");z.style.width="100%";e=document.createElement("td");l=document.createElement("td");x=document.createElement("td");var B=mxUtils.bind(this,function(u,G,I){var F=document.createElement("input");F.type="checkbox";z.appendChild(F);F.checked=b.sidebar.isEntryVisible(I);var L=document.createElement("span");mxUtils.write(L,G);G=document.createElement("div");G.style.display=
-"block";G.appendChild(F);G.appendChild(L);mxEvent.addListener(L,"click",function(K){F.checked=!F.checked;mxEvent.consume(K)});u.appendChild(G);return function(){return F.checked?I:null}});D.appendChild(e);D.appendChild(l);D.appendChild(x);m.appendChild(D);z.appendChild(m);q=[];var J=0;for(m=0;m<f.length;m++)for(D=0;D<f[m].entries.length;D++)J++;var M=[e,l,x],v=0;for(m=0;m<f.length;m++)(function(u){for(var G=0;G<u.entries.length;G++){var I=u.entries[G];q.push(B(M[Math.floor(v/(J/3))],I.title,I.id));
-v++}})(f[m]);c.appendChild(z);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";E=document.createElement("input");isLocalStorage&&(E.setAttribute("type","checkbox"),E.checked=!0,E.defaultChecked=!0,f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(u){E.checked=!E.checked;mxEvent.consume(u)}));c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});m.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){for(var u=["search"],G=0;G<q.length;G++){var I=q[G].apply(this,arguments);null!=I&&u.push(I)}b.sidebar.showEntries(0<u.length?u.join(";"):"",E.checked);b.hideDialog()});D.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(D)):(f.appendChild(D),f.appendChild(m));c.appendChild(f);this.container=
-c},PluginsDialog=function(b,e,f,c){function l(){D=!0;if(0==y.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var p=0;p<y.length;p++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var E=document.createElement("span");E.className="geSprite geSprite-delete";E.style.position="relative";E.style.cursor="pointer";E.style.top="5px";E.style.marginRight="4px";E.style.display="inline-block";A.appendChild(E);mxUtils.write(A,y[p]);x.appendChild(A);mxUtils.br(x);mxEvent.addListener(E,
-"click",function(z){return function(){b.confirm(mxResources.get("delete")+' "'+y[z]+'"?',function(){null!=f&&f(y[z]);y.splice(z,1);l()})}}(p))}}}var m=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var y=mxSettings.getPlugins().slice(),D=!1;m.appendChild(x);l();D=!1;var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(p){p&&0>mxUtils.indexOf(y,p)&&y.push(p);l()})}:function(){var p=document.createElement("div"),A=document.createElement("span");
-A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");p.appendChild(A);var E=document.createElement("select");E.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var z=document.createElement("option");mxUtils.write(z,App.publicPlugin[A]);z.value=App.publicPlugin[A];E.appendChild(z)}p.appendChild(E);mxUtils.br(p);mxUtils.br(p);A=mxUtils.button(mxResources.get("custom")+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();
-if(null!=J&&0<J.length){J=J.split(";");for(var M=0;M<J.length;M++){var v=J[M],u=App.pluginRegistry[v];null!=u&&(v=u);0<v.length&&0>mxUtils.indexOf(y,v)&&y.push(v)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});A.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[E.value];0>mxUtils.indexOf(y,B)&&(y.push(B),l())}),null,null,null,A);b.showDialog(p.container,360,100,!0,!0)});d.className=
-"geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){D?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(d),n.appendChild(k)):(n.appendChild(d),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var u=E.checked,G=z.checked,I=q.geometry,F=D.width,L=D.height,K=(300-F)/2,H=(300-L)/2;I.x<K?(I.width-=K-I.x,I.x=K):I.x+I.width>K+F&&(I.width=K+F-I.x,I.x=Math.min(I.x,K+F));I.y<H?(I.height-=
-H-I.y,I.y=H):I.y+I.height>H+L&&(I.height=H+L-I.y,I.y=Math.min(I.y,H+L));var Q=(I.x-K)/F*100;F=100-(I.x+I.width-K)/F*100;K=(I.y-H)/L*100;I=100-(I.y+I.height-H)/L*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(F)+"% "+mxUtils.format(I)+"% "+mxUtils.format(Q)+"%"+(u?" round "+n+"%":G?" round 50%":"")+")"}function m(u){null!=g&&(!0!==u&&(g.model.setGeometry(q,k.clone()),n=5,J.value=n),g.model.setStyle(q,p+l()),g.selectAll(),B.style.visibility=E.checked?"visible":"hidden")}var x=document.createElement("div"),
-y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var D=document.createElement("img");D.onload=function(){function u(){g.model.setStyle(q,p+l())}g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var G=g.createVertexHandler;
-g.createVertexHandler=function(){var R=G.apply(this,arguments);R.livePreview=!1;return R};if(null!=f)try{if("inset"==f.substring(0,5)){var I=q.geometry,F=D.width,L=D.height,K=(300-F)/2,H=(300-L)/2,Q=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(Q[0]),T=parseFloat(Q[1]),V=parseFloat(Q[2]),W=parseFloat(Q[3]);isFinite(U)&&isFinite(T)&&isFinite(V)&&isFinite(W)?(I.x=W/100*F+K,I.y=U/100*L+H,I.width=(100-T)/100*F+K-I.x,I.height=(100-V)/100*L+H-I.y,"round"==Q[4]?"50%"==Q[5]?z.setAttribute("checked",
-"checked"):(n=parseInt(Q[5]),J.value=n,E.setAttribute("checked","checked"),B.style.visibility="visible"):A.setAttribute("checked","checked")):f=null}else f=null}catch(R){}q.style=p+(f?f:l());q.vertex=!0;g.addCell(q,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,u);g.addListener(mxEvent.CELLS_RESIZED,u);var t=g.graphHandler.mouseUp,C=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){t.apply(this,arguments);d.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){C.apply(this,
-arguments);d.style.backgroundColor=""};g.dblClick=function(){};var N=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){N.call(this,[q],[q])}};D.onerror=function(){D.onload=null;D.src=Editor.errorImage};D.setAttribute("src",e);D.style.maxWidth="300px";D.style.maxHeight="300px";y.appendChild(D);x.appendChild(y);var d=document.createElement("div");d.style.width="300px";d.style.height="300px";d.style.overflow="hidden";d.style.backgroundColor="#fff9";x.appendChild(d);
-var g=null,k=new mxGeometry(100,100,100,100),n=5,q=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";x.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));
-x.appendChild(e);var E=document.createElement("input");E.setAttribute("type","radio");E.setAttribute("id","croppingRounded");E.setAttribute("name","croppingShape");E.style.margin="5px";x.appendChild(E);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));x.appendChild(e);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingEllipse");z.setAttribute("name","croppingShape");z.style.margin="5px";
-x.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));x.appendChild(e);mxEvent.addListener(A,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(z,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min","1");J.setAttribute("max","49");J.setAttribute("value",n);J.setAttribute("title",
-mxResources.get("arcSize"));B.appendChild(J);x.appendChild(B);mxEvent.addListener(J,"change",function(){n=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(l(),q.geometry.width,q.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){c(null,D.width,D.height);b.hideDialog()});M.className="geBtn";var v=document.createElement("div");
-v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(M),v.appendChild(y)):(v.appendChild(M),v.appendChild(y),v.appendChild(e));x.appendChild(v);this.container=x},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),m=document.createElement("table"),x=document.createElement("tbody"),y=document.createElement("tr"),D=document.createElement("td"),d=document.createElement("td");
-m.style.paddingLeft="6px";mxUtils.write(D,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("left")+":");var k=document.createElement("input");
-k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";d.appendChild(k);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";d.appendChild(n);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");
-d=document.createElement("td");mxUtils.write(D,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";d.appendChild(q);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
-p.value=null!=c&&null!=c.offset?c.offset.y:"";d.appendChild(p);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.width:"";d.appendChild(A);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=
-document.createElement("td");mxUtils.write(D,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="100px";E.value=null!=c?c.height:"";d.appendChild(E);y.appendChild(D);y.appendChild(d);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");d=document.createElement("td");mxUtils.write(D,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=
-1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";d.appendChild(z);y.appendChild(D);y.appendChild(d);x.appendChild(y);m.appendChild(x);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var M=f.getCellGeometry(e[J]);null!=M&&(M=M.clone(),f.isCellMovable(e[J])&&(M.relative=g.checked,
-0<mxUtils.trim(k.value).length&&(M.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(M.y=Number(n.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(q.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(p.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(A.value).length&&(M.width=Number(A.value)),0<mxUtils.trim(E.value).length&&(M.height=Number(E.value))),f.getModel().setGeometry(e[J],M));0<mxUtils.trim(z.value).length&&
-f.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[J]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,e,f,c,l,m){function x(G){for(G=document.elementFromPoint(G.clientX,
-G.clientY);null!=G&&G.parentNode!=q;)G=G.parentNode;var I=null;if(null!=G){var F=q.firstChild;for(I=0;null!=F&&F!=G;)F=F.nextSibling,I++}return I}function y(G,I,F,L,K,H,Q,U,T){try{if(b.spinner.stop(),null==I||"image/"==I.substring(0,6))if(null==G&&null!=Q||null==A[G]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
-X.title.length?"#d0d0d0":""};q.style.backgroundImage="";p.style.display="none";var W=K,t=H;if(K>b.maxImageSize||H>b.maxImageSize){var C=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,H));K*=C;H*=C}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.padding="0 12px";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition",
-"transform .1s ease-in-out");if(null!=G){var R=document.createElement("img");R.setAttribute("src",J.convert(G));R.style.width=W+"px";R.style.height=t+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-t)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";N.appendChild(R)}else if(null!=Q){var O=b.stringToCells(Graph.decompress(Q.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,N,null,!0,!1),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var P=document.createElement("img");
-P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ea,ma){mxEvent.addListener(P,"click",function(ia){A[ea]=null;for(var pa=0;pa<g.length;pa++)if(null!=g[pa].data&&g[pa].data==ea||null!=g[pa].xml&&
-null!=ma&&g[pa].xml==ma.xml){g.splice(pa,1);break}N.parentNode.removeChild(ba);0==g.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ia)});mxEvent.addListener(P,"dblclick",function(ia){mxEvent.consume(ia)})})(N,G,Q);N.appendChild(P);N.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=G?(X={data:G,w:K,h:H,title:T},null!=U&&(X.aspect=U),A[G]=R,g.push(X)):null!=Q&&(Q.aspect="fixed",g.push(Q),X=Q);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();N.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ma){null!=ma&&(X.title=ma,V())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);B=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(N,"dblclick",O);q.appendChild(N);mxEvent.addListener(N,"dragstart",function(ba){null==G&&null!=Q&&(P.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=Q.xml&&ba.dataTransfer.setData("Text",
-Q.xml);E=x(ba);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);P.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(ba){"hidden"==P.style.visibility&&(P.style.visibility="",S.style.visibility="");E=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=
-!1;try{if(W=mxUtils.parseXml(G),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var aa=0;aa<t.length;aa++)null!=t[aa].xml?y(null,null,0,0,0,0,t[aa]):y(t[aa].data,null,0,0,t[aa].w,t[aa].h,null,"fixed",t[aa].title);K=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){t=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(t));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);
-y(null,null,0,0,0,0,{xml:t,w:Z.width,h:Z.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function D(G){G.dataTransfer.dropEffect=null!=E?"move":"copy";G.stopPropagation();G.preventDefault()}function d(G){G.stopPropagation();G.preventDefault();M=!1;z=x(G);if(null!=E)null!=z&&z<q.children.length?(g.splice(z>E?z-1:z,0,g.splice(E,1)[0]),q.insertBefore(q.children[E],q.children[z])):(g.push(g.splice(E,1)[0]),q.appendChild(q.children[E]));
-else if(0<G.dataTransfer.files.length)b.importFiles(G.dataTransfer.files,0,0,b.maxImageSize,v(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var I=decodeURIComponent(G.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(I)||/(\.png)($|\?)/i.test(I)||/(\.gif)($|\?)/i.test(I)||/(\.svg)($|\?)/i.test(I))&&b.loadImage(I,function(F){y(I,null,0,0,F.width,F.height);q.scrollTop=q.scrollHeight})}G.stopPropagation();G.preventDefault()}var g=[];f=document.createElement("div");
-f.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";f.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",e);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";null==l||l.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");
-p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var A={},E=null,z=null,B=null;e=function(G){"true"!=mxEvent.getSource(G).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(G))};mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",e);var J=new mxUrlConverter,M=
-!1;if(null!=c)for(e=0;e<c.length;e++)k=c[e],y(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(q,"dragleave",function(G){p.style.cursor="";for(var I=mxEvent.getSource(G);null!=I;){if(I==q||I==p){G.stopPropagation();G.preventDefault();break}I=I.parentNode}});var v=function(G){return function(I,F,L,K,H,Q,U,T,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){y(W,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)?
-null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(I,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(y(W.responseText,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(y(I,F,L,K,H,Q,U,"fixed",mxEvent.isAltDown(G)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",D);mxEvent.addListener(q,"drop",d);mxEvent.addListener(p,"dragover",D);mxEvent.addListener(p,"drop",d);f.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
-c.appendChild(e);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(G){b.spinner.stop();if(null!=G){var I=b.getSearch("create title mode url drive splash state clibs ui".split(" "));I+=(0==I.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(G);G=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+I,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(G.container,450,240,!0);G.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"),
-function(){var G=b.createLibraryDataFromImages(g),I=n.value;/(\.xml)$/i.test(I)||(I+=".xml");b.isLocalFileSave()?b.saveLocalFile(G,I,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(I)+"&format=xml&xml="+encodeURIComponent(G))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple");
-u.setAttribute("type","file");mxEvent.addListener(u,"change",function(G){M=!1;b.importFiles(u.files,0,0,b.maxImageSize,function(I,F,L,K,H,Q,U,T,V){null!=u.files&&(v(G)(I,F,L,K,H,Q,U,T,V),u.type="",u.type="file",u.value="")});q.scrollTop=q.scrollHeight});u.style.display="none";document.body.appendChild(u);b.libDlgFileInputElt=u}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k=
-mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(G,I,F){M=!1;if(null!=G){if("data:image/"==G.substring(0,11)){var L=G.indexOf(",");0<L&&(G=G.substring(0,L)+";base64,"+G.substring(L+1))}y(G,null,0,0,I,F);q.scrollTop=q.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(G,I,F,L){b.saveLibrary(G,I,F,L)};k=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),x=document.createElement("tbody");m.style.cellPadding="4px";var y=document.createElement("tr");var D=document.createElement("td");D.setAttribute("colspan",
-"2");D.style.fontSize="10pt";mxUtils.write(D,f);y.appendChild(D);x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=c-200+"px";d.style.height=l+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};D.appendChild(d);y.appendChild(D);D=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
-"6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);D.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(e);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(d,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);y.appendChild(D);
-x.appendChild(y);y=document.createElement("tr");D=document.createElement("td");D.setAttribute("colspan","2");D.style.paddingTop="2px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",D.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);
-var q=function(p,A,E){var z=d.value,B=mxUtils.parseXml(z);z=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(E&&b.hideDialog(),B=!p.model.contains(A),!E||B||z!=n){z=Graph.compress(z);p.getModel().beginUpdate();try{if(B){var J=b.editor.graph.getFreeInsertPoint();A.geometry.x=J.x;A.geometry.y=J.y;p.addCell(A)}p.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+z+")",[A])}catch(M){throw M;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(A),p.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){q(g,k,!1)});f.className="geBtn";D.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){q(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";D.appendChild(f);b.editor.cancelFirst||D.appendChild(l);y.appendChild(D);x.appendChild(y);m.appendChild(x);this.container=m},CustomDialog=function(b,e,f,c,l,m,
-x,y,D,d,g){var k=document.createElement("div");k.appendChild(e);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=x&&n.appendChild(x);b.isOffline()||null==m||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),e.className="geBtn",n.appendChild(e));D=mxUtils.button(D||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});D.className="geBtn";y&&(D.style.display="none");b.editor.cancelFirst&&n.appendChild(D);l=mxUtils.button(l||
-mxResources.get("ok"),mxUtils.bind(this,function(){d||b.hideDialog(null,null,this.container);if(null!=f){var q=f();if("string"===typeof q){b.showError(mxResources.get("error"),q);return}}d&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(D);if(null!=g)for(y=0;y<g.length;y++)(function(q,p,A){q=mxUtils.button(q,function(E){p(E)});null!=A&&q.setAttribute("title",A);q.className="geBtn";n.appendChild(q)})(g[y][0],g[y][1],g[y][2]);
-k.appendChild(n);this.cancelBtn=D;this.okButton=l;this.container=k},TemplatesDialog=function(b,e,f,c,l,m,x,y,D,d,g,k,n,q,p){function A(da){Ba.innerText=da;Ba.style.display="block";setTimeout(function(){Ba.style.display="none"},4E3)}function E(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",C=t,t=null)}function z(da,ha,ja,sa,oa,Ca,Aa){if(-1<da.className.indexOf("geTempDlgRadioBtnActive"))return!1;da.className+=" geTempDlgRadioBtnActive";T.querySelector(".geTempDlgRadioBtn[data-id="+
-sa+"]").className="geTempDlgRadioBtn "+(Aa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");T.querySelector("."+ha).src="/images/"+ja+"-sel.svg";T.querySelector("."+oa).src="/images/"+Ca+".svg";return!0}function B(da,ha,ja,sa){function oa(qa,Ja){null==Aa?(qa=/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)?PROXY_URL+"?url="+encodeURIComponent(qa):TEMPLATE_PATH+"/"+qa,mxUtils.get(qa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&(Aa=Na.getText());Ja(Aa)}))):Ja(Aa)}
-function Ca(qa,Ja,Na){if(null!=qa&&mxUtils.isAncestorNode(document.body,ha)&&(qa=mxUtils.parseXml(qa),qa=Editor.extractGraphModel(qa.documentElement,!0),null!=qa)){"mxfile"==qa.nodeName&&(qa=Editor.parseDiagramNode(qa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(qa.ownerDocument),Ka=new mxGraphModel;Ra.decode(qa,Ka);qa=Ka.root.getChildAt(0).children||[];b.sidebar.createTooltip(ha,qa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ja,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";T.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(T.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}var Aa=null;if(Da||b.sidebar.currentElt==
-ha)b.sidebar.hideTooltip();else{var ua=function(qa){Da&&b.sidebar.currentElt==ha&&Ca(qa,mxEvent.getClientX(sa),mxEvent.getClientY(sa));Da=!1;ja.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ha;Da=!0;ja.src="/images/aui-wait.gif";da.isExt?D(da,ua,function(){A(mxResources.get("cantLoadPrev"));Da=!1;ja.src="/images/icon-search.svg"}):oa(da.url,ua)}}function J(da,ha,ja){if(null!=N){for(var sa=N.className.split(" "),oa=0;oa<sa.length;oa++)if(-1<sa[oa].indexOf("Active")){sa.splice(oa,
-1);break}N.className=sa.join(" ")}null!=da?(N=da,N.className+=" "+ha,R=ja,Ma.className="geTempDlgCreateBtn"):(R=N=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(da,ha){if(null!=R){var ja=function(ua){Aa.isExternal?D(Aa,function(qa){sa(qa,ua)},oa):Aa.url?mxUtils.get(TEMPLATE_PATH+"/"+Aa.url,mxUtils.bind(this,function(qa){200<=qa.getStatus()&&299>=qa.getStatus()?sa(qa.getText(),ua):oa()})):sa(b.emptyDiagramXml,ua)},sa=function(ua,qa){p||b.hideDialog(!0);e(ua,qa,Aa,ha)},oa=function(){A(mxResources.get("cannotLoad"));
-Ca()},Ca=function(){R=Aa;Ma.className="geTempDlgCreateBtn";ha&&(va.className="geTempDlgOpenBtn")},Aa=R;R=null;"boolean"!==typeof ha&&(ha=Aa.isExternal&&k);1==da?d(Aa.url,Aa):ha?(va.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ja,da,function(ua){var qa=null!=ua&&0<ua.length;return qa&&p?(ja(ua),!1):qa},null,null,null,Ca,q?null:[]),b.showDialog(da.container,350,80,!0,!0),da.init())}}function v(da){Ma.innerText=mxResources.get(ba||da?"create":"copy");da=da?"none":"";k&&(va.style.display=da);for(var ha=T.querySelectorAll(".geTempDlgLinkToDiagram"),ja=0;ja<ha.length;ja++)ha[ja].style.display=da}function u(da,ha,ja,sa,oa){oa||(ma.innerText="",J(),X=da,aa=sa);var Ca=null;if(ja){Ca=document.createElement("table");
-Ca.className="geTempDlgDiagramsListGrid";var Aa=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Aa.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Aa.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Aa.appendChild(ua);Ca.appendChild(Aa);ma.appendChild(Ca)}for(Aa=0;Aa<da.length;Aa++){da[Aa].isExternal=
-!ha;var qa=da[Aa].url,Ja=(ua=mxUtils.htmlEntities(ha?mxResources.get(da[Aa].title,null,da[Aa].title):da[Aa].title))||da[Aa].url,Na=da[Aa].imgUrl,Ra=da[Aa].changedBy||"",Ka="";da[Aa].lastModifiedOn&&(Ka=b.timeSince(new Date(da[Aa].lastModifiedOn)),null==Ka&&(Ka=mxResources.get("lessThanAMinute")),Ka=mxResources.get("timeAgo",[Ka],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+qa.substring(0,qa.length-4)+".png");qa=ja?50:15;null!=ua&&ua.length>qa&&(ua=ua.substring(0,qa)+"&hellip;");if(ja){var Pa=document.createElement("tr");
-Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Na.appendChild(Qa);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ua;Na.appendChild(Ja);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ka;Pa.appendChild(Na);Ca.appendChild(Pa);
-null==N&&(v(ha),J(Pa,"geTempDlgDiagramsListGridActive",da[Aa]));(function(La,Ta,Va){mxEvent.addListener(Pa,"click",function(){N!=Ta&&(v(ha),J(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Pa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(da[Aa],Pa,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ja);null==N&&(v(ha),J(Oa,"geTempDlgDiagramTileActive",da[Aa]));Ra=document.createElement("div");Ra.className=
-"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(La,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Na?Na.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=Na;Ra.appendChild(Sa);Oa.appendChild(Ra);Ra=document.createElement("div");
-Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Oa.appendChild(Qa);(function(La,Ta,Va){mxEvent.addListener(Oa,"click",function(){N!=Ta&&(v(ha),J(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Oa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(La,Ta,Va,Wa)})})(da[Aa],Oa,Qa);ma.appendChild(Oa)}}for(var Ua in sa)da=
-sa[Ua],0<da.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerText=mxResources.get(Ua,null,Ua),ma.appendChild(oa),u(da,ha,ja,null,!0))}function G(da,ha){xa.innerText="";J();var ja=Math.floor(xa.offsetWidth/150)-1;ha=!ha&&da.length>ja?ja:da.length;for(var sa=0;sa<ha;sa++){var oa=da[sa];oa.isCategory=!0;var Ca=document.createElement("div"),Aa=mxResources.get(oa.title);null==Aa&&(Aa=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem";
-Ca.setAttribute("title",Aa);Aa=mxUtils.htmlEntities(Aa);15<Aa.length&&(Aa=Aa.substring(0,15)+"&hellip;");null==N&&(v(!0),J(Ca,"geTempDlgNewDiagramCatItemActive",oa));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var qa=document.createElement("img");qa.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;ua.appendChild(qa);Ca.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Aa;Ca.appendChild(ua);xa.appendChild(Ca);(function(Ja,
-Na){mxEvent.addListener(Ca,"click",function(){N!=Na&&(v(!0),J(Na,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(Ca,"dblclick",M)})(oa,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";Aa=mxResources.get("showAllTemps");Ca.setAttribute("title",Aa);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Ca.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";
-ua.innerText=Aa;Ca.appendChild(ua);xa.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ja(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}ba=!0;var Na=T.querySelector(".geTemplatesList");Na.style.display="block";na.style.width="";Ea.style.display="";Ea.value="";Y=null;Ja()});ea.style.display=da.length<=ja?"none":""}function I(da,ha,ja){function sa(Sa,Ua){var La=mxResources.get(Sa);null==La&&(La=Sa.substring(0,1).toUpperCase()+Sa.substring(1));
-Sa=La+" ("+Ua.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function oa(Sa,Ua,La,Ta,Va){mxEvent.addListener(La,"click",function(){t!=La&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Ga.style.display="none",Fa.style.minHeight="100%"),t=La,t.style.fontWeight="bold",t.style.textDecoration="underline",na.scrollTop=0,V&&(W=!0),ia.innerHTML=Ua,pa.style.display="none",u(Va?ha[Sa]:
-Ta?Ia[Sa][Ta]:da[Sa],Va?!1:!0))})}var Ca=T.querySelector(".geTemplatesList");if(0<ja){ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,mxResources.get("custom"));Ca.appendChild(ja);for(var Aa in ha){ja=document.createElement("div");var ua=ha[Aa];ua=sa(Aa,ua);ja.className="geTemplateCatLink";ja.setAttribute("title",ua.fullLbl);ja.innerHTML=ua.lbl;Ca.appendChild(ja);oa(Aa,ua.lblOnly,ja,
-null,!0)}ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,"draw.io");Ca.appendChild(ja)}for(Aa in da){var qa=Ia[Aa],Ja=ja=document.createElement(qa?"ul":"div");ua=da[Aa];ua=sa(Aa,ua);if(null!=qa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl);
-Ra.innerHTML=ua.lbl;Ja=Ra;Na.appendChild(Ra);var Ka=document.createElement("ul");Ka.className="geTempTreeNested";Ka.style.visibility="hidden";for(var Pa in qa){var Qa=document.createElement("li"),Oa=sa(Pa,qa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";oa(Aa,Oa.lblOnly,Qa,Pa);Ka.appendChild(Qa)}Na.appendChild(Ka);ja.className="geTempTree";ja.appendChild(Na);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var La=
-Sa.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<La.length;Va++)La[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ka,Ra)}else ja.className="geTemplateCatLink geTemplateDrawioCatLink",ja.setAttribute("title",ua.fullLbl),ja.innerHTML=ua.lbl;Ca.appendChild(ja);oa(Aa,ua.lblOnly,
-Ja)}}function F(){mxUtils.get(c,function(da){if(!la){la=!0;da=da.getXml().documentElement.firstChild;for(var ha={};null!=da;){if("undefined"!==typeof da.getAttribute)if("clibs"==da.nodeName){for(var ja=da.getAttribute("name"),sa=da.getElementsByTagName("add"),oa=[],Ca=0;Ca<sa.length;Ca++)oa.push(encodeURIComponent(mxUtils.getTextContent(sa[Ca])));null!=ja&&0<oa.length&&(ha[ja]=oa.join(";"))}else if(oa=da.getAttribute("url"),null!=oa){sa=da.getAttribute("section");ja=da.getAttribute("subsection");
-if(null==sa&&(Ca=oa.indexOf("/"),sa=oa.substring(0,Ca),null==ja)){var Aa=oa.indexOf("/",Ca+1);-1<Aa&&(ja=oa.substring(Ca+1,Aa))}Ca=ya[sa];null==Ca&&(ra++,Ca=[],ya[sa]=Ca);oa=da.getAttribute("clibs");null!=ha[oa]&&(oa=ha[oa]);oa={url:da.getAttribute("url"),libs:da.getAttribute("libs"),title:da.getAttribute("title")||da.getAttribute("name"),preview:da.getAttribute("preview"),clibs:oa,tags:da.getAttribute("tags")};Ca.push(oa);null!=ja&&(Ca=Ia[sa],null==Ca&&(Ca={},Ia[sa]=Ca),sa=Ca[ja],null==sa&&(sa=[],
-Ca[ja]=sa),sa.push(oa))}da=da.nextSibling}I(ya,ka,wa)}})}function L(da){x&&(na.scrollTop=0,ma.innerText="",za.spin(ma),W=!1,V=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,x(ca,function(){A(mxResources.get("cannotLoad"));ca([])},da?null:m))}function K(da){if(""==da)null!=C&&(C.click(),C=null);else{if(null==TemplatesDialog.tagsList[c]){var ha={};for(Ja in ya)for(var ja=ya[Ja],sa=0;sa<ja.length;sa++){var oa=ja[sa];if(null!=oa.tags)for(var Ca=oa.tags.toLowerCase().split(";"),Aa=0;Aa<Ca.length;Aa++)null==
-ha[Ca[Aa]]&&(ha[Ca[Aa]]=[]),ha[Ca[Aa]].push(oa)}TemplatesDialog.tagsList[c]=ha}var ua=da.toLowerCase().split(" ");ha=TemplatesDialog.tagsList[c];if(0<wa&&null==ha.__tagsList__){for(Ja in ka)for(ja=ka[Ja],sa=0;sa<ja.length;sa++)for(oa=ja[sa],Ca=oa.title.split(" "),Ca.push(Ja),Aa=0;Aa<Ca.length;Aa++){var qa=Ca[Aa].toLowerCase();null==ha[qa]&&(ha[qa]=[]);ha[qa].push(oa)}ha.__tagsList__=!0}var Ja=[];ja={};for(sa=Ca=0;sa<ua.length;sa++)if(0<ua[sa].length){qa=ha[ua[sa]];var Na={};Ja=[];if(null!=qa)for(Aa=
-0;Aa<qa.length;Aa++)oa=qa[Aa],0==Ca==(null==ja[oa.url])&&(Na[oa.url]=!0,Ja.push(oa));ja=Na;Ca++}0==Ja.length?ia.innerText=mxResources.get("noResultsFor",[da]):u(Ja,!0)}}function H(da){if(Y!=da||P!=Z)E(),na.scrollTop=0,ma.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+da+'"',fa=null,ba?K(da):y&&(da?(za.spin(ma),W=!1,V=!0,y(da,ca,function(){A(mxResources.get("searchFailed"));ca([])},P?null:m)):L(P)),Y=da,Z=P}function Q(da){null!=fa&&clearTimeout(fa);13==da.keyCode?H(Ea.value):fa=setTimeout(function(){H(Ea.value)},
-1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(y?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
-mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?u.removeAttribute("disabled"):(u.checked=!1,u.setAttribute("disabled","disabled"))):g.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,m){var v=b.editor.graph,x=document.createElement("div");x.style.textAlign="center";x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";if(m){var E=document.createElement("input");E.setAttribute("id","geFreehandBrush");E.setAttribute("type",
+"checkbox");E.checked=v.freehand.isPerfectFreehandMode();E.style.margin="10px 5px 0px 10px";E.style.float="left";x.appendChild(E);var d=document.createElement("label");d.setAttribute("for","geFreehandBrush");d.style.float="left";d.style.marginTop="10px";x.appendChild(d);mxUtils.write(d,mxResources.get("brush"));x.appendChild(d);mxUtils.br(x);var g=document.createElement("input");g.setAttribute("type","range");g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",v.freehand.getBrushSize());
+g.style.width="90%";g.style.visibility="hidden";x.appendChild(g);mxUtils.br(x);d=function(){v.freehand.setPerfectFreehandMode(E.checked);g.style.visibility=E.checked?"visible":"hidden"};mxEvent.addListener(E,"change",d);d();mxEvent.addListener(g,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));
+k.style.marginTop=m?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";x.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),x,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);v.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,
+mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));var n=document.createElement("span");n.style.opacity="0.7";n.style["float"]="right";mxUtils.write(n,"X");k.appendChild(n);k.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(v.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&
+v.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,e,f,c,l){var m=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(E,d){if(m.isEnabled()){var g=new FilenameDialog(b,"",mxResources.get("add"),function(k){b.hideDialog();if(null!=k&&0<k.length){k=k.split(" ");for(var n=[],q=0;q<k.length;q++){var p=mxUtils.trim(k[q]);""!=p&&0>mxUtils.indexOf(E,p)&&n.push(p)}0<n.length&&(m.isSelectionEmpty()?d(E.concat(n)):
+m.addTagsForCells(m.getSelectionCells(),n))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(g.container,300,80,!0,!0);g.init()}}),x=v.div;this.window=new mxWindow(mxResources.get("tags"),x,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));b.installResizeHandler(this,
+!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var v="Unknown",x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),x.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
+e==b.dropbox?(v=mxResources.get("dropbox"),x.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),x.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),x.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),x.src=IMAGE_PATH+"/gitlab-logo.svg",x.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),x.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
+[v]));var E=document.createElement("input");E.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(E.checked)});v.insertBefore(x,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize="18px";v.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(E),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),
+l.appendChild(f),E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(m,"click",function(d){E.checked=!E.checked;mxEvent.consume(d)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var v=b.sidebar.customEntries[m],x={title:b.getResource(v.title),entries:[]},E=0;E<v.entries.length;E++){var d=v.entries[E];x.entries.push({id:d.id,title:b.getResource(d.title),
+desc:b.getResource(d.desc),image:d.preview})}l.push(x)}for(m=0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{x={title:f[m].title,entries:[]};for(E=0;E<f[m].entries.length;E++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[E].id)&&x.entries.push(f[m].entries[E]);0<x.entries.length&&l.push(x)}f=l;if(e){m=mxUtils.bind(this,function(S){for(var u=0;u<S.length;u++)(function(z){var F=p.cloneNode(!1);F.style.fontWeight="bold";F.style.backgroundColor=Editor.isDarkMode()?
+"#505759":"#e5e5e5";F.style.padding="6px 0px 6px 20px";mxUtils.write(F,z.title);g.appendChild(F);for(var J=0;J<z.entries.length;J++)(function(K){var H=p.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace="nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",K.title+" ("+K.id+")");var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=b.sidebar.isEntryVisible(K.id);N.defaultChecked=N.checked;H.appendChild(N);
+mxUtils.write(H," "+K.title);g.appendChild(H);var U=function(Q){if(null==Q||"INPUT"!=mxEvent.getSource(Q).nodeName){k.style.textAlign="center";k.style.padding="0px";k.style.color="";k.innerText="";if(null!=K.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,K.desc);k.appendChild(V)}null!=K.imageCallback?K.imageCallback(k):null!=K.image?k.innerHTML+='<img border="0" src="'+
+K.image+'"/>':null==K.desc&&(k.style.padding="20px",k.style.color="rgb(179, 179, 179)",mxUtils.write(k,mxResources.get("noPreview")));null!=n&&(n.style.backgroundColor="");n=H;n.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=Q&&mxEvent.consume(Q)}};mxEvent.addListener(H,"click",U);mxEvent.addListener(H,"dblclick",function(Q){N.checked=!N.checked;mxEvent.consume(Q)});q.push(function(){return N.checked?K.id:null});0==u&&0==J&&U()})(z.entries[J])})(S[u])});E=document.createElement("div");
+E.className="geDialogTitle";mxUtils.write(E,mxResources.get("shapes"));E.style.position="absolute";E.style.top="0px";E.style.left="0px";E.style.lineHeight="40px";E.style.height="40px";E.style.right="0px";var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom=
+"60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";var n=null,q=[],p=document.createElement("div");p.style.position="relative";p.style.left="0px";p.style.right="0px";m(f);c.style.padding="30px";c.appendChild(E);c.appendChild(g);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height=
+"60px";f.style.lineHeight="52px";var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.position="relative";y.style.top="1px";y.checked=b.sidebar.sidebarTitles;y.defaultChecked=y.checked;f.appendChild(y);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(S){y.checked=!y.checked;mxEvent.consume(S)});var A=document.createElement("input");A.setAttribute("type","checkbox");
+if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(A),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(m,"click",function(S){mxEvent.getSource(S)!=A&&(A.checked=!A.checked,mxEvent.consume(S))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";E=mxUtils.button(mxResources.get("apply"),
+function(){b.hideDialog();for(var S=[],u=0;u<q.length;u++){var z=q[u].apply(this,arguments);null!=z&&S.push(z)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(u=mxUtils.indexOf(S,".scratchpad"),null!=b.scratchpad!=(0<=u&&0<S.splice(u,1).length)&&b.toggleScratchpad(),u=mxUtils.indexOf(S,"search"),mxSettings.settings.search=0<=u&&0<S.splice(u,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(S.join(";"),A.checked,!0);b.setSidebarTitles(y.checked,
+A.checked)});E.className="geBtn gePrimaryBtn"}else{var C=document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";E=document.createElement("tr");C.style.width="100%";e=document.createElement("td");l=document.createElement("td");v=document.createElement("td");var B=mxUtils.bind(this,function(S,u,z){var F=document.createElement("input");F.type="checkbox";C.appendChild(F);F.checked=b.sidebar.isEntryVisible(z);var J=document.createElement("span");
+mxUtils.write(J,u);u=document.createElement("div");u.style.display="block";u.appendChild(F);u.appendChild(J);mxEvent.addListener(J,"click",function(K){F.checked=!F.checked;mxEvent.consume(K)});S.appendChild(u);return function(){return F.checked?z:null}});E.appendChild(e);E.appendChild(l);E.appendChild(v);m.appendChild(E);C.appendChild(m);q=[];var I=0;for(m=0;m<f.length;m++)for(E=0;E<f[m].entries.length;E++)I++;var M=[e,l,v],G=0;for(m=0;m<f.length;m++)(function(S){for(var u=0;u<S.entries.length;u++){var z=
+S.entries[u];q.push(B(M[Math.floor(G/(I/3))],z.title,z.id));G++}})(f[m]);c.appendChild(C);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(S){A.checked=!A.checked;mxEvent.consume(S)}));
+c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){for(var S=["search"],u=0;u<q.length;u++){var z=q[u].apply(this,arguments);null!=z&&S.push(z)}b.sidebar.showEntries(0<S.length?S.join(";"):"",A.checked);b.hideDialog()});E.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(E)):
+(f.appendChild(E),f.appendChild(m));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function l(){E=!0;if(0==x.length)v.innerText=mxResources.get("noPlugins");else{v.innerText="";for(var p=0;p<x.length;p++){var y=document.createElement("span");y.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";y.appendChild(A);
+mxUtils.write(y,x[p]);v.appendChild(y);mxUtils.br(v);mxEvent.addListener(A,"click",function(C){return function(){b.confirm(mxResources.get("delete")+' "'+x[C]+'"?',function(){null!=f&&f(x[C]);x.splice(C,1);l()})}}(p))}}}var m=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var x=mxSettings.getPlugins().slice(),E=!1;m.appendChild(v);l();E=!1;var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(p){p&&0>mxUtils.indexOf(x,
+p)&&x.push(p);l()})}:function(){var p=document.createElement("div"),y=document.createElement("span");y.style.marginTop="6px";mxUtils.write(y,mxResources.get("builtinPlugins")+": ");p.appendChild(y);var A=document.createElement("select");A.style.width="150px";for(y=0;y<App.publicPlugin.length;y++){var C=document.createElement("option");mxUtils.write(C,App.publicPlugin[y]);C.value=App.publicPlugin[y];A.appendChild(C)}p.appendChild(A);mxUtils.br(p);mxUtils.br(p);y=mxUtils.button(mxResources.get("custom")+
+"...",function(){var B=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var M=0;M<I.length;M++){var G=I[M],S=App.pluginRegistry[G];null!=S&&(G=S);0<G.length&&0>mxUtils.indexOf(x,G)&&x.push(G)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(B.container,300,80,!0,!0);B.init()});y.className="geBtn";p=new CustomDialog(b,p,mxUtils.bind(this,function(){var B=App.pluginRegistry[A.value];0>mxUtils.indexOf(x,
+B)&&(x.push(B),l())}),null,null,null,y);b.showDialog(p.container,360,100,!0,!0)});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){E?(mxSettings.setPlugins(x),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});k.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";
+n.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");n.appendChild(q);b.editor.cancelFirst?(c||n.appendChild(g),n.appendChild(d),n.appendChild(k)):(n.appendChild(d),n.appendChild(k),c||n.appendChild(g));m.appendChild(n);this.container=m},CropImageDialog=function(b,e,f,c){function l(){var S=A.checked,u=C.checked,z=q.geometry,F=E.width,
+J=E.height,K=(300-F)/2,H=(300-J)/2;z.x<K?(z.width-=K-z.x,z.x=K):z.x+z.width>K+F&&(z.width=K+F-z.x,z.x=Math.min(z.x,K+F));z.y<H?(z.height-=H-z.y,z.y=H):z.y+z.height>H+J&&(z.height=H+J-z.y,z.y=Math.min(z.y,H+J));var N=(z.x-K)/F*100;F=100-(z.x+z.width-K)/F*100;K=(z.y-H)/J*100;z=100-(z.y+z.height-H)/J*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(F)+"% "+mxUtils.format(z)+"% "+mxUtils.format(N)+"%"+(S?" round "+n+"%":u?" round 50%":"")+")"}function m(S){null!=g&&(!0!==S&&(g.model.setGeometry(q,
+k.clone()),n=5,I.value=n),g.model.setStyle(q,p+l()),g.selectAll(),B.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),x=document.createElement("div");x.style.height="300px";x.style.width="300px";x.style.display="inline-flex";x.style.justifyContent="center";x.style.alignItems="center";x.style.position="absolute";var E=document.createElement("img");E.onload=function(){function S(){g.model.setStyle(q,p+l())}g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);
+g.setEnabled(!0);g.setPanning(!1);g.setConnectable(!1);g.getRubberband().setEnabled(!1);g.graphHandler.allowLivePreview=!1;var u=g.createVertexHandler;g.createVertexHandler=function(){var T=u.apply(this,arguments);T.livePreview=!1;return T};if(null!=f)try{if("inset"==f.substring(0,5)){var z=q.geometry,F=E.width,J=E.height,K=(300-F)/2,H=(300-J)/2,N=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),U=parseFloat(N[0]),Q=parseFloat(N[1]),V=parseFloat(N[2]),W=parseFloat(N[3]);isFinite(U)&&isFinite(Q)&&isFinite(V)&&
+isFinite(W)?(z.x=W/100*F+K,z.y=U/100*J+H,z.width=(100-Q)/100*F+K-z.x,z.height=(100-V)/100*J+H-z.y,"round"==N[4]?"50%"==N[5]?C.setAttribute("checked","checked"):(n=parseInt(N[5]),I.value=n,A.setAttribute("checked","checked"),B.style.visibility="visible"):y.setAttribute("checked","checked")):f=null}else f=null}catch(T){}q.style=p+(f?f:l());q.vertex=!0;g.addCell(q,null,null,null,null);g.selectAll();g.addListener(mxEvent.CELLS_MOVED,S);g.addListener(mxEvent.CELLS_RESIZED,S);var t=g.graphHandler.mouseUp,
+D=g.graphHandler.mouseDown;g.graphHandler.mouseUp=function(){t.apply(this,arguments);d.style.backgroundColor="#fff9"};g.graphHandler.mouseDown=function(){D.apply(this,arguments);d.style.backgroundColor=""};g.dblClick=function(){};var L=g.getSelectionModel().changeSelection;g.getSelectionModel().changeSelection=function(){L.call(this,[q],[q])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";x.appendChild(E);v.appendChild(x);
+var d=document.createElement("div");d.style.width="300px";d.style.height="300px";d.style.overflow="hidden";d.style.backgroundColor="#fff9";v.appendChild(d);var g=null,k=new mxGeometry(100,100,100,100),n=5,q=new mxCell("",k.clone(),""),p="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRect");y.setAttribute("name","croppingShape");y.setAttribute("checked",
+"checked");y.style.margin="5px";v.appendChild(y);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);
+var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingEllipse");C.setAttribute("name","croppingShape");C.style.margin="5px";v.appendChild(C);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(y,"change",m);mxEvent.addListener(A,"change",m);mxEvent.addListener(C,"change",m);var B=document.createElement("div");B.style.textAlign="center";B.style.visibility=
+"hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",n);I.setAttribute("title",mxResources.get("arcSize"));B.appendChild(I);v.appendChild(B);mxEvent.addListener(I,"change",function(){n=this.value;m(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";x=mxUtils.button(mxResources.get("apply"),function(){c(l(),q.geometry.width,q.geometry.height);b.hideDialog()});
+x.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){c(null,E.width,E.height);b.hideDialog()});M.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(e),G.appendChild(M),G.appendChild(x)):(G.appendChild(M),G.appendChild(x),G.appendChild(e));v.appendChild(G);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),
+m=document.createElement("table"),v=document.createElement("tbody"),x=document.createElement("tr"),E=document.createElement("td"),d=document.createElement("td");m.style.paddingLeft="6px";mxUtils.write(E,mxResources.get("relative")+":");var g=document.createElement("input");g.setAttribute("type","checkbox");null!=c&&c.relative&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);this.init=function(){g.focus()};d.appendChild(g);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");
+E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("left")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c?c.x:"";d.appendChild(k);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width=
+"100px";n.value=null!=c?c.y:"";d.appendChild(n);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c&&null!=c.offset?c.offset.x:"";d.appendChild(q);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");
+d=document.createElement("td");mxUtils.write(E,mxResources.get("dy")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c&&null!=c.offset?c.offset.y:"";d.appendChild(p);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("width")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
+y.value=null!=c?c.width:"";d.appendChild(y);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");mxUtils.write(E,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";d.appendChild(A);x.appendChild(E);x.appendChild(d);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");d=document.createElement("td");
+mxUtils.write(E,mxResources.get("rotation")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";d.appendChild(C);x.appendChild(E);x.appendChild(d);v.appendChild(x);m.appendChild(v);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();
+try{for(var I=0;I<e.length;I++){var M=f.getCellGeometry(e[I]);null!=M&&(M=M.clone(),f.isCellMovable(e[I])&&(M.relative=g.checked,0<mxUtils.trim(k.value).length&&(M.x=Number(k.value)),0<mxUtils.trim(n.value).length&&(M.y=Number(n.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(q.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(p.value))),f.isCellResizable(e[I])&&(0<mxUtils.trim(y.value).length&&(M.width=
+Number(y.value)),0<mxUtils.trim(A.value).length&&(M.height=Number(A.value))),f.getModel().setGeometry(e[I],M));0<mxUtils.trim(C.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(C.value),[e[I]])}}finally{f.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(I){13==I.keyCode&&B.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(B)):(m.appendChild(B),
+m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,e,f,c,l,m){function v(u){for(u=document.elementFromPoint(u.clientX,u.clientY);null!=u&&u.parentNode!=q;)u=u.parentNode;var z=null;if(null!=u){var F=q.firstChild;for(z=0;null!=F&&F!=u;)F=F.nextSibling,z++}return z}function x(u,z,F,J,K,H,N,U,Q){try{if(b.spinner.stop(),null==z||"image/"==z.substring(0,6))if(null==u&&null!=N||null==y[u]){var V=function(){R.innerText="";R.style.cursor="pointer";R.style.whiteSpace="nowrap";R.style.textOverflow=
+"ellipsis";mxUtils.write(R,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));R.style.color=null==X.title||0==X.title.length?"#d0d0d0":""};q.style.backgroundImage="";p.style.display="none";var W=K,t=H;if(K>b.maxImageSize||H>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,H));K*=D;H*=D}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display=
+"inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition","transform .1s ease-in-out");if(null!=u){var T=document.createElement("img");T.setAttribute("src",I.convert(u));T.style.width=W+"px";T.style.height=t+"px";T.style.margin="10px";T.style.paddingBottom=Math.floor((100-t)/2)+"px";T.style.paddingLeft=Math.floor((100-W)/2)+"px";L.appendChild(T)}else if(null!=N){var O=b.stringToCells(Graph.decompress(N.xml));0<O.length&&
+(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var P=document.createElement("img");P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(ba){mxEvent.consume(ba)});
+(function(ba,ea,ja){mxEvent.addListener(P,"click",function(fa){y[ea]=null;for(var ra=0;ra<g.length;ra++)if(null!=g[ra].data&&g[ra].data==ea||null!=g[ra].xml&&null!=ja&&g[ra].xml==ja.xml){g.splice(ra,1);break}L.parentNode.removeChild(ba);0==g.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(fa)});mxEvent.addListener(P,"dblclick",function(fa){mxEvent.consume(fa)})})(L,u,N);L.appendChild(P);L.style.marginBottom="30px";var R=document.createElement("div");
+R.style.position="absolute";R.style.boxSizing="border-box";R.style.bottom="-18px";R.style.left="10px";R.style.right="10px";R.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";R.style.overflow="hidden";R.style.textAlign="center";var X=null;null!=u?(X={data:u,w:K,h:H,title:Q},null!=U&&(X.aspect=U),y[u]=T,g.push(X)):null!=N&&(N.aspect="fixed",g.push(N),X=N);mxEvent.addListener(R,"keydown",function(ba){13==ba.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(ba))});V();L.appendChild(R);
+mxEvent.addListener(R,"mousedown",function(ba){"true"!=R.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ja){null!=ja&&(X.title=ja,V())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(ba)}else if("true"!=R.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==
+X.title||0==X.title.length)R.innerText="";R.style.textOverflow="";R.style.whiteSpace="";R.style.cursor="text";R.style.color="";R.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(R.style,"user-select","text");R.focus();document.execCommand("selectAll",!1,null);B=function(){R.removeAttribute("contentEditable");R.style.cursor="pointer";X.title=R.innerHTML;V()};mxEvent.consume(ba)}};mxEvent.addListener(R,"click",O);mxEvent.addListener(L,"dblclick",O);q.appendChild(L);mxEvent.addListener(L,
+"dragstart",function(ba){null==u&&null!=N&&(P.style.visibility="hidden",R.style.visibility="hidden");mxClient.IS_FF&&null!=N.xml&&ba.dataTransfer.setData("Text",N.xml);A=v(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);P.style.visibility="";R.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==P.style.visibility&&(P.style.visibility="",R.style.visibility="");
+A=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(W=mxUtils.parseXml(u),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var Z=0;Z<t.length;Z++)null!=t[Z].xml?x(null,null,0,0,0,0,t[Z]):x(t[Z].data,null,0,0,t[Z].w,t[Z].h,null,"fixed",t[Z].title);K=!0}else if("mxfile"==W.documentElement.nodeName){var Y=W.documentElement.getElementsByTagName("diagram");
+for(Z=0;Z<Y.length;Z++){t=mxUtils.getTextContent(Y[Z]);O=b.stringToCells(Graph.decompress(t));var aa=b.editor.graph.getBoundingBoxFromGeometry(O);x(null,null,0,0,0,0,{xml:t,w:aa.width,h:aa.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function E(u){u.dataTransfer.dropEffect=null!=A?"move":"copy";u.stopPropagation();u.preventDefault()}function d(u){u.stopPropagation();u.preventDefault();M=!1;C=v(u);if(null!=A)null!=
+C&&C<q.children.length?(g.splice(C>A?C-1:C,0,g.splice(A,1)[0]),q.insertBefore(q.children[A],q.children[C])):(g.push(g.splice(A,1)[0]),q.appendChild(q.children[A]));else if(0<u.dataTransfer.files.length)b.importFiles(u.dataTransfer.files,0,0,b.maxImageSize,G(u));else if(0<=mxUtils.indexOf(u.dataTransfer.types,"text/uri-list")){var z=decodeURIComponent(u.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(z)||/(\.png)($|\?)/i.test(z)||/(\.gif)($|\?)/i.test(z)||/(\.svg)($|\?)/i.test(z))&&b.loadImage(z,
+function(F){x(z,null,0,0,F.width,F.height);q.scrollTop=q.scrollHeight})}u.stopPropagation();u.preventDefault()}var g=[];f=document.createElement("div");f.style.height="100%";var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.height="40px";f.appendChild(k);mxUtils.write(k,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var n=document.createElement("input");n.setAttribute("value",e);n.style.marginRight="20px";n.style.marginLeft="10px";n.style.width="500px";
+null==l||l.isRenamable()||n.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};k.appendChild(n);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat=
+"no-repeat";0==g.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));f.appendChild(p);var y={},A=null,C=null,B=null;e=function(u){"true"!=mxEvent.getSource(u).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(u))};
+mxEvent.addListener(q,"mousedown",e);mxEvent.addListener(q,"pointerdown",e);mxEvent.addListener(q,"touchstart",e);var I=new mxUrlConverter,M=!1;if(null!=c)for(e=0;e<c.length;e++)k=c[e],x(k.data,null,0,0,k.w,k.h,k,k.aspect,k.title);mxEvent.addListener(q,"dragleave",function(u){p.style.cursor="";for(var z=mxEvent.getSource(u);null!=z;){if(z==q||z==p){u.stopPropagation();u.preventDefault();break}z=z.parentNode}});var G=function(u){return function(z,F,J,K,H,N,U,Q,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||
+/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){x(W,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(z,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(x(W.responseText,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g,
+" ")),q.scrollTop=q.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(x(z,F,J,K,H,N,U,"fixed",mxEvent.isAltDown(u)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",E);mxEvent.addListener(q,"drop",d);mxEvent.addListener(p,"dragover",E);mxEvent.addListener(p,"drop",d);f.appendChild(q);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(k=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(u){b.spinner.stop();if(null!=u){var z=b.getSearch("create title mode url drive splash state clibs ui".split(" "));z+=(0==z.length?"?":"&")+"splash=0&clibs=U"+
+encodeURIComponent(u);u=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+z,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(u.container,450,240,!0);u.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),
+k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get("export"),function(){var u=b.createLibraryDataFromImages(g),z=n.value;/(\.xml)$/i.test(z)||(z+=".xml");b.isLocalFileSave()?b.saveLocalFile(u,z,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(z)+"&format=xml&xml="+encodeURIComponent(u))).simulate(document,"_blank")});k.setAttribute("id","btnDownload");k.className="geBtn";c.appendChild(k);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var S=
+document.createElement("input");S.setAttribute("multiple","multiple");S.setAttribute("type","file");mxEvent.addListener(S,"change",function(u){M=!1;b.importFiles(S.files,0,0,b.maxImageSize,function(z,F,J,K,H,N,U,Q,V){null!=S.files&&(G(u)(z,F,J,K,H,N,U,Q,V),S.type="",S.type="file",S.value="")});q.scrollTop=q.scrollHeight});S.style.display="none";document.body.appendChild(S);b.libDlgFileInputElt=S}k=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});
+k.setAttribute("id","btnAddImage");k.className="geBtn";c.appendChild(k)}k=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),B=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(u,z,F){M=!1;if(null!=u){if("data:image/"==u.substring(0,11)){var J=u.indexOf(",");0<J&&(u=u.substring(0,J)+";base64,"+u.substring(J+1))}x(u,null,0,0,z,F);q.scrollTop=q.scrollHeight}})});k.setAttribute("id","btnAddImageUrl");k.className="geBtn";c.appendChild(k);this.saveBtnClickHandler=function(u,
+z,F,J){b.saveLibrary(u,z,F,J)};k=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(n.value,g,l,m)}));k.setAttribute("id","btnSave");k.className="geBtn gePrimaryBtn";c.appendChild(k);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),v=document.createElement("tbody");m.style.cellPadding="4px";var x=document.createElement("tr");
+var E=document.createElement("td");E.setAttribute("colspan","2");E.style.fontSize="10pt";mxUtils.write(E,f);x.appendChild(E);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=c-200+"px";d.style.height=l+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};E.appendChild(d);x.appendChild(E);E=document.createElement("td");f=document.createElement("div");f.style.position=
+"relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);E.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var k=b.editor.graph.cloneCell(e);g.addCells([k]);f=g.view.getState(k);var n="";null!=f.shape&&null!=f.shape.stencil&&(n=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(d,n||"");f=g.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);g.view.scaleAndTranslate(l,
+20/l-f.x,20/l-f.y);x.appendChild(E);v.appendChild(x);x=document.createElement("tr");E=document.createElement("td");E.setAttribute("colspan","2");E.style.paddingTop="2px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",E.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";
+b.editor.cancelFirst&&E.appendChild(l);var q=function(p,y,A){var C=d.value,B=mxUtils.parseXml(C);C=mxUtils.getPrettyXml(B.documentElement);B=B.documentElement.getElementsByTagName("parsererror");if(null!=B&&0<B.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),B=!p.model.contains(y),!A||B||C!=n){C=Graph.compress(C);p.getModel().beginUpdate();try{if(B){var I=b.editor.graph.getFreeInsertPoint();y.geometry.x=I.x;y.geometry.y=
+I.y;p.addCell(y)}p.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+C+")",[y])}catch(M){throw M;}finally{p.getModel().endUpdate()}B&&(p.setSelectionCell(y),p.scrollCellToVisible(y))}};f=mxUtils.button(mxResources.get("preview"),function(){q(g,k,!1)});f.className="geBtn";E.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){q(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(l);x.appendChild(E);v.appendChild(x);m.appendChild(v);
+this.container=m},CustomDialog=function(b,e,f,c,l,m,v,x,E,d,g){var k=document.createElement("div");k.appendChild(e);var n=document.createElement("div");n.style.marginTop="30px";n.style.textAlign="center";null!=v&&n.appendChild(v);b.isOffline()||null==m||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),e.className="geBtn",n.appendChild(e));E=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});E.className="geBtn";x&&(E.style.display="none");b.editor.cancelFirst&&
+n.appendChild(E);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){d||b.hideDialog(null,null,this.container);if(null!=f){var q=f();if("string"===typeof q){b.showError(mxResources.get("error"),q);return}}d&&b.hideDialog(null,null,this.container)}));n.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(E);if(null!=g)for(x=0;x<g.length;x++)(function(q,p,y){q=mxUtils.button(q,function(A){p(A)});null!=y&&q.setAttribute("title",y);q.className="geBtn";
+n.appendChild(q)})(g[x][0],g[x][1],g[x][2]);k.appendChild(n);this.cancelBtn=E;this.okButton=l;this.container=k},TemplatesDialog=function(b,e,f,c,l,m,v,x,E,d,g,k,n,q,p){function y(ha){oa.innerText=ha;oa.style.display="block";setTimeout(function(){oa.style.display="none"},4E3)}function A(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",D=t,t=null)}function C(ha,ia,pa,va,za,Ea,Ba){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";
+Q.querySelector(".geTempDlgRadioBtn[data-id="+va+"]").className="geTempDlgRadioBtn "+(Ba?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ia).src="/images/"+pa+"-sel.svg";Q.querySelector("."+za).src="/images/"+Ea+".svg";return!0}function B(ha,ia,pa,va){function za(sa,Ha){null==Ba?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&
+(Ba=Na.getText());Ha(Ba)}))):Ha(Ba)}function Ea(sa,Ha,Na){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(sa.ownerDocument),Ia=new mxGraphModel;Ra.decode(sa,Ia);sa=Ia.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-
+80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ha,Na),!0,null,!0);var Pa=document.createElement("div");Pa.className="geTempDlgDialogMask";Q.appendChild(Pa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Pa&&(Q.removeChild(Pa),Pa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Pa,"click",function(){b.sidebar.hideTooltip()})}}
+var Ba=null;if(La||b.sidebar.currentElt==ia)b.sidebar.hideTooltip();else{var ua=function(sa){La&&b.sidebar.currentElt==ia&&Ea(sa,mxEvent.getClientX(va),mxEvent.getClientY(va));La=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;La=!0;pa.src="/images/aui-wait.gif";ha.isExt?E(ha,ua,function(){y(mxResources.get("cantLoadPrev"));La=!1;pa.src="/images/icon-search.svg"}):za(ha.url,ua)}}function I(ha,ia,pa){if(null!=L){for(var va=L.className.split(" "),za=0;za<va.length;za++)if(-1<
+va[za].indexOf("Active")){va.splice(za,1);break}L.className=va.join(" ")}null!=ha?(L=ha,L.className+=" "+ia,T=pa,Ma.className="geTempDlgCreateBtn"):(T=L=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(ha,ia){if(null!=T){var pa=function(ua){Ba.isExternal?E(Ba,function(sa){va(sa,ua)},za):Ba.url?mxUtils.get(TEMPLATE_PATH+"/"+Ba.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?va(sa.getText(),ua):za()})):va(b.emptyDiagramXml,ua)},va=function(ua,sa){p||
+b.hideDialog(!0);e(ua,sa,Ba,ia)},za=function(){y(mxResources.get("cannotLoad"));Ea()},Ea=function(){T=Ba;Ma.className="geTempDlgCreateBtn";ia&&(xa.className="geTempDlgOpenBtn")},Ba=T;T=null;"boolean"!==typeof ia&&(ia=Ba.isExternal&&k);1==ha?d(Ba.url,Ba):ia?(xa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
+mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),pa,ha,function(ua){var sa=null!=ua&&0<ua.length;return sa&&p?(pa(ua),!1):sa},null,null,null,Ea,q?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function G(ha){Ma.innerText=mxResources.get(ba||ha?"create":"copy");ha=ha?"none":"";k&&(xa.style.display=ha);for(var ia=Q.querySelectorAll(".geTempDlgLinkToDiagram"),pa=0;pa<ia.length;pa++)ia[pa].style.display=ha}function S(ha,ia,pa,va,za){za||
+(ja.innerText="",I(),X=ha,Z=va);var Ea=null;if(pa){Ea=document.createElement("table");Ea.className="geTempDlgDiagramsListGrid";var Ba=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ba.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Ba.appendChild(ua);
+Ea.appendChild(Ba);ja.appendChild(Ea)}for(Ba=0;Ba<ha.length;Ba++){ha[Ba].isExternal=!ia;var sa=ha[Ba].url,Ha=(ua=mxUtils.htmlEntities(ia?mxResources.get(ha[Ba].title,null,ha[Ba].title):ha[Ba].title))||ha[Ba].url,Na=ha[Ba].imgUrl,Ra=ha[Ba].changedBy||"",Ia="";ha[Ba].lastModifiedOn&&(Ia=b.timeSince(new Date(ha[Ba].lastModifiedOn)),null==Ia&&(Ia=mxResources.get("lessThanAMinute")),Ia=mxResources.get("timeAgo",[Ia],"{1} ago"));Na||(Na=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=pa?50:15;
+null!=ua&&ua.length>sa&&(ua=ua.substring(0,sa)+"&hellip;");if(pa){var Pa=document.createElement("tr");Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));za||Na.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ua;Na.appendChild(Ha);Pa.appendChild(Na);Na=document.createElement("td");Na.innerText=Ra;Pa.appendChild(Na);
+Na=document.createElement("td");Na.innerText=Ia;Pa.appendChild(Na);Ea.appendChild(Pa);null==L&&(G(ia),I(Pa,"geTempDlgDiagramsListGridActive",ha[Ba]));(function(Ka,Ta,Va){mxEvent.addListener(Pa,"click",function(){L!=Ta&&(G(ia),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Pa,"dblclick",M);mxEvent.addListener(Qa,"click",function(Wa){B(Ka,Ta,Va,Wa)})})(ha[Ba],Pa,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ha);null==L&&
+(G(ia),I(Oa,"geTempDlgDiagramTileActive",ha[Ba]));Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ka,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Na?Na.replace(".drawio.xml","").replace(".drawio","").replace(".xml",
+""):"");Sa.src=Na;Ra.appendChild(Sa);Oa.appendChild(Ra);Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ua?ua:"";Oa.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));za||Oa.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Oa,"click",function(){L!=Ta&&(G(ia),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Oa,"dblclick",
+M);mxEvent.addListener(Qa,"click",function(Wa){B(Ka,Ta,Va,Wa)})})(ha[Ba],Oa,Qa);ja.appendChild(Oa)}}for(var Ua in va)ha=va[Ua],0<ha.length&&(za=document.createElement("div"),za.className="geTempDlgImportCat",za.innerText=mxResources.get(Ua,null,Ua),ja.appendChild(za),S(ha,ia,pa,null,!0))}function u(ha,ia){ya.innerText="";I();var pa=Math.floor(ya.offsetWidth/150)-1;ia=!ia&&ha.length>pa?pa:ha.length;for(var va=0;va<ia;va++){var za=ha[va];za.isCategory=!0;var Ea=document.createElement("div"),Ba=mxResources.get(za.title);
+null==Ba&&(Ba=za.title.substring(0,1).toUpperCase()+za.title.substring(1));Ea.className="geTempDlgNewDiagramCatItem";Ea.setAttribute("title",Ba);Ba=mxUtils.htmlEntities(Ba);15<Ba.length&&(Ba=Ba.substring(0,15)+"&hellip;");null==L&&(G(!0),I(Ea,"geTempDlgNewDiagramCatItemActive",za));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+"/"+za.img;ua.appendChild(sa);Ea.appendChild(ua);ua=document.createElement("div");
+ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ba;Ea.appendChild(ua);ya.appendChild(Ea);(function(Ha,Na){mxEvent.addListener(Ea,"click",function(){L!=Na&&(G(!0),I(Na,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ea,"dblclick",M)})(za,Ea)}Ea=document.createElement("div");Ea.className="geTempDlgNewDiagramCatItem";Ba=mxResources.get("showAllTemps");Ea.setAttribute("title",Ba);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize=
+"32px";Ea.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerText=Ba;Ea.appendChild(ua);ya.appendChild(Ea);mxEvent.addListener(Ea,"click",function(){function Ha(){var Ra=Na.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ba=!0;var Na=Q.querySelector(".geTemplatesList");Na.style.display="block";ma.style.width="";Ca.style.display="";Ca.value="";Y=null;Ha()});ea.style.display=ha.length<=pa?"none":""}function z(ha,ia,
+pa){function va(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1));Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function za(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){t!=Ka&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Fa.style.display="none",Ga.style.minHeight="100%"),t=Ka,t.style.fontWeight="bold",
+t.style.textDecoration="underline",ma.scrollTop=0,V&&(W=!0),fa.innerHTML=Ua,ra.style.display="none",S(Va?ia[Sa]:Ta?Ja[Sa][Ta]:ha[Sa],Va?!1:!0))})}var Ea=Q.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));Ea.appendChild(pa);for(var Ba in ia){pa=document.createElement("div");var ua=ia[Ba];ua=va(Ba,ua);pa.className="geTemplateCatLink";
+pa.setAttribute("title",ua.fullLbl);pa.innerHTML=ua.lbl;Ea.appendChild(pa);za(Ba,ua.lblOnly,pa,null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");Ea.appendChild(pa)}for(Ba in ha){var sa=Ja[Ba],Ha=pa=document.createElement(sa?"ul":"div");ua=ha[Ba];ua=va(Ba,ua);if(null!=sa){var Na=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";
+Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl);Ra.innerHTML=ua.lbl;Ha=Ra;Na.appendChild(Ra);var Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var Pa in sa){var Qa=document.createElement("li"),Oa=va(Pa,sa[Pa]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";za(Ba,Oa.lblOnly,Qa,Pa);Ia.appendChild(Qa)}Na.appendChild(Ia);pa.className="geTempTree";pa.appendChild(Na);
+(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka=Sa.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ka.length;Va++)Ka[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ia,Ra)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",pa.setAttribute("title",
+ua.fullLbl),pa.innerHTML=ua.lbl;Ea.appendChild(pa);za(Ba,ua.lblOnly,Ha)}}function F(){mxUtils.get(c,function(ha){if(!ta){ta=!0;ha=ha.getXml().documentElement.firstChild;for(var ia={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var pa=ha.getAttribute("name"),va=ha.getElementsByTagName("add"),za=[],Ea=0;Ea<va.length;Ea++)za.push(encodeURIComponent(mxUtils.getTextContent(va[Ea])));null!=pa&&0<za.length&&(ia[pa]=za.join(";"))}else if(za=ha.getAttribute("url"),null!=
+za){va=ha.getAttribute("section");pa=ha.getAttribute("subsection");if(null==va&&(Ea=za.indexOf("/"),va=za.substring(0,Ea),null==pa)){var Ba=za.indexOf("/",Ea+1);-1<Ba&&(pa=za.substring(Ea+1,Ba))}Ea=wa[va];null==Ea&&(ca++,Ea=[],wa[va]=Ea);za=ha.getAttribute("clibs");null!=ia[za]&&(za=ia[za]);za={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:za,tags:ha.getAttribute("tags")};Ea.push(za);null!=pa&&
+(Ea=Ja[va],null==Ea&&(Ea={},Ja[va]=Ea),va=Ea[pa],null==va&&(va=[],Ea[pa]=va),va.push(za))}ha=ha.nextSibling}z(wa,ka,na)}})}function J(ha){v&&(ma.scrollTop=0,ja.innerText="",Aa.spin(ja),W=!1,V=!0,fa.innerText=mxResources.get("recentDiag"),Y=null,v(la,function(){y(mxResources.get("cannotLoad"));la([])},ha?null:m))}function K(ha){if(""==ha)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var ia={};for(Ha in wa)for(var pa=wa[Ha],va=0;va<pa.length;va++){var za=pa[va];if(null!=za.tags)for(var Ea=
+za.tags.toLowerCase().split(";"),Ba=0;Ba<Ea.length;Ba++)null==ia[Ea[Ba]]&&(ia[Ea[Ba]]=[]),ia[Ea[Ba]].push(za)}TemplatesDialog.tagsList[c]=ia}var ua=ha.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[c];if(0<na&&null==ia.__tagsList__){for(Ha in ka)for(pa=ka[Ha],va=0;va<pa.length;va++)for(za=pa[va],Ea=za.title.split(" "),Ea.push(Ha),Ba=0;Ba<Ea.length;Ba++){var sa=Ea[Ba].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(za)}ia.__tagsList__=!0}var Ha=[];pa={};for(va=Ea=0;va<ua.length;va++)if(0<
+ua[va].length){sa=ia[ua[va]];var Na={};Ha=[];if(null!=sa)for(Ba=0;Ba<sa.length;Ba++)za=sa[Ba],0==Ea==(null==pa[za.url])&&(Na[za.url]=!0,Ha.push(za));pa=Na;Ea++}0==Ha.length?fa.innerText=mxResources.get("noResultsFor",[ha]):S(Ha,!0)}}function H(ha){if(Y!=ha||P!=aa)A(),ma.scrollTop=0,ja.innerText="",fa.innerText=mxResources.get("searchResults")+' "'+ha+'"',qa=null,ba?K(ha):x&&(ha?(Aa.spin(ja),W=!1,V=!0,x(ha,la,function(){y(mxResources.get("searchFailed"));la([])},P?null:m)):J(P)),Y=ha,aa=P}function N(ha){null!=
+qa&&clearTimeout(qa);13==ha.keyCode?H(Ca.value):qa=setTimeout(function(){H(Ca.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(x?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(n?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(k?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",T=document.createElement("div");T.innerHTML=U;T.className=
-"geTemplateDlg";this.container=T;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,t=null,C=null,N=null,R=null,O=!1,P=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,ea=T.querySelector(".geTempDlgShowAllBtn"),ma=T.querySelector(".geTempDlgDiagramsTiles"),ia=T.querySelector(".geTempDlgDiagramsListTitle"),pa=T.querySelector(".geTempDlgDiagramsListBtns"),na=T.querySelector(".geTempDlgContent"),Fa=T.querySelector(".geTempDlgDiagramsList"),Ga=T.querySelector(".geTempDlgNewDiagramCat"),
-xa=T.querySelector(".geTempDlgNewDiagramCatList"),Ma=T.querySelector(".geTempDlgCreateBtn"),va=T.querySelector(".geTempDlgOpenBtn"),Ea=T.querySelector(".geTempDlgSearchBox"),Ba=T.querySelector(".geTempDlgErrMsg"),za=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(T.querySelector(".geTempDlgBack"),"click",function(){E();ba=!1;T.querySelector(".geTemplatesList").style.display="none";na.style.width=
-"100%";Ga.style.display="";Fa.style.minHeight="calc(100% - 280px)";Ea.style.display=y?"":"none";Ea.value="";Y=null;L(P)});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==Y?L(P):H(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
-"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==Y?L(P):H(Y))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,u(X,!1,S,aa))});mxEvent.addListener(T.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,u(X,!1,S,aa))});var Da=!1;
-mxEvent.addListener(ea,"click",function(){O?(Ga.style.height="280px",xa.style.height="190px",ea.innerText=mxResources.get("showMore"),G(ta)):(Ga.style.height="440px",xa.style.height="355px",ea.innerText=mxResources.get("showLess"),G(ta,!0));O=!O});var la=!1,Ha=!1,ya={},Ia={},ka={},ta=[],ra=1,wa=0;null!=g?g(function(da,ha){ka=da;wa=ha;F()},F):F();mxUtils.get(l,function(da){if(!Ha){Ha=!0;for(da=da.getXml().documentElement.firstChild;null!=da;)"undefined"!==typeof da.getAttribute&&null!=da.getAttribute("title")&&
-ta.push({img:da.getAttribute("img"),libs:da.getAttribute("libs"),clibs:da.getAttribute("clibs"),title:da.getAttribute("title")}),da=da.nextSibling;G(ta)}});var ca=function(da,ha,ja){pa.style.display="";za.stop();V=!1;if(W)W=!1;else if(ha)ma.innerText=ha;else{ja=ja||{};ha=0;for(var sa in ja)ha+=ja[sa].length;0==da.length&&0==ha?ma.innerText=mxResources.get("noDiagrams"):u(da,!1,S,0==ha?null:ja)}};L(P);var fa=null;mxEvent.addListener(Ea,"keyup",Q);mxEvent.addListener(Ea,"search",Q);mxEvent.addListener(Ea,
-"input",Q);mxEvent.addListener(Ma,"click",function(da){M(!1,!1)});k&&mxEvent.addListener(va,"click",function(da){M(!1,!0)});n&&mxEvent.addListener(T.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(da){M(!0)});mxEvent.addListener(T.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var x="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
-(x=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(x=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(x=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));
-f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(J){this.style.border="";13==J.keyCode&&B.click()}var x=document.createElement("table"),y=document.createElement("tbody");x.style.marginTop="8px";var D=document.createElement("tr");var d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
-"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(k);D.appendChild(d);
-y.appendChild(D);D=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")+":");D.appendChild(d);var n=document.createElement("input");"s"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(n);D.appendChild(d);y.appendChild(D);D=document.createElement("tr");
+(n?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(k?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",Q=document.createElement("div");Q.innerHTML=U;Q.className=
+"geTemplateDlg";this.container=Q;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,t=null,D=null,L=null,T=null,O=!1,P=!0,R=!1,X=[],Z=null,Y,aa,ba=!1,ea=Q.querySelector(".geTempDlgShowAllBtn"),ja=Q.querySelector(".geTempDlgDiagramsTiles"),fa=Q.querySelector(".geTempDlgDiagramsListTitle"),ra=Q.querySelector(".geTempDlgDiagramsListBtns"),ma=Q.querySelector(".geTempDlgContent"),Ga=Q.querySelector(".geTempDlgDiagramsList"),Fa=Q.querySelector(".geTempDlgNewDiagramCat"),
+ya=Q.querySelector(".geTempDlgNewDiagramCatList"),Ma=Q.querySelector(".geTempDlgCreateBtn"),xa=Q.querySelector(".geTempDlgOpenBtn"),Ca=Q.querySelector(".geTempDlgSearchBox"),oa=Q.querySelector(".geTempDlgErrMsg"),Aa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(Q.querySelector(".geTempDlgBack"),"click",function(){A();ba=!1;Q.querySelector(".geTemplatesList").style.display="none";ma.style.width=
+"100%";Fa.style.display="";Ga.style.minHeight="calc(100% - 280px)";Ca.style.display=x?"":"none";Ca.value="";Y=null;J(P)});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){C(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==Y?J(P):H(Y))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){C(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
+"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==Y?J(P):H(Y))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){C(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(R=!0,S(X,!1,R,Z))});mxEvent.addListener(Q.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){C(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(R=!1,S(X,!1,R,Z))});var La=!1;mxEvent.addListener(ea,
+"click",function(){O?(Fa.style.height="280px",ya.style.height="190px",ea.innerText=mxResources.get("showMore"),u(da)):(Fa.style.height="440px",ya.style.height="355px",ea.innerText=mxResources.get("showLess"),u(da,!0));O=!O});var ta=!1,Da=!1,wa={},Ja={},ka={},da=[],ca=1,na=0;null!=g?g(function(ha,ia){ka=ha;na=ia;F()},F):F();mxUtils.get(l,function(ha){if(!Da){Da=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==typeof ha.getAttribute&&null!=ha.getAttribute("title")&&da.push({img:ha.getAttribute("img"),
+libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;u(da)}});var la=function(ha,ia,pa){ra.style.display="";Aa.stop();V=!1;if(W)W=!1;else if(ia)ja.innerText=ia;else{pa=pa||{};ia=0;for(var va in pa)ia+=pa[va].length;0==ha.length&&0==ia?ja.innerText=mxResources.get("noDiagrams"):S(ha,!1,R,0==ia?null:pa)}};J(P);var qa=null;mxEvent.addListener(Ca,"keyup",N);mxEvent.addListener(Ca,"search",N);mxEvent.addListener(Ca,"input",N);mxEvent.addListener(Ma,
+"click",function(ha){M(!1,!1)});k&&mxEvent.addListener(xa,"click",function(ha){M(!1,!0)});n&&mxEvent.addListener(Q.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){M(!0)});mxEvent.addListener(Q.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();p||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var v="Unknown",x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),x.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
+(v=mxResources.get("dropbox"),x.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),x.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),x.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),x.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),x.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
+f=mxUtils.button(f,c);f.insertBefore(x,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function m(I){this.style.border="";13==I.keyCode&&B.click()}var v=document.createElement("table"),x=document.createElement("tbody");v.style.marginTop="8px";var E=document.createElement("tr");var d=document.createElement("td");d.colSpan=2;d.style.whiteSpace=
+"nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","sysfonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-sysfonts");d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","fontdialog-sysfonts");mxUtils.write(k,mxResources.get("sysFonts",null,"System Fonts"));d.appendChild(k);E.appendChild(d);
+x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(d);var n=document.createElement("input");"s"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_s";d=document.createElement("td");d.appendChild(n);E.appendChild(d);x.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");d.appendChild(q);k=document.createElement("label");k.setAttribute("for","fontdialog-googlefonts");mxUtils.write(k,mxResources.get("googleFonts",
-null,"Google Fonts"));d.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(k));D.appendChild(d);y.appendChild(D);D=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")+":");
-D.appendChild(d);var p=document.createElement("input");"g"==c&&p.setAttribute("value",e);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(p);D.appendChild(d);y.appendChild(D);D=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
-"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");d.appendChild(A);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(k);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);D=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")+":");D.appendChild(d);var E=document.createElement("input");"w"==c&&(Editor.enableWebFonts?E.setAttribute("value",e):n.setAttribute("value",e));E.style.marginLeft="4px";E.style.width="250px";E.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(E);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);D=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")+":");D.appendChild(d);var z=document.createElement("input");z.setAttribute("value",f||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(z);D.appendChild(d);Editor.enableWebFonts&&y.appendChild(D);this.init=function(){var J=n;"g"==c?J=p:"w"==c&&Editor.enableWebFonts&&(J=E);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-J.select():document.execCommand("selectAll",!1,null)};D=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);
-var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var J=n.value;var M="s"}else if(q.checked){J=p.value;var v=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");M="g"}else A.checked&&(J=E.value,v=z.value,M="w");var u=v;var G=M,I=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(x.querySelector(".dlg_fontName_"+G).style.border="1px solid red",u=!1):"w"!=G||I.test(u)?u=!0:(x.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",u=!1);u&&(l(J,v,M),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(E,"keypress",m);mxEvent.addListener(z,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(E,"focus",function(){A.setAttribute("checked","checked");A.checked=
-!0});mxEvent.addListener(z,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});d.appendChild(B);b.editor.cancelFirst||d.appendChild(e);D.appendChild(d);y.appendChild(D);x.appendChild(y);this.container=x};
+null,"Google Fonts"));d.appendChild(k);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(k=b.menus.createHelpLink("https://fonts.google.com/"),k.getElementsByTagName("img")[0].setAttribute("valign","middle"),d.appendChild(k));E.appendChild(d);x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");
+E.appendChild(d);var p=document.createElement("input");"g"==c&&p.setAttribute("value",e);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_g";d=document.createElement("td");d.appendChild(p);E.appendChild(d);x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.fontWeight="bold";var y=document.createElement("input");y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value",
+"webfonts");y.setAttribute("type","radio");y.setAttribute("name","current-fontdialog");y.setAttribute("id","fontdialog-webfonts");d.appendChild(y);k=document.createElement("label");k.setAttribute("for","fontdialog-webfonts");mxUtils.write(k,mxResources.get("webfonts",null,"Web Fonts"));d.appendChild(k);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";d.style.paddingLeft=
+"15px";mxUtils.write(d,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(d);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):n.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";d=document.createElement("td");d.appendChild(A);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";
+d.style.width="120px";d.style.paddingLeft="15px";mxUtils.write(d,mxResources.get("fontUrl",null,"Font URL")+":");E.appendChild(d);var C=document.createElement("input");C.setAttribute("value",f||"");C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontUrl";d=document.createElement("td");d.appendChild(C);E.appendChild(d);Editor.enableWebFonts&&x.appendChild(E);this.init=function(){var I=n;"g"==c?I=p:"w"==c&&Editor.enableWebFonts&&(I=A);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+I.select():document.execCommand("selectAll",!1,null)};E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",d.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);
+var B=mxUtils.button(mxResources.get("apply"),function(){if(g.checked){var I=n.value;var M="s"}else if(q.checked){I=p.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");M="g"}else y.checked&&(I=A.value,G=C.value,M="w");var S=G;var u=M,z=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(v.querySelector(".dlg_fontName_"+u).style.border="1px solid red",S=!1):"w"!=u||z.test(S)?S=!0:(v.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",S=!1);S&&(l(I,G,M),b.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(n,"keypress",m);mxEvent.addListener(p,"keypress",m);mxEvent.addListener(A,"keypress",m);mxEvent.addListener(C,"keypress",m);mxEvent.addListener(n,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(p,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(A,"focus",function(){y.setAttribute("checked","checked");y.checked=
+!0});mxEvent.addListener(C,"focus",function(){y.setAttribute("checked","checked");y.checked=!0});d.appendChild(B);b.editor.cancelFirst||d.appendChild(e);E.appendChild(d);x.appendChild(E);v.appendChild(x);this.container=v};
function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));e.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));e.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
-e.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(x);x.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||f.appendChild(m);x.setAttribute("disabled","disabled");this.okBtn=x;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+e.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||f.appendChild(m);v.setAttribute("disabled","disabled");this.okBtn=v;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
AspectDialog.prototype.createViewer=function(b,e,f,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var l=new Graph(b);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!1);l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var m=e.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=null!=c?c:"#ffffff";b.style.backgroundColor=m;c=new mxCodec(e.ownerDocument);b=l.getModel();c.decode(e,b);e=b.getChildCount(b.root);
-c=null==f;for(m=0;m<e;m++){var x=b.getChildAt(b.root,m);b.setVisible(x,c||f==x.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};
+c=null==f;for(m=0;m<e;m++){var v=b.getChildAt(b.root,m);b.setVisible(v,c||f==v.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};
AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],f);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var x=0;x<m.length;x++)this.createLayerItem(m[x],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var v=0;v<m.length;v++)this.createLayerItem(m[v],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var x=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(x=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var y=document.createElement("td");
-y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("zoom")+":");l.appendChild(y);var D=document.createElement("input");D.setAttribute("value",100*m+"%");D.style.marginLeft="4px";D.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(D);l.appendChild(y);f.appendChild(l);l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";
-mxUtils.write(y,mxResources.get("borderWidth")+":");l.appendChild(y);var d=document.createElement("input");d.setAttribute("value",x);d.style.marginLeft="4px";d.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(d);l.appendChild(y);f.appendChild(l);this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(D.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(d.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("compressed")+":");l.appendChild(y);var k=document.createElement("input");k.setAttribute("type","checkbox");
-g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(k);l.appendChild(y);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";
-y.style.width="120px";mxUtils.write(y,mxResources.get("realtimeCollaboration")+":");l.appendChild(y);var n=document.createElement("input");n.setAttribute("type","checkbox");var q=c.isRealtimeEnabled();if(q="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=q&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this,
-function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(n);y.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(y);f.appendChild(l)}this.init=null!=this.init?this.init:
-function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");y=document.createElement("td");y.colSpan=2;y.style.paddingTop="20px";y.style.whiteSpace="nowrap";y.setAttribute("align","center");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&y.appendChild(x);y.appendChild(m);b.editor.cancelFirst||y.appendChild(x);l.appendChild(y);f.appendChild(l);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(K,H){K=new mxCell("",new mxGeometry(K,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return k.addCell(K)}function x(K){K=k.getSelectionCells();k.deleteCells(K)}function y(){var K=parseInt(G.value)||0;K=0>K?0:100<K?100:K;
-G.value=K;var H=parseInt(F.value)||0;H=0>H?0:100<H?100:H;F.value=H;var Q=parseInt(I.value)||0,U=parseInt(L.value)||0;K=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(K/100,H/100),!1,null,Q,U));H=k.getSelectionCell();if(null!=H){Q=H.geometry.clone();U=k.view.scale;var T=k.view.translate;Q.x=(K.x-3*U)/U-T.x;Q.y=(K.y-3*U)/U-T.y;k.model.setGeometry(H,Q)}}function D(K){var H=0,Q=0,U=n.geometry,T=mxUtils.format((K.geometry.x+3-U.x)/U.width);K=mxUtils.format((K.geometry.y+3-U.y)/U.height);
-0>T?(H=T*U.width,T=0):1<T&&(H=(T-1)*U.width,T=1);0>K?(Q=K*U.height,K=0):1<K&&(Q=(K-1)*U.height,K=1);return{x:T,y:K,dx:parseInt(H),dy:parseInt(Q)}}function d(){if(1==k.getSelectionCount()){var K=k.getSelectionCell();K=D(K);G.value=100*K.x;F.value=100*K.y;I.value=K.dx;L.value=K.dy;u.style.visibility=""}else u.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box";
+var FilePropertiesDialog=function(b){var e=document.createElement("table"),f=document.createElement("tbody");e.style.width="100%";e.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var v=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(v=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var x=document.createElement("td");
+x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";mxUtils.write(x,mxResources.get("zoom")+":");l.appendChild(x);var E=document.createElement("input");E.setAttribute("value",100*m+"%");E.style.marginLeft="4px";E.style.width="180px";x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(E);l.appendChild(x);f.appendChild(l);l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";
+mxUtils.write(x,mxResources.get("borderWidth")+":");l.appendChild(x);var d=document.createElement("input");d.setAttribute("value",v);d.style.marginLeft="4px";d.style.width="180px";x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(d);l.appendChild(x);f.appendChild(l);this.init=function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(E.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(d.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var g=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width="120px";mxUtils.write(x,mxResources.get("compressed")+":");l.appendChild(x);var k=document.createElement("input");k.setAttribute("type","checkbox");
+g&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(k);l.appendChild(x);f.appendChild(l);this.init=function(){k.focus()};m=function(){null!=b.fileNode&&g!=k.checked&&(b.fileNode.setAttribute("compressed",k.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";
+x.style.width="120px";mxUtils.write(x,mxResources.get("realtimeCollaboration")+":");l.appendChild(x);var n=document.createElement("input");n.setAttribute("type","checkbox");var q=c.isRealtimeEnabled();if(q="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))n.setAttribute("checked","checked"),n.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();n.checked!=q&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(n.checked,mxUtils.bind(this,
+function(p){b.spinner.stop()}),mxUtils.bind(this,function(p){b.spinner.stop();b.showError(mxResources.get("error"),null!=p&&null!=p.error?p.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){n.focus()};x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(n);x.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(x);f.appendChild(l)}this.init=null!=this.init?this.init:
+function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&x.appendChild(v);x.appendChild(m);b.editor.cancelFirst||x.appendChild(v);l.appendChild(x);f.appendChild(l);e.appendChild(f);this.container=
+e},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(K,H){K=new mxCell("",new mxGeometry(K,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return k.addCell(K)}function v(K){K=k.getSelectionCells();k.deleteCells(K)}function x(){var K=parseInt(u.value)||0;K=0>K?0:100<K?100:K;
+u.value=K;var H=parseInt(F.value)||0;H=0>H?0:100<H?100:H;F.value=H;var N=parseInt(z.value)||0,U=parseInt(J.value)||0;K=k.getConnectionPoint(p,new mxConnectionConstraint(new mxPoint(K/100,H/100),!1,null,N,U));H=k.getSelectionCell();if(null!=H){N=H.geometry.clone();U=k.view.scale;var Q=k.view.translate;N.x=(K.x-3*U)/U-Q.x;N.y=(K.y-3*U)/U-Q.y;k.model.setGeometry(H,N)}}function E(K){var H=0,N=0,U=n.geometry,Q=mxUtils.format((K.geometry.x+3-U.x)/U.width);K=mxUtils.format((K.geometry.y+3-U.y)/U.height);
+0>Q?(H=Q*U.width,Q=0):1<Q&&(H=(Q-1)*U.width,Q=1);0>K?(N=K*U.height,K=0):1<K&&(N=(K-1)*U.height,K=1);return{x:Q,y:K,dx:parseInt(H),dy:parseInt(N)}}function d(){if(1==k.getSelectionCount()){var K=k.getSelectionCell();K=E(K);u.value=100*K.x;F.value=100*K.y;z.value=K.dx;J.value=K.dy;S.style.visibility=""}else S.style.visibility="hidden"}var g=document.createElement("div");g.style.width="350px";g.style.height="350px";g.style.overflow="hidden";g.style.border="1px solid lightGray";g.style.boxSizing="border-box";
mxEvent.disableContextMenu(g);c.appendChild(g);var k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!0);k.setConnectable(!1);k.setTooltips(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;k.maxFitScale=2;g=e.geometry;var n=new mxCell(e.value,new mxGeometry(0,0,g.width,g.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");n.vertex=!0;k.addCell(n);k.dblClick=function(K,H){if(null!=H&&H!=n)k.setSelectionCell(H);else{H=
-mxUtils.convertPoint(k.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=k.view.scale;var Q=k.view.translate;k.setSelectionCell(m((H.x-3*K)/K-Q.x,(H.y-3*K)/K-Q.y))}};l=new mxKeyHandler(k);l.bindKey(46,x);l.bindKey(8,x);k.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==n)};k.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var q=k.isCellSelectable;k.isCellSelectable=function(K){return K==n?!1:
-q.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var A=0;null!=g&&A<g.length;A++){var E=k.getConnectionPoint(p,g[A]);m(E.x-3,E.y-3)}k.fit(8);k.center();A=mxUtils.button("",function(){k.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(A,60);E=mxUtils.button("",function(){k.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,60);var z=mxUtils.button("",function(){k.fit(8);k.center()});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.position=
-"relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(z,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,
-60);var J=mxUtils.button("",x);J.className="geSprite geSprite-delete";J.setAttribute("title",mxResources.get("delete"));J.style.position="relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.float="right";J.style.cursor="pointer";mxUtils.setOpacity(J,10);g=document.createElement("div");g.appendChild(A);g.appendChild(E);g.appendChild(B);g.appendChild(z);g.appendChild(J);c.appendChild(g);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min",
-"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";g.appendChild(M);var v=document.createElement("select");v.style.position="relative";v.style.top=mxClient.IS_FF?"0px":"-4px";E=["left","right","top","bottom"];for(A=0;A<E.length;A++)z=E[A],B=document.createElement("option"),mxUtils.write(B,mxResources.get(z)),B.value=z,v.appendChild(B);g.appendChild(v);A=mxUtils.button(mxResources.get("add"),function(){var K=
-parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var H=v.value,Q=n.geometry,U=[],T=0;T<K;T++){switch(H){case "left":var V=Q.x;var W=Q.y+(T+1)*Q.height/(K+1);break;case "right":V=Q.x+Q.width;W=Q.y+(T+1)*Q.height/(K+1);break;case "top":V=Q.x+(T+1)*Q.width/(K+1);W=Q.y;break;case "bottom":V=Q.x+(T+1)*Q.width/(K+1),W=Q.y+Q.height}U.push(m(V-3,W-3))}k.setSelectionCells(U)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";g.appendChild(A);var u=document.createElement("div");
-u.style.margin="4px 0px 8px 0px";u.style.whiteSpace="nowrap";u.style.height="24px";g=document.createElement("span");mxUtils.write(g,mxResources.get("dx"));u.appendChild(g);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","0");G.setAttribute("max","100");G.style.width="45px";G.style.margin="0 4px 0 4px";u.appendChild(G);mxUtils.write(u,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";
-u.appendChild(I);mxUtils.write(u,"pt");g=document.createElement("span");mxUtils.write(g,mxResources.get("dy"));g.style.marginLeft="12px";u.appendChild(g);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";u.appendChild(F);mxUtils.write(u,"%");var L=document.createElement("input");L.setAttribute("type","number");L.style.width="45px";L.style.margin="0 4px 0 4px";u.appendChild(L);
-mxUtils.write(u,"pt");c.appendChild(u);d();k.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<k.getSelectionCount()?mxUtils.setOpacity(J,60):mxUtils.setOpacity(J,10);d()});k.addListener(mxEvent.CELLS_MOVED,d);mxEvent.addListener(G,"change",y);mxEvent.addListener(F,"change",y);mxEvent.addListener(I,"change",y);mxEvent.addListener(L,"change",y);g=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});g.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var K=
-k.model.cells,H=[],Q=[],U;for(U in K){var T=K[U];T.cp&&Q.push(D(T))}Q.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(K=0;K<Q.length;K++)0<K&&Q[K].x==Q[K-1].x&&Q[K].y==Q[K-1].y&&Q[K].dx==Q[K-1].dx&&Q[K].dy==Q[K-1].dy||H.push("["+Q[K].x+","+Q[K].y+",0,"+Q[K].dx+","+Q[K].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});A.className="geBtn gePrimaryBtn";E=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[e]);f();b.hideDialog()});E.className="geBtn";z=document.createElement("div");z.style.marginTop="10px";z.style.textAlign="right";b.editor.cancelFirst?(z.appendChild(g),z.appendChild(E),z.appendChild(A)):(z.appendChild(E),z.appendChild(A),z.appendChild(g));c.appendChild(z)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+mxUtils.convertPoint(k.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=k.view.scale;var N=k.view.translate;k.setSelectionCell(m((H.x-3*K)/K-N.x,(H.y-3*K)/K-N.y))}};l=new mxKeyHandler(k);l.bindKey(46,v);l.bindKey(8,v);k.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==n)};k.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var q=k.isCellSelectable;k.isCellSelectable=function(K){return K==n?!1:
+q.apply(this,arguments)};k.getLinkForCell=function(){return null};var p=k.view.getState(n);g=k.getAllConnectionConstraints(p);for(var y=0;null!=g&&y<g.length;y++){var A=k.getConnectionPoint(p,g[y]);m(A.x-3,A.y-3)}k.fit(8);k.center();y=mxUtils.button("",function(){k.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(y,60);A=mxUtils.button("",function(){k.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var C=mxUtils.button("",function(){k.fit(8);k.center()});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.position=
+"relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var B=mxUtils.button("",function(){k.zoomActual();k.center()});B.className="geSprite geSprite-actualsize";B.setAttribute("title",mxResources.get("actualSize"));B.style.position="relative";B.style.outline="none";B.style.border="none";B.style.margin="2px";B.style.cursor="pointer";B.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(B,
+60);var I=mxUtils.button("",v);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);g=document.createElement("div");g.appendChild(y);g.appendChild(A);g.appendChild(B);g.appendChild(C);g.appendChild(I);c.appendChild(g);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min",
+"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";g.appendChild(M);var G=document.createElement("select");G.style.position="relative";G.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(y=0;y<A.length;y++)C=A[y],B=document.createElement("option"),mxUtils.write(B,mxResources.get(C)),B.value=C,G.appendChild(B);g.appendChild(G);y=mxUtils.button(mxResources.get("add"),function(){var K=
+parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var H=G.value,N=n.geometry,U=[],Q=0;Q<K;Q++){switch(H){case "left":var V=N.x;var W=N.y+(Q+1)*N.height/(K+1);break;case "right":V=N.x+N.width;W=N.y+(Q+1)*N.height/(K+1);break;case "top":V=N.x+(Q+1)*N.width/(K+1);W=N.y;break;case "bottom":V=N.x+(Q+1)*N.width/(K+1),W=N.y+N.height}U.push(m(V-3,W-3))}k.setSelectionCells(U)});y.style.position="relative";y.style.marginLeft="8px";y.style.top=mxClient.IS_FF?"0px":"-4px";g.appendChild(y);var S=document.createElement("div");
+S.style.margin="4px 0px 8px 0px";S.style.whiteSpace="nowrap";S.style.height="24px";g=document.createElement("span");mxUtils.write(g,mxResources.get("dx"));S.appendChild(g);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min","0");u.setAttribute("max","100");u.style.width="45px";u.style.margin="0 4px 0 4px";S.appendChild(u);mxUtils.write(S,"%");var z=document.createElement("input");z.setAttribute("type","number");z.style.width="45px";z.style.margin="0 4px 0 4px";
+S.appendChild(z);mxUtils.write(S,"pt");g=document.createElement("span");mxUtils.write(g,mxResources.get("dy"));g.style.marginLeft="12px";S.appendChild(g);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";S.appendChild(F);mxUtils.write(S,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";S.appendChild(J);
+mxUtils.write(S,"pt");c.appendChild(S);d();k.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<k.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);d()});k.addListener(mxEvent.CELLS_MOVED,d);mxEvent.addListener(u,"change",x);mxEvent.addListener(F,"change",x);mxEvent.addListener(z,"change",x);mxEvent.addListener(J,"change",x);g=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});g.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){var K=
+k.model.cells,H=[],N=[],U;for(U in K){var Q=K[U];Q.cp&&N.push(E(Q))}N.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(K=0;K<N.length;K++)0<K&&N[K].x==N[K-1].x&&N[K].y==N[K-1].y&&N[K].dx==N[K-1].dx&&N[K].dy==N[K-1].dy||H.push("["+N[K].x+","+N[K].y+",0,"+N[K].dx+","+N[K].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});y.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[e]);f();b.hideDialog()});A.className="geBtn";C=document.createElement("div");C.style.marginTop="10px";C.style.textAlign="right";b.editor.cancelFirst?(C.appendChild(g),C.appendChild(A),C.appendChild(y)):(C.appendChild(A),C.appendChild(y),C.appendChild(g));c.appendChild(C)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11185,109 +11187,109 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,C){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,
-C){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,C){return"1"==
-mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,C){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,D){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,
+D){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==
+mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,D){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&
-0==t.edges.length&&C.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,C){t=C.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},
-isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,C){t=C.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast","0")},isVisible:function(t,C){C=C.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&C.isTable(t.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&
+0==t.edges.length&&D.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},
+isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,D){t=D.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast","0")},isVisible:function(t,D){D=D.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&D.isTable(t.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,C){return C.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,C){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,D){return D.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,D){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,C){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;C=C.editorUi.editor.graph;return null!=t&&(C.isSwimlane(t)||0<C.model.getChildCount(t))},
-isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,C){var N=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;C=C.editorUi.editor.graph;return null!=N&&(C.isContainer(N)&&"0"!=t.style.collapsible||!C.isContainer(N)&&"1"==t.style.collapsible)},isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(t,C){return 1==t.vertices.length&&0==t.edges.length&&!C.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(t,C){C=C.editorUi.editor.graph.model;return 0<t.vertices.length?C.isVertex(C.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,C){t=0<t.vertices.length?C.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,D){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=t&&(D.isSwimlane(t)||0<D.model.getChildCount(t))},
+isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,D){var L=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;D=D.editorUi.editor.graph;return null!=L&&(D.isContainer(L)&&"0"!=t.style.collapsible||!D.isContainer(L)&&"1"==t.style.collapsible)},isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(t,D){return 1==t.vertices.length&&0==t.edges.length&&!D.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(t,D){D=D.editorUi.editor.graph.model;return 0<t.vertices.length?D.isVertex(D.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,D){t=0<t.vertices.length?D.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,C){var N=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return C.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,C){return 0<t.vertices.length&&
-C.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(t){var C=rough.canvas({getContext:function(){return t}});C.draw=function(N){var R=N.sets||[];N=N.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var P=R[O];switch(P.type){case "path":null!=N.stroke&&this._drawToContext(t,P,N);break;case "fillPath":this._drawToContext(t,P,N);break;case "fillSketch":this.fillSketch(t,P,N)}}};C.fillSketch=function(N,R,O){var P=t.state.strokeColor,S=t.state.strokeWidth,X=t.state.strokeAlpha,aa=t.state.dashed,Y=O.fillWeight;
-0>Y&&(Y=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(Y);t.setDashed(!1);this._drawToContext(N,R,O);t.setDashed(aa);t.setStrokeWidth(S);t.setStrokeColor(P);t.setStrokeAlpha(X)};C._drawToContext=function(N,R,O){N.begin();for(var P=0;P<R.ops.length;P++){var S=R.ops[P],X=S.data;switch(S.op){case "move":N.moveTo(X[0],X[1]);break;case "bcurveTo":N.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":N.lineTo(X[0],X[1])}}N.end();"fillPath"===R.type&&
-O.filled?N.fill():N.stroke()};return C};(function(){function t(P,S,X){this.canvas=P;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,D){var L=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,D){return 0<t.vertices.length&&
+D.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(t){var D=rough.canvas({getContext:function(){return t}});D.draw=function(L){var T=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var P=T[O];switch(P.type){case "path":null!=L.stroke&&this._drawToContext(t,P,L);break;case "fillPath":this._drawToContext(t,P,L);break;case "fillSketch":this.fillSketch(t,P,L)}}};D.fillSketch=function(L,T,O){var P=t.state.strokeColor,R=t.state.strokeWidth,X=t.state.strokeAlpha,Z=t.state.dashed,Y=O.fillWeight;
+0>Y&&(Y=O.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(O.fill||"");t.setStrokeWidth(Y);t.setDashed(!1);this._drawToContext(L,T,O);t.setDashed(Z);t.setStrokeWidth(R);t.setStrokeColor(P);t.setStrokeAlpha(X)};D._drawToContext=function(L,T,O){L.begin();for(var P=0;P<T.ops.length;P++){var R=T.ops[P],X=R.data;switch(R.op){case "move":L.moveTo(X[0],X[1]);break;case "bcurveTo":L.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":L.lineTo(X[0],X[1])}}L.end();"fillPath"===T.type&&
+O.filled?L.fill():L.stroke()};return D};(function(){function t(P,R,X){this.canvas=P;this.rc=R;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(P,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;P=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",aa.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=P||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};t.prototype.begin=function(){this.passThrough?
-this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};t.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(P,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,
-S,X,aa),this.lastX=X,this.lastY=aa)};t.prototype.curveTo=function(P,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};t.prototype.arcTo=function(P,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,X,aa,Y,Z,ba);if(null!=ea)for(var ma=0;ma<ea.length;ma+=6)this.curveTo(ea[ma],ea[ma+1],ea[ma+2],ea[ma+3],ea[ma+4],ea[ma+
-5]);this.lastX=Z;this.lastY=ba}};t.prototype.rect=function(P,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,X,aa,this.getStyle(!0,!0)))};t.prototype.ellipse=function(P,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};t.prototype.roundrect=function(P,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(P+Y,S),this.lineTo(P+X-Y,S),this.quadTo(P+X,S,P+X,S+Z),this.lineTo(P+X,S+aa-Z),this.quadTo(P+X,S+aa,P+X-Y,S+aa),this.lineTo(P+Y,S+aa),this.quadTo(P,S+aa,P,S+aa-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+Y,S))};t.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||
-delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
-arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new t(P,Editor.createRoughCanvas(P),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,X,aa,Y){null!=P.handJiggle&&P.handJiggle.passThrough||N.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==t&&!this.outline){P.save();
-var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=P.setStrokeColor;P.setStrokeColor=function(){};var ea=P.setFillColor;P.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;R.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ea;P.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;P.restore();X&&null!=aa&&(P.addTolerance=function(){})}R.apply(this,arguments);
-P.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,X,aa,Y,Z){null!=P.handJiggle&&P.handJiggle.constructor==t?(P.handJiggle.passThrough=!0,O.apply(this,arguments),P.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
-t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,C,N){if(null!=t&&"undefined"!==typeof pako){var R=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var P=0;P<R.length;P++)if("mxgraph"==R[P].getAttribute("class")){O.push(R[P]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
-(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,N),0<R.length&&(t=mxUtils.parseXml(R),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(R=t.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)t=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||C||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==
-t.nodeName&&(R=t.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,N)));null==t||"mxGraphModel"==t.nodeName||C&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,C){var N=mxUtils.trim(mxUtils.getTextContent(t)),R=null;0<N.length?(t=Graph.decompress(N,null,C),null!=t&&0<t.length&&(R=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(R=mxUtils.createXmlDocument(),
-R.appendChild(R.importNode(t[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(t){var C=mxUtils.getTextContent(t),N=null;0<C.length?N=Graph.decompress(C):null!=t.firstChild&&(N=mxUtils.getXml(t.firstChild));return N};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var C=t.indexOf("EmbeddedFile");if(-1<C){var N=t.indexOf("stream",C)+9;if(0<t.substring(C,N).indexOf("application#2Fvnd.jgraph.mxfile"))return C=
-t.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(N,C)),{to:"string"})}return null}N=null;C="";for(var R=0,O=0,P=[],S=null;O<t.length;){var X=t.charCodeAt(O);O+=1;10!=X&&(C+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var aa=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){N=t.substring(O,aa);break}}10==X&&("endobj"==C?S=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(S=[],P[C.split(" ")[0]]=S):null!=S&&S.push(C),
-C="")}null==N&&(N=Editor.extractGraphModelFromXref(P));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(t){var C=t.trailer,N=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=t[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(t=t[C[1]],null!=t&&(t=t.join("\n"),N=t.substring(1,t.length-1))))));return N};Editor.extractParserError=function(t,C){var N=
-null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(N=C||mxResources.get("invalidChars"),C=t[0].getElementsByTagName("div"),0<C.length&&(N=mxUtils.getTextContent(C[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(t,C){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=C))};Editor.configure=function(t){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(P,R){var X=1;if(null!=this.shape.state){var Z=this.shape.state.cell.id;if(null!=Z)for(var Y=0;Y<Z.length;Y++)X=(X<<5)-X+Z.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};Z=this.rc.getDefaultOptions();X.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;P=null;(X.filled=R)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",Z.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Z.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Z.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+Z.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",Z.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Z.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Z.disableMultiStrokeFill);R=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==R?-1:R;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",R);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
+R);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",R);R=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==R?-1:R;R=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==R&&(R=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),R=null!=X.fill&&(null!=P||null!=R&&X.fill==R)?"solid":Z.fillStyle);X.fillStyle=R;return X};t.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(P,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+P,R),this.lastX=P,this.lastY=R)};t.prototype.moveTo=function(P,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,R),this.lastX=P,this.lastY=R,this.firstX=P,this.firstY=R)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(P,R,X,Z){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,R,X,Z),this.lastX=X,this.lastY=Z)};
+t.prototype.curveTo=function(P,R,X,Z,Y,aa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,R,X,Z,Y,aa),this.lastX=Y,this.lastY=aa)};t.prototype.arcTo=function(P,R,X,Z,Y,aa,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,P,R,X,Z,Y,aa,ba);if(null!=ea)for(var ja=0;ja<ea.length;ja+=6)this.curveTo(ea[ja],ea[ja+1],ea[ja+2],ea[ja+3],ea[ja+4],ea[ja+5]);this.lastX=aa;this.lastY=ba}};
+t.prototype.rect=function(P,R,X,Z){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,R,X,Z,this.getStyle(!0,!0)))};t.prototype.ellipse=function(P,R,X,Z){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+X/2,R+Z/2,X,Z,this.getStyle(!0,!0)))};t.prototype.roundrect=function(P,R,X,Z,Y,aa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):
+(this.begin(),this.moveTo(P+Y,R),this.lineTo(P+X-Y,R),this.quadTo(P+X,R,P+X,R+aa),this.lineTo(P+X,R+Z-aa),this.quadTo(P+X,R+Z,P+X-Y,R+Z),this.lineTo(P+Y,R+Z),this.quadTo(P,R+Z,P,R+Z-aa),this.lineTo(P,R+aa),this.quadTo(P,R,P+Y,R))};t.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var R in P)this.nextShape.options[R]=P[R];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;
+P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new t(P,Editor.createRoughCanvas(P),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(P):
+this.createRoughCanvas(P)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,R,X,Z,Y){null!=P.handJiggle&&P.handJiggle.passThrough||L.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var R=P.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==t&&!this.outline){P.save();var Z=this.fill,Y=this.stroke;this.stroke=
+this.fill=null;var aa=this.configurePointerEvents,ba=P.setStrokeColor;P.setStrokeColor=function(){};var ea=P.setFillColor;P.setFillColor=function(){};X||null==Z||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;T.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ea;P.setStrokeColor=ba;this.configurePointerEvents=aa;this.stroke=Y;this.fill=Z;P.restore();X&&null!=Z&&(P.addTolerance=function(){})}T.apply(this,arguments);P.addTolerance=R};var O=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(P,R,X,Z,Y,aa){null!=P.handJiggle&&P.handJiggle.constructor==t?(P.handJiggle.passThrough=!0,O.apply(this,arguments),P.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};
+Editor.extractGraphModel=function(t,D,L){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var P=0;P<T.length;P++)if("mxgraph"==T[P].getAttribute("class")){O.push(T[P]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(t=mxUtils.parseXml(O.xml),t=t.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,L),0<
+T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||D||(O=null,"diagram"==t.nodeName?O=t:"mxfile"==t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&
+(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(t=Editor.parseDiagramNode(O,L)));null==t||"mxGraphModel"==t.nodeName||D&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,D){var L=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<L.length?(t=Graph.decompress(L,null,D),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));
+return T};Editor.getDiagramNodeXml=function(t){var D=mxUtils.getTextContent(t),L=null;0<D.length?L=Graph.decompress(D):null!=t.firstChild&&(L=mxUtils.getXml(t.firstChild));return L};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var D=t.indexOf("EmbeddedFile");if(-1<D){var L=t.indexOf("stream",D)+9;if(0<t.substring(D,L).indexOf("application#2Fvnd.jgraph.mxfile"))return D=t.indexOf("endstream",
+L-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(L,D)),{to:"string"})}return null}L=null;D="";for(var T=0,O=0,P=[],R=null;O<t.length;){var X=t.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var Z=t.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Z>O){L=t.substring(O,Z);break}}10==X&&("endobj"==D?R=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(R=[],P[D.split(" ")[0]]=R):null!=R&&R.push(D),D="")}null==L&&(L=
+Editor.extractGraphModelFromXref(P));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(t){var D=t.trailer,L=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=t[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(t=t[D[1]],null!=t&&(t=t.join("\n"),L=t.substring(1,t.length-1))))));return L};Editor.extractParserError=function(t,D){var L=null;t=null!=
+t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(L=D||mxResources.get("invalidChars"),D=t[0].getElementsByTagName("div"),0<D.length&&(L=mxUtils.getTextContent(D[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(t,D){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=D))};Editor.configure=function(t){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var C=document.createElement("style");C.setAttribute("type","text/css");C.appendChild(document.createTextNode(t.css));var N=document.getElementsByTagName("script")[0];N.parentNode.insertBefore(C,N)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(t.css));var L=document.getElementsByTagName("script")[0];L.parentNode.insertBefore(D,L)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
-null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(C=parseFloat(t.zoomFactor),!isNaN(C)&&1<C?Graph.prototype.zoomFactor=C:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(C=parseInt(t.gridSteps),!isNaN(C)&&0<C?mxGraphView.prototype.gridSteps=C:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=t.pageFormat&&(C=parseInt(t.pageFormat.width),N=parseInt(t.pageFormat.height),!isNaN(C)&&0<C&&!isNaN(N)&&0<N?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,C,N),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(C=parseInt(t.sidebarTitleSize),!isNaN(C)&&0<C?Sidebar.prototype.sidebarTitleSize=C:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=t.autosaveDelay&&(C=parseInt(t.autosaveDelay),!isNaN(C)&&0<C?DrawioFile.prototype.autosaveDelay=C:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};
-Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(t));C.parentNode.insertBefore(N,C);t=t.split("url(");for(N=1;N<t.length;N++){var R=t[N].indexOf(")");R=Editor.trimCssUrl(t[N].substring(0,R));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R);
-O.setAttribute("as","font");O.setAttribute("crossorigin","");C.parentNode.insertBefore(O,C)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=t?t:Editor.GUID_LENGTH;for(var C=[],N=0;N<t;N++)C.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return C.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var C=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[t],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==t.nodeName){C=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=N&&(R=new mxCodec(N.ownerDocument),R.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=N){var R=new mxCodec(N.ownerDocument);R.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");C=t.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(C=t.getAttribute("extFonts"))try{for(C=C.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),N=0;N<C.length;N++)this.graph.addExtFont(C[N].name,C[N].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,C){t=null!=t?t:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,C);null!=R&&N.setAttribute("backgroundImage",JSON.stringify(R));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
-0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),N.setAttribute("extFonts",R.join("|")));return N};Editor.prototype.isDataSvg=function(t){try{var C=mxUtils.parseXml(t).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 N=mxUtils.parseXml(C).documentElement;return"mxfile"==
-N.nodeName||"mxGraphModel"==N.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(t,C,N){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=
-Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,C){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
-Editor.onMathJaxDone()}catch(P){MathJax.typesetClear([O]),null!=P.retry?P.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+P.toString())}};window.MathJax=null!=C?C:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
-Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var O=mxUtils.bind(this,function(P,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};C=document.getElementsByTagName("script");if(null!=C&&0<C.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",t);C[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(t){if(0<t.length){var C="",N=[""],R=0,O=!0,P;t=$jscomp.makeIterator(t);for(P=t.next();!P.done;P=t.next())P=P.value,'"'===P?(O&&P===C&&(N[R]+=P),O=!O):","===P&&O?P=N[++R]="":N[R]+=P,C=P;return N}return[]};Editor.prototype.getProxiedUrl=
-function(t){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(t)){var C=/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t);C=/\.png$/i.test(t)||/\.pdf$/i.test(t)||C;var N="t="+(new Date).getTime();t=PROXY_URL+"?url="+encodeURIComponent(t)+"&"+N+(C?"&base64=1":"")}return t};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==
-window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var C=t.convert,N=this;t.convert=function(R){if(null!=
-R){var O="http://"==R.substring(0,7)||"https://"==R.substring(0,8);O&&!navigator.onLine?R=Editor.svgBrokenImage.src:!O||R.substring(0,t.baseUrl.length)==t.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=C.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=
-function(t,C){try{var N=!0,R=window.setTimeout(mxUtils.bind(this,function(){N=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(P){window.clearTimeout(R);N&&C(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(R);N&&C(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(N)try{var P=document.createElement("canvas"),S=P.getContext("2d");
-P.height=O.height;P.width=O.width;S.drawImage(O,0,0);C(P.toDataURL())}catch(X){C(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(R);N&&C(Editor.svgBrokenImage.src)};O.src=t}}catch(P){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,C,N,R){null==R&&(R=this.createImageUrlConverter());var O=0,P=N||{};N=mxUtils.bind(this,function(S,X){S=t.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(X));
-if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=P[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(ea){null!=ea&&(P[Z]=ea,Y.setAttribute(X,ea));O--;0==O&&C(t)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(ea){}})(S[aa])});N("image","xlink:href");N("img","src");0==O&&C(t)};Editor.base64Encode=function(t){for(var C="",N=0,R=t.length,O,P,S;N<R;){O=t.charCodeAt(N++)&255;if(N==R){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);C+="==";break}P=t.charCodeAt(N++);if(N==R){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(P&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);C+="=";break}S=t.charCodeAt(N++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(P&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return C};Editor.prototype.loadUrl=function(t,C,N,R,O,P,S,X){try{var aa=!S&&(R||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=C){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var ea=0;ea<Z.length;ea++)ba[ea]=String.fromCharCode(Z[ea]);ba=ba.join("")}P=null!=P?P:"data:image/png;base64,";ba=P+Editor.base64Encode(ba)}C(ba)}}else null!=N&&(0==Z.getStatus()?N({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?N({code:Z.getStatus()},
-Z):N({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=N&&N({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=N&&N(Z)}};Editor.prototype.absoluteCssFonts=function(t){var C=null;if(null!=t){var N=t.split("url(");if(0<N.length){C=[N[0]];t=window.location.pathname;var R=null!=t?t.lastIndexOf("/"):-1;0<=R&&(t=t.substring(0,R+1));R=document.getElementsByTagName("base");var O=
-null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var P=1;P<N.length;P++)if(R=N[P].indexOf(")"),0<R){var S=Editor.trimCssUrl(N[P].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":t)+S);C.push('url("'+S+'"'+N[P].substring(R))}else C.push(N[P])}else C=[t]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(t,C,N){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+
-encodeURIComponent(C));N(t,C)};Editor.prototype.embedCssFonts=function(t,C){var N=t.split("url("),R=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var aa=[N[0]],Y=1;Y<N.length;Y++){var Z=N[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(N[Y].substring(0,Z))]);aa.push('"'+N[Y].substring(Z))}C(aa.join(""))}});if(0<N.length){for(t=1;t<N.length;t++){var P=N[t].indexOf(")"),S=null,X=N[t].indexOf("format(",P);0<X&&(S=Editor.trimCssUrl(N[t].substring(X+
-7,N[t].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;R++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject";
-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(ea){this.cachedFonts[aa]=ea;R--;O()}),mxUtils.bind(this,function(ea){R--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[t].substring(0,P)),S)}O()}else C(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss=
-C;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(t[C]=Graph.fontMapping[C]);return t};Editor.prototype.embedExtFonts=function(t){var C=this.graph.getCustomFonts();if(0<C.length){var N=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(N.join(""),t)}),P=0;P<C.length;P++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?
-null==this.cachedGoogleFonts[X]?(R++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;N.push(aa+"\n");R--;O()}),mxUtils.bind(this,function(aa){R--;N.push("@import url("+X+");\n");O()}))):N.push(this.cachedGoogleFonts[X]+"\n"):N.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(C[P].name,C[P].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var C=document.getElementsByTagName("style"),N=0;N<
-C.length;N++){var R=mxUtils.getTextContent(C[N]);0>R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&t[0].appendChild(C[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,C){C=null!=C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var N=t.getElementsByTagName("defs"),R=t.ownerDocument;0==N.length?(N=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=t.firstChild?t.insertBefore(N,t.firstChild):t.appendChild(N)):N=N[0];t=null!=R.createElementNS?
-R.createElementNS(mxConstants.NS_SVG,"style"):R.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,C);N.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,C,N){var R=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(R/t,R/C))};Editor.prototype.exportToCanvas=function(t,C,N,R,O,P,S,X,aa,Y,Z,ba,ea,ma,ia,pa,na,Fa){try{P=null!=P?P:!0;S=null!=S?S:!0;ba=null!=
-ba?ba:this.graph;ea=null!=ea?ea:0;var Ga=aa?null:ba.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==aa&&(Ga=pa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ea,ma,null,S,null,null,null,Y,null,pa,na,Fa),mxUtils.bind(this,function(xa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Ea=function(){mxClient.IS_SF?window.setTimeout(function(){la.drawImage(Ma,0,0);t(Ba,xa)},0):(la.drawImage(Ma,0,0),t(Ba,xa))},Ba=document.createElement("canvas"),
-za=parseInt(xa.getAttribute("width")),Da=parseInt(xa.getAttribute("height"));X=null!=X?X:1;null!=C&&(X=P?Math.min(1,Math.min(3*C/(4*Da),C/za)):C/za);X=this.getMaxCanvasScale(za,Da,X);za=Math.ceil(X*za);Da=Math.ceil(X*Da);Ba.setAttribute("width",za);Ba.setAttribute("height",Da);var la=Ba.getContext("2d");null!=Ga&&(la.beginPath(),la.rect(0,0,za,Da),la.fillStyle=Ga,la.fill());1!=X&&la.scale(X,X);if(ia){var Ha=ba.view,ya=Ha.scale;Ha.scale=1;var Ia=btoa(unescape(encodeURIComponent(Ha.createSvgGrid(Ha.gridColor))));
-Ha.scale=ya;Ia="data:image/svg+xml;base64,"+Ia;var ka=ba.gridSize*Ha.gridSteps*X,ta=ba.getGraphBounds(),ra=Ha.translate.x*ya,wa=Ha.translate.y*ya,ca=ra+(ta.x-ra)/ya-ea,fa=wa+(ta.y-wa)/ya-ea,da=new Image;da.onload=function(){try{for(var ha=-Math.round(ka-mxUtils.mod((ra-ca)*X,ka)),ja=-Math.round(ka-mxUtils.mod((wa-fa)*X,ka));ha<za;ha+=ka)for(var sa=ja;sa<Da;sa+=ka)la.drawImage(da,ha/X,sa/X);Ea()}catch(oa){null!=O&&O(oa)}};da.onerror=function(ha){null!=O&&O(ha)};da.src=Ia}else Ea()}catch(ha){null!=
-O&&O(ha)}});Ma.onerror=function(Ea){null!=O&&O(Ea)};Y&&this.graph.addSvgShadow(xa);this.graph.mathEnabled&&this.addMathCss(xa);var va=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(xa,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(xa))}catch(Ea){null!=O&&O(Ea)}});this.embedExtFonts(mxUtils.bind(this,function(Ea){try{null!=Ea&&this.addFontCss(xa,Ea),this.loadFonts(va)}catch(Ba){null!=O&&O(Ba)}}))}catch(Ea){null!=O&&O(Ea)}}),N,Z)}catch(xa){null!=O&&
-O(xa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=l,x=0;8>x;x++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(t,C,N,R){for(var O=0;O<R;O++)t=Editor.crcTable[(t^C.charCodeAt(N+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var C=-1,N=0;N<t.length;N++)C=C>>>8^Editor.crcTable[(C^t.charCodeAt(N))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(t,C,N,R,O){function P(Z,ba){var ea=aa;aa+=ba;return Z.substring(ea,aa)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+
-(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var aa=0;if(P(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(P(t,4),"IHDR"!=P(t,4))null!=O&&O();else{P(t,17);O=t.substring(0,aa);do{var Y=S(t);if("IDAT"==P(t,4)){O=t.substring(0,aa-8);"pHYs"==C&&"dpi"==N?(N=Math.round(R/.0254),N=X(N)+X(N)+String.fromCharCode(1)):
-N=N+String.fromCharCode(0)+("zTXt"==C?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,C,0,4);R=Editor.updateCRC(R,N,0,N.length);O+=X(N.length)+C+N+X(R^4294967295);O+=t.substring(aa-8,t.length);break}O+=t.substring(aa-8,aa-4+Y);P(t,Y);P(t,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(t,C){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var D=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,C){var N=null;null!=t.editor.graph.getModel().getParent(C)?N=C.getId():null!=t.currentPage&&(N=t.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var d=
+null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(D=parseFloat(t.zoomFactor),!isNaN(D)&&1<D?Graph.prototype.zoomFactor=D:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(D=parseInt(t.gridSteps),!isNaN(D)&&0<D?mxGraphView.prototype.gridSteps=D:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=t.pageFormat&&(D=parseInt(t.pageFormat.width),L=parseInt(t.pageFormat.height),!isNaN(D)&&0<D&&!isNaN(L)&&0<L?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,D,L),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(D=parseInt(t.sidebarTitleSize),!isNaN(D)&&0<D?Sidebar.prototype.sidebarTitleSize=D:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=t.autosaveDelay&&(D=parseInt(t.autosaveDelay),!isNaN(D)&&0<D?DrawioFile.prototype.autosaveDelay=D:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};
+Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(t));D.parentNode.insertBefore(L,D);t=t.split("url(");for(L=1;L<t.length;L++){var T=t[L].indexOf(")");T=Editor.trimCssUrl(t[L].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);
+O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=t?t:Editor.GUID_LENGTH;for(var D=[],L=0;L<t;L++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
+Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var D=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[t],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==t.nodeName){D=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=L&&(T=new mxCodec(L.ownerDocument),T.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=L){var T=new mxCodec(L.ownerDocument);T.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");D=t.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(D=t.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<D.length;L++)this.graph.addExtFont(D[L].name,D[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
+};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,D){t=null!=t?t:!0;var L=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=T&&L.setAttribute("backgroundImage",JSON.stringify(T));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",T.join("|")));return L};Editor.prototype.isDataSvg=function(t){try{var D=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var L=mxUtils.parseXml(D).documentElement;return"mxfile"==
+L.nodeName||"mxGraphModel"==L.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,D,L){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=
+Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
+Editor.onMathJaxDone()}catch(P){MathJax.typesetClear([O]),null!=P.retry?P.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+P.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
+Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(P,R){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",t);D[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(t){if(0<t.length){var D="",L=[""],T=0,O=!0,P;t=$jscomp.makeIterator(t);for(P=t.next();!P.done;P=t.next())P=P.value,'"'===P?(O&&P===D&&(L[T]+=P),O=!O):","===P&&O?P=L[++T]="":L[T]+=P,D=P;return L}return[]};Editor.prototype.getProxiedUrl=
+function(t){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(t)){var D=/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t);D=/\.png$/i.test(t)||/\.pdf$/i.test(t)||D;var L="t="+(new Date).getTime();t=PROXY_URL+"?url="+encodeURIComponent(t)+"&"+L+(D?"&base64=1":"")}return t};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==
+window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var D=t.convert,L=this;t.convert=function(T){if(null!=
+T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,t.baseUrl.length)==t.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=
+function(t,D){try{var L=!0,T=window.setTimeout(mxUtils.bind(this,function(){L=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(P){window.clearTimeout(T);L&&D(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(T);L&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(L)try{var P=document.createElement("canvas"),R=P.getContext("2d");
+P.height=O.height;P.width=O.width;R.drawImage(O,0,0);D(P.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);L&&D(Editor.svgBrokenImage.src)};O.src=t}}catch(P){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,D,L,T){null==T&&(T=this.createImageUrlConverter());var O=0,P=L||{};L=mxUtils.bind(this,function(R,X){R=t.getElementsByTagName(R);for(var Z=0;Z<R.length;Z++)mxUtils.bind(this,function(Y){try{if(null!=Y){var aa=T.convert(Y.getAttribute(X));
+if(null!=aa&&"data:"!=aa.substring(0,5)){var ba=P[aa];null==ba?(O++,this.convertImageToDataUri(aa,function(ea){null!=ea&&(P[aa]=ea,Y.setAttribute(X,ea));O--;0==O&&D(t)})):Y.setAttribute(X,ba)}else null!=aa&&Y.setAttribute(X,aa)}}catch(ea){}})(R[Z])});L("image","xlink:href");L("img","src");0==O&&D(t)};Editor.base64Encode=function(t){for(var D="",L=0,T=t.length,O,P,R;L<T;){O=t.charCodeAt(L++)&255;if(L==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);D+="==";break}P=t.charCodeAt(L++);if(L==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);D+="=";break}R=t.charCodeAt(L++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(R&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R&63)}return D};Editor.prototype.loadUrl=function(t,D,L,T,O,P,R,X){try{var Z=!R&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&
+299>=aa.getStatus()){if(null!=D){var ba=aa.getText();if(Z){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();ba=Array(aa.length);for(var ea=0;ea<aa.length;ea++)ba[ea]=String.fromCharCode(aa[ea]);ba=ba.join("")}P=null!=P?P:"data:image/png;base64,";ba=P+Editor.base64Encode(ba)}D(ba)}}else null!=L&&(0==aa.getStatus()?L({message:mxResources.get("accessDenied")},aa):404==aa.getStatus()?
+L({code:aa.getStatus()},aa):L({message:mxResources.get("error")+" "+aa.getStatus()},aa))}),function(aa){null!=L&&L({message:mxResources.get("error")+" "+aa.getStatus()})},Z,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(aa){null!=L&&L(aa)}};Editor.prototype.absoluteCssFonts=function(t){var D=null;if(null!=t){var L=t.split("url(");if(0<L.length){D=[L[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");
+var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var P=1;P<L.length;P++)if(T=L[P].indexOf(")"),0<T){var R=Editor.trimCssUrl(L[P].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=O?O+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":t)+R);D.push('url("'+R+'"'+L[P].substring(T))}else D.push(L[P])}else D=[t]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(t,D,L){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+
+encodeURIComponent(D));L(t,D)};Editor.prototype.embedCssFonts=function(t,D){var L=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var Z=[L[0]],Y=1;Y<L.length;Y++){var aa=L[Y].indexOf(")");Z.push('url("');Z.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,aa))]);Z.push('"'+L[Y].substring(aa))}D(Z.join(""))}});if(0<L.length){for(t=1;t<L.length;t++){var P=L[t].indexOf(")"),R=null,X=L[t].indexOf("format(",P);0<X&&(R=Editor.trimCssUrl(L[t].substring(X+
+7,L[t].indexOf(")",X))));mxUtils.bind(this,function(Z){if(null==this.cachedFonts[Z]){this.cachedFonts[Z]=Z;T++;var Y="application/x-font-ttf";if("svg"==R||/(\.svg)($|\?)/i.test(Z))Y="image/svg+xml";else if("otf"==R||"embedded-opentype"==R||/(\.otf)($|\?)/i.test(Z))Y="application/x-font-opentype";else if("woff"==R||/(\.woff)($|\?)/i.test(Z))Y="application/font-woff";else if("woff2"==R||/(\.woff2)($|\?)/i.test(Z))Y="application/font-woff2";else if("eot"==R||/(\.eot)($|\?)/i.test(Z))Y="application/vnd.ms-fontobject";
+else if("sfnt"==R||/(\.sfnt)($|\?)/i.test(Z))Y="application/font-sfnt";this.mapFontUrl(Y,Z,mxUtils.bind(this,function(aa,ba){this.loadUrl(ba,mxUtils.bind(this,function(ea){this.cachedFonts[Z]=ea;T--;O()}),mxUtils.bind(this,function(ea){T--;O()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[t].substring(0,P)),R)}O()}else D(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=
+D;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(t[D]=Graph.fontMapping[D]);return t};Editor.prototype.embedExtFonts=function(t){var D=this.graph.getCustomFonts();if(0<D.length){var L=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(L.join(""),t)}),P=0;P<D.length;P++)mxUtils.bind(this,function(R,X){Graph.isCssFontUrl(X)?
+null==this.cachedGoogleFonts[X]?(T++,this.loadUrl(X,mxUtils.bind(this,function(Z){this.cachedGoogleFonts[X]=Z;L.push(Z+"\n");T--;O()}),mxUtils.bind(this,function(Z){T--;L.push("@import url("+X+");\n");O()}))):L.push(this.cachedGoogleFonts[X]+"\n"):L.push('@font-face {font-family: "'+R+'";src: url("'+X+'")}\n')})(D[P].name,D[P].url);O()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var D=document.getElementsByTagName("style"),L=0;L<D.length;L++){var T=
+mxUtils.getTextContent(D[L]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(D[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var L=t.getElementsByTagName("defs"),T=t.ownerDocument;0==L.length?(L=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(L,t.firstChild):t.appendChild(L)):L=L[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,
+"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,D);L.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,D,L){var T=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(T/t,T/D))};Editor.prototype.exportToCanvas=function(t,D,L,T,O,P,R,X,Z,Y,aa,ba,ea,ja,fa,ra,ma,Ga){try{P=null!=P?P:!0;R=null!=R?R:!0;ba=null!=ba?ba:this.graph;ea=null!=ea?ea:0;var Fa=
+Z?null:ba.background;Fa==mxConstants.NONE&&(Fa=null);null==Fa&&(Fa=T);null==Fa&&0==Z&&(Fa=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ea,ja,null,R,null,null,null,Y,null,ra,ma,Ga),mxUtils.bind(this,function(ya){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var Ca=function(){mxClient.IS_SF?window.setTimeout(function(){ta.drawImage(Ma,0,0);t(oa,ya)},0):(ta.drawImage(Ma,0,0),t(oa,ya))},oa=document.createElement("canvas"),Aa=parseInt(ya.getAttribute("width")),
+La=parseInt(ya.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=P?Math.min(1,Math.min(3*D/(4*La),D/Aa)):D/Aa);X=this.getMaxCanvasScale(Aa,La,X);Aa=Math.ceil(X*Aa);La=Math.ceil(X*La);oa.setAttribute("width",Aa);oa.setAttribute("height",La);var ta=oa.getContext("2d");null!=Fa&&(ta.beginPath(),ta.rect(0,0,Aa,La),ta.fillStyle=Fa,ta.fill());1!=X&&ta.scale(X,X);if(fa){var Da=ba.view,wa=Da.scale;Da.scale=1;var Ja=btoa(unescape(encodeURIComponent(Da.createSvgGrid(Da.gridColor))));Da.scale=wa;Ja="data:image/svg+xml;base64,"+
+Ja;var ka=ba.gridSize*Da.gridSteps*X,da=ba.getGraphBounds(),ca=Da.translate.x*wa,na=Da.translate.y*wa,la=ca+(da.x-ca)/wa-ea,qa=na+(da.y-na)/wa-ea,ha=new Image;ha.onload=function(){try{for(var ia=-Math.round(ka-mxUtils.mod((ca-la)*X,ka)),pa=-Math.round(ka-mxUtils.mod((na-qa)*X,ka));ia<Aa;ia+=ka)for(var va=pa;va<La;va+=ka)ta.drawImage(ha,ia/X,va/X);Ca()}catch(za){null!=O&&O(za)}};ha.onerror=function(ia){null!=O&&O(ia)};ha.src=Ja}else Ca()}catch(ia){null!=O&&O(ia)}});Ma.onerror=function(Ca){null!=O&&
+O(Ca)};Y&&this.graph.addSvgShadow(ya);this.graph.mathEnabled&&this.addMathCss(ya);var xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ya,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(ya))}catch(Ca){null!=O&&O(Ca)}});this.embedExtFonts(mxUtils.bind(this,function(Ca){try{null!=Ca&&this.addFontCss(ya,Ca),this.loadFonts(xa)}catch(oa){null!=O&&O(oa)}}))}catch(Ca){null!=O&&O(Ca)}}),L,aa)}catch(ya){null!=O&&O(ya)}};Editor.crcTable=[];for(var l=0;256>
+l;l++)for(var m=l,v=0;8>v;v++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(t,D,L,T){for(var O=0;O<T;O++)t=Editor.crcTable[(t^D.charCodeAt(L+O))&255]^t>>>8;return t};Editor.crc32=function(t){for(var D=-1,L=0;L<t.length;L++)D=D>>>8^Editor.crcTable[(D^t.charCodeAt(L))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(t,D,L,T,O){function P(aa,ba){var ea=Z;Z+=ba;return aa.substring(ea,Z)}function R(aa){aa=P(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<
+8)+(aa.charCodeAt(1)<<16)+(aa.charCodeAt(0)<<24)}function X(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>8&255,aa&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var Z=0;if(P(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(P(t,4),"IHDR"!=P(t,4))null!=O&&O();else{P(t,17);O=t.substring(0,Z);do{var Y=R(t);if("IDAT"==P(t,4)){O=t.substring(0,Z-8);"pHYs"==D&&"dpi"==L?(L=Math.round(T/.0254),L=X(L)+X(L)+String.fromCharCode(1)):
+L=L+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);T=Editor.updateCRC(T,L,0,L.length);O+=X(L.length)+D+L+X(T^4294967295);O+=t.substring(Z-8,t.length);break}O+=t.substring(Z-8,Z-4+Y);P(t,Y);P(t,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var x=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
+function(t,D){x.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,D){var L=null;null!=t.editor.graph.getModel().getParent(D)?L=D.getId():null!=t.currentPage&&(L=t.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var d=
Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var g=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?g.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(t){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,N=C.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(O){var P=new ChangePageSetup(C);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=O;N.model.execute(P)},{install:function(O){this.listener=function(){O(N.shadowVisible)};
-C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));t.appendChild(R)}return t};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=n.apply(this,arguments);var C=this.editorUi,N=C.editor.graph;if(N.isEnabled()){var R=C.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(S){C.editor.setAutosave(S);C.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&N.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return N.mathEnabled},function(S){C.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(N.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var P=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";O.appendChild(P)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+function(t){return!1};var k=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=k.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,L=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var P=new ChangePageSetup(D);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=O;L.model.execute(P)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
+D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var n=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=n.apply(this,arguments);var D=this.editorUi,L=D.editor.graph;if(L.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=
+this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(R){D.editor.setAutosave(R);D.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(R){this.listener=function(){R(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});t.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return L.mathEnabled},function(R){D.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=function(){R(L.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";t.appendChild(O);var P=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";O.appendChild(P)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{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",
@@ -11310,137 +11312,137 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(t,C,N){if(null!=C){var R=function(P){if(null!=P)if(N)for(var S=0;S<P.length;S++)C[P[S].name]=P[S];else for(var X in C){var aa=!1;for(S=0;S<P.length;S++)if(P[S].name==X&&P[S].type==C[X].type){aa=!0;break}aa||delete C[X]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{R(JSON.parse(t))}catch(P){}}};var q=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));q.apply(this,arguments);if(Editor.enableCustomProperties){for(var C=
-{},N=t.vertices,R=t.edges,O=0;O<N.length;O++)this.findCommonProperties(N[O],C,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],C,0==N.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,t))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(t,C,N){function R(la,Ha,ya,Ia){ba.getModel().beginUpdate();try{var ka=[],ta=[];if(null!=ya.index){for(var ra=[],wa=ya.parentRow.nextSibling;wa&&wa.getAttribute("data-pName")==la;)ra.push(wa.getAttribute("data-pValue")),wa=wa.nextSibling;ya.index<ra.length?null!=Ia?ra.splice(Ia,1):ra[ya.index]=Ha:ra.push(Ha);null!=ya.size&&ra.length>ya.size&&(ra=ra.slice(0,ya.size));Ha=ra.join(",");null!=ya.countProperty&&(ba.setCellStyles(ya.countProperty,ra.length,
-ba.getSelectionCells()),ka.push(ya.countProperty),ta.push(ra.length))}ba.setCellStyles(la,Ha,ba.getSelectionCells());ka.push(la);ta.push(Ha);if(null!=ya.dependentProps)for(la=0;la<ya.dependentProps.length;la++){var ca=ya.dependentPropsDefVal[la],fa=ya.dependentPropsVals[la];if(fa.length>Ha)fa=fa.slice(0,Ha);else for(var da=fa.length;da<Ha;da++)fa.push(ca);fa=fa.join(",");ba.setCellStyles(ya.dependentProps[la],fa,ba.getSelectionCells());ka.push(ya.dependentProps[la]);ta.push(fa)}if("function"==typeof ya.onChange)ya.onChange(ba,
-Ha);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ta,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(la,Ha,ya){var Ia=mxUtils.getOffset(t,!0),ka=mxUtils.getOffset(la,!0);Ha.style.position="absolute";Ha.style.left=ka.x-Ia.x+"px";Ha.style.top=ka.y-Ia.y+"px";Ha.style.width=la.offsetWidth+"px";Ha.style.height=la.offsetHeight-(ya?4:0)+"px";Ha.style.zIndex=5}function P(la,Ha,ya){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height=
-"4px";Ia.style.margin="2px";Ia.style.border="1px solid black";Ia.style.background=Ha&&"none"!=Ha?Ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ka){this.editorUi.pickColor(Ha,function(ta){Ia.style.background="none"==ta?"url('"+Dialog.prototype.noColorImage+"')":ta;R(la,ta,ya)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ia);return btn}function S(la,Ha,ya,Ia,ka,ta,ra){null!=Ha&&(Ha=Ha.split(","),
-ea.push({name:la,values:Ha,type:ya,defVal:Ia,countProperty:ka,parentRow:ta,isDeletable:!0,flipBkg:ra}));btn=mxUtils.button("+",mxUtils.bind(Z,function(wa){for(var ca=ta,fa=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==la)ca=ca.nextSibling,fa++;else break;var da={type:ya,parentRow:ta,index:fa,isDeletable:!0,defVal:Ia,countProperty:ka};fa=Y(la,"",da,0==fa%2,ra);R(la,Ia,da);ca.parentNode.insertBefore(fa,ca.nextSibling);mxEvent.consume(wa)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function X(la,Ha,ya,Ia,ka,ta,ra){if(0<ka){var wa=Array(ka);Ha=null!=Ha?Ha.split(","):[];for(var ca=0;ca<ka;ca++)wa[ca]=null!=Ha[ca]?Ha[ca]:null!=Ia?Ia:"";ea.push({name:la,values:wa,type:ya,defVal:Ia,parentRow:ta,flipBkg:ra,size:ka})}return document.createElement("div")}function aa(la,Ha,ya){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Ha;mxEvent.addListener(Ia,"change",function(){R(la,Ia.checked?"1":"0",ya)});return Ia}function Y(la,
-Ha,ya,Ia,ka){var ta=ya.dispName,ra=ya.type,wa=document.createElement("tr");wa.className="gePropRow"+(ka?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";wa.setAttribute("data-pName",la);wa.setAttribute("data-pValue",Ha);Ia=!1;null!=ya.index&&(wa.setAttribute("data-index",ya.index),ta=(null!=ta?ta:"")+"["+ya.index+"]",Ia=!0);var ca=document.createElement("td");ca.className="gePropRowCell";ta=mxResources.get(ta,null,ta);mxUtils.write(ca,ta);ca.setAttribute("title",ta);Ia&&(ca.style.textAlign="right");
-wa.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==ra)ca.appendChild(P(la,Ha,ya));else if("bool"==ra||"boolean"==ra)ca.appendChild(aa(la,Ha,ya));else if("enum"==ra){var fa=ya.enumList;for(ka=0;ka<fa.length;ka++)if(ta=fa[ka],ta.val==Ha){mxUtils.write(ca,mxResources.get(ta.dispName,null,ta.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(ca,da);for(var ha=0;ha<fa.length;ha++){var ja=fa[ha],sa=
-document.createElement("option");sa.value=mxUtils.htmlEntities(ja.val);mxUtils.write(sa,mxResources.get(ja.dispName,null,ja.dispName));da.appendChild(sa)}da.value=Ha;t.appendChild(da);mxEvent.addListener(da,"change",function(){var oa=mxUtils.htmlEntities(da.value);R(la,oa,ya)});da.focus();mxEvent.addListener(da,"blur",function(){t.removeChild(da)})}))}else"dynamicArr"==ra?ca.appendChild(S(la,Ha,ya.subType,ya.subDefVal,ya.countProperty,wa,ka)):"staticArr"==ra?ca.appendChild(X(la,Ha,ya.subType,ya.subDefVal,
-ya.size,wa,ka)):"readOnly"==ra?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Ha,ka.style.width="96px",ka.style.borderWidth="0px",ca.appendChild(ka)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ha)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function da(){var ja=ha.value;ja=0==ja.length&&"string"!=ra?0:ja;ya.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",ra="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=ya.min&&ja<
-ya.min?ja=ya.min:null!=ya.max&&ja>ya.max&&(ja=ya.max);ja=encodeURIComponent(("int"==ra?parseInt(ja):ja)+"");R(la,ja,ya)}var ha=document.createElement("input");O(ca,ha,!0);ha.value=decodeURIComponent(Ha);ha.className="gePropEditor";"int"!=ra&&"float"!=ra||ya.allowAuto||(ha.type="number",ha.step="int"==ra?"1":"any",null!=ya.min&&(ha.min=parseFloat(ya.min)),null!=ya.max&&(ha.max=parseFloat(ya.max)));t.appendChild(ha);mxEvent.addListener(ha,"keypress",function(ja){13==ja.keyCode&&da()});ha.focus();mxEvent.addListener(ha,
-"blur",function(){da()})})));ya.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(Z,function(da){R(la,"",ya,ya.index);mxEvent.consume(da)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",ca.appendChild(ka));wa.appendChild(ca);return wa}var Z=this,ba=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ma=document.createElement("table");ma.className="geProperties";ma.style.whiteSpace="nowrap";ma.style.width="100%";var ia=
-document.createElement("tr");ia.className="gePropHeader";var pa=document.createElement("th");pa.className="gePropHeaderCell";var na=document.createElement("img");na.src=Sidebar.prototype.expandedImage;na.style.verticalAlign="middle";pa.appendChild(na);mxUtils.write(pa,mxResources.get("property"));ia.style.cursor="pointer";var Fa=function(){var la=ma.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){na.src=Sidebar.prototype.collapsedImage;var Ha="none";for(var ya=t.childNodes.length-
-1;0<=ya;ya--)try{var Ia=t.childNodes[ya],ka=Ia.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||t.removeChild(Ia)}catch(ta){}}else na.src=Sidebar.prototype.expandedImage,Ha="";for(ya=0;ya<la.length;ya++)la[ya].style.display=Ha};mxEvent.addListener(ia,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Fa()});ia.appendChild(pa);pa=document.createElement("th");pa.className="gePropHeaderCell";pa.innerHTML=mxResources.get("value");ia.appendChild(pa);ma.appendChild(ia);var Ga=
-!1,xa=!1;ia=null;1==N.vertices.length&&0==N.edges.length?ia=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(ia=N.edges[0].id);null!=ia&&ma.appendChild(Y("id",mxUtils.htmlEntities(ia),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in C)if(ia=C[Ma],"function"!=typeof ia.isVisible||ia.isVisible(N,this)){var va=null!=N.style[Ma]?mxUtils.htmlEntities(N.style[Ma]+""):null!=ia.getDefaultValue?ia.getDefaultValue(N,this):ia.defVal;if("separator"==ia.type)xa=!xa;else{if("staticArr"==ia.type)ia.size=
-parseInt(N.style[ia.sizeProperty]||C[ia.sizeProperty].defVal)||0;else if(null!=ia.dependentProps){var Ea=ia.dependentProps,Ba=[],za=[];for(pa=0;pa<Ea.length;pa++){var Da=N.style[Ea[pa]];za.push(C[Ea[pa]].subDefVal);Ba.push(null!=Da?Da.split(","):[])}ia.dependentPropsDefVal=za;ia.dependentPropsVals=Ba}ma.appendChild(Y(Ma,va,ia,Ga,xa));Ga=!Ga}}for(pa=0;pa<ea.length;pa++)for(ia=ea[pa],C=ia.parentRow,N=0;N<ia.values.length;N++)Ma=Y(ia.name,ia.values[N],{type:ia.type,parentRow:ia.parentRow,isDeletable:ia.isDeletable,
-index:N,defVal:ia.defVal,countProperty:ia.countProperty,size:ia.size},0==N%2,ia.flipBkg),C.parentNode.insertBefore(Ma,C.nextSibling),C=Ma;t.appendChild(ma);Fa();return t};StyleFormatPanel.prototype.addStyles=function(t){function C(ia){mxEvent.addListener(ia,"mouseenter",function(){ia.style.opacity="1"});mxEvent.addListener(ia,"mouseleave",function(){ia.style.opacity="0.5"})}var N=this.editorUi,R=N.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
-O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
-document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ia){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ia)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ia){null!=X[ia]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ia,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ia){var pa=mxUtils.bind(this,function(Fa){var Ga=mxUtils.button("",mxUtils.bind(this,function(va){R.getModel().beginUpdate();try{for(var Ea=N.getSelectionState().cells,Ba=0;Ba<Ea.length;Ba++){for(var za=R.getModel().getStyle(Ea[Ba]),Da=0;Da<P.length;Da++)za=mxUtils.removeStylename(za,
-P[Da]);var la=R.getModel().isVertex(Ea[Ba])?R.defaultVertexStyle:R.defaultEdgeStyle;null!=Fa?(mxEvent.isShiftDown(va)||(za=""==Fa.fill?mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,Fa.fill||mxUtils.getValue(la,mxConstants.STYLE_FILLCOLOR,null)),za=mxUtils.setStyle(za,mxConstants.STYLE_GRADIENTCOLOR,Fa.gradient||mxUtils.getValue(la,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(va)||mxClient.IS_MAC&&mxEvent.isMetaDown(va)||!R.getModel().isVertex(Ea[Ba])||
-(za=mxUtils.setStyle(za,mxConstants.STYLE_FONTCOLOR,Fa.font||mxUtils.getValue(la,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(va)||(za=""==Fa.stroke?mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,Fa.stroke||mxUtils.getValue(la,mxConstants.STYLE_STROKECOLOR,null)))):(za=mxUtils.setStyle(za,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(la,mxConstants.STYLE_FILLCOLOR,"#ffffff")),za=mxUtils.setStyle(za,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(la,
-mxConstants.STYLE_STROKECOLOR,"#000000")),za=mxUtils.setStyle(za,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(la,mxConstants.STYLE_GRADIENTCOLOR,null)),R.getModel().isVertex(Ea[Ba])&&(za=mxUtils.setStyle(za,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(la,mxConstants.STYLE_FONTCOLOR,null))));R.getModel().setStyle(Ea[Ba],za)}}finally{R.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px";
-if(null!=Fa){var xa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Fa.border&&(xa=Fa.border);null!=Fa.gradient?mxClient.IS_IE&&10>document.documentMode?Ga.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Fa.fill+"', EndColorStr='"+Fa.gradient+"', GradientType=0)":Ga.style.backgroundImage="linear-gradient("+Fa.fill+" 0px,"+Fa.gradient+" 100%)":Fa.fill==mxConstants.NONE?Ga.style.background="url('"+Dialog.prototype.noColorImage+"')":Ga.style.backgroundColor=""==Fa.fill?
-mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Fa.fill||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ga.style.border=Fa.stroke==mxConstants.NONE?xa+" transparent":""==Fa.stroke?xa+" "+mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):xa+" "+(Fa.stroke||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Fa.title&&Ga.setAttribute("title",Fa.title)}else{xa=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ga.style.backgroundColor=xa;Ga.style.border="1px solid "+Ma}Ga.style.borderRadius="0";O.appendChild(Ga)});O.innerText="";for(var na=0;na<ia.length;na++)0<na&&0==mxUtils.mod(na,4)&&mxUtils.br(O),pa(ia[na])});null==this.format.currentScheme?
-Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ma=document.createElement("div");ma.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(t.appendChild(ea),t.appendChild(ma));mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(ea);C(ma);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var C=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,R=null;1==C.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",t.appendChild(R));N=1==C.cells.length?N.view.getState(C.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title",
-mxResources.get("editShape")),C.style.marginBottom="2px",null==R?C.style.width="210px":(R.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),t.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==R?C.style.width="210px":(R.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),
-t.appendChild(C));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
-C){var N=Graph.fontMapping[C];null==N&&Graph.isCssFontUrl(C)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",C)):(null==N&&(N='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+C+'");\n}'),t=document.createElement("style"),mxUtils.write(t,N));return t};Graph.addFont=function(t,C,N){if(null!=t&&0<t.length&&null!=C&&0<C.length){var R=t.toLowerCase();if("helvetica"!=R&&"arial"!=t&&"sans-serif"!=
-R){var O=Graph.customFontElements[R];null!=O&&O.url!=C&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=C,"http:"==C.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(C)),O={name:t,url:C,elt:Graph.createFontElement(t,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,C=document.getElementsByTagName("head")[0],null!=N&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=N,O.elt.onerror=N):N()),null!=C&&C.appendChild(O.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
-return t};Graph.getFontUrl=function(t,C){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(C=t.url);return C};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var C=0;C<t.length;C++){var N=t[C].getAttribute("data-font-src");if(null!=N){var R="FONT"==t[C].nodeName?t[C].getAttribute("face"):t[C].style.fontFamily;null!=R&&Graph.addFont(R,N)}}};Graph.processFontStyle=function(t){if(null!=t){var C=mxUtils.getValue(t,"fontSource",null);if(null!=C){var N=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
-null);null!=N&&Graph.addFont(N,decodeURIComponent(C))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function t(O){C=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var C=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){C=null});this.isMouseInsertPoint=function(){return null!=C};var N=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):N.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var P=this.graph.getCellStyle(O);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=P.marginTop||0;S.marginBottom=
-P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var E=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,C){return Graph.processFontStyle(E.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,C,N,R,O,P,S,X,aa,Y,Z){z.apply(this,arguments);Graph.processFontAttributes(Z)};
-var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,C,N){function R(){for(var ia=S.getSelectionCells(),pa=[],na=0;na<ia.length;na++)S.isCellVisible(ia[na])&&pa.push(ia[na]);S.setSelectionCells(pa)}function O(ia){S.setHiddenTags(ia?[]:X.slice());R();S.refresh()}function P(ia,pa){Y.innerText="";if(0<ia.length){var na=document.createElement("table");
-na.setAttribute("cellpadding","2");na.style.boxSizing="border-box";na.style.tableLayout="fixed";na.style.width="100%";var Fa=document.createElement("tbody");if(null!=ia&&0<ia.length)for(var Ga=0;Ga<ia.length;Ga++)(function(xa){var Ma=0>mxUtils.indexOf(S.hiddenTags,xa),va=document.createElement("tr"),Ea=document.createElement("td");Ea.style.align="center";Ea.style.width="16px";var Ba=document.createElement("img");Ba.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);Ba.setAttribute("title",
-mxResources.get(Ma?"hideIt":"show",[xa]));mxUtils.setOpacity(Ba,Ma?75:25);Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(C||Editor.isDarkMode())Ba.style.filter="invert(100%)";Ea.appendChild(Ba);mxEvent.addListener(Ba,"click",function(Da){mxEvent.isShiftDown(Da)?O(0<=mxUtils.indexOf(S.hiddenTags,xa)):(S.toggleHiddenTag(xa),R(),S.refresh());mxEvent.consume(Da)});va.appendChild(Ea);Ea=document.createElement("td");Ea.style.overflow="hidden";Ea.style.whiteSpace="nowrap";
-Ea.style.textOverflow="ellipsis";Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.setAttribute("title",xa);a=document.createElement("a");mxUtils.write(a,xa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Ea.appendChild(a);mxEvent.addListener(Ea,"click",function(Da){if(mxEvent.isShiftDown(Da)){O(!0);var la=S.getCellsForTags([xa],null,null,!0);S.isEnabled()?S.setSelectionCells(la):S.highlightCells(la)}else if(Ma&&0<S.hiddenTags.length)O(!0);else{la=
-X.slice();var Ha=mxUtils.indexOf(la,xa);la.splice(Ha,1);S.setHiddenTags(la);R();S.refresh()}mxEvent.consume(Da)});va.appendChild(Ea);if(S.isEnabled()){Ea=document.createElement("td");Ea.style.verticalAlign="middle";Ea.style.textAlign="center";Ea.style.width="18px";if(null==pa){Ea.style.align="center";Ea.style.width="16px";Ba=document.createElement("img");Ba.setAttribute("src",Editor.crossImage);Ba.setAttribute("title",mxResources.get("removeIt",[xa]));mxUtils.setOpacity(Ba,Ma?75:25);Ba.style.verticalAlign=
-"middle";Ba.style.cursor="pointer";Ba.style.width="16px";if(C||Editor.isDarkMode())Ba.style.filter="invert(100%)";mxEvent.addListener(Ba,"click",function(Da){var la=mxUtils.indexOf(X,xa);0<=la&&X.splice(la,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[xa]);S.refresh();mxEvent.consume(Da)});Ea.appendChild(Ba)}else{var za=document.createElement("input");za.setAttribute("type","checkbox");za.style.margin="0px";za.defaultChecked=null!=pa&&0<=mxUtils.indexOf(pa,xa);za.checked=za.defaultChecked;
-za.style.background="transparent";za.setAttribute("title",mxResources.get(za.defaultChecked?"removeIt":"add",[xa]));mxEvent.addListener(za,"change",function(Da){za.checked?S.addTagsForCells(S.getSelectionCells(),[xa]):S.removeTagsForCells(S.getSelectionCells(),[xa]);mxEvent.consume(Da)});Ea.appendChild(za)}va.appendChild(Ea)}Fa.appendChild(va)})(ia[Ga]);na.appendChild(Fa);Y.appendChild(na)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow=
-"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ia){S.setHiddenTags([]);mxEvent.isShiftDown(ia)||
-(X=S.hiddenTags.slice());R();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(X,function(ia){X=ia;ea()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var ea=mxUtils.bind(this,function(ia,pa){if(t()){ia=S.getAllTags();for(pa=0;pa<ia.length;pa++)0>mxUtils.indexOf(X,
-ia[pa])&&X.push(ia[pa]);X.sort();S.isSelectionEmpty()?P(X):P(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ea);S.model.addListener(mxEvent.CHANGE,ea);S.addListener(mxEvent.REFRESH,ea);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow="hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(Z),
-ma.appendChild(ba),aa.appendChild(ma));return{div:aa,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var C in Graph.customFontElements){var N=Graph.customFontElements[C];t.push({name:N.name,url:N.url})}return t};Graph.prototype.setFont=function(t,C){Graph.addFont(t,C);document.execCommand("fontname",!1,t);if(null!=C){var N=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(t,C);for(var R=0;R<N.length;R++)N[R].getAttribute("face")==
-t&&N[R].getAttribute("data-font-src")!=C&&N[R].setAttribute("data-font-src",C)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var C in t)this.globalVars[C]=
-t[C]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var C=M.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[t]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,C,N,R,O,P,S,X,aa,Y,Z,ba,ea,ma){var ia=null,pa=null,na=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,pa=this.shapeForegroundColor,na=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Fa=v.apply(this,arguments),Ga=this.getCustomFonts();if(Z&&0<Ga.length){var xa=Fa.ownerDocument,Ma=null!=xa.createElementNS?xa.createElementNS(mxConstants.NS_SVG,"style"):xa.createElement("style");null!=xa.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var va="",Ea="",Ba=0;Ba<Ga.length;Ba++){var za=Ga[Ba].name,Da=Ga[Ba].url;Graph.isCssFontUrl(Da)?
-va+="@import url("+Da+");\n":Ea+='@font-face {\nfont-family: "'+za+'";\nsrc: url("'+Da+'");\n}\n'}Ma.appendChild(xa.createTextNode(va+Ea));Fa.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Fa),Editor.MathJaxRender(Fa),Fa.parentNode.removeChild(Fa));null!=ia&&(this.shapeBackgroundColor=na,this.shapeForegroundColor=pa,this.stylesheet=ia,this.refresh());return Fa};var u=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){u.apply(this,
-arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var I=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return I.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var C="1"==mxUtils.getValue(t.style,"enumerate",0);C&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):C||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);C=t.secondLabel;if(null!=C){var N=t.view.scale,R=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*N,t.y+4*N,0,0):mxRectangle.fromPoint(t.view.getPoint(t));C.bounds.equals(t)&&C.value==R&&C.scale==N||(C.bounds=t,C.value=R,C.scale=
-N,C.redraw())}};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var L=Graph.prototype.refresh;Graph.prototype.refresh=function(){L.apply(this,
+function(t,D,L){if(null!=D){var T=function(P){if(null!=P)if(L)for(var R=0;R<P.length;R++)D[P[R].name]=P[R];else for(var X in D){var Z=!1;for(R=0;R<P.length;R++)if(P[R].name==X&&P[R].type==D[X].type){Z=!0;break}Z||delete D[X]}},O=this.editorUi.editor.graph.view.getState(t);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(P){}}};var q=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));q.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
+{},L=t.vertices,T=t.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],D,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],D,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,t))}};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return p.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(t,D,L){function T(ta,Da,wa,Ja){ba.getModel().beginUpdate();try{var ka=[],da=[];if(null!=wa.index){for(var ca=[],na=wa.parentRow.nextSibling;na&&na.getAttribute("data-pName")==ta;)ca.push(na.getAttribute("data-pValue")),na=na.nextSibling;wa.index<ca.length?null!=Ja?ca.splice(Ja,1):ca[wa.index]=Da:ca.push(Da);null!=wa.size&&ca.length>wa.size&&(ca=ca.slice(0,wa.size));Da=ca.join(",");null!=wa.countProperty&&(ba.setCellStyles(wa.countProperty,ca.length,
+ba.getSelectionCells()),ka.push(wa.countProperty),da.push(ca.length))}ba.setCellStyles(ta,Da,ba.getSelectionCells());ka.push(ta);da.push(Da);if(null!=wa.dependentProps)for(ta=0;ta<wa.dependentProps.length;ta++){var la=wa.dependentPropsDefVal[ta],qa=wa.dependentPropsVals[ta];if(qa.length>Da)qa=qa.slice(0,Da);else for(var ha=qa.length;ha<Da;ha++)qa.push(la);qa=qa.join(",");ba.setCellStyles(wa.dependentProps[ta],qa,ba.getSelectionCells());ka.push(wa.dependentProps[ta]);da.push(qa)}if("function"==typeof wa.onChange)wa.onChange(ba,
+Da);aa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",da,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(ta,Da,wa){var Ja=mxUtils.getOffset(t,!0),ka=mxUtils.getOffset(ta,!0);Da.style.position="absolute";Da.style.left=ka.x-Ja.x+"px";Da.style.top=ka.y-Ja.y+"px";Da.style.width=ta.offsetWidth+"px";Da.style.height=ta.offsetHeight-(wa?4:0)+"px";Da.style.zIndex=5}function P(ta,Da,wa){var Ja=document.createElement("div");Ja.style.width="32px";Ja.style.height=
+"4px";Ja.style.margin="2px";Ja.style.border="1px solid black";Ja.style.background=Da&&"none"!=Da?Da:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(aa,function(ka){this.editorUi.pickColor(Da,function(da){Ja.style.background="none"==da?"url('"+Dialog.prototype.noColorImage+"')":da;T(ta,da,wa)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ja);return btn}function R(ta,Da,wa,Ja,ka,da,ca){null!=Da&&(Da=Da.split(","),
+ea.push({name:ta,values:Da,type:wa,defVal:Ja,countProperty:ka,parentRow:da,isDeletable:!0,flipBkg:ca}));btn=mxUtils.button("+",mxUtils.bind(aa,function(na){for(var la=da,qa=0;null!=la.nextSibling;)if(la.nextSibling.getAttribute("data-pName")==ta)la=la.nextSibling,qa++;else break;var ha={type:wa,parentRow:da,index:qa,isDeletable:!0,defVal:Ja,countProperty:ka};qa=Y(ta,"",ha,0==qa%2,ca);T(ta,Ja,ha);la.parentNode.insertBefore(qa,la.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function X(ta,Da,wa,Ja,ka,da,ca){if(0<ka){var na=Array(ka);Da=null!=Da?Da.split(","):[];for(var la=0;la<ka;la++)na[la]=null!=Da[la]?Da[la]:null!=Ja?Ja:"";ea.push({name:ta,values:na,type:wa,defVal:Ja,parentRow:da,flipBkg:ca,size:ka})}return document.createElement("div")}function Z(ta,Da,wa){var Ja=document.createElement("input");Ja.type="checkbox";Ja.checked="1"==Da;mxEvent.addListener(Ja,"change",function(){T(ta,Ja.checked?"1":"0",wa)});return Ja}function Y(ta,
+Da,wa,Ja,ka){var da=wa.dispName,ca=wa.type,na=document.createElement("tr");na.className="gePropRow"+(ka?"Dark":"")+(Ja?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",ta);na.setAttribute("data-pValue",Da);Ja=!1;null!=wa.index&&(na.setAttribute("data-index",wa.index),da=(null!=da?da:"")+"["+wa.index+"]",Ja=!0);var la=document.createElement("td");la.className="gePropRowCell";da=mxResources.get(da,null,da);mxUtils.write(la,da);la.setAttribute("title",da);Ja&&(la.style.textAlign="right");
+na.appendChild(la);la=document.createElement("td");la.className="gePropRowCell";if("color"==ca)la.appendChild(P(ta,Da,wa));else if("bool"==ca||"boolean"==ca)la.appendChild(Z(ta,Da,wa));else if("enum"==ca){var qa=wa.enumList;for(ka=0;ka<qa.length;ka++)if(da=qa[ka],da.val==Da){mxUtils.write(la,mxResources.get(da.dispName,null,da.dispName));break}mxEvent.addListener(la,"click",mxUtils.bind(aa,function(){var ha=document.createElement("select");O(la,ha);for(var ia=0;ia<qa.length;ia++){var pa=qa[ia],va=
+document.createElement("option");va.value=mxUtils.htmlEntities(pa.val);mxUtils.write(va,mxResources.get(pa.dispName,null,pa.dispName));ha.appendChild(va)}ha.value=Da;t.appendChild(ha);mxEvent.addListener(ha,"change",function(){var za=mxUtils.htmlEntities(ha.value);T(ta,za,wa)});ha.focus();mxEvent.addListener(ha,"blur",function(){t.removeChild(ha)})}))}else"dynamicArr"==ca?la.appendChild(R(ta,Da,wa.subType,wa.subDefVal,wa.countProperty,na,ka)):"staticArr"==ca?la.appendChild(X(ta,Da,wa.subType,wa.subDefVal,
+wa.size,na,ka)):"readOnly"==ca?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Da,ka.style.width="96px",ka.style.borderWidth="0px",la.appendChild(ka)):(la.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Da)),mxEvent.addListener(la,"click",mxUtils.bind(aa,function(){function ha(){var pa=ia.value;pa=0==pa.length&&"string"!=ca?0:pa;wa.allowAuto&&(null!=pa.trim&&"auto"==pa.trim().toLowerCase()?(pa="auto",ca="string"):(pa=parseFloat(pa),pa=isNaN(pa)?0:pa));null!=wa.min&&pa<
+wa.min?pa=wa.min:null!=wa.max&&pa>wa.max&&(pa=wa.max);pa=encodeURIComponent(("int"==ca?parseInt(pa):pa)+"");T(ta,pa,wa)}var ia=document.createElement("input");O(la,ia,!0);ia.value=decodeURIComponent(Da);ia.className="gePropEditor";"int"!=ca&&"float"!=ca||wa.allowAuto||(ia.type="number",ia.step="int"==ca?"1":"any",null!=wa.min&&(ia.min=parseFloat(wa.min)),null!=wa.max&&(ia.max=parseFloat(wa.max)));t.appendChild(ia);mxEvent.addListener(ia,"keypress",function(pa){13==pa.keyCode&&ha()});ia.focus();mxEvent.addListener(ia,
+"blur",function(){ha()})})));wa.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(aa,function(ha){T(ta,"",wa,wa.index);mxEvent.consume(ha)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",la.appendChild(ka));na.appendChild(la);return na}var aa=this,ba=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ja=document.createElement("table");ja.className="geProperties";ja.style.whiteSpace="nowrap";ja.style.width="100%";var fa=
+document.createElement("tr");fa.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var ma=document.createElement("img");ma.src=Sidebar.prototype.expandedImage;ma.style.verticalAlign="middle";ra.appendChild(ma);mxUtils.write(ra,mxResources.get("property"));fa.style.cursor="pointer";var Ga=function(){var ta=ja.querySelectorAll(".gePropNonHeaderRow");if(aa.editorUi.propertiesCollapsed){ma.src=Sidebar.prototype.collapsedImage;var Da="none";for(var wa=t.childNodes.length-
+1;0<=wa;wa--)try{var Ja=t.childNodes[wa],ka=Ja.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||t.removeChild(Ja)}catch(da){}}else ma.src=Sidebar.prototype.expandedImage,Da="";for(wa=0;wa<ta.length;wa++)ta[wa].style.display=Da};mxEvent.addListener(fa,"click",function(){aa.editorUi.propertiesCollapsed=!aa.editorUi.propertiesCollapsed;Ga()});fa.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");fa.appendChild(ra);ja.appendChild(fa);
+var Fa=!1,ya=!1;fa=null;1==L.vertices.length&&0==L.edges.length?fa=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(fa=L.edges[0].id);null!=fa&&ja.appendChild(Y("id",mxUtils.htmlEntities(fa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in D)if(fa=D[Ma],"function"!=typeof fa.isVisible||fa.isVisible(L,this)){var xa=null!=L.style[Ma]?mxUtils.htmlEntities(L.style[Ma]+""):null!=fa.getDefaultValue?fa.getDefaultValue(L,this):fa.defVal;if("separator"==fa.type)ya=!ya;else{if("staticArr"==fa.type)fa.size=
+parseInt(L.style[fa.sizeProperty]||D[fa.sizeProperty].defVal)||0;else if(null!=fa.dependentProps){var Ca=fa.dependentProps,oa=[],Aa=[];for(ra=0;ra<Ca.length;ra++){var La=L.style[Ca[ra]];Aa.push(D[Ca[ra]].subDefVal);oa.push(null!=La?La.split(","):[])}fa.dependentPropsDefVal=Aa;fa.dependentPropsVals=oa}ja.appendChild(Y(Ma,xa,fa,Fa,ya));Fa=!Fa}}for(ra=0;ra<ea.length;ra++)for(fa=ea[ra],D=fa.parentRow,L=0;L<fa.values.length;L++)Ma=Y(fa.name,fa.values[L],{type:fa.type,parentRow:fa.parentRow,isDeletable:fa.isDeletable,
+index:L,defVal:fa.defVal,countProperty:fa.countProperty,size:fa.size},0==L%2,fa.flipBkg),D.parentNode.insertBefore(Ma,D.nextSibling),D=Ma;t.appendChild(ja);Ga();return t};StyleFormatPanel.prototype.addStyles=function(t){function D(fa){mxEvent.addListener(fa,"mouseenter",function(){fa.style.opacity="1"});mxEvent.addListener(fa,"mouseleave",function(){fa.style.opacity="0.5"})}var L=this.editorUi,T=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
+O.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(O);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.position="relative";R.style.textAlign="center";R.style.width="210px";for(var X=[],Z=0;Z<this.defaultColorSchemes.length;Z++){var Y=
+document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(fa){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){aa(fa)}))})(Z);X.push(Y);R.appendChild(Y)}var aa=mxUtils.bind(this,function(fa){null!=X[fa]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=fa,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(fa){var ra=mxUtils.bind(this,function(Ga){var Fa=mxUtils.button("",mxUtils.bind(this,function(xa){T.getModel().beginUpdate();try{for(var Ca=L.getSelectionState().cells,oa=0;oa<Ca.length;oa++){for(var Aa=T.getModel().getStyle(Ca[oa]),La=0;La<P.length;La++)Aa=mxUtils.removeStylename(Aa,
+P[La]);var ta=T.getModel().isVertex(Ca[oa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=Ga?(mxEvent.isShiftDown(xa)||(Aa=""==Ga.fill?mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,Ga.fill||mxUtils.getValue(ta,mxConstants.STYLE_FILLCOLOR,null)),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_GRADIENTCOLOR,Ga.gradient||mxUtils.getValue(ta,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(xa)||mxClient.IS_MAC&&mxEvent.isMetaDown(xa)||!T.getModel().isVertex(Ca[oa])||
+(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FONTCOLOR,Ga.font||mxUtils.getValue(ta,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(xa)||(Aa=""==Ga.stroke?mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,Ga.stroke||mxUtils.getValue(ta,mxConstants.STYLE_STROKECOLOR,null)))):(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ta,
+mxConstants.STYLE_STROKECOLOR,"#000000")),Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ca[oa])&&(Aa=mxUtils.setStyle(Aa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ta,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ca[oa],Aa)}}finally{T.getModel().endUpdate()}}));Fa.className="geStyleButton";Fa.style.width="36px";Fa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Fa.style.margin="0px 6px 6px 0px";
+if(null!=Ga){var ya="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ga.border&&(ya=Ga.border);null!=Ga.gradient?mxClient.IS_IE&&10>document.documentMode?Fa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ga.fill+"', EndColorStr='"+Ga.gradient+"', GradientType=0)":Fa.style.backgroundImage="linear-gradient("+Ga.fill+" 0px,"+Ga.gradient+" 100%)":Ga.fill==mxConstants.NONE?Fa.style.background="url('"+Dialog.prototype.noColorImage+"')":Fa.style.backgroundColor=""==Ga.fill?
+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ga.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Fa.style.border=Ga.stroke==mxConstants.NONE?ya+" transparent":""==Ga.stroke?ya+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):ya+" "+(Ga.stroke||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ga.title&&Fa.setAttribute("title",Ga.title)}else{ya=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Fa.style.backgroundColor=ya;Fa.style.border="1px solid "+Ma}Fa.style.borderRadius="0";O.appendChild(Fa)});O.innerText="";for(var ma=0;ma<fa.length;ma++)0<ma&&0==mxUtils.mod(ma,4)&&mxUtils.br(O),ra(fa[ma])});null==this.format.currentScheme?
+aa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):aa(this.format.currentScheme);Z=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ja=document.createElement("div");ja.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Z+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(t.appendChild(ea),t.appendChild(ja));mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(ea);D(ja);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(R);return t};StyleFormatPanel.prototype.addEditOps=function(t){var D=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));L=1==D.cells.length?L.view.getState(D.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
+mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),t.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
+t.appendChild(D));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
+D){var L=Graph.fontMapping[D];null==L&&Graph.isCssFontUrl(D)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",D)):(null==L&&(L='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+D+'");\n}'),t=document.createElement("style"),mxUtils.write(t,L));return t};Graph.addFont=function(t,D,L){if(null!=t&&0<t.length&&null!=D&&0<D.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
+T){var O=Graph.customFontElements[T];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:t,url:D,elt:Graph.createFontElement(t,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,D=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=D&&D.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
+return t};Graph.getFontUrl=function(t,D){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(D=t.url);return D};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var D=0;D<t.length;D++){var L=t[D].getAttribute("data-font-src");if(null!=L){var T="FONT"==t[D].nodeName?t[D].getAttribute("face"):t[D].style.fontFamily;null!=T&&Graph.addFont(T,L)}}};Graph.processFontStyle=function(t){if(null!=t){var D=mxUtils.getValue(t,"fontSource",null);if(null!=D){var L=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+null);null!=L&&Graph.addFont(L,decodeURIComponent(D))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var y=Graph.prototype.init;Graph.prototype.init=function(){function t(O){D=O}y.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var L=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):L.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var P=this.graph.getCellStyle(O);if(null!=P&&"rack"==P.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=P.marginLeft||0;R.marginRight=P.marginRight||0;R.marginTop=P.marginTop||0;R.marginBottom=
+P.marginBottom||0;R.allowGaps=P.allowGaps||0;R.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,D){return Graph.processFontStyle(A.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,D,L,T,O,P,R,X,Z,Y,aa){C.apply(this,arguments);Graph.processFontAttributes(aa)};
+var B=mxText.prototype.redraw;mxText.prototype.redraw=function(){B.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,D,L){function T(){for(var fa=R.getSelectionCells(),ra=[],ma=0;ma<fa.length;ma++)R.isCellVisible(fa[ma])&&ra.push(fa[ma]);R.setSelectionCells(ra)}function O(fa){R.setHiddenTags(fa?[]:X.slice());T();R.refresh()}function P(fa,ra){Y.innerText="";if(0<fa.length){var ma=document.createElement("table");
+ma.setAttribute("cellpadding","2");ma.style.boxSizing="border-box";ma.style.tableLayout="fixed";ma.style.width="100%";var Ga=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var Fa=0;Fa<fa.length;Fa++)(function(ya){var Ma=0>mxUtils.indexOf(R.hiddenTags,ya),xa=document.createElement("tr"),Ca=document.createElement("td");Ca.style.align="center";Ca.style.width="16px";var oa=document.createElement("img");oa.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);oa.setAttribute("title",
+mxResources.get(Ma?"hideIt":"show",[ya]));mxUtils.setOpacity(oa,Ma?75:25);oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";Ca.appendChild(oa);mxEvent.addListener(oa,"click",function(La){mxEvent.isShiftDown(La)?O(0<=mxUtils.indexOf(R.hiddenTags,ya)):(R.toggleHiddenTag(ya),T(),R.refresh());mxEvent.consume(La)});xa.appendChild(Ca);Ca=document.createElement("td");Ca.style.overflow="hidden";Ca.style.whiteSpace="nowrap";
+Ca.style.textOverflow="ellipsis";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.setAttribute("title",ya);a=document.createElement("a");mxUtils.write(a,ya);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);Ca.appendChild(a);mxEvent.addListener(Ca,"click",function(La){if(mxEvent.isShiftDown(La)){O(!0);var ta=R.getCellsForTags([ya],null,null,!0);R.isEnabled()?R.setSelectionCells(ta):R.highlightCells(ta)}else if(Ma&&0<R.hiddenTags.length)O(!0);else{ta=
+X.slice();var Da=mxUtils.indexOf(ta,ya);ta.splice(Da,1);R.setHiddenTags(ta);T();R.refresh()}mxEvent.consume(La)});xa.appendChild(Ca);if(R.isEnabled()){Ca=document.createElement("td");Ca.style.verticalAlign="middle";Ca.style.textAlign="center";Ca.style.width="18px";if(null==ra){Ca.style.align="center";Ca.style.width="16px";oa=document.createElement("img");oa.setAttribute("src",Editor.crossImage);oa.setAttribute("title",mxResources.get("removeIt",[ya]));mxUtils.setOpacity(oa,Ma?75:25);oa.style.verticalAlign=
+"middle";oa.style.cursor="pointer";oa.style.width="16px";if(D||Editor.isDarkMode())oa.style.filter="invert(100%)";mxEvent.addListener(oa,"click",function(La){var ta=mxUtils.indexOf(X,ya);0<=ta&&X.splice(ta,1);R.removeTagsForCells(R.model.getDescendants(R.model.getRoot()),[ya]);R.refresh();mxEvent.consume(La)});Ca.appendChild(oa)}else{var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.margin="0px";Aa.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,ya);Aa.checked=Aa.defaultChecked;
+Aa.style.background="transparent";Aa.setAttribute("title",mxResources.get(Aa.defaultChecked?"removeIt":"add",[ya]));mxEvent.addListener(Aa,"change",function(La){Aa.checked?R.addTagsForCells(R.getSelectionCells(),[ya]):R.removeTagsForCells(R.getSelectionCells(),[ya]);mxEvent.consume(La)});Ca.appendChild(Aa)}xa.appendChild(Ca)}Ga.appendChild(xa)})(fa[Fa]);ma.appendChild(Ga);Y.appendChild(ma)}}var R=this,X=R.hiddenTags.slice(),Z=document.createElement("div");Z.style.userSelect="none";Z.style.overflow=
+"hidden";Z.style.padding="10px";Z.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=R.isEnabled()?"1px solid #808080":"none";Y.style.bottom=R.isEnabled()?"48px":"10px";Z.appendChild(Y);var aa=mxUtils.button(mxResources.get("reset"),function(fa){R.setHiddenTags([]);mxEvent.isShiftDown(fa)||
+(X=R.hiddenTags.slice());T();R.refresh()});aa.setAttribute("title",mxResources.get("reset"));aa.className="geBtn";aa.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(X,function(fa){X=fa;ea()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";R.addListener(mxEvent.ROOT,function(){X=R.hiddenTags.slice()});var ea=mxUtils.bind(this,function(fa,ra){if(t()){fa=R.getAllTags();for(ra=0;ra<fa.length;ra++)0>mxUtils.indexOf(X,
+fa[ra])&&X.push(fa[ra]);X.sort();R.isSelectionEmpty()?P(X):P(X,R.getCommonTagsForCells(R.getSelectionCells()))}});R.selectionModel.addListener(mxEvent.CHANGE,ea);R.model.addListener(mxEvent.CHANGE,ea);R.addListener(mxEvent.REFRESH,ea);var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.whiteSpace="nowrap";ja.style.position="absolute";ja.style.overflow="hidden";ja.style.bottom="0px";ja.style.height="42px";ja.style.right="10px";ja.style.left="10px";R.isEnabled()&&(ja.appendChild(aa),
+ja.appendChild(ba),Z.appendChild(ja));return{div:Z,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var D in Graph.customFontElements){var L=Graph.customFontElements[D];t.push({name:L.name,url:L.url})}return t};Graph.prototype.setFont=function(t,D){Graph.addFont(t,D);document.execCommand("fontname",!1,t);if(null!=D){var L=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(t,D);for(var T=0;T<L.length;T++)L[T].getAttribute("face")==
+t&&L[T].getAttribute("data-font-src")!=D&&L[T].setAttribute("data-font-src",D)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var D in t)this.globalVars[D]=
+t[D]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var D=M.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[t]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,D,L,T,O,P,R,X,Z,Y,aa,ba,ea,ja){var fa=null,ra=null,ma=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(fa=this.stylesheet,ra=this.shapeForegroundColor,ma=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ga=G.apply(this,arguments),Fa=this.getCustomFonts();if(aa&&0<Fa.length){var ya=Ga.ownerDocument,Ma=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):ya.createElement("style");null!=ya.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var xa="",Ca="",oa=0;oa<Fa.length;oa++){var Aa=Fa[oa].name,La=Fa[oa].url;Graph.isCssFontUrl(La)?
+xa+="@import url("+La+");\n":Ca+='@font-face {\nfont-family: "'+Aa+'";\nsrc: url("'+La+'");\n}\n'}Ma.appendChild(ya.createTextNode(xa+Ca));Ga.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Ga),Editor.MathJaxRender(Ga),Ga.parentNode.removeChild(Ga));null!=fa&&(this.shapeBackgroundColor=ma,this.shapeForegroundColor=ra,this.stylesheet=fa,this.refresh());return Ga};var S=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){S.apply(this,
+arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var u=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){u.apply(this,arguments);this.enumerationState=0};var z=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return z.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var D="1"==mxUtils.getValue(t.style,"enumerate",0);D&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):D||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);D=t.secondLabel;if(null!=D){var L=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*L,t.y+4*L,0,0):mxRectangle.fromPoint(t.view.getPoint(t));D.bounds.equals(t)&&D.value==T&&D.scale==L||(D.bounds=t,D.value=T,D.scale=
+L,D.redraw())}};var F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var J=Graph.prototype.refresh;Graph.prototype.refresh=function(){J.apply(this,
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var K=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){K.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
-t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,C){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,R=0,O=0,P=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){N&&(N=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<R&&R--;0==R&&aa()}),aa=mxUtils.bind(this,function(){if(O<t.length){var Y=this.stoppingCustomActions,Z=t[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(P(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){P();var ea=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Z.hide&&(P(),ea=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(P(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(P(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ea=[];null!=Z.select&&this.isEnabled()&&(ea=this.getCellsForAction(Z.select),this.setSelectionCells(ea));null!=Z.highlight&&(ea=this.getCellsForAction(Z.highlight),this.highlightCells(ea,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(ea=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=Z.tags){ea=[];null!=Z.tags.hidden&&(ea=ea.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ma=this.getAllTags(),ia=0;ia<ma.length;ia++)0>mxUtils.indexOf(Z.tags.visible,ma[ia])&&0>mxUtils.indexOf(ea,ma[ia])&&ea.push(ma[ia]);this.setHiddenTags(ea);this.refresh()}0<ba.length&&(R++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay));
-0==R?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=C&&C()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,C){var N=this.getLinkForCell(C);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(t,N));if(this.isHtmlLabel(C)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var O=R.getElementsByTagName("a"),P=!1,S=0;S<O.length;S++)N=O[S].getAttribute("href"),null!=N&&"data:action/json,"==
-N.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(t,N)),P=!0);P&&this.labelChanged(C,R.innerHTML)}};Graph.prototype.updateCustomLink=function(t,C){if("data:action/json,"==C.substring(0,17))try{var N=JSON.parse(C.substring(17));null!=N.actions&&(this.updateCustomLinkActions(t,N.actions),C="data:action/json,"+JSON.stringify(N))}catch(R){}return C};Graph.prototype.updateCustomLinkActions=function(t,C){for(var N=0;N<C.length;N++){var R=C[N],O;for(O in R)this.updateCustomLinkAction(t,
-R[O],"cells"),this.updateCustomLinkAction(t,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,C,N){if(null!=C&&null!=C[N]){for(var R=[],O=0;O<C[N].length;O++)if("*"==C[N][O])R.push(C[N][O]);else{var P=t[C[N][O]];null!=P?""!=P&&R.push(P):R.push(C[N][O])}C[N]=R}};Graph.prototype.getCellsForAction=function(t,C){C=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,C));if(null!=t.excludeCells){for(var N=[],R=0;R<C.length;R++)0>t.excludeCells.indexOf(C[R].id)&&N.push(C[R]);
-C=N}return C};Graph.prototype.getCellsById=function(t){var C=[];if(null!=t)for(var N=0;N<t.length;N++)if("*"==t[N]){var R=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(P){return P!=R},R))}else{var O=this.model.getCell(t[N]);null!=O&&C.push(O)}return C};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(t){var C=mxUtils.indexOf(this.hiddenTags,t);0>C?this.hiddenTags.push(t):0<=C&&this.hiddenTags.splice(C,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var C=0;C<t.length;C++)if(0>mxUtils.indexOf(this.hiddenTags,t[C]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,C,N,
-R){var O=[];if(null!=t){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},X=0;X<t.length;X++)0<t[X].length&&(S[t[X]]=!0,P++);for(X=0;X<C.length;X++)if(N&&this.model.getParent(C[X])==this.model.root||this.model.isVertex(C[X])||this.model.isEdge(C[X])){var aa=this.getTagsForCell(C[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=t.length)){for(var Z=Y=0;Z<aa.length&&Y<P;Z++)null!=S[aa[Z]]&&Y++;Y=Y==P}Y&&(1!=R||this.isCellVisible(C[X]))&&O.push(C[X])}}return O};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var C=null,N=[],R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);N=[];if(0<O.length){O=O.split(" ");for(var P={},S=0;S<O.length;S++)if(null==C||null!=C[O[S]])P[O[S]]=!0,N.push(O[S]);C=P}else return[]}return N};Graph.prototype.getTagsForCells=function(t){for(var C=[],N={},R=0;R<t.length;R++){var O=this.getTagsForCell(t[R]);if(0<O.length){O=O.split(" ");for(var P=
-0;P<O.length;P++)null==N[O[P]]&&(N[O[P]]=!0,C.push(O[P]))}}return C};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var N=0;N<t.length;N++){for(var R=this.getTagsForCell(t[N]),O=R.split(" "),P=!1,S=0;S<C.length;S++){var X=mxUtils.trim(C[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(R=0<R.length?R+" "+X:X,P=!0)}P&&this.setAttributeForCell(t[N],"tags",R)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var N=0;N<t.length;N++){var R=this.getTagsForCell(t[N]);if(0<R.length){for(var O=R.split(" "),P=!1,S=0;S<C.length;S++){var X=mxUtils.indexOf(O,C[S]);0<=X&&(O.splice(X,1),P=!0)}P&&this.setAttributeForCell(t[N],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var C=0;C<t.length;C++)this.model.setVisible(t[C],!this.model.isVisible(t[C]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(t,C){this.model.beginUpdate();try{for(var N=0;N<t.length;N++)this.model.setVisible(t[N],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,C,N,R){for(var O=0;O<t.length;O++)this.highlightCell(t[O],C,N,R)};Graph.prototype.highlightCell=function(t,C,N,R,O){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;t=this.view.getState(t);var P=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,
-1)+O),P=new mxCellHighlight(this,C,O,!1),null!=R&&(P.opacity=R),P.highlight(t),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},N));return P};Graph.prototype.addSvgShadow=function(t,C,N,R){N=null!=N?N:!1;R=null!=R?R:!0;var O=t.ownerDocument,P=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");P.setAttribute("id",
-this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
-"offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=S[0];O.appendChild(P);N||(C=null!=C?C:t.getElementsByTagName("g")[0],
-null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&R&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),C=t.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,t.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(t,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C=
-null!=C?C:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),C&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),C=0;do var N=this.model.getChildAt(this.model.root,C);while(C++<t&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};
-mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
-[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
-STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
-[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=
-[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=
-[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
-mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];
-mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+
-"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
-[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
-[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
-[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var C=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?C="mxgraph.er":"sysML"==t.substring(0,5)&&(C="mxgraph.sysml"));return C};var Q=mxMarker.createMarker;mxMarker.createMarker=function(t,C,N,R,O,P,S,X,aa,Y){if(null!=N&&null==mxMarker.markers[N]){var Z=this.getPackageForType(N);null!=Z&&mxStencilRegistry.getStencil(Z)}return Q.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,
-C,N,R,O,P){"1"==mxUtils.getValue(C.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(t,C){function N(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function R(ta){function ra(Ka,Pa,Qa){var Oa=Ka.useCssTransforms,Sa=Ka.currentTranslate,Ua=Ka.currentScale,La=
-Ka.view.translate,Ta=Ka.view.scale;Ka.useCssTransforms&&(Ka.useCssTransforms=!1,Ka.currentTranslate=new mxPoint(0,0),Ka.currentScale=1,Ka.view.translate=new mxPoint(0,0),Ka.view.scale=1);var Va=Ka.getGraphBounds(),Wa=0,$a=0,Xa=Ia.get(),ab=1/Ka.pageScale,Za=Fa.checked;if(Za){ab=parseInt(Ha.value);var gb=parseInt(ya.value);ab=Math.min(Xa.height*gb/(Va.height/Ka.view.scale),Xa.width*ab/(Va.width/Ka.view.scale))}else ab=parseInt(na.value)/(100*Ka.pageScale),isNaN(ab)&&(wa=1/Ka.pageScale,na.value="100 %");
-Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*wa);Xa.height=Math.ceil(Xa.height*wa);ab*=wa;!Za&&Ka.pageVisible?(Va=Ka.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ka,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ma.checked&&(Pa.isCellVisible=function(Ya){return Ka.isCellSelected(Ya)});Wa=t.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
-(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ka.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
-(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
-Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ka.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ka,
-ab,Wa,$a,Qa,!0);Qa=Ka.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Oa&&(Ka.useCssTransforms=Oa,
-Ka.currentTranslate=Sa,Ka.currentScale=Ua,Ka.view.translate=La,Ka.view.scale=Ta);return Pa}var wa=parseInt(ka.value)/100;isNaN(wa)&&(wa=1,ka.value="100 %");wa*=.75;var ca=null,fa=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ha=ba.value,ja=ea.value,sa=!Y.checked,oa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,
-Y.checked,ha,ja,Fa.checked,Ha.value,ya.value,parseInt(na.value)/100,parseInt(ka.value)/100,Ia.get());else{sa&&(sa=ma.checked||ha==aa&&ja==aa);if(!sa&&null!=t.pages&&t.pages.length){var Ca=0;sa=t.pages.length-1;Y.checked||(Ca=parseInt(ha)-1,sa=parseInt(ja)-1);for(var Aa=Ca;Aa<=sa;Aa++){var ua=t.pages[Aa];ha=ua==t.currentPage?O:null;if(null==ha){ha=t.createTemporaryGraph(O.stylesheet);ha.shapeForegroundColor=O.shapeForegroundColor;ha.shapeBackgroundColor=O.shapeBackgroundColor;ja=!0;Ca=!1;var qa=null,
-Ja=null;null==ua.viewState&&null==ua.root&&t.updatePageRoot(ua);null!=ua.viewState&&(ja=ua.viewState.pageVisible,Ca=ua.viewState.mathEnabled,qa=ua.viewState.background,Ja=ua.viewState.backgroundImage,ha.extFonts=ua.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=t.createImageForPageLink(Ja.originalSrc,ua));ha.background=qa;ha.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ha.pageVisible=ja;ha.mathEnabled=Ca;var Na=ha.getGraphBounds;ha.getGraphBounds=function(){var Ka=
-Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ka};var Ra=ha.getGlobalVariable;ha.getGlobalVariable=function(Ka){return"page"==Ka?ua.getName():"pagenumber"==Ka?Aa+1:"pagecount"==Ka?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ha.container);t.updatePageRoot(ua);
-ha.model.setRoot(ua.root)}oa=ra(ha,oa,Aa!=sa);ha!=O&&ha.container.parentNode.removeChild(ha.container)}}else oa=ra(O);null==oa?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(oa.mathEnabled&&(sa=oa.wnd.document,ta&&(oa.wnd.IMMEDIATE_PRINT=!0),sa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),oa.closeDocument(),!oa.mathEnabled&&ta&&PrintDialog.printPreview(oa));null!=ca&&(O.shapeForegroundColor=fa,O.shapeBackgroundColor=da,O.stylesheet=
-ca,O.refresh())}}var O=t.editor.graph,P=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,C||mxResources.get("print"));P.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
-"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));S.appendChild(C);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");S.appendChild(C);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type",
-"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));S.appendChild(C);var ea=ba.cloneNode(!0);S.appendChild(ea);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",N);mxEvent.addListener(ea,"change",N);if(null!=t.pages&&(X=t.pages.length,null!=t.currentPage))for(C=0;C<t.pages.length;C++)if(t.currentPage==t.pages[C]){aa=
-C+1;ba.value=aa;ea.value=aa;break}ba.setAttribute("max",X);ea.setAttribute("max",X);t.isPagesEnabled()?1<X&&(P.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ma=document.createElement("input");ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.style.marginRight="8px";O.isSelectionEmpty()&&ma.setAttribute("disabled","disabled");var ia=document.createElement("div");ia.style.marginBottom="10px";1==X?(ma.setAttribute("type","checkbox"),ma.style.marginBottom="12px",ia.appendChild(ma)):
-(ma.setAttribute("name","pages-printdialog"),ma.style.marginBottom="8px",S.appendChild(ma));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));ma.parentNode.appendChild(C);1==X&&mxUtils.br(ma.parentNode);var pa=document.createElement("input");pa.style.marginRight="8px";pa.setAttribute("value","adjust");pa.setAttribute("type","radio");pa.setAttribute("name","printZoom");ia.appendChild(pa);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo"));
-ia.appendChild(C);var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","100 %");na.style.width="50px";ia.appendChild(na);mxEvent.addListener(na,"focus",function(){pa.checked=!0});P.appendChild(ia);S=S.cloneNode(!1);var Fa=pa.cloneNode(!0);Fa.setAttribute("value","fit");pa.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(Fa);S.appendChild(C);ia=
-document.createElement("table");ia.style.display="inline-block";var Ga=document.createElement("tbody"),xa=document.createElement("tr"),Ma=xa.cloneNode(!0),va=document.createElement("td"),Ea=va.cloneNode(!0),Ba=va.cloneNode(!0),za=va.cloneNode(!0),Da=va.cloneNode(!0),la=va.cloneNode(!0);va.style.textAlign="right";za.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));var Ha=document.createElement("input");Ha.style.cssText="margin:0 8px 0 8px;";Ha.setAttribute("value","1");Ha.setAttribute("min",
-"1");Ha.setAttribute("type","number");Ha.style.width="40px";Ea.appendChild(Ha);C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsAcross"));Ba.appendChild(C);mxUtils.write(za,mxResources.get("fitToBy"));var ya=Ha.cloneNode(!0);Da.appendChild(ya);mxEvent.addListener(Ha,"focus",function(){Fa.checked=!0});mxEvent.addListener(ya,"focus",function(){Fa.checked=!0});C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsDown"));la.appendChild(C);xa.appendChild(va);
-xa.appendChild(Ea);xa.appendChild(Ba);Ma.appendChild(za);Ma.appendChild(Da);Ma.appendChild(la);Ga.appendChild(xa);Ga.appendChild(Ma);ia.appendChild(Ga);S.appendChild(ia);P.appendChild(S);S=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));S.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(C,"printdialog",t.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));S.appendChild(C);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";S.appendChild(ka);P.appendChild(S);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&
-C.appendChild(S);t.isOffline()||(ia=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ia.className="geBtn",C.appendChild(ia));PrintDialog.previewEnabled&&(ia=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();R(!1)}),ia.className="geBtn",C.appendChild(ia));ia=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();R(!0)});ia.className="geBtn gePrimaryBtn";C.appendChild(ia);t.editor.cancelFirst||
-C.appendChild(S);P.appendChild(C);this.container=P};var T=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
-!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var t=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(C){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}Editor.prototype.useCanvasForExport=
+t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,T=0,O=0,P=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),R=mxUtils.bind(this,
+function(){L&&(L=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<T&&T--;0==T&&Z()}),Z=mxUtils.bind(this,function(){if(O<t.length){var Y=this.stoppingCustomActions,aa=t[O++],ba=[];if(null!=aa.open)if(R(),this.isCustomLink(aa.open)){if(!this.customLinkClicked(aa.open))return}else this.openLink(aa.open);null==aa.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=aa.wait?parseInt(aa.wait):1E3),R());null!=aa.opacity&&null!=aa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(aa.opacity,!0)),aa.opacity.value);null!=aa.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeIn,!0)),0,1,X,Y?0:aa.fadeIn.delay));null!=aa.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeOut,!0)),1,0,X,Y?0:aa.fadeOut.delay));null!=aa.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeIn,
+!0),!0)));null!=aa.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeOut,!0),!1)));null!=aa.toggle&&(P(),this.toggleCells(this.getCellsForAction(aa.toggle,!0)));if(null!=aa.show){P();var ea=this.getCellsForAction(aa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=aa.hide&&(P(),ea=this.getCellsForAction(aa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=aa.toggleStyle&&null!=
+aa.toggleStyle.key&&(P(),this.toggleCellStyles(aa.toggleStyle.key,null!=aa.toggleStyle.defaultValue?aa.toggleStyle.defaultValue:"0",this.getCellsForAction(aa.toggleStyle,!0)));null!=aa.style&&null!=aa.style.key&&(P(),this.setCellStyles(aa.style.key,aa.style.value,this.getCellsForAction(aa.style,!0)));ea=[];null!=aa.select&&this.isEnabled()&&(ea=this.getCellsForAction(aa.select),this.setSelectionCells(ea));null!=aa.highlight&&(ea=this.getCellsForAction(aa.highlight),this.highlightCells(ea,aa.highlight.color,
+aa.highlight.duration,aa.highlight.opacity));null!=aa.scroll&&(ea=this.getCellsForAction(aa.scroll));null!=aa.viewbox&&this.fitWindow(aa.viewbox,aa.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=aa.tags){ea=[];null!=aa.tags.hidden&&(ea=ea.concat(aa.tags.hidden));if(null!=aa.tags.visible)for(var ja=this.getAllTags(),fa=0;fa<ja.length;fa++)0>mxUtils.indexOf(aa.tags.visible,ja[fa])&&0>mxUtils.indexOf(ea,ja[fa])&&ea.push(ja[fa]);this.setHiddenTags(ea);this.refresh()}0<ba.length&&
+(T++,this.executeAnimations(ba,X,Y?1:aa.steps,Y?0:aa.delay));0==T?Z():R()}else this.stoppingCustomActions=this.executingCustomActions=!1,R(),null!=D&&D()});Z()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,D){var L=this.getLinkForCell(D);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(t,L));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=T.getElementsByTagName("a"),P=!1,R=0;R<
+O.length;R++)L=O[R].getAttribute("href"),null!=L&&"data:action/json,"==L.substring(0,17)&&(O[R].setAttribute("href",this.updateCustomLink(t,L)),P=!0);P&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,D){if("data:action/json,"==D.substring(0,17))try{var L=JSON.parse(D.substring(17));null!=L.actions&&(this.updateCustomLinkActions(t,L.actions),D="data:action/json,"+JSON.stringify(L))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(t,D){for(var L=0;L<
+D.length;L++){var T=D[L],O;for(O in T)this.updateCustomLinkAction(t,T[O],"cells"),this.updateCustomLinkAction(t,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,D,L){if(null!=D&&null!=D[L]){for(var T=[],O=0;O<D[L].length;O++)if("*"==D[L][O])T.push(D[L][O]);else{var P=t[D[L][O]];null!=P?""!=P&&T.push(P):T.push(D[L][O])}D[L]=T}};Graph.prototype.getCellsForAction=function(t,D){D=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,D));if(null!=t.excludeCells){for(var L=
+[],T=0;T<D.length;T++)0>t.excludeCells.indexOf(D[T].id)&&L.push(D[T]);D=L}return D};Graph.prototype.getCellsById=function(t){var D=[];if(null!=t)for(var L=0;L<t.length;L++)if("*"==t[L]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(P){return P!=T},T))}else{var O=this.model.getCell(t[L]);null!=O&&D.push(O)}return D};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};
+Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(t){var D=mxUtils.indexOf(this.hiddenTags,t);0>D?this.hiddenTags.push(t):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var D=0;D<t.length;D++)if(0>
+mxUtils.indexOf(this.hiddenTags,t[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,D,L,T){var O=[];if(null!=t){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var P=0,R={},X=0;X<t.length;X++)0<t[X].length&&(R[t[X]]=!0,P++);for(X=0;X<D.length;X++)if(L&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var Z=this.getTagsForCell(D[X]),Y=!1;if(0<Z.length&&(Z=Z.split(" "),Z.length>=t.length)){for(var aa=Y=0;aa<Z.length&&Y<
+P;aa++)null!=R[Z[aa]]&&Y++;Y=Y==P}Y&&(1!=T||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var D=null,L=[],T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);L=[];if(0<O.length){O=O.split(" ");for(var P={},R=0;R<O.length;R++)if(null==D||null!=D[O[R]])P[O[R]]=!0,L.push(O[R]);D=P}else return[]}return L};Graph.prototype.getTagsForCells=
+function(t){for(var D=[],L={},T=0;T<t.length;T++){var O=this.getTagsForCell(t[T]);if(0<O.length){O=O.split(" ");for(var P=0;P<O.length;P++)null==L[O[P]]&&(L[O[P]]=!0,D.push(O[P]))}}return D};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){for(var T=this.getTagsForCell(t[L]),O=T.split(" "),P=!1,R=0;R<D.length;R++){var X=mxUtils.trim(D[R]);
+""!=X&&0>mxUtils.indexOf(O,X)&&(T=0<T.length?T+" "+X:X,P=!0)}P&&this.setAttributeForCell(t[L],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,D){if(0<t.length&&0<D.length){this.model.beginUpdate();try{for(var L=0;L<t.length;L++){var T=this.getTagsForCell(t[L]);if(0<T.length){for(var O=T.split(" "),P=!1,R=0;R<D.length;R++){var X=mxUtils.indexOf(O,D[R]);0<=X&&(O.splice(X,1),P=!0)}P&&this.setAttributeForCell(t[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};
+Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var D=0;D<t.length;D++)this.model.setVisible(t[D],!this.model.isVisible(t[D]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,D){this.model.beginUpdate();try{for(var L=0;L<t.length;L++)this.model.setVisible(t[L],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,D,L,T){for(var O=0;O<t.length;O++)this.highlightCell(t[O],D,L,T)};Graph.prototype.highlightCell=function(t,D,
+L,T,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;t=this.view.getState(t);var P=null;null!=t&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+O),P=new mxCellHighlight(this,D,O,!1),null!=T&&(P.opacity=T),P.highlight(t),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},L));return P};Graph.prototype.addSvgShadow=
+function(t,D,L,T){L=null!=L?L:!1;T=null!=T?T:!0;var O=t.ownerDocument,P=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");P.setAttribute("id",this.shadowId);var R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");R.setAttribute("in","SourceAlpha");R.setAttribute("stdDeviation",this.svgShadowBlur);R.setAttribute("result","blur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"feOffset"):O.createElement("feOffset");R.setAttribute("in","blur");R.setAttribute("dx",this.svgShadowSize);R.setAttribute("dy",this.svgShadowSize);R.setAttribute("result","offsetBlur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");R.setAttribute("flood-color",this.svgShadowColor);R.setAttribute("flood-opacity",this.svgShadowOpacity);R.setAttribute("result","offsetColor");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"feComposite"):O.createElement("feComposite");R.setAttribute("in","offsetColor");R.setAttribute("in2","offsetBlur");R.setAttribute("operator","in");R.setAttribute("result","offsetBlur");P.appendChild(R);R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");R.setAttribute("in","SourceGraphic");R.setAttribute("in2","offsetBlur");P.appendChild(R);R=t.getElementsByTagName("defs");0==R.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"defs"):O.createElement("defs"),null!=t.firstChild?t.insertBefore(O,t.firstChild):t.appendChild(O)):O=R[0];O.appendChild(P);L||(D=null!=D?D:t.getElementsByTagName("g")[0],null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),D=t.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=
+parseFloat(D[3])+6,t.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(t,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=null!=D?D:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),
+D=0;do var L=this.model.getChildAt(this.model.root,D);while(D++<t&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+
+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=
+[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=
+[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=
+[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=
+[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];
+mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+
+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
+[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
+STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var D=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?D="mxgraph.er":"sysML"==t.substring(0,5)&&(D="mxgraph.sysml"));return D};var N=mxMarker.createMarker;mxMarker.createMarker=function(t,D,L,T,O,P,R,X,Z,Y){if(null!=L&&null==mxMarker.markers[L]){var aa=this.getPackageForType(L);null!=
+aa&&mxStencilRegistry.getStencil(aa)}return N.apply(this,arguments)};var U=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,D,L,T,O,P){"1"==mxUtils.getValue(D.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return U.apply(this,arguments)};PrintDialog.prototype.create=function(t,D){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),
+parseInt(ba.value))))}function T(da){function ca(Ia,Pa,Qa){var Oa=Ia.useCssTransforms,Sa=Ia.currentTranslate,Ua=Ia.currentScale,Ka=Ia.view.translate,Ta=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Va=Ia.getGraphBounds(),Wa=0,$a=0,Xa=Ja.get(),ab=1/Ia.pageScale,Za=Ga.checked;if(Za){ab=parseInt(Da.value);var gb=parseInt(wa.value);ab=Math.min(Xa.height*gb/(Va.height/Ia.view.scale),
+Xa.width*ab/(Va.width/Ia.view.scale))}else ab=parseInt(ma.value)/(100*Ia.pageScale),isNaN(ab)&&(na=1/Ia.pageScale,ma.value="100 %");Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ia.pageVisible?(Va=Ia.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Pa){Pa=PrintDialog.createPrintPreview(Ia,ab,Xa,0,Wa,$a,Za);Pa.pageSelector=!1;Pa.mathEnabled=!1;ja.checked&&(Pa.isCellVisible=function(Ya){return Ia.isCellSelected(Ya)});
+Wa=t.getCurrentFile();null!=Wa&&(Pa.title=Wa.getTitle());var hb=Pa.writeHead;Pa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ia.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,
+db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Pa.renderPage;Pa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?
+this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Pa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,
+O.refresh())}else{Xa=Ia.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Pa.backgroundColor=Xa;Pa.autoOrigin=Za;Pa.appendGraph(Ia,ab,Wa,$a,Qa,!0);Qa=Ia.getCustomFonts();if(null!=Pa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Pa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Pa.wnd.document.writeln('<style type="text/css">'),Pa.wnd.document.writeln('@font-face {\nfont-family: "'+
+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Pa.wnd.document.writeln("</style>"))}Oa&&(Ia.useCssTransforms=Oa,Ia.currentTranslate=Sa,Ia.currentScale=Ua,Ia.view.translate=Ka,Ia.view.scale=Ta);return Pa}var na=parseInt(ka.value)/100;isNaN(na)&&(na=1,ka.value="100 %");na*=.75;var la=null,qa=O.shapeForegroundColor,ha=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(la=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",
+O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,pa=ea.value,va=!Y.checked,za=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,Y.checked,ia,pa,Ga.checked,Da.value,wa.value,parseInt(ma.value)/100,parseInt(ka.value)/100,Ja.get());else{va&&(va=ja.checked||ia==Z&&pa==Z);if(!va&&null!=t.pages&&t.pages.length){var Ea=0;va=t.pages.length-1;Y.checked||(Ea=parseInt(ia)-1,va=parseInt(pa)-1);for(var Ba=Ea;Ba<=va;Ba++){var ua=t.pages[Ba];ia=ua==t.currentPage?O:null;if(null==ia){ia=t.createTemporaryGraph(O.stylesheet);
+ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;pa=!0;Ea=!1;var sa=null,Ha=null;null==ua.viewState&&null==ua.root&&t.updatePageRoot(ua);null!=ua.viewState&&(pa=ua.viewState.pageVisible,Ea=ua.viewState.mathEnabled,sa=ua.viewState.background,Ha=ua.viewState.backgroundImage,ia.extFonts=ua.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=t.createImageForPageLink(Ha.originalSrc,ua));ia.background=sa;ia.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,
+Ha.height,Ha.x,Ha.y):null;ia.pageVisible=pa;ia.mathEnabled=Ea;var Na=ia.getGraphBounds;ia.getGraphBounds=function(){var Ia=Na.apply(this,arguments),Pa=this.backgroundImage;if(null!=Pa&&null!=Pa.width&&null!=Pa.height){var Qa=this.view.translate,Oa=this.view.scale;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Qa.x+Pa.x)*Oa,(Qa.y+Pa.y)*Oa,Pa.width*Oa,Pa.height*Oa))}return Ia};var Ra=ia.getGlobalVariable;ia.getGlobalVariable=function(Ia){return"page"==Ia?ua.getName():"pagenumber"==Ia?Ba+1:
+"pagecount"==Ia?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(ia.container);t.updatePageRoot(ua);ia.model.setRoot(ua.root)}za=ca(ia,za,Ba!=va);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else za=ca(O);null==za?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(za.mathEnabled&&(va=za.wnd.document,da&&(za.wnd.IMMEDIATE_PRINT=!0),va.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),za.closeDocument(),
+!za.mathEnabled&&da&&PrintDialog.printPreview(za));null!=la&&(O.shapeForegroundColor=qa,O.shapeBackgroundColor=ha,O.stylesheet=la,O.refresh())}}var O=t.editor.graph,P=document.createElement("div"),R=document.createElement("h3");R.style.width="100%";R.style.textAlign="center";R.style.marginTop="0px";mxUtils.write(R,D||mxResources.get("print"));P.appendChild(R);var X=1,Z=1;R=document.createElement("div");R.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=
+document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");R.appendChild(Y);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));R.appendChild(D);mxUtils.br(R);var aa=Y.cloneNode(!0);Y.setAttribute("checked","checked");aa.setAttribute("value","range");R.appendChild(aa);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+
+":");R.appendChild(D);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="50px";R.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));R.appendChild(D);var ea=ba.cloneNode(!0);R.appendChild(ea);mxEvent.addListener(ba,"focus",function(){aa.checked=!0});mxEvent.addListener(ea,"focus",function(){aa.checked=!0});mxEvent.addListener(ba,"change",
+L);mxEvent.addListener(ea,"change",L);if(null!=t.pages&&(X=t.pages.length,null!=t.currentPage))for(D=0;D<t.pages.length;D++)if(t.currentPage==t.pages[D]){Z=D+1;ba.value=Z;ea.value=Z;break}ba.setAttribute("max",X);ea.setAttribute("max",X);t.isPagesEnabled()?1<X&&(P.appendChild(R),aa.checked=!0):aa.checked=!0;mxUtils.br(R);var ja=document.createElement("input");ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.style.marginRight="8px";O.isSelectionEmpty()&&ja.setAttribute("disabled",
+"disabled");var fa=document.createElement("div");fa.style.marginBottom="10px";1==X?(ja.setAttribute("type","checkbox"),ja.style.marginBottom="12px",fa.appendChild(ja)):(ja.setAttribute("name","pages-printdialog"),ja.style.marginBottom="8px",R.appendChild(ja));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ja.parentNode.appendChild(D);1==X&&mxUtils.br(ja.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");
+ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");fa.appendChild(ra);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));fa.appendChild(D);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="50px";fa.appendChild(ma);mxEvent.addListener(ma,"focus",function(){ra.checked=!0});P.appendChild(fa);R=R.cloneNode(!1);var Ga=ra.cloneNode(!0);Ga.setAttribute("value","fit");ra.setAttribute("checked",
+"checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(Ga);R.appendChild(D);fa=document.createElement("table");fa.style.display="inline-block";var Fa=document.createElement("tbody"),ya=document.createElement("tr"),Ma=ya.cloneNode(!0),xa=document.createElement("td"),Ca=xa.cloneNode(!0),oa=xa.cloneNode(!0),Aa=xa.cloneNode(!0),La=xa.cloneNode(!0),ta=xa.cloneNode(!0);xa.style.textAlign="right";Aa.style.textAlign="right";mxUtils.write(xa,
+mxResources.get("fitTo"));var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("min","1");Da.setAttribute("type","number");Da.style.width="40px";Ca.appendChild(Da);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));oa.appendChild(D);mxUtils.write(Aa,mxResources.get("fitToBy"));var wa=Da.cloneNode(!0);La.appendChild(wa);mxEvent.addListener(Da,"focus",function(){Ga.checked=!0});mxEvent.addListener(wa,
+"focus",function(){Ga.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));ta.appendChild(D);ya.appendChild(xa);ya.appendChild(Ca);ya.appendChild(oa);Ma.appendChild(Aa);Ma.appendChild(La);Ma.appendChild(ta);Fa.appendChild(ya);Fa.appendChild(Ma);fa.appendChild(Fa);R.appendChild(fa);P.appendChild(R);R=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));
+R.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var Ja=PageSetupDialog.addPageFormatPanel(D,"printdialog",t.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);R.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));R.appendChild(D);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";R.appendChild(ka);P.appendChild(R);D=document.createElement("div");
+D.style.cssText="text-align:right;margin:48px 0 0 0;";R=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});R.className="geBtn";t.editor.cancelFirst&&D.appendChild(R);t.isOffline()||(fa=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),fa.className="geBtn",D.appendChild(fa));PrintDialog.previewEnabled&&(fa=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),fa.className="geBtn",D.appendChild(fa));
+fa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});fa.className="geBtn gePrimaryBtn";D.appendChild(fa);t.editor.cancelFirst||D.appendChild(R);P.appendChild(D);this.container=P};var Q=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=
+this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Q.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),
+null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var t=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(D){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,n,q,p,A){p=null!=p?p:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var E=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=E+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
-encodeURIComponent(n):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(z){}try{A||null==window.console||console.error(p,d,g,k,n,q)}catch(z){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,n,q,p,y){p=null!=p?p:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==g||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var A=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=A+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(C){}try{y||null==window.console||console.error(p,d,g,k,n,q)}catch(C){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=
function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,
d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
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=
@@ -11449,117 +11451,117 @@ g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.leng
EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=q.spin;q.spin=function(E,z){var B=!1;this.active||(p.call(this,E),this.active=!0,null!=z&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=q.spin;q.spin=function(A,C){var B=!1;this.active||(p.call(this,A),this.active=!0,null!=C&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),B=document.createElement("div"),
B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,d)+"px",B.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),B.innerHTML=z,E.appendChild(B),q.status=B),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(E,z)}));this.stop();return J}),B=!0);return B};var A=q.stop;q.stop=function(){A.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=C.substring(C.length-3,C.length)&&"!"!=C.charAt(C.length-1)&&(C+="..."),B.innerHTML=C,A.appendChild(B),q.status=B),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(A,C)}));this.stop();return I}),B=!0);return B};var y=q.stop;q.stop=function(){y.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
return q};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,q=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var A=q.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<A&&q.movePage(A,A-1)};if(38==p.keyCode)return function(){0<A&&q.movePage(A,0)};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A,
-A+1)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.movePage(A,q.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<A&&q.selectNextPage(!1)};if(38==p.keyCode)return function(){0<A&&q.selectPage(q.pages[0])};if(39==p.keyCode)return function(){A<q.pages.length-1&&q.selectNextPage(!0)};if(40==p.keyCode)return function(){A<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
+EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,q=this;g.getFunction=function(p){if(n.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var y=q.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<y&&q.movePage(y,y-1)};if(38==p.keyCode)return function(){0<y&&q.movePage(y,0)};if(39==p.keyCode)return function(){y<q.pages.length-1&&q.movePage(y,
+y+1)};if(40==p.keyCode)return function(){y<q.pages.length-1&&q.movePage(y,q.pages.length-1)}}else if(mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)){if(37==p.keyCode)return function(){0<y&&q.selectNextPage(!1)};if(38==p.keyCode)return function(){0<y&&q.selectPage(q.pages[0])};if(39==p.keyCode)return function(){y<q.pages.length-1&&q.selectNextPage(!0)};if(40==p.keyCode)return function(){y<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=p.keyCode&&90>=p.keyCode)||
n.isSelectionEmpty()||mxEvent.isAltDown(p)||mxEvent.isShiftDown(p)||mxEvent.isControlDown(p)||mxClient.IS_MAC&&mxEvent.isMetaDown(p)?k.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("&lt;mxfile ");if(0<=k){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>k&&(g=d.substring(k,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var q=mxUtils.parseXml(d),p=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+""))}else{var q=mxUtils.parseXml(d),p=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=p?mxUtils.getXml(p):""}}catch(y){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=n.length-1;0<=q;q--){var p=this.updatePageRoot(new DiagramPage(n[q]));null==p.getName()&&
p.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,p,0==q?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=k)for(q=0;q<k.length;q++)g.model.execute(new ChangePage(this,k[q],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,q,p,A,E,z,B,J){g=null!=g?g:this.editor.graph;q=null!=q?q:!1;z=null!=z?z:!0;var M=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else M=v=n;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var G=d.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());
-G.appendChild(d)}else{G=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(G);if(Graph.decompress(u)!=G)return G;G=d.ownerDocument.createElement("diagram");G.setAttribute("id",Editor.guid());mxUtils.setTextContent(G,u)}u=d.ownerDocument.createElement("mxfile");u.appendChild(G)}B?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):
-(u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,
-null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!p&&!q&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,v,M);else if(p||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),J=this.getEmbeddedSvg(J,g,n,null,E,z,M);return J};EditorUi.prototype.getXmlFileData=
-function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var q=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(z){var B=z.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&z.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,
-Graph.compressNode(B)));q.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],A=p.node;if(p!=this.currentPage)if(p.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,E,null,n);EditorUi.removeChildNodes(A);mxUtils.setTextContent(A,
-Graph.compressNode(E));delete p.needsUpdate}else n&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),
-E=E.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,E,null,n),A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(E))));d(A)}return q};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var q=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+if(null!=k)for(q=0;q<k.length;q++)g.model.execute(new ChangePage(this,k[q],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,q,p,y,A,C,B,I){g=null!=g?g:this.editor.graph;q=null!=q?q:!1;C=null!=C?C:!0;var M=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var G="_blank";else M=G=n;if(null==d)return"";var S=d;if("mxfile"!=S.nodeName.toLowerCase()){if(I){var u=d.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());
+u.appendChild(d)}else{u=Graph.zapGremlins(mxUtils.getXml(d));S=Graph.compress(u);if(Graph.decompress(S)!=u)return u;u=d.ownerDocument.createElement("diagram");u.setAttribute("id",Editor.guid());mxUtils.setTextContent(u,S)}S=d.ownerDocument.createElement("mxfile");S.appendChild(u)}B?(S=S.cloneNode(!0),S.removeAttribute("modified"),S.removeAttribute("host"),S.removeAttribute("agent"),S.removeAttribute("etag"),S.removeAttribute("userAgent"),S.removeAttribute("version"),S.removeAttribute("editor"),S.removeAttribute("type")):
+(S.removeAttribute("userAgent"),S.removeAttribute("version"),S.removeAttribute("editor"),S.removeAttribute("pages"),S.removeAttribute("type"),mxClient.IS_CHROMEAPP?S.setAttribute("host","Chrome"):EditorUi.isElectronApp?S.setAttribute("host","Electron"):S.setAttribute("host",window.location.hostname),S.setAttribute("modified",(new Date).toISOString()),S.setAttribute("agent",navigator.appVersion),S.setAttribute("version",EditorUi.VERSION),S.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,
+null!=d&&S.setAttribute("type",d),1<S.getElementsByTagName("diagram").length&&null!=this.pages&&S.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(S):mxUtils.getXml(S);if(!p&&!q&&(y||null!=k&&/(\.html)$/i.test(k.getTitle())))I=this.getHtml2(mxUtils.getXml(S),g,null!=k?k.getTitle():null,G,M);else if(p||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),I=this.getEmbeddedSvg(I,g,n,null,A,C,M);return I};EditorUi.prototype.getXmlFileData=
+function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var q=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(C){var B=C.getElementsByTagName("mxGraphModel");B=0<B.length?B[0]:null;null==B&&k?(B=mxUtils.trim(mxUtils.getTextContent(C)),C=C.cloneNode(!1),0<B.length&&(B=Graph.decompress(B),null!=B&&0<B.length&&C.appendChild(mxUtils.parseXml(B).documentElement))):null==B||k?C=C.cloneNode(!0):(C=C.cloneNode(!1),mxUtils.setTextContent(C,
+Graph.compressNode(B)));q.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var p=this.pages[g],y=p.node;if(p!=this.currentPage)if(p.needsUpdate){var A=new mxCodec(mxUtils.createXmlDocument());A=A.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,A,null,n);EditorUi.removeChildNodes(y);mxUtils.setTextContent(y,
+Graph.compressNode(A));delete p.needsUpdate}else n&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(A=new mxCodec(mxUtils.createXmlDocument()),
+A=A.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,A,null,n),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(A))));d(y)}return q};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var q=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
/\s/.test(q)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(p){d[EditorUi.DIFF_INSERT][g].data=
-p.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][n];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(g=mxUtils.bind(this,function(p){var A=q.cells[p];if(null!=A){for(var E in A)null!=A[E].value&&(A[E].value="["+A[E].value.length+"]"),null!=A[E].xmlValue&&(A[E].xmlValue="["+A[E].xmlValue.length+"]"),null!=A[E].style&&(A[E].style="["+A[E].style.length+"]"),mxUtils.isEmptyObject(A[E])&&delete A[E];mxUtils.isEmptyObject(A)&&
+p.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][n];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(g=mxUtils.bind(this,function(p){var y=q.cells[p];if(null!=y){for(var A in y)null!=y[A].value&&(y[A].value="["+y[A].value.length+"]"),null!=y[A].xmlValue&&(y[A].xmlValue="["+y[A].xmlValue.length+"]"),null!=y[A].style&&(y[A].style="["+y[A].style.length+"]"),mxUtils.isEmptyObject(y[A])&&delete y[A];mxUtils.isEmptyObject(y)&&
delete q.cells[p]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=
0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=
g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
-this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,q,p,A,E,z,B,J){q=null!=q?q:!0;p=null!=p?p:!1;var M=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var v=
-null!=M.themes&&"darkTheme"==M.defaultThemeName;B=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var u=M.getGlobalVariable;M=this.createTemporaryGraph(v?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var G=this.pages[0];this.currentPage==G?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&M.setBackgroundImage(G.viewState.backgroundImage);M.getGlobalVariable=
-function(I){return"page"==I?G.getName():"pagenumber"==I?1:u.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(G.root)}}A=null!=A?A:this.getXmlFileData(q,p,B,J);z=null!=z?z:this.getCurrentFile();d=this.createFileData(A,M,z,window.location.href,d,g,k,n,q,E,B);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,q,p){p=null!=p?p:!0;var A=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=
-p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var z=g.view.scale;p=Math.floor(A.x/z-g.view.translate.x);z=Math.floor(A.y/z-g.view.translate.y);A=g.background;null==q&&(g=this.getBasenames().join(";"),0<g.length&&(E=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",p);d.setAttribute("y0",z)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",
+this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,q,p,y,A,C,B,I){q=null!=q?q:!0;p=null!=p?p:!1;var M=this.editor.graph;if(g||!d&&null!=C&&/(\.svg)$/i.test(C.getTitle())){var G=
+null!=M.themes&&"darkTheme"==M.defaultThemeName;B=!1;if(G||null!=this.pages&&this.currentPage!=this.pages[0]){var S=M.getGlobalVariable;M=this.createTemporaryGraph(G?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var u=this.pages[0];this.currentPage==u?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&M.setBackgroundImage(u.viewState.backgroundImage);M.getGlobalVariable=
+function(z){return"page"==z?u.getName():"pagenumber"==z?1:S.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(u.root)}}y=null!=y?y:this.getXmlFileData(q,p,B,I);C=null!=C?C:this.getCurrentFile();d=this.createFileData(y,M,C,window.location.href,d,g,k,n,q,A,B);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,q,p){p=null!=p?p:!0;var y=null,A=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){y=
+p?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var C=g.view.scale;p=Math.floor(y.x/C-g.view.translate.x);C=Math.floor(y.y/C-g.view.translate.y);y=g.background;null==q&&(g=this.getBasenames().join(";"),0<g.length&&(A=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",p);d.setAttribute("y0",C)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=n&&d.setAttribute("edit",
n));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
-q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+A+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,n,q){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+
g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var n=0;n<d.length;n++)null==d[n].getAttribute("id")&&d[n].setAttribute("id",n),g=new DiagramPage(d[n]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
[n+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");g={};for(n=0;n<q.length;n++)g[q[n]]=!0;var p=this.editor.graph.getModel(),A=p.getChildren(p.root);for(n=0;n<A.length;n++){var E=A[n];p.setVisible(E,g[E.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
-/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,n,q,p,A,E,z,B,J,M){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==d?
-!1:!q),u=v+("xml"==d||"pdf"==d&&J?".drawio":"")+"."+d;if("xml"==d){var G=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,q,null,null,null,g);this.saveData(u,d,G,"text/xml")}else if("html"==d)G=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(u,d,G,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=v+".png";else if("jpeg"==d)u=v+".jpg";else if("remoteSvg"==d){u=v+".svg";d="svg";var I=parseInt(z);
-"string"===typeof E&&0<E.indexOf("%")&&(E=parseInt(E)/100);if(0<I){var F=this.editor.graph,L=F.getGraphBounds();var K=Math.ceil(L.width*E/F.view.scale+2*I);var H=Math.ceil(L.height*E/F.view.scale+2*I)}}this.saveRequest(u,d,mxUtils.bind(this,function(W,t){try{var C=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var N=this.createDownloadRequest(W,d,n,t,A,q,E,z,B,J,M,K,H);this.editor.graph.pageVisible=C;return N}catch(R){this.handleError(R)}}))}else{var Q=null,U=mxUtils.bind(this,
-function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}))});if("svg"==d){var T=this.editor.graph.background;if(A||T==mxConstants.NONE)T=null;var V=this.editor.graph.getSvg(T,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else u=v+".svg",Q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,q,p,A,E,z,B,J,M,v){var u=this.editor.graph,G=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var I="",F="";if(G.width*G.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-B=B?"1":"0";"pdf"==g&&(null!=J?F="&from="+J.from+"&to="+J.to:0==p&&(F="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){I="&from="+p;break}p=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!q?q||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;q={globalVars:u.getExportVariables()};z&&(q.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&
-(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+I+F+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=A?"&scale="+A:"")+(null!=E?"&border="+E:"")+(M&&isFinite(M)?"&w="+M:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var n=
-window.location.hash,q=mxUtils.bind(this,function(A){var E=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<E.length&&(E+="\n"),E+=A);A=new LocalFile(this,"csv"!=d.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==d.format&&this.importCsv(E,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var z=
-null!=d.interval?parseInt(d.interval):6E4,B=null,J=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(u){v===this.currentPage&&(200<=u.getStatus()&&300>=u.getStatus()?(this.updateDiagram(u.getText()),M()):this.handleError({message:mxResources.get("error")+" "+u.getStatus()}))}),mxUtils.bind(this,function(u){this.handleError(u)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(B);
-B=window.setTimeout(J,z)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();J()}));M();J()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var p=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(p,mxUtils.bind(this,function(A){q(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else q("")};EditorUi.prototype.updateDiagram=function(d){function g(H){var Q=new mxCellOverlay(H.image||q.warningImage,H.tooltip,H.align,H.valign,H.offset);Q.addListener(mxEvent.CLICK,function(U,
-T){n.alert(H.tooltip)});return Q}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,p=q.getModel();p.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var E=p.getCell(d.getAttribute("id"));if(null!=E){try{var z=d.getAttribute("value");if(null!=z){var B=mxUtils.parseXml(z).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(E,B);else for(var J=
-B.attributes,M=0;M<J.length;M++)q.setAttributeForCell(E,J[M].nodeName,0<J[M].nodeValue.length?J[M].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+E.id+": "+H)}try{var v=d.getAttribute("style");null!=v&&q.model.setStyle(E,v)}catch(H){null!=window.console&&console.log("Error in style for "+E.id+": "+H)}try{var u=d.getAttribute("icon");if(null!=u){var G=0<u.length?JSON.parse(u):null;null!=G&&G.append||q.removeCellOverlays(E);null!=G&&q.addCellOverlay(E,g(G))}}catch(H){null!=
-window.console&&console.log("Error in icon for "+E.id+": "+H)}try{var I=d.getAttribute("geometry");if(null!=I){I=JSON.parse(I);var F=q.getCellGeometry(E);if(null!=F){F=F.clone();for(key in I){var L=parseFloat(I[key]);"dx"==key?F.x+=L:"dy"==key?F.y+=L:"dw"==key?F.width+=L:"dh"==key?F.height+=L:F[key]=parseFloat(I[key])}q.model.setGeometry(E,F)}}}catch(H){null!=window.console&&console.log("Error in icon for "+E.id+": "+H)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
-K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,p)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{p.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,
-A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var q=new Date;k=q.getFullYear();n=q.getMonth()+1;var p=q.getDate(),A=q.getHours(),E=q.getMinutes();q=q.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+A+"-"+E+"-"+q))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");g={};for(n=0;n<q.length;n++)g[q[n]]=!0;var p=this.editor.graph.getModel(),y=p.getChildren(p.root);for(n=0;n<y.length;n++){var A=y[n];p.setVisible(A,g[A.id]||!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||
+/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,n,q,p,y,A,C,B,I,M){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var G=this.getBaseFilename("remoteSvg"==d?
+!1:!q),S=G+("xml"==d||"pdf"==d&&I?".drawio":"")+"."+d;if("xml"==d){var u=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,q,null,null,null,g);this.saveData(S,d,u,"text/xml")}else if("html"==d)u=this.getHtml2(this.getFileData(!0),this.editor.graph,G),this.saveData(S,d,u,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)S=G+".png";else if("jpeg"==d)S=G+".jpg";else if("remoteSvg"==d){S=G+".svg";d="svg";var z=parseInt(C);
+"string"===typeof A&&0<A.indexOf("%")&&(A=parseInt(A)/100);if(0<z){var F=this.editor.graph,J=F.getGraphBounds();var K=Math.ceil(J.width*A/F.view.scale+2*z);var H=Math.ceil(J.height*A/F.view.scale+2*z)}}this.saveRequest(S,d,mxUtils.bind(this,function(W,t){try{var D=this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var L=this.createDownloadRequest(W,d,n,t,y,q,A,C,B,I,M,K,H);this.editor.graph.pageVisible=D;return L}catch(T){this.handleError(T)}}))}else{var N=null,U=mxUtils.bind(this,
+function(W){W.length<=MAX_REQUEST_SIZE?this.saveData(S,"svg",W,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});if("svg"==d){var Q=this.editor.graph.background;if(y||Q==mxConstants.NONE)Q=null;var V=this.editor.graph.getSvg(Q,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(W){this.spinner.stop();U(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(W))})))}else S=G+".svg",N=this.getFileData(!1,!0,null,mxUtils.bind(this,function(W){this.spinner.stop();U(W)}),n)}}catch(W){this.handleError(W)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,q,p,y,A,C,B,I,M,G){var S=this.editor.graph,u=S.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==p?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var z="",F="";if(u.width*u.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+B=B?"1":"0";"pdf"==g&&(null!=I?F="&from="+I.from+"&to="+I.to:0==p&&(F="&allPages=1"));"xmlpng"==g&&(B="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){z="&from="+p;break}p=S.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!q?q||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;q={globalVars:S.getExportVariables()};C&&(q.grid={size:S.gridSize,steps:S.view.gridSteps,color:S.view.gridColor});Graph.translateDiagram&&
+(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+z+F+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+n+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=y?"&scale="+y:"")+(null!=A?"&border="+A:"")+(M&&isFinite(M)?"&w="+M:"")+(G&&isFinite(G)?"&h="+G:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var n=
+window.location.hash,q=mxUtils.bind(this,function(y){var A=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<A.length&&(A+="\n"),A+=y);y=new LocalFile(this,"csv"!=d.format&&0<A.length?A:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return n};this.fileLoaded(y);"csv"==d.format&&this.importCsv(A,mxUtils.bind(this,function(G){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=
+null!=d.interval?parseInt(d.interval):6E4,B=null,I=mxUtils.bind(this,function(){var G=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(S){G===this.currentPage&&(200<=S.getStatus()&&300>=S.getStatus()?(this.updateDiagram(S.getText()),M()):this.handleError({message:mxResources.get("error")+" "+S.getStatus()}))}),mxUtils.bind(this,function(S){this.handleError(S)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(B);
+B=window.setTimeout(I,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();I()}));M();I()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var p=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(p,mxUtils.bind(this,function(y){q(y)}),mxUtils.bind(this,function(y){null!=k&&k(y)}))}else q("")};EditorUi.prototype.updateDiagram=function(d){function g(H){var N=new mxCellOverlay(H.image||q.warningImage,H.tooltip,H.align,H.valign,H.offset);N.addListener(mxEvent.CLICK,function(U,
+Q){n.alert(H.tooltip)});return N}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,p=q.getModel();p.beginUpdate();var y=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var A=p.getCell(d.getAttribute("id"));if(null!=A){try{var C=d.getAttribute("value");if(null!=C){var B=mxUtils.parseXml(C).documentElement;if(null!=B)if("1"==B.getAttribute("replace-value"))p.setValue(A,B);else for(var I=
+B.attributes,M=0;M<I.length;M++)q.setAttributeForCell(A,I[M].nodeName,0<I[M].nodeValue.length?I[M].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+A.id+": "+H)}try{var G=d.getAttribute("style");null!=G&&q.model.setStyle(A,G)}catch(H){null!=window.console&&console.log("Error in style for "+A.id+": "+H)}try{var S=d.getAttribute("icon");if(null!=S){var u=0<S.length?JSON.parse(S):null;null!=u&&u.append||q.removeCellOverlays(A);null!=u&&q.addCellOverlay(A,g(u))}}catch(H){null!=
+window.console&&console.log("Error in icon for "+A.id+": "+H)}try{var z=d.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var F=q.getCellGeometry(A);if(null!=F){F=F.clone();for(key in z){var J=parseFloat(z[key]);"dx"==key?F.x+=J:"dy"==key?F.y+=J:"dw"==key?F.width+=J:"dh"==key?F.height+=J:F[key]=parseFloat(z[key])}q.model.setGeometry(A,F)}}}catch(H){null!=window.console&&console.log("Error in icon for "+A.id+": "+H)}}}else if("model"==d.nodeName){for(var K=d.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
+K.nextSibling;null!=K&&(new mxCodec(d.firstChild)).decode(K,p)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(y=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{p.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
+y)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var q=new Date;k=q.getFullYear();n=q.getMonth()+1;var p=q.getDate(),y=q.getHours(),A=q.getMinutes();q=q.getSeconds();k=g+(" "+(k+"-"+n+"-"+p+"-"+y+"-"+A+"-"+q))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=
this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&
(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();
delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=d.getMode()){var p="1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),
-action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(A){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(A){}}catch(A){this.fileLoadedError=
-A;if(null!=d)try{d.close()}catch(E){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+A.message,label:"stack_"+A.stack})}catch(E){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||q():q()});g?d():this.handleError(A,mxResources.get("errorLoadingFile"),d,!0,null,null,
-!0)}else q();return n};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,q=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<d.length;p++){this.updatePageRoot(d[p]);var A=d[p].node.cloneNode(!1);A.removeAttribute("name");n.root=d[p].root;var E=q.encode(n);this.editor.graph.saveViewState(d[p].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");A.appendChild(E);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,
-g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(z,B,J,M){return!M||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?M&&"mxCell"==z.nodeName&&"previous"==B?null:J:Math.round(J)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,
-g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var p=d.attributes[q].name,A=null!=g?g(d,p,d.attributes[q].value,!0):d.attributes[q].value;null!=A&&(n^=this.hashValue(p,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)n=(n<<5)-n+this.hashValue(d.childNodes[q],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(q=0;q<d.length;q++)g=(g<<5)-g+d.charCodeAt(q)<<
-0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,q,p,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=
+y;if(null!=d)try{d.close()}catch(A){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(A){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||q():q()});g?d():this.handleError(y,mxResources.get("errorLoadingFile"),d,!0,null,null,
+!0)}else q();return n};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,q=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var p=0;p<d.length;p++){this.updatePageRoot(d[p]);var y=d[p].node.cloneNode(!1);y.removeAttribute("name");n.root=d[p].root;var A=q.encode(n);this.editor.graph.saveViewState(d[p].viewState,A,!0);A.removeAttribute("pageWidth");A.removeAttribute("pageHeight");y.appendChild(A);null!=g&&(g.eltCount+=y.getElementsByTagName("*").length,
+g.nodeCount+=y.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(y,function(C,B,I,M){return!M||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?M&&"mxCell"==C.nodeName&&"previous"==B?null:I:Math.round(I)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,
+g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var p=d.attributes[q].name,y=null!=g?g(d,p,d.attributes[q].value,!0):d.attributes[q].value;null!=y&&(n^=this.hashValue(p,g,k)+this.hashValue(y,g,k))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)n=(n<<5)-n+this.hashValue(d.childNodes[q],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(q=0;q<d.length;q++)g=(g<<5)-g+d.charCodeAt(q)<<
+0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,q,p,y){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var n=k.previousSibling;g.insertBefore(k,d);g.insertBefore(n,k)};EditorUi.prototype.loadLibrary=
function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,g,k,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&
-(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var p=null,A=mxUtils.bind(this,function(K,H){0==K.length&&d.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),H.appendChild(p)):this.addLibraryEntries(K,H)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,
-k.lastIndexOf("."))));var E=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(K){A(g,K)}));this.repositionLibrary(q);var z=E.parentNode.previousSibling;n=z.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";z.style.position="relative";var J=
-document.createElement("img");J.className="geAdaptiveAsset";J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("close"));J.setAttribute("valign","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.top="2px";J.style.width="14px";J.style.cursor="pointer";J.style.margin="0 3px";var M=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var H=
-mxUtils.bind(this,function(){this.closeLibrary(d)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(K)}}));if(d.isEditable()){var v=this.editor.graph,u=null,G=mxUtils.bind(this,function(K){this.showLibraryDialog(d.getTitle(),E,g,d,d.getMode());mxEvent.consume(K)}),I=mxUtils.bind(this,function(K){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=J.cloneNode(!1),
-u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",B.insertBefore(u,B.firstChild),z.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),z.style.paddingRight=18*B.childNodes.length+"px")})):null==M&&(M=J.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",
-mxResources.get("save")),B.insertBefore(M,B.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==M||d.isModified()||(z.style.paddingRight=18*B.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(H)})),z.style.paddingRight=18*B.childNodes.length+"px")}),F=mxUtils.bind(this,function(K,H,Q,U){K=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(K)));for(var T=
-0;T<K.length;T++){var V=v.getCellGeometry(K[T]);null!=V&&V.translate(-H.x,-H.y)}E.appendChild(this.sidebar.createVertexTemplateFromCells(K,H.width,H.height,U||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:H.width,h:H.height};null!=U&&(K.title=U);g.push(K);I(Q);null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)}),L=mxUtils.bind(this,function(K){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(K),v.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=v.getSelectionCells(),Q=v.view.getBounds(H),U=v.view.scale;Q.x/=U;Q.y/=U;Q.width/=U;Q.height/=U;Q.x-=v.view.translate.x;Q.y-=v.view.translate.y;F(H,Q)}mxEvent.consume(K)});mxEvent.addGestureListeners(E,function(){},mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility=
-"hidden"),E.style.backgroundColor="#f1f3f4",E.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(E.style.backgroundColor="",E.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,L(K),mxEvent.consume(K))}));mxEvent.addListener(E,"mouseleave",mxUtils.bind(this,function(K){v.isMouseDown&&null!=v.graphHandler.first&&
-(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),E.style.backgroundColor="",E.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(K){E.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";E.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(E,"drop",mxUtils.bind(this,function(K){E.style.cursor="";E.style.backgroundColor=
-"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,Q,U,T,V,W,t,C,N){if(null!=H&&"image/"==Q.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,V,W),H)],H[0].vertex=!0,F(H,new mxRectangle(0,0,V,W),K,mxEvent.isAltDown(K)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&&
-(p.parentNode.removeChild(p),p=null);else{var R=!1,O=mxUtils.bind(this,function(P,S){null!=P&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(P),null!=S&&0<S.length&&(P=S));if(null!=P)if(P=mxUtils.parseXml(P),"mxlibrary"==P.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(P.documentElement));A(X,E);g=g.concat(X);I(K);this.spinner.stop();R=!0}catch(ba){}else if("mxfile"==P.documentElement.nodeName)try{var aa=P.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);F(Y,new mxRectangle(0,0,Z.width,Z.height),K)}R=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}R||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=N&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(N,function(P){O(P,
-"text/xml")},null,t):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,t)&&null!=N?this.isExternalDataComms()?this.parseFile(N,mxUtils.bind(this,function(P){4==P.readyState&&(this.spinner.stop(),200<=P.status&&299>=P.status?O(P.responseText,"text/xml"):this.handleError({message:mxResources.get(413==P.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(H,Q)}}));
-K.stopPropagation();K.preventDefault()})),mxEvent.addListener(E,"dragleave",function(K){E.style.cursor="";E.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));J=J.cloneNode(!1);J.setAttribute("src",Editor.editImage);J.setAttribute("title",mxResources.get("edit"));B.insertBefore(J,B.firstChild);mxEvent.addListener(J,"click",G);mxEvent.addListener(E,"dblclick",function(K){mxEvent.getSource(K)==E&&G(K)});n=J.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
-mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",L);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),B.insertBefore(n,B.firstChild))}z.appendChild(B);
-z.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var n=d[k],q=n.data;if(null!=q){q=this.convertDataUri(q);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+q,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(q=this.stringToCells(Graph.decompress(n.xml)),0<q.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(q,
+(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var p=null,y=mxUtils.bind(this,function(K,H){0==K.length&&d.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),H.appendChild(p)):this.addLibraryEntries(K,H)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,
+k.lastIndexOf("."))));var A=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(K){y(g,K)}));this.repositionLibrary(q);var C=A.parentNode.previousSibling;n=C.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=d.title&&C.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+n);var B=document.createElement("div");B.style.position="absolute";B.style.right="0px";B.style.top="0px";B.style.padding="8px";B.style.backgroundColor="inherit";C.style.position="relative";var I=
+document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var M=null;if(".scratchpad"!=d.title||this.closableScratchpad)B.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var H=
+mxUtils.bind(this,function(){this.closeLibrary(d)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(K)}}));if(d.isEditable()){var G=this.editor.graph,S=null,u=mxUtils.bind(this,function(K){this.showLibraryDialog(d.getTitle(),A,g,d,d.getMode());mxEvent.consume(K)}),z=mxUtils.bind(this,function(K){d.setModified(!0);d.isAutosave()?(null!=S&&null!=S.parentNode&&S.parentNode.removeChild(S),S=I.cloneNode(!1),
+S.setAttribute("src",Editor.spinImage),S.setAttribute("title",mxResources.get("saving")),S.style.cursor="default",S.style.marginRight="2px",S.style.marginTop="-2px",B.insertBefore(S,B.firstChild),C.style.paddingRight=18*B.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=S&&null!=S.parentNode&&(S.parentNode.removeChild(S),C.style.paddingRight=18*B.childNodes.length+"px")})):null==M&&(M=I.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",
+mxResources.get("save")),B.insertBefore(M,B.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==M||d.isModified()||(C.style.paddingRight=18*B.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(H)})),C.style.paddingRight=18*B.childNodes.length+"px")}),F=mxUtils.bind(this,function(K,H,N,U){K=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(K)));for(var Q=
+0;Q<K.length;Q++){var V=G.getCellGeometry(K[Q]);null!=V&&V.translate(-H.x,-H.y)}A.appendChild(this.sidebar.createVertexTemplateFromCells(K,H.width,H.height,U||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:H.width,h:H.height};null!=U&&(K.title=U);g.push(K);z(N);null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)}),J=mxUtils.bind(this,function(K){if(G.isSelectionEmpty())G.getRubberband().isActive()?(G.getRubberband().execute(K),G.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=G.getSelectionCells(),N=G.view.getBounds(H),U=G.view.scale;N.x/=U;N.y/=U;N.width/=U;N.height/=U;N.x-=G.view.translate.x;N.y-=G.view.translate.y;F(H,N)}mxEvent.consume(K)});mxEvent.addGestureListeners(A,function(){},mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler.first&&(G.graphHandler.suspend(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility=
+"hidden"),A.style.backgroundColor="#f1f3f4",A.style.cursor="copy",G.panningManager.stop(),G.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler&&(A.style.backgroundColor="",A.style.cursor="default",this.sidebar.showTooltips=!0,G.panningManager.stop(),G.graphHandler.reset(),G.isMouseDown=!1,G.autoScroll=!0,J(K),mxEvent.consume(K))}));mxEvent.addListener(A,"mouseleave",mxUtils.bind(this,function(K){G.isMouseDown&&null!=G.graphHandler.first&&
+(G.graphHandler.resume(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="visible"),A.style.backgroundColor="",A.style.cursor="",G.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(K){A.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";A.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(K){A.style.cursor="";A.style.backgroundColor=
+"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,N,U,Q,V,W,t,D,L){if(null!=H&&"image/"==N.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,V,W),H)],H[0].vertex=!0,F(H,new mxRectangle(0,0,V,W),K,mxEvent.isAltDown(K)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<g.length&&
+(p.parentNode.removeChild(p),p=null);else{var T=!1,O=mxUtils.bind(this,function(P,R){null!=P&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(P),null!=R&&0<R.length&&(P=R));if(null!=P)if(P=mxUtils.parseXml(P),"mxlibrary"==P.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(P.documentElement));y(X,A);g=g.concat(X);z(K);this.spinner.stop();T=!0}catch(ba){}else if("mxfile"==P.documentElement.nodeName)try{var Z=P.documentElement.getElementsByTagName("diagram");for(X=0;X<Z.length;X++){var Y=
+this.stringToCells(Editor.getDiagramNodeXml(Z[X])),aa=this.editor.graph.getBoundingBoxFromGeometry(Y);F(Y,new mxRectangle(0,0,aa.width,aa.height),K)}T=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}T||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<g.length&&(p.parentNode.removeChild(p),p=null)});null!=L&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(L,function(P){O(P,
+"text/xml")},null,t):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,t)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(P){4==P.readyState&&(this.spinner.stop(),200<=P.status&&299>=P.status?O(P.responseText,"text/xml"):this.handleError({message:mxResources.get(413==P.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(H,N)}}));
+K.stopPropagation();K.preventDefault()})),mxEvent.addListener(A,"dragleave",function(K){A.style.cursor="";A.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));B.insertBefore(I,B.firstChild);mxEvent.addListener(I,"click",u);mxEvent.addListener(A,"dblclick",function(K){mxEvent.getSource(K)==A&&u(K)});n=I.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
+mxResources.get("add"));B.insertBefore(n,B.firstChild);mxEvent.addListener(n,"click",J);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),B.insertBefore(n,B.firstChild))}C.appendChild(B);
+C.style.paddingRight=18*B.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var n=d[k],q=n.data;if(null!=q){q=this.convertDataUri(q);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(p+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(p+"image="+q,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(q=this.stringToCells(Graph.decompress(n.xml)),0<q.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(q,
n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,q,p,A){d=new ImageDialog(this,d,g,k,n,q,p,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,q,p,y){d=new ImageDialog(this,d,g,k,n,q,p,y);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g){d=null!=d?d:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),
k.ignoreColor=!0,this.editor.graph.model.execute(k))});d=new BackgroundImageDialog(this,d,g);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,n,q){d=new LibraryDialog(this,d,g,k,n,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);
this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=
-g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,n,q,p,A){var E=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},z=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),J=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=
-z.retry&&(B=mxResources.get("cancel"),J=function(){E();z.retry()});if(404==z.code||404==z.status||403==z.code){A=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=q?null:null!=p?p:window.location.hash;if(null!=M&&("#G"==M.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
-M.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==z.code||404==z.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(g,A,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(d,g,k,n,q)}),
-J,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){L.innerText="";for(var K=0;K<G.length;K++){var H=document.createElement("option");mxUtils.write(H,G[K].displayName);H.value=K;L.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+G[K].email+">");H.setAttribute("disabled","disabled");L.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=G.length;L.appendChild(H)}var G=this.drive.getUsersList(),
-I=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");I.appendChild(F);var L=document.createElement("select");L.style.width="200px";u();mxEvent.addListener(L,"change",mxUtils.bind(this,function(){var K=L.value,H=G.length!=K;H&&this.drive.setUser(G[K]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(G=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(Q){this.handleError(Q)}),!0)}));I.appendChild(L);
-I=new CustomDialog(this,I,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(I.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?A=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?A=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?
-A=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(A=mxUtils.htmlEntities(z)))}var v=p=null;null!=z&&null!=z.helpLink?(p=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(p=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+p+": "+z.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,A,B,k,J,null,null,p,v,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,q,p){var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&
-g()},function(){A();null!=k&&k()},n,q,null,null,null,null,E);this.showDialog(d.container,340,46+E,!0,p);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();mxEvent.consume(n)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,n,q,p,y){var A=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},C=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{y?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(S){}if(null!=C||null!=g){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var B=mxResources.get("ok"),I=null;g=null!=g?g:mxResources.get("error");if(null!=C){null!=
+C.retry&&(B=mxResources.get("cancel"),I=function(){A();C.retry()});if(404==C.code||404==C.status||403==C.code){y=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=q?null:null!=p?p:window.location.hash;if(null!=M&&("#G"==M.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+M.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==C.code||404==C.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(g,y,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(d,g,k,n,q)}),
+I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function S(){J.innerText="";for(var K=0;K<u.length;K++){var H=document.createElement("option");mxUtils.write(H,u[K].displayName);H.value=K;J.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+u[K].email+">");H.setAttribute("disabled","disabled");J.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=u.length;J.appendChild(H)}var u=this.drive.getUsersList(),
+z=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");z.appendChild(F);var J=document.createElement("select");J.style.width="200px";S();mxEvent.addListener(J,"change",mxUtils.bind(this,function(){var K=J.value,H=u.length!=K;H&&this.drive.setUser(u[K]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(u=this.drive.getUsersList(),S())}),mxUtils.bind(this,function(N){this.handleError(N)}),!0)}));z.appendChild(J);
+z=new CustomDialog(this,z,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(z.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=C.message?y=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name):mxUtils.htmlEntities(C.message):null!=C.response&&null!=C.response.error?y=mxUtils.htmlEntities(C.response.error):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?
+y=mxUtils.htmlEntities(mxResources.get("timeout")):C.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof C&&0<C.length&&(y=mxUtils.htmlEntities(C)))}var G=p=null;null!=C&&null!=C.helpLink?(p=mxResources.get("help"),G=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail&&(p=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+p+": "+C.ownerEmail+")"),G=mxUtils.bind(this,function(){return this.openLink("mailto:"+
+mxUtils.htmlEntities(C.ownerEmail))}));this.showError(g,y,B,k,I,null,null,p,G,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,q,p){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){y();null!=g&&
+g()},function(){y();null!=k&&k()},n,q,null,null,null,null,A);this.showDialog(d.container,340,46+A,!0,p);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(q);
-q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(q);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("id","geDoNotShowAgainCheckbox");A.style.marginRight="6px";if(!n){g.appendChild(A);var E=document.createElement("label");E.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(E,mxResources.get("doNotShowAgain"));g.appendChild(E);p.style.paddingBottom="30px";p.appendChild(g)}var z=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,A.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);z()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){z()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){var M=mxEvent.getSource(J);M!=A&&M!=E?(null!=k&&k(),z(),mxEvent.consume(J)):B()}));window.setTimeout(mxUtils.bind(this,
+q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";p.appendChild(q);mxUtils.write(p,g);document.body.appendChild(p);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var y=document.createElement("input");
+y.setAttribute("type","checkbox");y.setAttribute("id","geDoNotShowAgainCheckbox");y.style.marginRight="6px";if(!n){g.appendChild(y);var A=document.createElement("label");A.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(A,mxResources.get("doNotShowAgain"));g.appendChild(A);p.style.paddingBottom="30px";p.appendChild(g)}var C=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,y.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);C()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){var M=mxEvent.getSource(I);M!=y&&M!=A?(null!=k&&k(),C(),mxEvent.consume(I)):B()}));window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(B,3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,n){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,
"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,n,q){var p="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+p;d=this.createImageDataUri(d,g,k,q);this.saveData(n,p,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,n,q,p){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
/(\.html)$/i.test(g)||(g=g+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,
-k,n);else{var A=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(E?parseInt(E[2],10):!1)?!1:p}if(p||this.isOffline()){A.href=URL.createObjectURL(n?this.base64ToBlob(d,k):new Blob([d],{type:k}));p?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},
-2E4),A.click(),A.parentNode.removeChild(A)}catch(z){}}else this.createEchoRequest(d,g,k,n,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,q,p){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,n=Math.ceil(k/1024),q=Array(n),
-p=0;p<n;++p){for(var A=1024*p,E=Math.min(A+1024,k),z=Array(E-A),B=0;A<E;++B,++A)z[B]=d[A].charCodeAt(0);q[p]=new Uint8Array(z)}return new Blob(q,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,n,q,p,A,E){p=null!=p?p:!1;A=null!=A?A:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(p);isLocalStorage&&q++;var z=4>=q?2:6<q?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,
-k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var M=new EmbedDialog(this,d);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(d,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),v.document.close())}else J==App.MODE_DEVICE||"download"==J?this.doSaveLocalFile(d,B,k,n,null,E):null!=B&&0<B.length&&this.pickFolder(J,mxUtils.bind(this,function(u){try{this.exportFile(d,B,k,n,J,u)}catch(G){this.handleError(G)}}))}catch(u){this.handleError(u)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,A,null,1<q,z,d,k,n);p=this.isServices(q)?q>z?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(d=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write('<html><img style="max-width:100%;" src="data:'+
+k,n);else{var y=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(A?parseInt(A[2],10):!1)?!1:p}if(p||this.isOffline()){y.href=URL.createObjectURL(n?this.base64ToBlob(d,k):new Blob([d],{type:k}));p?y.download=g:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},
+2E4),y.click(),y.parentNode.removeChild(y)}catch(C){}}else this.createEchoRequest(d,g,k,n,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,q,p){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=p?"&base64="+p:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,n=Math.ceil(k/1024),q=Array(n),
+p=0;p<n;++p){for(var y=1024*p,A=Math.min(y+1024,k),C=Array(A-y),B=0;y<A;++B,++y)C[B]=d[y].charCodeAt(0);q[p]=new Uint8Array(C)}return new Blob(q,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,n,q,p,y,A){p=null!=p?p:!1;y=null!=y?y:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(p);isLocalStorage&&q++;var C=4>=q?2:6<q?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(B,I){try{if("_blank"==I)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,
+k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var M=new EmbedDialog(this,d);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var G=window.open("about:blank");null==G?mxUtils.popup(d,!0):(G.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),G.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(d,B,k,n,null,A):null!=B&&0<B.length&&this.pickFolder(I,mxUtils.bind(this,function(S){try{this.exportFile(d,B,k,n,I,S)}catch(u){this.handleError(u)}}))}catch(S){this.handleError(S)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,y,null,1<q,C,d,k,n);p=this.isServices(q)?q>C?390:280:160;this.showDialog(g.container,420,p,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(d=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write('<html><img style="max-width:100%;" src="data:'+
g+";base64,"+d+'"/></html>')):n.document.write("<html>"+d+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),n.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var g=d(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
@@ -11569,171 +11571,197 @@ mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentN
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,
function(n){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var p=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=p.zIndex;var A=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});A.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(E){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight=
-"140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",z);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,q){this.isLocalFileSave()?this.saveLocalFile(k,d,n,q,g):this.saveRequest(d,g,mxUtils.bind(this,function(p,A){return this.createEchoRequest(k,p,n,q,g,A)}),k,q,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,q,p,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;
-var E=this.getServiceCount(!1);isLocalStorage&&E++;var z=4>=E?2:6<E?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,J){if("_blank"==J||null!=B&&0<B.length){var M=k("_blank"==J?null:B,J==App.MODE_DEVICE||"download"==J||null==J||"_blank"==J?"0":"1");null!=M&&(J==App.MODE_DEVICE||"download"==J||"_blank"==J?M.simulate(document,"_blank"):this.pickFolder(J,mxUtils.bind(this,function(v){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,J,v)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),B,p,!0,J,v)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,A,null,1<E,z,n,p,q);E=this.isServices(E)?4<E?390:280:160;this.showDialog(d.container,
-420,E,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,q,p){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,q,p,A,E,z,B,J,M,v,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var G=this.editor.graph.isSelectionEmpty();k=null!=k?k:G;var I=g?null:this.editor.graph.background;I==mxConstants.NONE&&
-(I=null);null==I&&0==g&&(I=J?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(I,d,A,E,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!v,J,M);n&&this.editor.graph.addSvgShadow(F);var L=this.getBaseFilename()+(q?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(Q){this.isLocalFileSave()||Q.length<=MAX_REQUEST_SIZE?this.saveData(L,"svg",Q,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(Q)}))});var K=mxUtils.bind(this,function(Q){this.spinner.stop();q&&Q.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Q))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var H=mxUtils.bind(this,function(Q){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Q,K,this.thumbImageCache)):
-K(Q)});v?this.embedFonts(F,H):(this.editor.addFontCss(F),H(F))}catch(Q){this.handleError(Q)}};EditorUi.prototype.addRadiobox=function(d,g,k,n,q,p,A){return this.addCheckbox(d,k,n,q,p,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,q,p,A,E){p=null!=p?p:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();z.id=A;null!=E&&z.setAttribute("name",E);k&&(z.setAttribute("checked","checked"),
-z.defaultChecked=!0);n&&z.setAttribute("disabled","disabled");p&&(d.appendChild(z),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),q||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),q="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var p=document.createElement("select");
-p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");p.appendChild(n);d.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var A=new FilenameDialog(this,
-q,mxResources.get("ok"),function(E){null!=E?q=E:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(A.container,300,80,!0,!1);A.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return p}}};
-EditorUi.prototype.addLinkSection=function(d,g){function k(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=p):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(E)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");
+this.exportDialog.style.zIndex=p.zIndex;var y=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});y.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(A){y.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(A,null,"png");A=document.createElement("img");A.style.maxWidth="140px";A.style.maxHeight=
+"140px";A.style.cursor="pointer";A.style.backgroundColor="white";A.setAttribute("title",mxResources.get("openInNewWindow"));A.setAttribute("border","0");A.setAttribute("src",C);this.exportDialog.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,q){this.isLocalFileSave()?this.saveLocalFile(k,d,n,q,g):this.saveRequest(d,g,mxUtils.bind(this,function(p,y){return this.createEchoRequest(k,p,n,q,g,y)}),k,q,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,q,p,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;
+var A=this.getServiceCount(!1);isLocalStorage&&A++;var C=4>=A?2:6<A?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(B,I){if("_blank"==I||null!=B&&0<B.length){var M=k("_blank"==I?null:B,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=M&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?M.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(G){p=null!=p?p:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,B,p,!0,I,G)}catch(S){this.handleError(S)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),B,p,!0,I,G)}catch(S){this.handleError(S)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(S){this.spinner.stop();this.handleError(S)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,y,null,1<A,C,n,p,q);A=this.isServices(A)?4<A?390:280:160;this.showDialog(d.container,
+420,A,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,q,p){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,q,p,y,A,C,B,I,M,G,S){if(this.spinner.spin(document.body,mxResources.get("export")))try{var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;var z=g?null:this.editor.graph.background;z==mxConstants.NONE&&
+(z=null);null==z&&0==g&&(z=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(z,d,y,A,null,k,null,null,"blank"==B?"_blank":"self"==B?"_top":null,null,!G,I,M);n&&this.editor.graph.addSvgShadow(F);var J=this.getBaseFilename()+(q?".drawio":"")+".svg";S=null!=S?S:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(J,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(N)}))});var K=mxUtils.bind(this,function(N){this.spinner.stop();q&&N.setAttribute("content",this.getFileData(!0,null,null,null,k,C,null,null,null,!1));S(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var H=mxUtils.bind(this,function(N){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,K,this.thumbImageCache)):
+K(N)});G?this.embedFonts(F,H):(this.editor.addFontCss(F),H(F))}catch(N){this.handleError(N)}};EditorUi.prototype.addRadiobox=function(d,g,k,n,q,p,y){return this.addCheckbox(d,k,n,q,p,y,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,q,p,y,A){p=null!=p?p:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();C.id=y;null!=A&&C.setAttribute("name",A);k&&(C.setAttribute("checked","checked"),
+C.defaultChecked=!0);n&&C.setAttribute("disabled","disabled");p&&(d.appendChild(C),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",y),d.appendChild(k),q||mxUtils.br(d));return C};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),q="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var p=document.createElement("select");
+p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");p.appendChild(n);d.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var y=new FilenameDialog(this,
+q,mxResources.get("ok"),function(A){null!=A?q=A:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===p.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return p}}};
+EditorUi.prototype.addLinkSection=function(d,g){function k(){var A=document.createElement("div");A.style.width="100%";A.style.height="100%";A.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(A.style.border="1px solid black",A.style.backgroundColor=p):(A.style.backgroundPosition="center center",A.style.backgroundRepeat="no-repeat",A.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(A)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");
n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));
-n.appendChild(q);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+":");var p="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(p||"none",function(z){p=z;k()});mxEvent.consume(E)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height=
-"22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,q,p,A){A=null!=A?A:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!=
-g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=q&&0<q.length&&A.push("edit="+encodeURIComponent(q)),p&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(d,g,k,n,q,p,A,E,z,B){z=this.createUrlParameters(d,g,k,n,q,p,z);d=this.getCurrentFile();g=!0;null!=A?k="#U"+encodeURIComponent(A):
-(d=this.getCurrentFile(),E||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(z.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,q,p,A,E,z,B,J,M){this.getBasenames();var v={};""!=q&&q!=mxConstants.NONE&&(v.highlight=q);"auto"!==n&&(v.target=n);B||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];A&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages,
-this.currentPage)));g&&(k.push("zoom"),v.resize=!0);E&&k.push("layers");z&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),v.toolbar=k.join(" "));null!=J&&0<J.length&&(v.edit=J);null!=d?v.url=d:v.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";M(g,'<script type="text/javascript" src="'+
+n.appendChild(q);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+":");var p="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(A){this.pickColor(p||"none",function(C){p=C;k()});mxEvent.consume(A)}));k();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height=
+"22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";d.appendChild(y);mxUtils.br(d);return{getColor:function(){return p},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,q,p,y){y=null!=y?y:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=d&&y.push("target="+d),null!=
+g&&g!=mxConstants.NONE&&y.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=q&&0<q.length&&y.push("edit="+encodeURIComponent(q)),p&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(d,g,k,n,q,p,y,A,C,B){C=this.createUrlParameters(d,g,k,n,q,p,C);d=this.getCurrentFile();g=!0;null!=y?k="#U"+encodeURIComponent(y):
+(d=this.getCurrentFile(),A||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(d.getTitle()));B&&1<k.length&&(C.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,q,p,y,A,C,B,I,M){this.getBasenames();var G={};""!=q&&q!=mxConstants.NONE&&(G.highlight=q);"auto"!==n&&(G.target=n);B||(G.lightbox=!1);G.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(G.zoom=k/100);k=[];y&&(k.push("pages"),G.resize=!0,null!=this.pages&&null!=this.currentPage&&(G.page=mxUtils.indexOf(this.pages,
+this.currentPage)));g&&(k.push("zoom"),G.resize=!0);A&&k.push("layers");C&&k.push("tags");0<k.length&&(B&&k.push("lightbox"),G.toolbar=k.join(" "));null!=I&&0<I.length&&(G.edit=I);null!=d?G.url=d:G.xml=this.getFileData(!0,null,null,null,null,!y);g='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(G))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";M(g,'<script type="text/javascript" src="'+
(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,n){var q=document.createElement("div");q.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(p);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");p=E.cloneNode(!0);p.setAttribute("value","copy");A.appendChild(p);var z=document.createElement("span");
-mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(z);mxUtils.br(A);A.appendChild(E);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));A.appendChild(z);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),A.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&E.setAttribute("disabled","disabled");q.appendChild(A);var J=this.addLinkSection(q),M=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";q.appendChild(v);var u=this.addCheckbox(q,mxResources.get("fit"),!0);
-A=null!=this.pages&&1<this.pages.length;var G=G=this.addCheckbox(q,mxResources.get("allPages"),A,!A),I=this.addCheckbox(q,mxResources.get("layers"),!0),F=this.addCheckbox(q,mxResources.get("tags"),!0),L=this.addCheckbox(q,mxResources.get("lightbox"),!0),K=null;A=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(q,L);var H=K.getEditInput();H.style.marginBottom="16px";A+=50;mxEvent.addListener(L,"change",function(){L.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");
-H.checked&&L.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){n(E.checked?k:null,M.checked,v.value,J.getTarget(),J.getColor(),u.checked,G.checked,I.checked,F.checked,L.checked,null!=K?K.getLink():null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,q,p,A,E){var z=document.createElement("div");z.style.whiteSpace=
-"nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(B);var J=this.getCurrentFile();d=0;if(null==J||J.constructor!=window.DriveFile||g)A=null!=A?A:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;A=null!=A?A:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var M=document.createElement("div");M.style.whiteSpace="normal";mxUtils.write(M,mxResources.get("linkAccountRequired"));B.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(J.getId())}));M.style.marginTop="12px";M.className="geBtn";B.appendChild(M);z.appendChild(B);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));B.appendChild(M);
-mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var v=null,u=null;if(null!=k||null!=n)d+=30,mxUtils.write(z,mxResources.get("width")+":"),v=document.createElement("input"),
-v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",z.appendChild(v),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=n+"px",z.appendChild(u),mxUtils.br(z);var G=this.addLinkSection(z,p);k=null!=this.pages&&1<this.pages.length;var I=null;
-if(null==J||J.constructor!=window.DriveFile||g)I=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var F=this.addCheckbox(z,mxResources.get("lightbox"),!0,null,null,!p),L=this.addEditButton(z,F),K=L.getEditInput();p&&(K.style.marginLeft=F.style.marginLeft,F.style.display="none",d-=20);var H=this.addCheckbox(z,mxResources.get("layers"),!0);H.style.marginLeft=K.style.marginLeft;H.style.marginTop="8px";var Q=this.addCheckbox(z,mxResources.get("tags"),!0);Q.style.marginLeft=K.style.marginLeft;Q.style.marginBottom=
-"16px";Q.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&F.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){q(G.getTarget(),G.getColor(),null==I?!0:I.checked,F.checked,L.getLink(),H.checked,null!=v?v.value:null,
-null!=u?u.value:null,Q.checked)}),null,mxResources.get("create"),A,E);this.showDialog(g.container,340,300+d,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):G.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(q?"10":"4")+"px";p.appendChild(A);if(q){mxUtils.write(p,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";p.appendChild(E);mxUtils.write(p,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=
-this.lastExportBorder||"0";p.appendChild(z);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),J=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var M=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=M&&(M.style.marginBottom="16px");d=new CustomDialog(this,p,mxUtils.bind(this,function(){var v=
-parseInt(E.value)/100||1,u=parseInt(z.value)||0;k(!B.checked,null!=J?J.checked:!1,null!=M?M.checked:!1,v,u)}),null,d,g);this.showDialog(d.container,300,(q?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,q,p,A,E,z){A=null!=A?A:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var J=this.editor.graph,M="jpeg"==E?220:300,v=document.createElement("h3");mxUtils.write(v,d);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-B.appendChild(v);mxUtils.write(B,mxResources.get("zoom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";B.appendChild(u);mxUtils.write(B,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";B.appendChild(G);mxUtils.br(B);var I=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,J.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var L=document.createElement("select");L.style.marginTop="16px";L.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var K={};for(v=0;v<d.length;v++)if(!J.isSelectionEmpty()||"selectionOnly"!=
-d[v]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(d[v]));H.setAttribute("value",d[v]);L.appendChild(H);K[d[v]]=H}z?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(L),mxUtils.br(B),M+=26,mxEvent.addListener(L,"change",function(){"selectionOnly"==L.value&&(I.checked=!0)})):p&&(B.appendChild(F),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),M+=30,mxEvent.addListener(I,"change",function(){I.checked?F.removeAttribute("disabled"):F.setAttribute("disabled",
-"disabled")}));J.isSelectionEmpty()?z&&(I.style.display="none",I.nextSibling.style.display="none",I.nextSibling.nextSibling.style.display="none",M-=30):(L.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(I,"change",function(){L.value=I.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),M+=26);var T=this.addCheckbox(B,
-mxResources.get("shadow"),J.shadowVisible),V=null;if("png"==E||"jpeg"==E)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),A,null,null,"jpeg"!=E);W.style.marginBottom="16px";var t=document.createElement("input");t.style.marginBottom="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||t.setAttribute("disabled","disabled");var C=
-document.createElement("select");C.style.maxWidth="260px";C.style.marginLeft="8px";C.style.marginRight="10px";C.style.marginBottom="16px";C.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));C.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));C.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||C.appendChild(p);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){"lblToSvg"==C.value?(t.checked=!0,t.setAttribute("disabled","disabled"),K.page.style.display="none","page"==L.value&&(L.value="diagram"),T.checked=!1,T.setAttribute("disabled","disabled"),R.style.display="inline-block",N.style.display="none"):"disabled"==t.getAttribute("disabled")&&(t.checked=!1,t.removeAttribute("disabled"),T.removeAttribute("disabled"),
-K.page.style.display="",R.style.display="none",N.style.display="")}));g&&(B.appendChild(t),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(C),mxUtils.br(B),M+=60);var N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="8px";N.style.marginRight="10px";N.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));N.appendChild(g);
-g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));N.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));N.appendChild(g);var R=document.createElement("div");mxUtils.write(R,mxResources.get("LinksLost"));R.style.margin="7px";R.style.display="none";"svg"==E&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(N),B.appendChild(R),mxUtils.br(B),
-mxUtils.br(B),M+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=G.value;this.lastExportZoom=u.value;q(u.value,Q.checked,!I.checked,T.checked,W.checked,t.checked,G.value,F.checked,!1,N.value,null!=V?V.checked:null,null!=U?U.checked:null,L.value,"embedFonts"==C.value,"lblToSvg"==C.value)}),null,k,n);this.showDialog(k.container,340,M,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var E=document.createElement("h3");mxUtils.write(E,g);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(E)}var z=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),A.shadowVisible&&n,!n),J=this.addCheckbox(p,k),M=this.addCheckbox(p,mxResources.get("lightbox"),
-!0),v=this.addEditButton(p,M),u=v.getEditInput(),G=1<A.model.getChildCount(A.model.getRoot()),I=this.addCheckbox(p,mxResources.get("layers"),G,!G);I.style.marginLeft=u.style.marginLeft;I.style.marginBottom="12px";I.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(G&&I.removeAttribute("disabled"),u.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&M.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled",
-"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){d(z.checked,B.checked,J.checked,M.checked,v.getLink(),I.checked)}),null,mxResources.get("embed"),q);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,q,p,A,E){function z(u){var G=" ",I="";n&&(G=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=J?"&page="+J:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",I+="cursor:pointer;");d&&(I+="max-width:100%;");var F="";k&&(F=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');A('<img src="'+u+'"'+F+(""!=I?' style="'+I+'"':"")+G+"/>")}var B=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var G=n?this.getFileData(!0):null;u=
-this.createImageDataUri(u,G,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){E({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var M="";k&&(M="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+M+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&&
-299>=v.getStatus()?z("data:image/png;base64,"+v.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,q,p,A){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=E.getElementsByTagName("a");if(null!=z)for(var B=0;B<z.length;B++){var J=z[B].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==z[B].getAttribute("target")&&z[B].removeAttribute("target")}n&&
-E.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(E);if(k){var M=" ",v="";n&&(M="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(p?"&layers=1":
-"")+"');}})(this);\"",v+="cursor:pointer;");d&&(v+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(u){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=v?' style="'+v+'"':"")+M+"/>")}))}else v="",n&&(g=this.getSelectedPageIndex(),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"+(null!=g?"&page="+g:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),d&&(d=parseInt(E.getAttribute("width")),q=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),v+="max-width:100%;max-height:"+q+"px;",E.removeAttribute("height")),""!=v&&E.setAttribute("style",v),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),A(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(d){d=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(p);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";A.setAttribute("value","url");A.setAttribute("type","radio");A.setAttribute("name","type-embedhtmldialog");p=A.cloneNode(!0);p.setAttribute("value","copy");y.appendChild(p);var C=document.createElement("span");
+mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(C);mxUtils.br(y);y.appendChild(A);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));y.appendChild(C);var B=this.getCurrentFile();null==k&&null!=B&&B.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),y.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();
+this.drive.showPermissions(B.getId())})));p.setAttribute("checked","checked");null==k&&A.setAttribute("disabled","disabled");q.appendChild(y);var I=this.addLinkSection(q),M=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.style.marginRight="12px";G.value="100%";q.appendChild(G);var S=this.addCheckbox(q,mxResources.get("fit"),!0);
+y=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(q,mxResources.get("allPages"),y,!y),z=this.addCheckbox(q,mxResources.get("layers"),!0),F=this.addCheckbox(q,mxResources.get("tags"),!0),J=this.addCheckbox(q,mxResources.get("lightbox"),!0),K=null;y=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(q,J);var H=K.getEditInput();H.style.marginBottom="16px";y+=50;mxEvent.addListener(J,"change",function(){J.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");
+H.checked&&J.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){n(A.checked?k:null,M.checked,G.value,I.getTarget(),I.getColor(),S.checked,u.checked,z.checked,F.checked,J.checked,null!=K?K.getLink():null)}),null,d,g);this.showDialog(d.container,340,y,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,q,p,y,A){var C=document.createElement("div");C.style.whiteSpace=
+"nowrap";var B=document.createElement("h3");mxUtils.write(B,d||mxResources.get("link"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";C.appendChild(B);var I=this.getCurrentFile();d=0;if(null==I||I.constructor!=window.DriveFile||g)y=null!=y?y:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;y=null!=y?y:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";B=document.createElement("div");B.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var M=document.createElement("div");M.style.whiteSpace="normal";mxUtils.write(M,mxResources.get("linkAccountRequired"));B.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));M.style.marginTop="12px";M.className="geBtn";B.appendChild(M);C.appendChild(B);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));B.appendChild(M);
+mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(U){this.spinner.stop();U=new ErrorDialog(this,null,mxResources.get(null!=U?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(U.container,300,80,!0,!1);U.init()}))}))}var G=null,S=null;if(null!=k||null!=n)d+=30,mxUtils.write(C,mxResources.get("width")+":"),G=document.createElement("input"),
+G.setAttribute("type","text"),G.style.marginRight="16px",G.style.width="50px",G.style.marginLeft="6px",G.style.marginRight="16px",G.style.marginBottom="10px",G.value="100%",C.appendChild(G),mxUtils.write(C,mxResources.get("height")+":"),S=document.createElement("input"),S.setAttribute("type","text"),S.style.width="50px",S.style.marginLeft="6px",S.style.marginBottom="10px",S.value=n+"px",C.appendChild(S),mxUtils.br(C);var u=this.addLinkSection(C,p);k=null!=this.pages&&1<this.pages.length;var z=null;
+if(null==I||I.constructor!=window.DriveFile||g)z=this.addCheckbox(C,mxResources.get("allPages"),k,!k);var F=this.addCheckbox(C,mxResources.get("lightbox"),!0,null,null,!p),J=this.addEditButton(C,F),K=J.getEditInput();p&&(K.style.marginLeft=F.style.marginLeft,F.style.display="none",d-=20);var H=this.addCheckbox(C,mxResources.get("layers"),!0);H.style.marginLeft=K.style.marginLeft;H.style.marginTop="8px";var N=this.addCheckbox(C,mxResources.get("tags"),!0);N.style.marginLeft=K.style.marginLeft;N.style.marginBottom=
+"16px";N.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(H.removeAttribute("disabled"),K.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&F.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,C,mxUtils.bind(this,function(){q(u.getTarget(),u.getColor(),null==z?!0:z.checked,F.checked,J.getLink(),H.checked,null!=G?G.value:null,
+null!=S?S.value:null,N.checked)}),null,mxResources.get("create"),y,A);this.showDialog(g.container,340,300+d,!0,!0);null!=G?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(q?"10":"4")+"px";p.appendChild(y);if(q){mxUtils.write(p,mxResources.get("zoom")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight="12px";A.value=this.lastExportZoom||"100%";p.appendChild(A);mxUtils.write(p,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=
+this.lastExportBorder||"0";p.appendChild(C);mxUtils.br(p)}var B=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=n?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var M=n?null:this.addCheckbox(p,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=M&&(M.style.marginBottom="16px");d=new CustomDialog(this,p,mxUtils.bind(this,function(){var G=
+parseInt(A.value)/100||1,S=parseInt(C.value)||0;k(!B.checked,null!=I?I.checked:!1,null!=M?M.checked:!1,G,S)}),null,d,g);this.showDialog(d.container,300,(q?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,q,p,y,A,C){y=null!=y?y:Editor.defaultIncludeDiagram;var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph,M="jpeg"==A?220:300,G=document.createElement("h3");mxUtils.write(G,d);G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+B.appendChild(G);mxUtils.write(B,mxResources.get("zoom")+":");var S=document.createElement("input");S.setAttribute("type","text");S.style.marginRight="16px";S.style.width="60px";S.style.marginLeft="4px";S.style.marginRight="12px";S.value=this.lastExportZoom||"100%";B.appendChild(S);mxUtils.write(B,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder||
+"0";B.appendChild(u);mxUtils.br(B);var z=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var J=document.createElement("select");J.style.marginTop="16px";J.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var K={};for(G=0;G<d.length;G++)if(!I.isSelectionEmpty()||"selectionOnly"!=
+d[G]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(d[G]));H.setAttribute("value",d[G]);J.appendChild(H);K[d[G]]=H}C?(mxUtils.write(B,mxResources.get("size")+":"),B.appendChild(J),mxUtils.br(B),M+=26,mxEvent.addListener(J,"change",function(){"selectionOnly"==J.value&&(z.checked=!0)})):p&&(B.appendChild(F),mxUtils.write(B,mxResources.get("crop")),mxUtils.br(B),M+=30,mxEvent.addListener(z,"change",function(){z.checked?F.removeAttribute("disabled"):F.setAttribute("disabled",
+"disabled")}));I.isSelectionEmpty()?C&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",M-=30):(J.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(z,"change",function(){J.value=z.checked?"selectionOnly":"diagram"}));var N=this.addCheckbox(B,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=A),U=null;Editor.isDarkMode()&&(U=this.addCheckbox(B,mxResources.get("dark"),!0),M+=26);var Q=this.addCheckbox(B,
+mxResources.get("shadow"),I.shadowVisible),V=null;if("png"==A||"jpeg"==A)V=this.addCheckbox(B,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var W=this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),y,null,null,"jpeg"!=A);W.style.marginBottom="16px";var t=document.createElement("input");t.style.marginBottom="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||t.setAttribute("disabled","disabled");var D=
+document.createElement("select");D.style.maxWidth="260px";D.style.marginLeft="8px";D.style.marginRight="10px";D.style.marginBottom="16px";D.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));D.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,
+mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||D.appendChild(p);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){"lblToSvg"==D.value?(t.checked=!0,t.setAttribute("disabled","disabled"),K.page.style.display="none","page"==J.value&&(J.value="diagram"),Q.checked=!1,Q.setAttribute("disabled","disabled"),T.style.display="inline-block",L.style.display="none"):"disabled"==t.getAttribute("disabled")&&(t.checked=!1,t.removeAttribute("disabled"),Q.removeAttribute("disabled"),
+K.page.style.display="",T.style.display="none",L.style.display="")}));g&&(B.appendChild(t),mxUtils.write(B,mxResources.get("embedImages")),mxUtils.br(B),mxUtils.write(B,mxResources.get("txtSettings")+":"),B.appendChild(D),mxUtils.br(B),M+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));L.appendChild(g);
+g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));L.appendChild(g);var T=document.createElement("div");mxUtils.write(T,mxResources.get("LinksLost"));T.style.margin="7px";T.style.display="none";"svg"==A&&(mxUtils.write(B,mxResources.get("links")+":"),B.appendChild(L),B.appendChild(T),mxUtils.br(B),
+mxUtils.br(B),M+=50);k=new CustomDialog(this,B,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=S.value;q(S.value,N.checked,!z.checked,Q.checked,W.checked,t.checked,u.value,F.checked,!1,L.value,null!=V?V.checked:null,null!=U?U.checked:null,J.value,"embedFonts"==D.value,"lblToSvg"==D.value)}),null,k,n);this.showDialog(k.container,340,M,!0,!0,null,null,null,null,!0);S.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?S.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,q){var p=document.createElement("div");p.style.whiteSpace="nowrap";var y=this.editor.graph;if(null!=g){var A=document.createElement("h3");mxUtils.write(A,g);A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(A)}var C=this.addCheckbox(p,mxResources.get("fit"),!0),B=this.addCheckbox(p,mxResources.get("shadow"),y.shadowVisible&&n,!n),I=this.addCheckbox(p,k),M=this.addCheckbox(p,mxResources.get("lightbox"),
+!0),G=this.addEditButton(p,M),S=G.getEditInput(),u=1<y.model.getChildCount(y.model.getRoot()),z=this.addCheckbox(p,mxResources.get("layers"),u,!u);z.style.marginLeft=S.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(u&&z.removeAttribute("disabled"),S.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));S.checked&&M.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled",
+"disabled")});g=new CustomDialog(this,p,mxUtils.bind(this,function(){d(C.checked,B.checked,I.checked,M.checked,G.getLink(),z.checked)}),null,mxResources.get("embed"),q);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,q,p,y,A){function C(S){var u=" ",z="";n&&(u=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");d&&(z+="max-width:100%;");var F="";k&&(F=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');y('<img src="'+S+'"'+F+(""!=z?' style="'+z+'"':"")+u+"/>")}var B=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(S){var u=n?this.getFileData(!0):null;S=
+this.createImageDataUri(S,u,"png");C(S)}),null,null,null,mxUtils.bind(this,function(S){A({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),B.width*B.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var M="";k&&(M="&w="+Math.round(2*B.width)+"&h="+Math.round(2*B.height));var G=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+M+"&xml="+encodeURIComponent(g));G.send(mxUtils.bind(this,function(){200<=G.getStatus()&&
+299>=G.getStatus()?C("data:image/png;base64,"+G.getText()):A({message:mxResources.get("unknownError")})}))}else A({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,q,p,y){var A=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),C=A.getElementsByTagName("a");if(null!=C)for(var B=0;B<C.length;B++){var I=C[B].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==C[B].getAttribute("target")&&C[B].removeAttribute("target")}n&&
+A.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(A);if(k){var M=" ",G="";n&&(M="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(p?"&layers=1":
+"")+"');}})(this);\"",G+="cursor:pointer;");d&&(G+="max-width:100%;");this.editor.convertImages(A,mxUtils.bind(this,function(S){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(S))+'"'+(""!=G?' style="'+G+'"':"")+M+"/>")}))}else G="",n&&(g=this.getSelectedPageIndex(),A.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(q?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),G+="cursor:pointer;"),d&&(d=parseInt(A.getAttribute("width")),q=parseInt(A.getAttribute("height")),A.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),G+="max-width:100%;max-height:"+q+"px;",A.removeAttribute("height")),""!=G&&A.setAttribute("style",G),this.editor.addFontCss(A),this.editor.graph.mathEnabled&&this.editor.addMathCss(A),y(mxUtils.getXml(A))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){k=n[0];var q=g.getGlobalVariable;g.getGlobalVariable=function(p){return"page"==p?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:q.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(p){}finally{this.editor.graph=n}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=
-d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,q){try{var p=this.editor.graph,A=null!=p.themes&&"darkTheme"==p.defaultThemeName,E=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),p),E=k;else if(A||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(A?p.getDefaultStylesheet():p.getStylesheet());var z=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(J){return"page"==J?B.getName():"pagenumber"==J?1:z.apply(this,
-arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==E&&(E=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=J.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(E));d(M.substring(M.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&&
-g(J)}),null,null,n,null,p.shadowVisible,null,p,q,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,q,p,A,E,z,B,J,M,v){E=null!=E?E:!0;J=null!=J?J:0;A=null!=z?z:g.background;A==mxConstants.NONE&&(A=null);p=g.getSvg(A,B,J,null,null,p,null,null,null,g.shadowVisible||M,null,v,"diagram");(g.shadowVisible||M)&&g.addSvgShadow(p,null,null,0==J);null!=d&&p.setAttribute("content",d);null!=k&&p.setAttribute("resource",k);var u=mxUtils.bind(this,function(G){G=
-(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(G);null!=q&&q(G);return G});g.mathEnabled&&this.editor.addMathCss(p);if(null!=q)this.embedFonts(p,mxUtils.bind(this,function(G){E?this.editor.convertImages(G,mxUtils.bind(this,function(I){u(I)})):u(G)}));else return u(p)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,q,p,A,E,z,B,J,M,v){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(G){this.spinner.stop();try{this.saveCanvas(G,
-q?this.getFileData(!0,null,null,null,k,E):null,z,null==this.pages||0==this.pages.length,J)}catch(I){this.handleError(I)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}),null,k,d||1,g,n,null,null,p,A,B,M,v)}catch(G){this.spinner.stop(),this.handleError(G)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,n,q,p,A){g=null!=g?g:0;k=null!=k?k:0;var E=[];try{var z=
-this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var J=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=J&&"mxfile"==J.nodeName&&null!=this.pages){var M=J.getElementsByTagName("diagram");if(1==M.length&&!p){if(J=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(d[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=M[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,v))}}else if(0<M.length){p=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[M[0].getAttribute("id")]=this.pages[0].getId(),J=Editor.parseDiagramNode(M[0]),n=!1,u=1);for(;u<M.length;u++){var G=M[u].getAttribute("id");M[u].removeAttribute("id");var I=this.updatePageRoot(new DiagramPage(M[u]));d[G]=M[u].getAttribute("id");var F=this.pages.length;null==I.getName()&&I.setName(mxResources.get("pageWithNumber",[F+1]));z.model.execute(new ChangePage(this,I,I,F,
-!0));p.push(I)}this.updatePageLinks(d,p)}}if(null!=J&&"mxGraphModel"===J.nodeName){E=z.importGraphModel(J,g,k,n);if(null!=E)for(u=0;u<E.length;u++)this.updatePageLinksForCell(d,E[u]);var L=z.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=L&&null!=L.originalSrc){this.updateBackgroundPageLink(d,L);var K=new ChangePageSetup(this,null,L);K.ignoreColor=!0;z.model.execute(K)}}A&&this.insertHandler(E,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(H){if(q)throw H;
-this.handleError(H)}return E};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,g){var k=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(g);null!=q&&n.setLinkForCell(g,this.updatePageLink(d,q));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),A=!1,E=0;E<p.length;E++)q=p[E].getAttribute("href"),null!=q&&(p[E].setAttribute("href",this.updatePageLink(d,q)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(E=0;E<n.model.getChildCount(g);E++)this.updatePageLinksForCell(d,n.model.getChildAt(g,E))};EditorUi.prototype.updatePageLink=
-function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var A=p.open.substring(p.open.indexOf(",")+1);k=d[A];null!=k?p.open="data:page/id,"+k:null==this.getPageById(A)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(E){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,q){n=null!=n?n:d.name;k=null!=k?k:mxUtils.bind(this,function(A){this.handleError(A)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(n);try{var E="UNKNOWN-VISIO",z=n.lastIndexOf(".");if(0<=z&&z<n.length)E=n.substring(z+1).toUpperCase();else{var B=n.lastIndexOf("/");0<=
-B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:E+"-MS-IMPORT-FILE",action:"filename_"+n,label:A?"remote":"local"})}catch(M){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",d,n);var J=new XMLHttpRequest;J.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));J.responseType="blob";this.addRemoteServiceSecurityCheck(J);
-null!=q&&J.setRequestHeader("x-convert-custom",q);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var M=J.response;if("text/xml"==M.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(G){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(M)}else this.doImportVisio(M,g,k,n)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(v=new FileReader,v.onload=
-function(){k({message:JSON.parse(v.result).Message})},v.readAsText(J.response))}catch(u){k({})}});J.send(A)}else try{this.doImportVisio(d,g,k,n)}catch(M){k(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(q){this.handleError(q)});
+d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,q){try{var p=this.editor.graph,y=null!=p.themes&&"darkTheme"==p.defaultThemeName,A=null;if(null!=k&&0<k.length)p=this.createTemporaryGraph(y?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),p),A=k;else if(y||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(y?p.getDefaultStylesheet():p.getStylesheet());var C=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=B.viewState&&null!=B.viewState&&p.setBackgroundImage(B.viewState.backgroundImage);p.getGlobalVariable=function(I){return"page"==I?B.getName():"pagenumber"==I?1:C.apply(this,
+arguments)};document.body.appendChild(p.container);p.model.setRoot(B.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=I.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(A));d(M.substring(M.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(G){null!=g&&g(G)}}),null,null,null,mxUtils.bind(this,function(I){null!=g&&
+g(I)}),null,null,n,null,p.shadowVisible,null,p,q,null,null,null,"diagram",null)}catch(I){null!=g&&g(I)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,q,p,y,A,C,B,I,M,G){A=null!=A?A:!0;I=null!=I?I:0;y=null!=C?C:g.background;y==mxConstants.NONE&&(y=null);p=g.getSvg(y,B,I,null,null,p,null,null,null,g.shadowVisible||M,null,G,"diagram");(g.shadowVisible||M)&&g.addSvgShadow(p,null,null,0==I);null!=d&&p.setAttribute("content",d);null!=k&&p.setAttribute("resource",k);var S=mxUtils.bind(this,function(u){u=
+(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(u);null!=q&&q(u);return u});g.mathEnabled&&this.editor.addMathCss(p);if(null!=q)this.embedFonts(p,mxUtils.bind(this,function(u){A?this.editor.convertImages(u,mxUtils.bind(this,function(z){S(z)})):S(u)}));else return S(p)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,q,p,y,A,C,B,I,M,G){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var S=this.editor.graph.isSelectionEmpty();k=null!=k?k:S;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(u){this.spinner.stop();try{this.saveCanvas(u,
+q?this.getFileData(!0,null,null,null,k,A):null,C,null==this.pages||0==this.pages.length,I)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,k,d||1,g,n,null,null,p,y,B,M,G)}catch(u){this.spinner.stop(),this.handleError(u)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,n,q,p,y){g=null!=g?g:0;k=null!=k?k:0;var A=[];try{var C=
+this.editor.graph;if(null!=d&&0<d.length){C.model.beginUpdate();try{var B=mxUtils.parseXml(d);d={};var I=this.editor.extractGraphModel(B.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var M=I.getElementsByTagName("diagram");if(1==M.length&&!p){if(I=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(d[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var G=M[0].getAttribute("name");null!=G&&""!=G&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,G))}}else if(0<M.length){p=[];var S=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[M[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(M[0]),n=!1,S=1);for(;S<M.length;S++){var u=M[S].getAttribute("id");M[S].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(M[S]));d[u]=M[S].getAttribute("id");var F=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[F+1]));C.model.execute(new ChangePage(this,z,z,F,
+!0));p.push(z)}this.updatePageLinks(d,p)}}if(null!=I&&"mxGraphModel"===I.nodeName){A=C.importGraphModel(I,g,k,n);if(null!=A)for(S=0;S<A.length;S++)this.updatePageLinksForCell(d,A[S]);var J=C.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=J&&null!=J.originalSrc){this.updateBackgroundPageLink(d,J);var K=new ChangePageSetup(this,null,J);K.ignoreColor=!0;C.model.execute(K)}}y&&this.insertHandler(A,null,null,C.defaultVertexStyle,C.defaultEdgeStyle,!1,!0)}finally{C.model.endUpdate()}}}catch(H){if(q)throw H;
+this.handleError(H)}return A};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,g){var k=document.createElement("div"),n=this.editor.graph,q=n.getLinkForCell(g);null!=q&&n.setLinkForCell(g,this.updatePageLink(d,q));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var p=k.getElementsByTagName("a"),y=!1,A=0;A<p.length;A++)q=p[A].getAttribute("href"),null!=q&&(p[A].setAttribute("href",this.updatePageLink(d,q)),y=!0);y&&n.labelChanged(g,k.innerHTML)}for(A=0;A<n.model.getChildCount(g);A++)this.updatePageLinksForCell(d,n.model.getChildAt(g,A))};EditorUi.prototype.updatePageLink=
+function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var q=0;q<n.actions.length;q++){var p=n.actions[q];if(null!=p.open&&Graph.isPageLink(p.open)){var y=p.open.substring(p.open.indexOf(",")+1);k=d[y];null!=k?p.open="data:page/id,"+k:null==this.getPageById(y)&&delete p.open}}g="data:action/json,"+JSON.stringify(n)}}catch(A){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,q){n=null!=n?n:d.name;k=null!=k?k:mxUtils.bind(this,function(y){this.handleError(y)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(n);try{var A="UNKNOWN-VISIO",C=n.lastIndexOf(".");if(0<=C&&C<n.length)A=n.substring(C+1).toUpperCase();else{var B=n.lastIndexOf("/");0<=
+B&&B<n.length&&(n=n.substring(B+1))}EditorUi.logEvent({category:A+"-MS-IMPORT-FILE",action:"filename_"+n,label:y?"remote":"local"})}catch(M){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",d,n);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
+null!=q&&I.setRequestHeader("x-convert-custom",q);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var M=I.response;if("text/xml"==M.type){var G=new FileReader;G.onload=mxUtils.bind(this,function(S){try{g(S.target.result)}catch(u){k({message:mxResources.get("errorLoadingFile")})}});G.readAsText(M)}else this.doImportVisio(M,g,k,n)}catch(S){k(S)}else try{""==I.responseType||"text"==I.responseType?k({message:I.responseText}):(G=new FileReader,G.onload=
+function(){k({message:JSON.parse(G.result).Message})},G.readAsText(I.response))}catch(S){k({})}});I.send(y)}else try{this.doImportVisio(d,g,k,n)}catch(M){k(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(q){this.handleError(q)});
var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(q){k(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
-JSON.parse(d);g(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&p.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var A=0;A<q.svgThumbs.length;A++)p.push(Editor.createSvgDataUri(q.svgThumbs[A]));null!=q.thumb&&p.push(q.thumb);console.log.apply(console,p)}}catch(E){}}catch(E){null!=window.console&&console.error(E),k(E)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);g(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&p.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var y=0;y<q.svgThumbs.length;y++)p.push(Editor.createSvgDataUri(q.svgThumbs[y]));null!=q.thumb&&p.push(q.thumb);console.log.apply(console,p)}}catch(A){}}catch(A){null!=window.console&&console.error(A),k(A)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(d,
-g,k,n){var q=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(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 E=mxUtils.parseXml(A).getElementsByTagName("svg");
-if(0<E.length){var z=parseFloat(E[0].getAttribute("width")),B=parseFloat(E[0].getAttribute("height"));if(isNaN(z)||isNaN(B))try{var J=E[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(J[2]);B=parseFloat(J[3])}catch(M){z=z||100,B=B||100}k(q.convertDataUri(Editor.createSvgDataUri(A)),z,B)}else n({message:mxResources.get("invalidInput")})}catch(M){n(M)}})}catch(A){n(A)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function q(E,z,B){c1=E>>2;c2=(E&3)<<4|z>>4;c3=(z&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+q(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+q(E.charCodeAt(i),0,0):r+q(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(B){var J=new Image;J.onload=
-function(){try{var M=J.width,v=J.height;if(0==M&&0==v){var u=z.result,G=u.indexOf(","),I=decodeURIComponent(escape(atob(u.substring(G+1)))),F=mxUtils.parseXml(I).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),v=parseFloat(F[0].getAttribute("height")))}k(z.result,M,v)}catch(L){n(L)}};J.src=z.result};z.onerror=function(B){n(B)}}else n(E)};A.onerror=function(E){n(E)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,q=null;n.getModel().beginUpdate();
-try{q=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(q,!0)}finally{n.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,g,k,n,q,p,A,E){p=null!=p?p:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(v){4==
-v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,E)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B,
-g,k,p,!0,E);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var J=this.importXml(B,g,k,p,!0,E);if(0<J.length)return J}catch(v){}this.loadImage(d,mxUtils.bind(this,function(v){if("data:"==d.substring(0,5))this.resizeImage(v,d,mxUtils.bind(this,function(I,F,L){z.setSelectionCell(z.insertVertex(null,null,
-"",z.snap(g),z.snap(k),F,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(I)+";"))}),A,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),G=Math.round(v.width*u);v=Math.round(v.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),G,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var v=null;z.getModel().beginUpdate();try{v=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(n?"html=1;":"")),z.updateCellSize(v),z.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{z.getModel().endUpdate()}z.setSelectionCell(v)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,p,null,E);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,p,null,E))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{z=this.editor.graph;q=null;z.getModel().beginUpdate();try{q=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");q.value=d;z.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var M=z.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=M.width;q.geometry.height=M.height}Graph.isLink(q.value)&&z.setLinkForCell(q,q.value);q.geometry.width+=z.gridSize;q.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+g,k,n){var q=this,p=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(y){try{if(mxClient.IS_IE||mxClient.IS_IE11)y=y.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var A=mxUtils.parseXml(y).getElementsByTagName("svg");
+if(0<A.length){var C=parseFloat(A[0].getAttribute("width")),B=parseFloat(A[0].getAttribute("height"));if(isNaN(C)||isNaN(B))try{var I=A[0].getAttribute("viewBox").split(/\s+/);C=parseFloat(I[2]);B=parseFloat(I[3])}catch(M){C=C||100,B=B||100}k(q.convertDataUri(Editor.createSvgDataUri(y)),C,B)}else n({message:mxResources.get("invalidInput")})}catch(M){n(M)}})}catch(y){n(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function q(A,C,B){c1=A>>2;c2=(A&3)<<4|C>>4;c3=(C&15)<<2|B>>6;c4=B&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(A){if(10>A)return String.fromCharCode(48+A);A-=10;if(26>A)return String.fromCharCode(65+A);A-=26;if(26>A)return String.fromCharCode(97+A);A-=26;return 0==A?"-":1==A?"_":"?"}var y=new XMLHttpRequest;y.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(A){r="";for(i=0;i<A.length;i+=3)r=i+2==A.length?r+q(A.charCodeAt(i),A.charCodeAt(i+1),0):i+1==A.length?r+q(A.charCodeAt(i),0,0):r+q(A.charCodeAt(i),A.charCodeAt(i+1),A.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(B){var I=new Image;I.onload=
+function(){try{var M=I.width,G=I.height;if(0==M&&0==G){var S=C.result,u=S.indexOf(","),z=decodeURIComponent(escape(atob(S.substring(u+1)))),F=mxUtils.parseXml(z).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),G=parseFloat(F[0].getAttribute("height")))}k(C.result,M,G)}catch(J){n(J)}};I.src=C.result};C.onerror=function(B){n(B)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,q=null;n.getModel().beginUpdate();
+try{q=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(q,!0)}finally{n.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,g,k,n,q,p,y,A){p=null!=p?p:!0;y=null!=y?y:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(G){4==
+G.readyState&&200<=G.status&&299>=G.status&&this.editor.graph.setSelectionCells(this.insertTextAt(G.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var C=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var B=Editor.extractGraphModelFromPdf(d);if(null!=B&&0<B.length)return this.importXml(B,g,k,p,!0,A)}if(Editor.isPngDataUrl(d)&&(B=Editor.extractGraphModelFromPng(d),null!=B&&0<B.length))return this.importXml(B,
+g,k,p,!0,A);if("data:image/svg+xml;"==d.substring(0,19))try{B=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(B=d.substring(d.indexOf(",")+1),B=window.atob&&!mxClient.IS_SF?atob(B):Base64.decode(B,!0)):B=decodeURIComponent(d.substring(d.indexOf(",")+1));var I=this.importXml(B,g,k,p,!0,A);if(0<I.length)return I}catch(G){}this.loadImage(d,mxUtils.bind(this,function(G){if("data:"==d.substring(0,5))this.resizeImage(G,d,mxUtils.bind(this,function(z,F,J){C.setSelectionCell(C.insertVertex(null,null,
+"",C.snap(g),C.snap(k),F,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),y,this.maxImageSize);else{var S=Math.min(1,Math.min(this.maxImageSize/G.width,this.maxImageSize/G.height)),u=Math.round(G.width*S);G=Math.round(G.height*S);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(g),C.snap(k),u,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var G=null;C.getModel().beginUpdate();try{G=C.insertVertex(C.getDefaultParent(),null,d,C.snap(g),C.snap(k),1,1,"text;"+(n?"html=1;":"")),C.updateCellSize(G),C.fireEvent(new mxEventObject("textInserted","cells",[G]))}finally{C.getModel().endUpdate()}C.setSelectionCell(G)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,p,null,A);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(G){this.editor.graph.setSelectionCells(this.importXml(G,g,k,p,null,A))}),mxUtils.bind(this,function(G){this.handleError(G)}));else{C=this.editor.graph;q=null;C.getModel().beginUpdate();try{q=C.insertVertex(C.getDefaultParent(),null,"",C.snap(g),C.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");q.value=d;C.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var M=C.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=M.width;q.geometry.height=M.height}Graph.isLink(q.value)&&C.setLinkForCell(q,q.value);q.geometry.width+=C.gridSize;q.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,E){StorageFile.listFiles(this,
-"F",A,E)});window.openBrowserFile=mxUtils.bind(this,function(A,E,z){StorageFile.getFileContent(this,A,E,z)});window.deleteBrowserFile=mxUtils.bind(this,function(A,E,z){StorageFile.deleteFile(this,A,E,z)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(A=new Blob([A],{type:"application/octet-stream"}),
-this.importVisio(A,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var q=this.dialog,p=q.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;p.apply(q,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,g,k){var n=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var A=0,E,z=!1;p.forEach(function(B,J){B=J.name.toLowerCase();"diagram/diagram.xml"==B?(z=!0,J.async("string").then(function(M){0==M.indexOf("<mxfile ")?g(M):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>A&&(A=B,E=J))});0<A?E.async("string").then(function(B){(new XMLHttpRequest).upload&&
-n.isRemoteFileFormat(B,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),d.name):k()}):z||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,g,k,n,q,p,A,E,z,B,J,M){B=null!=
-B?B:!0;var v=!1,u=null,G=mxUtils.bind(this,function(I){var F=null;null!=I&&"<mxlibrary"==I.substring(0,10)?this.loadLibrary(new LocalLibrary(this,I,A)):F=this.importXml(I,k,n,B,null,null!=M?mxEvent.isControlDown(M):null);null!=E&&E(F)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=J?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,n,B,null,null!=M?mxEvent.isControlDown(M):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0,
-z)+d.substring(d.indexOf(",",z+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),u=[g.insertVertex(null,null,"",k,n,q,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(v=!0,this.importGraphML(d,G)):null!=z&&null!=A&&(/(\.v(dx|sdx?))($|\?)/i.test(A)||/(\.vs(x|sx?))($|\?)/i.test(A))?(v=!0,this.importVisio(z,G)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,A)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,q=mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?G(I.responseText):null!=E&&E(null))}),null!=d?this.parseFileData(d,q,A):this.parseFile(z,q,A)):0==d.indexOf("PK")&&null!=z?(v=!0,this.importZipFile(z,G,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,n,!0,null,B);E(u)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(u=this.insertTextAt(this.validateFileData(d),
-k,n,!0,null,B,null,null!=M?mxEvent.isControlDown(M):null));v||null==E||E(u);return u};EditorUi.prototype.importFiles=function(d,g,k,n,q,p,A,E,z,B,J,M,v){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var u=null!=g&&null!=k,G=!0;g=null!=g?g:0;k=null!=k?k:0;var I=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var F=J||this.resampleThreshold,L=0;L<d.length;L++)if("image/svg"!==d[L].type.substring(0,9)&&"image/"===d[L].type.substring(0,6)&&d[L].size>F){I=!0;break}var K=mxUtils.bind(this,function(){var H=
-this.editor.graph,Q=H.gridSize;q=null!=q?q:mxUtils.bind(this,function(C,N,R,O,P,S,X,aa,Y){try{return null!=C&&"<mxlibrary"==C.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,C,X)),null):this.isCompatibleString(C)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,C,X,!0)),null):this.importFile(C,N,R,O,P,S,X,aa,Y,u,M,v)}catch(Z){return this.handleError(Z),null}});p=null!=p?p:mxUtils.bind(this,function(C){H.setSelectionCells(C)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=d.length,T=U,V=[],W=mxUtils.bind(this,function(C,N){V[C]=N;if(0==--T){this.spinner.stop();if(null!=E)E(V);else{var R=[];H.getModel().beginUpdate();try{for(C=0;C<V.length;C++){var O=V[C]();null!=O&&(R=R.concat(O))}}finally{H.getModel().endUpdate()}}p(R)}}),t=0;t<U;t++)mxUtils.bind(this,function(C){var N=d[C];if(null!=N){var R=new FileReader;R.onload=mxUtils.bind(this,function(O){if(null==A||A(N))if("image/"==N.type.substring(0,
-6))if("image/svg"==N.type.substring(0,9)){var P=Graph.clipSvgDataUri(O.target.result),S=P.indexOf(",");S=decodeURIComponent(escape(atob(P.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=M?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,
-14)?W(C,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],ma=ea.getAttribute("width"),ia=ea.getAttribute("height");ma=null!=ma&&"%"!=ma.charAt(ma.length-1)?parseFloat(ma):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var pa=ea.getAttribute("viewBox");if(null==pa||0==pa.length)ea.setAttribute("viewBox","0 0 "+ma+" "+ia);else if(isNaN(ma)||isNaN(ia)){var na=pa.split(" ");3<na.length&&(ma=parseFloat(na[2]),ia=parseFloat(na[3]))}P=
-Editor.createSvgDataUri(mxUtils.getXml(ea));var Fa=Math.min(1,Math.min(n/Math.max(1,ma)),n/Math.max(1,ia)),Ga=q(P,N.type,g+C*Q,k+C*Q,Math.max(1,Math.round(ma*Fa)),Math.max(1,Math.round(ia*Fa)),N.name);if(isNaN(ma)||isNaN(ia)){var xa=new Image;xa.onload=mxUtils.bind(this,function(){ma=Math.max(1,xa.width);ia=Math.max(1,xa.height);Ga[0].geometry.width=ma;Ga[0].geometry.height=ia;ea.setAttribute("viewBox","0 0 "+ma+" "+ia);P=Editor.createSvgDataUri(mxUtils.getXml(ea));var Ma=P.indexOf(";");0<Ma&&(P=
-P.substring(0,Ma)+P.substring(P.indexOf(",",Ma+1)));H.setCellStyles("image",P,[Ga[0]])});xa.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Ga}}}catch(Ma){}return null})):W(C,mxUtils.bind(this,function(){return q(aa,"text/xml",g+C*Q,k+C*Q,0,0,N.name)}))}else W(C,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==N.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;W(C,mxUtils.bind(this,function(){return q(Y,
-"text/xml",g+C*Q,k+C*Q,Z.width,Z.height,N.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ea,ma,ia){W(C,mxUtils.bind(this,function(){if(null!=
-ea&&ea.length<B){var pa=G&&this.isResampleImageSize(N.size,J)?Math.min(1,Math.min(n/ma,n/ia)):1;return q(ea,N.type,g+C*Q,k+C*Q,Math.round(ma*pa),Math.round(ia*pa),N.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),G,n,J,N.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else P=O.target.result,q(P,N.type,g+C*Q,k+C*Q,240,160,N.name,function(ba){W(C,function(){return ba})},N)});/(\.v(dx|sdx?))($|\?)/i.test(N.name)||
-/(\.vs(x|sx?))($|\?)/i.test(N.name)?q(null,N.type,g+C*Q,k+C*Q,240,160,N.name,function(O){W(C,function(){return O})},N):"image"==N.type.substring(0,5)||"application/pdf"==N.type?R.readAsDataURL(N):R.readAsText(N)}})(t)});if(I){I=[];for(L=0;L<d.length;L++)I.push(d[L]);d=I;this.confirmImageResize(function(H){G=H;K()},z)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
-[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(p,A){if(p||g)mxSettings.setResizeImages(p?A:null),mxSettings.save();k();d(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){q(p,!0)},function(p){q(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"),
+this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,A){StorageFile.listFiles(this,
+"F",y,A)});window.openBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.getFileContent(this,y,A,C)});window.deleteBrowserFile=mxUtils.bind(this,function(y,A,C){StorageFile.deleteFile(this,y,A,C)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,A){null!=A&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(A)?(y=new Blob([y],{type:"application/octet-stream"}),
+this.importVisio(y,mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,A)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var q=this.dialog,p=q.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=n;p.apply(q,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,g,k){var n=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(p){if(mxUtils.isEmptyObject(p.files))k();else{var y=0,A,C=!1;p.forEach(function(B,I){B=I.name.toLowerCase();"diagram/diagram.xml"==B?(C=!0,I.async("string").then(function(M){0==M.indexOf("<mxfile ")?g(M):k()})):0==B.indexOf("versions/")&&(B=parseInt(B.substr(9)),B>y&&(y=B,A=I))});0<y?A.async("string").then(function(B){(new XMLHttpRequest).upload&&
+n.isRemoteFileFormat(B,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(B,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?g(I.responseText):k())}),d.name):k()}):C||k()}},function(p){k(p)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,g,k,n,q,p,y,A,C,B,I,M){B=null!=
+B?B:!0;var G=!1,S=null,u=mxUtils.bind(this,function(z){var F=null;null!=z&&"<mxlibrary"==z.substring(0,10)?this.loadLibrary(new LocalLibrary(this,z,y)):F=this.importXml(z,k,n,B,null,null!=M?mxEvent.isControlDown(M):null);null!=A&&A(F)});"image"==g.substring(0,5)?(C=!1,"image/png"==g.substring(0,9)&&(g=I?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(S=this.importXml(g,k,n,B,null,null!=M?mxEvent.isControlDown(M):null),C=!0)),C||(g=this.editor.graph,C=d.indexOf(";"),0<C&&(d=d.substring(0,
+C)+d.substring(d.indexOf(",",C+1))),B&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),S=[g.insertVertex(null,null,"",k,n,q,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(G=!0,this.importGraphML(d,u)):null!=C&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(G=!0,this.importVisio(C,u)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,y)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(G=!0,q=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(z.responseText):null!=A&&A(null))}),null!=d?this.parseFileData(d,q,y):this.parseFile(C,q,y)):0==d.indexOf("PK")&&null!=C?(G=!0,this.importZipFile(C,u,mxUtils.bind(this,function(){S=this.insertTextAt(this.validateFileData(d),k,n,!0,null,B);A(S)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(S=this.insertTextAt(this.validateFileData(d),
+k,n,!0,null,B,null,null!=M?mxEvent.isControlDown(M):null));G||null==A||A(S);return S};EditorUi.prototype.importFiles=function(d,g,k,n,q,p,y,A,C,B,I,M,G){n=null!=n?n:this.maxImageSize;B=null!=B?B:this.maxImageBytes;var S=null!=g&&null!=k,u=!0;g=null!=g?g:0;k=null!=k?k:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var F=I||this.resampleThreshold,J=0;J<d.length;J++)if("image/svg"!==d[J].type.substring(0,9)&&"image/"===d[J].type.substring(0,6)&&d[J].size>F){z=!0;break}var K=mxUtils.bind(this,function(){var H=
+this.editor.graph,N=H.gridSize;q=null!=q?q:mxUtils.bind(this,function(D,L,T,O,P,R,X,Z,Y){try{return null!=D&&"<mxlibrary"==D.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,D,X)),null):this.isCompatibleString(D)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,D,X,!0)),null):this.importFile(D,L,T,O,P,R,X,Z,Y,S,M,G)}catch(aa){return this.handleError(aa),null}});p=null!=p?p:mxUtils.bind(this,function(D){H.setSelectionCells(D)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var U=d.length,Q=U,V=[],W=mxUtils.bind(this,function(D,L){V[D]=L;if(0==--Q){this.spinner.stop();if(null!=A)A(V);else{var T=[];H.getModel().beginUpdate();try{for(D=0;D<V.length;D++){var O=V[D]();null!=O&&(T=T.concat(O))}}finally{H.getModel().endUpdate()}}p(T)}}),t=0;t<U;t++)mxUtils.bind(this,function(D){var L=d[D];if(null!=L){var T=new FileReader;T.onload=mxUtils.bind(this,function(O){if(null==y||y(L))if("image/"==L.type.substring(0,
+6))if("image/svg"==L.type.substring(0,9)){var P=Graph.clipSvgDataUri(O.target.result),R=P.indexOf(",");R=decodeURIComponent(escape(atob(P.substring(R+1))));var X=mxUtils.parseXml(R);R=X.getElementsByTagName("svg");if(0<R.length){R=R[0];var Z=M?null:R.getAttribute("content");null!=Z&&"<"!=Z.charAt(0)&&"%"!=Z.charAt(0)&&(Z=unescape(window.atob?atob(Z):Base64.decode(Z,!0)));null!=Z&&"%"==Z.charAt(0)&&(Z=decodeURIComponent(Z));null==Z||"<mxfile "!==Z.substring(0,8)&&"<mxGraphModel "!==Z.substring(0,14)?
+W(D,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ea=ba[0],ja=ea.getAttribute("width"),fa=ea.getAttribute("height");ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var ra=ea.getAttribute("viewBox");if(null==ra||0==ra.length)ea.setAttribute("viewBox","0 0 "+ja+" "+fa);else if(isNaN(ja)||isNaN(fa)){var ma=ra.split(" ");3<ma.length&&(ja=parseFloat(ma[2]),fa=parseFloat(ma[3]))}P=
+Editor.createSvgDataUri(mxUtils.getXml(ea));var Ga=Math.min(1,Math.min(n/Math.max(1,ja)),n/Math.max(1,fa)),Fa=q(P,L.type,g+D*N,k+D*N,Math.max(1,Math.round(ja*Ga)),Math.max(1,Math.round(fa*Ga)),L.name);if(isNaN(ja)||isNaN(fa)){var ya=new Image;ya.onload=mxUtils.bind(this,function(){ja=Math.max(1,ya.width);fa=Math.max(1,ya.height);Fa[0].geometry.width=ja;Fa[0].geometry.height=fa;ea.setAttribute("viewBox","0 0 "+ja+" "+fa);P=Editor.createSvgDataUri(mxUtils.getXml(ea));var Ma=P.indexOf(";");0<Ma&&(P=
+P.substring(0,Ma)+P.substring(P.indexOf(",",Ma+1)));H.setCellStyles("image",P,[Fa[0]])});ya.src=Editor.createSvgDataUri(mxUtils.getXml(ea))}return Fa}}}catch(Ma){}return null})):W(D,mxUtils.bind(this,function(){return q(Z,"text/xml",g+D*N,k+D*N,0,0,L.name)}))}else W(D,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==L.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var aa=new Image;aa.src=O.target.result;W(D,mxUtils.bind(this,function(){return q(Y,
+"text/xml",g+D*N,k+D*N,aa.width,aa.height,L.name)}));R=!0}}R||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ea,ja,fa){W(D,mxUtils.bind(this,function(){if(null!=
+ea&&ea.length<B){var ra=u&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(n/ja,n/fa)):1;return q(ea,L.type,g+D*N,k+D*N,Math.round(ja*ra),Math.round(fa*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),u,n,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else P=O.target.result,q(P,L.type,g+D*N,k+D*N,240,160,L.name,function(ba){W(D,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||
+/(\.vs(x|sx?))($|\?)/i.test(L.name)?q(null,L.type,g+D*N,k+D*N,240,160,L.name,function(O){W(D,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?T.readAsDataURL(L):T.readAsText(L)}})(t)});if(z){z=[];for(J=0;J<d.length;J++)z.push(d[J]);d=z;this.confirmImageResize(function(H){u=H;K()},C)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
+[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(p,y){if(p||g)mxSettings.setResizeImages(p?y:null),mxSettings.save();k();d(y)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){q(p,!0)},function(p){q(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"),
'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,n)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var n=new XMLHttpRequest;n.open("POST",
-OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,q,p,A){q=null!=q?q:this.maxImageSize;var E=Math.max(1,d.width),
-z=Math.max(1,d.height);if(n&&this.isResampleImageSize(null!=A?A:g.length,p))try{var B=Math.max(E/q,z/q);if(1<B){var J=Math.round(E/B),M=Math.round(z/B),v=document.createElement("canvas");v.width=J;v.height=M;v.getContext("2d").drawImage(d,0,0,J,M);var u=v.toDataURL();if(u.length<g.length){var G=document.createElement("canvas");G.width=J;G.height=M;var I=G.toDataURL();u!==I&&(g=u,E=J,z=M)}}}catch(F){}k(g,E,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};
+OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,q,p,y){q=null!=q?q:this.maxImageSize;var A=Math.max(1,d.width),
+C=Math.max(1,d.height);if(n&&this.isResampleImageSize(null!=y?y:g.length,p))try{var B=Math.max(A/q,C/q);if(1<B){var I=Math.round(A/B),M=Math.round(C/B),G=document.createElement("canvas");G.width=I;G.height=M;G.getContext("2d").drawImage(d,0,0,I,M);var S=G.toDataURL();if(S.length<g.length){var u=document.createElement("canvas");u.width=I;u.height=M;var z=u.toDataURL();S!==z&&(g=S,A=I,C=M)}}}catch(F){}k(g,A,C)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};
EditorUi.prototype.loadImage=function(d,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=d}catch(q){if(null!=k)k(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(F){var L=F.getEvent();return null==F.getState()&&
-!mxEvent.isMouseEvent(L)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(L)&&(null==F.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))});g.cellEditor.editPlantUmlData=function(F,L,K){var H=JSON.parse(K);L=new TextareaDialog(d,mxResources.get("plantUml")+":",H.data,function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Q,H.format,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==H.format)g.labelChanged(F,"<pre>"+
-U+"</pre>"),g.updateCellSize(F,!0);else{g.setCellStyles("image",d.convertDataUri(U),[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=T,W.height=V,g.cellsResized([F],[W],!1))}g.setAttributeForCell(F,"plantUmlData",JSON.stringify({data:Q,format:H.format}))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},null,null,400,220);d.showDialog(L.container,420,300,!0,!0);L.init()};g.cellEditor.editMermaidData=function(F,L,K){var H=JSON.parse(K);L=new TextareaDialog(d,mxResources.get("mermaid")+
-":",H.data,function(Q){null!=Q&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Q,H.config,function(U,T,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Math.max(W.width,T),W.height=Math.max(W.height,V),g.cellsResized([F],[W],!1));g.setAttributeForCell(F,"mermaidData",JSON.stringify({data:Q,config:H.config},null,2))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},
-null,null,400,220);d.showDialog(L.container,420,300,!0,!0);L.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(F,L){try{var K=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=K)this.editPlantUmlData(F,L,K);else if(K=this.graph.getAttributeForCell(F,"mermaidData"),null!=K)this.editMermaidData(F,L,K);else{var H=g.getCellStyle(F);"1"==mxUtils.getValue(H,"metaEdit","0")?d.showDataDialog(F):k.apply(this,arguments)}}catch(Q){d.handleError(Q)}};g.getLinkTitle=function(F){return d.getLinkTitle(F)};
-g.customLinkClicked=function(F){var L=!1;try{d.handleCustomLink(F),L=!0}catch(K){d.handleError(K)}return L};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(F){var L=n.apply(this,arguments);null!=L&&null!=L.src&&Graph.isPageLink(L.src)&&(L={originalSrc:L.src});return L};var q=g.setBackgroundImage;g.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=d.createImageForPageLink(F.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
-function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(F,L){F=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=F){var K=F.indexOf(",");if(0<K)for(F=F.substring(K+1),L=L.getProperty("patches"),K=0;K<L.length;K++)if(null!=L[K][EditorUi.DIFF_UPDATE]&&null!=L[K][EditorUi.DIFF_UPDATE][F]||null!=L[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(L[K][EditorUi.DIFF_REMOVE],
-F)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(F,L){var K=p.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!L)K={src:K.originalSrc};else if(L&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,Q=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=d.createImageForPageLink(K.originalSrc);
-this.shapeBackgroundColor=U;this.shapeForegroundColor=Q;this.stylesheet=H}return K};var A=this.clearDefaultStyle;this.clearDefaultStyle=function(){A.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=
-d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var z=g.addClickHandler;g.addClickHandler=function(F,L,K){var H=L;L=function(Q,U){if(null==U){var T=mxEvent.getSource(Q);"a"==T.nodeName.toLowerCase()&&(U=T.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(Q)||!mxEvent.isPopupTrigger(Q))&&g.customLinkClicked(U)&&mxEvent.consume(Q);null!=H&&H(Q,U)};z.call(this,F,
-L,K)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(F,L,K){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,
-!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var J=g.getExportVariables;g.getExportVariables=function(){var F=J.apply(this,arguments),L=d.getCurrentFile();null!=L&&(F.filename=L.getTitle());F.pagecount=null!=d.pages?d.pages.length:1;F.page=null!=d.currentPage?d.currentPage.getName():"";F.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return F};var M=g.getGlobalVariable;g.getGlobalVariable=function(F){var L=d.getCurrentFile();return"filename"==
-F&&null!=L?L.getTitle():"page"==F&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==F?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==F?null!=d.pages?d.pages.length:1:M.apply(this,arguments)};var v=g.labelLinkClicked;g.labelLinkClicked=function(F,L,K){var H=L.getAttribute("href");if(null==H||!g.isCustomLink(H)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))v.apply(this,arguments);else{if(!g.isEnabled()||null!=F&&g.isCellLocked(F.cell))g.customLinkClicked(H),
-g.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var F=d.defaultFilename,L=d.getCurrentFile();null!=L&&(F=null!=L.getTitle()?L.getTitle():F);return F};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(F){var J=F.getEvent();return null==F.getState()&&
+!mxEvent.isMouseEvent(J)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(J)&&(null==F.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))});g.cellEditor.editPlantUmlData=function(F,J,K){var H=JSON.parse(K);J=new TextareaDialog(d,mxResources.get("plantUml")+":",H.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,H.format,function(U,Q,V){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==H.format)g.labelChanged(F,"<pre>"+
+U+"</pre>"),g.updateCellSize(F,!0);else{g.setCellStyles("image",d.convertDataUri(U),[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Q,W.height=V,g.cellsResized([F],[W],!1))}g.setAttributeForCell(F,"plantUmlData",JSON.stringify({data:N,format:H.format}))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},null,null,400,220);d.showDialog(J.container,420,300,!0,!0);J.init()};g.cellEditor.editMermaidData=function(F,J,K){var H=JSON.parse(K);J=new TextareaDialog(d,mxResources.get("mermaid")+
+":",H.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,H.config,function(U,Q,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",U,[F]);var W=g.model.getGeometry(F);null!=W&&(W=W.clone(),W.width=Math.max(W.width,Q),W.height=Math.max(W.height,V),g.cellsResized([F],[W],!1));g.setAttributeForCell(F,"mermaidData",JSON.stringify({data:N,config:H.config},null,2))}finally{g.getModel().endUpdate()}},function(U){d.handleError(U)})},
+null,null,400,220);d.showDialog(J.container,420,300,!0,!0);J.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(F,J){try{var K=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=K)this.editPlantUmlData(F,J,K);else if(K=this.graph.getAttributeForCell(F,"mermaidData"),null!=K)this.editMermaidData(F,J,K);else{var H=g.getCellStyle(F);"1"==mxUtils.getValue(H,"metaEdit","0")?d.showDataDialog(F):k.apply(this,arguments)}}catch(N){d.handleError(N)}};g.getLinkTitle=function(F){return d.getLinkTitle(F)};
+g.customLinkClicked=function(F){var J=!1;try{d.handleCustomLink(F),J=!0}catch(K){d.handleError(K)}return J};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(F){var J=n.apply(this,arguments);null!=J&&null!=J.src&&Graph.isPageLink(J.src)&&(J={originalSrc:J.src});return J};var q=g.setBackgroundImage;g.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=d.createImageForPageLink(F.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
+function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(F,J){F=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=F){var K=F.indexOf(",");if(0<K)for(F=F.substring(K+1),J=J.getProperty("patches"),K=0;K<J.length;K++)if(null!=J[K][EditorUi.DIFF_UPDATE]&&null!=J[K][EditorUi.DIFF_UPDATE][F]||null!=J[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(J[K][EditorUi.DIFF_REMOVE],
+F)){g.refreshBackgroundImage();break}}}));var p=g.getBackgroundImageObject;g.getBackgroundImageObject=function(F,J){var K=p.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!J)K={src:K.originalSrc};else if(J&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,N=this.shapeForegroundColor,U=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=d.createImageForPageLink(K.originalSrc);
+this.shapeBackgroundColor=U;this.shapeForegroundColor=N;this.stylesheet=H}return K};var y=this.clearDefaultStyle;this.clearDefaultStyle=function(){y.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var A=
+d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return A.apply(this,arguments)};var C=g.addClickHandler;g.addClickHandler=function(F,J,K){var H=J;J=function(N,U){if(null==U){var Q=mxEvent.getSource(N);"a"==Q.nodeName.toLowerCase()&&(U=Q.getAttribute("href"))}null!=U&&g.isCustomLink(U)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(U)&&mxEvent.consume(N);null!=H&&H(N,U)};C.call(this,F,
+J,K)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(F,J,K){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,
+!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var F=I.apply(this,arguments),J=d.getCurrentFile();null!=J&&(F.filename=J.getTitle());F.pagecount=null!=d.pages?d.pages.length:1;F.page=null!=d.currentPage?d.currentPage.getName():"";F.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return F};var M=g.getGlobalVariable;g.getGlobalVariable=function(F){var J=d.getCurrentFile();return"filename"==
+F&&null!=J?J.getTitle():"page"==F&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==F?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==F?null!=d.pages?d.pages.length:1:M.apply(this,arguments)};var G=g.labelLinkClicked;g.labelLinkClicked=function(F,J,K){var H=J.getAttribute("href");if(null==H||!g.isCustomLink(H)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))G.apply(this,arguments);else{if(!g.isEnabled()||null!=F&&g.isCellLocked(F.cell))g.customLinkClicked(H),
+g.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var F=d.defaultFilename,J=d.getCurrentFile();null!=J&&(F=null!=J.getTitle()?J.getTitle():F);return F};var S=this.actions.get("print");S.setEnabled(!mxClient.IS_IOS||!navigator.standalone);S.visible=S.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var L=g.cellEditor.text2,K=null;null!=L&&(mxEvent.addListener(L,"dragleave",function(H){null!=K&&(K.parentNode.removeChild(K),K=null);H.stopPropagation();H.preventDefault()}),mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(H){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&
-(K=this.highlightElement(L));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(H){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(U,T,V,W,t,C){g.insertImage(U,t,C)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var T=0;T<U.length;T++)U[T]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var Q=
-H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(U){var T=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,T)),V/Math.max(1,U));g.insertImage(decodeURIComponent(Q),T*V,U*V)})):document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(F,L){mxSettings.setUnit(L.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(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)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,L){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var G=
-this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:G.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var I=null;mxEvent.addListener(g.container,"dragleave",function(F){g.isEnabled()&&(null!=I&&(I.parentNode.removeChild(I),I=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,
-function(F){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(F){null!=I&&(I.parentNode.removeChild(I),I=null);if(g.isEnabled()){var L=mxUtils.convertPoint(g.container,mxEvent.getClientX(F),mxEvent.getClientY(F)),K=F.dataTransfer.files,H=g.view.translate,Q=g.view.scale,U=L.x/Q-H.x,T=L.y/Q-H.y;if(0<K.length)"1"!=
-urlParams.embed&&mxEvent.isShiftDown(F)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(F)&&(T=U=null),this.importFiles(K,U,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(T=U=0);var V=0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;L=this.extractGraphModelFromEvent(F,null!=this.pages);
-if(null!=L)g.setSelectionCells(this.importXml(L,U,T,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var W=F.dataTransfer.getData("text/html");L=document.createElement("div");L.innerHTML=g.sanitizeHtml(W);var t=null;K=L.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(t=!0)):(K=L.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(L=L.getElementsByTagName("pre"),
-null!=L&&1==L.length&&(W=mxUtils.getTextContent(L[0]))));var C=!0,N=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(W,U,T,!0,t,null,C,mxEvent.isControlDown(F)))});t&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(R){C=R;N()},mxEvent.isControlDown(F)):N()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(R){var O=Math.max(1,R.width);R=Math.max(1,R.height);var P=this.maxImageSize;P=Math.min(1,
-Math.min(P/Math.max(1,O)),P/Math.max(1,R));g.setSelectionCell(g.insertVertex(null,null,"",U,T,O*P,R*P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(R){g.setSelectionCells(this.insertTextAt(V,U,T,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),U,T,!0))}}F.stopPropagation();F.preventDefault()}),!1)}g.enableFlowAnimation=
-!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();u=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",u);this.addListener("sketchModeChanged",u);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?
-mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,q=0;q<k.types.length;q++)if("text/"===k.types[q].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var A=
-p[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(z,B,J,M,v,u){d.insertImage(z,v,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var B=0;B<z.length;B++)z[B]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=
-"&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=
-"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var A=mxEvent.getSource(p);null==g.container||!g.isEnabled()||g.isMouseDown||
-g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var A=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=A&&17!=
-A&&91!=A&&93!=A||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,
-"paste",mxUtils.bind(this,function(p){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),mxEvent.isConsumed(p)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(p,k,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);g=g||this.doSetCurrentTheme(d);
-this.fireEvent(new mxEventObject("currentThemeChanged"));g||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var g=Editor.currentTheme,k=!1;if(g!=d){if("1"==urlParams["live-ui"]){var n=function(q){return null==q||""==q||"dark"==q||"kennedy"==q};console.log("doSetCurrentTheme",g,d);d=n(d)?"default":d;g=n(g)?"default":g;"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display=
-"block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth,k=!0):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,k=!0);this.switchTheme(d)}Editor.currentTheme=d}return k};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d);this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=
-this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),
-document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",
-null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height="22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",
-this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,g,k,n){var q=this.menus.get(g);d=d.addMenu(mxResources.get(g),q.funct);d.className=k;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height=
-"30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(g));this.menus.menuCreated(q,d,"geMenuItem");null!=n&&(d.style.backgroundImage="url("+n+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-
-241):Math.max(10,this.diagramContainer.clientWidth-248),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,g,240,k,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=
-new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var J=g.cellEditor.text2,K=null;null!=J&&(mxEvent.addListener(J,"dragleave",function(H){null!=K&&(K.parentNode.removeChild(K),K=null);H.stopPropagation();H.preventDefault()}),mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(H){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&
+(K=this.highlightElement(J));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(H){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(U,Q,V,W,t,D){g.insertImage(U,t,D)},function(){},function(U){return"image/"==U.type.substring(0,6)},function(U){for(var Q=0;Q<U.length;Q++)U[Q]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var N=
+H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(U){var Q=Math.max(1,U.width);U=Math.max(1,U.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,Q)),V/Math.max(1,U));g.insertImage(decodeURIComponent(N),Q*V,U*V)})):document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):
+0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(S=this.editor.graph.view,S.setUnit(mxSettings.getUnit()),S.addListener("unitChanged",function(F,J){mxSettings.setUnit(J.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
+!this.editor.editable?null:new mxDualRuler(this,S.unit),this.refresh());if("1"==urlParams.styledev){S=document.getElementById("geFooter");null!=S&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
+mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),S.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,J){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var u=
+this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:u.apply(this,arguments)}}S=document.getElementById("geInfo");null!=S&&S.parentNode.removeChild(S);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(g.container,"dragleave",function(F){g.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,
+function(F){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(F){null!=z&&(z.parentNode.removeChild(z),z=null);if(g.isEnabled()){var J=mxUtils.convertPoint(g.container,mxEvent.getClientX(F),mxEvent.getClientY(F)),K=F.dataTransfer.files,H=g.view.translate,N=g.view.scale,U=J.x/N-H.x,Q=J.y/N-H.y;if(0<K.length)"1"!=
+urlParams.embed&&mxEvent.isShiftDown(F)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(F)&&(Q=U=null),this.importFiles(K,U,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(Q=U=0);var V=0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;J=this.extractGraphModelFromEvent(F,null!=this.pages);
+if(null!=J)g.setSelectionCells(this.importXml(J,U,Q,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var W=F.dataTransfer.getData("text/html");J=document.createElement("div");J.innerHTML=g.sanitizeHtml(W);var t=null;K=J.getElementsByTagName("img");null!=K&&1==K.length?(W=K[0].getAttribute("src"),null==W&&(W=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(t=!0)):(K=J.getElementsByTagName("a"),null!=K&&1==K.length?W=K[0].getAttribute("href"):(J=J.getElementsByTagName("pre"),
+null!=J&&1==J.length&&(W=mxUtils.getTextContent(J[0]))));var D=!0,L=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(W,U,Q,!0,t,null,D,mxEvent.isControlDown(F)))});t&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(T){D=T;L()},mxEvent.isControlDown(F)):L()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(T){var O=Math.max(1,T.width);T=Math.max(1,T.height);var P=this.maxImageSize;P=Math.min(1,
+Math.min(P/Math.max(1,O)),P/Math.max(1,T));g.setSelectionCell(g.insertVertex(null,null,"",U,Q,O*P,T*P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(T){g.setSelectionCells(this.insertTextAt(V,U,Q,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),U,Q,!0))}}F.stopPropagation();F.preventDefault()}),!1)}g.enableFlowAnimation=
+!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();S=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",S);this.addListener("sketchModeChanged",S);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
+urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,q=0;q<k.types.length;q++)if("text/"===
+k.types[q].substring(0,5)){n=!0;break}if(!n){var p=k.items;for(index in p){var y=p[index];if("file"===y.kind){if(d.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,function(C,B,I,M,G,S){d.insertImage(C,G,S)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var B=0;B<C.length;B++)C[B]()});else{var A=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],A.x,A.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position=
+"absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var y=mxEvent.getSource(p);
+null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",p=g.container.scrollLeft,y=g.container.scrollTop,g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=p,g.container.scrollTop=y)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var y=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=y&&17!=y&&91!=y&&93!=y||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"cut",
+mxUtils.bind(this,function(p){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(y){this.handleError(y)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(p){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=p.clipboardData&&this.pasteCells(p,k,!0,!0),!mxEvent.isConsumed(p))){var y=g.container.scrollLeft,A=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){g.container.scrollLeft=y;g.container.scrollTop=A;
+this.pasteCells(p,k,!1,!0)}),0)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(p){return mxEvent.getSource(p)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function g(I){return""==I||"dark"==I||"kennedy"==I||null==I}var k=Editor.currentTheme;d=g(d)?"default":d;k=g(k)?"default":k;var n=
+"sketch"==k&&"default"==d||"default"==k&&"sketch"==d;if(n&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var q=this.editor.graph.view.translate,p=q.x,y=q.y,A=mxUtils.getOffset(this.editor.graph.container),C=this.editor.graph.container.scrollLeft-A.x,B=this.editor.graph.container.scrollTop-A.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
+function(){"sketch"==k&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==k&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
+"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var I=this.editor.graph.view.scale;A=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=C+A.x+(q.x-p)*I;this.editor.graph.container.scrollTop=
+B+A.y+(q.y-y)*I;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return n};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
+"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
+this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
+(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
+Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
+function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
+(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var g=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),k=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){g.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";k.style.display=g.style.display});this.actions.get("undo").addListener("stateChanged",d);
+this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+d=this.sketchFooterMenuElt;var g=this.createPageMenuTab(!1,!0);g.className="geToolbarButton";g.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(g);var k=mxUtils.bind(this,function(){g.innerText="";if(null!=this.currentPage){mxUtils.write(g,this.currentPage.getName());var n=null!=this.pages?this.pages.length:1,q=this.getPageIndex(this.currentPage);q=null!=q?q+1:1;var p=this.currentPage.getId();
+g.setAttribute("title",this.currentPage.getName()+" ("+q+"/"+n+")"+(null!=p?" ["+p+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){g.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
+k);this.editor.addListener("pagesPatched",k);k();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));k=this.createMenu("viewZoom",Editor.plusImage);k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(k);mxUtils.bind(this,function(n){mxEvent.addListener(n,
+"click",mxUtils.bind(this,function(p){mxEvent.isAltDown(p)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(p)):mxEvent.isShiftDown(p)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(p))}));var q=mxUtils.bind(this,function(){n.innerText="";mxUtils.write(n,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,q);this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",
+q)})(k);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var n=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);n.style.paddingLeft="12px";n.style.backgroundSize="";n.style.width="26px";n.style.height="30px";n.style.opacity="0.7";var q=this.createMenu("insert",Editor.plusImage);q.style.backgroundSize="";q.style.marginBottom="4px";q.style.display="block";q.style.width="30px";q.style.height="30px";q.style.padding="4px";q.style.opacity="0.7";var p=!1,y=mxUtils.bind(this,function(){g.innerText="";if(!p){var A=function(B,I,M,G){null!=I&&B.setAttribute("title",I);B.style.cursor="pointer";B.style.margin="8px 0px";
+B.style.display="block";g.appendChild(B);null!=G&&(B.style.position="relative",B.style.overflow="visible",I=document.createElement("div"),I.style.position="absolute",I.style.fontSize="8px",I.style.left="32px",I.style.top="28px",mxUtils.write(I,G),B.appendChild(I));return B};A(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");A(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");A(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");A(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var C=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,0),!1);C.geometry.points=
+[];C.geometry.relative=!0;C.edge=!0;A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,C.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");C=C.clone();C.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";C.geometry.width=this.editor.graph.defaultEdgeLength+20;C.geometry.setTerminalPoint(new mxPoint(0,20),!0);C.geometry.setTerminalPoint(new mxPoint(C.geometry.width,20),!1);
+A(this.sidebar.createEdgeTemplateFromCells([C],C.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));A(n,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(q)}"1"!=urlParams.embedInline&&g.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){p?(mxUtils.setPrefixedStyle(g.style,"transform","translate(0, -50%)"),g.style.padding="8px 6px 4px",g.style.width="40px",g.style.top="50%",g.style.bottom="",g.style.height="",
+k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",p=!1,y()):(g.innerText="",g.appendChild(k),mxUtils.setPrefixedStyle(g.style,"transform","translate(0, 0)"),g.style.bottom="12px",g.style.padding="0px",g.style.height="24px",g.style.width="24px",g.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",p=!0)}));this.addListener("darkModeChanged",
+y);this.addListener("sketchModeChanged",y);y();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
+"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,g){var k=this.menus.get(d),n=this.menubar.addMenu(mxResources.get(d),k.funct);n.className="geToolbarButton";n.style.display="inline-block";n.style.cursor="pointer";n.style.height="24px";n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(k,n,"geMenuItem");null!=g&&(n.style.backgroundImage="url("+g+")",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize=
+"100% 100%",n.style.width="24px",n.innerText="");return n};EditorUi.prototype.createMenuItem=function(d,g,k){var n=document.createElement("a");n.className="geToolbarButton";n.setAttribute("title",mxResources.get(d));n.style.backgroundImage="url("+g+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width="24px";n.style.height="24px";var q=this.actions.get(d);
+null!=q&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(p){p.preventDefault()})),mxEvent.addListener(n,"click",function(p){"disabled"!=n.getAttribute("disabled")&&q.funct(p);mxEvent.consume(p)}),k||(d=function(){q.isEnabled()?(n.removeAttribute("disabled"),n.style.cursor="pointer"):(n.setAttribute("disabled","disabled"),n.style.cursor="default");n.style.opacity=q.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),q.addListener("stateChanged",
+d),d()));return n};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,g,240,k,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
+"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
-"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }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); "+
-(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+
-(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
+(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var m=document.createElement("link");m.setAttribute("rel","stylesheet");m.setAttribute("href",STYLE_PATH+"/dark.css");
@@ -11741,192 +11769,192 @@ m.setAttribute("charset","UTF-8");m.setAttribute("type","text/css");EditorUi.pro
"#ffffff";g.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";g.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";g.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";g.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.loadStylesheet();null!=this.actions.layersWindow&&
(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=g.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
g.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=g.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=g.shapeForegroundColor;Graph.prototype.defaultThemeName=g.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==m.parentNode&&document.getElementsByTagName("head")[0].appendChild(m):null!=m.parentNode&&m.parentNode.removeChild(m)}};
-EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var g=function(n,q,p){null==
-n[q]&&(n[q]=p)},k=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,"jettySize","auto");
-g(k.defaultEdgeStyle,"orthogonalLoop","1");g(k.defaultEdgeStyle,"endArrow","open");g(k.defaultEdgeStyle,"endSize","14");g(k.defaultEdgeStyle,"startSize","14");d&&(g(k.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultVertexStyle,"fontSource",Editor.sketchFontSource),g(k.defaultVertexStyle,"hachureGap","4"),g(k.defaultVertexStyle,"sketch","1"),g(k.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),g(k.defaultEdgeStyle,
-"sketch","1"),g(k.defaultEdgeStyle,"hachureGap","4"),g(k.defaultEdgeStyle,"sourcePerimeterSpacing","8"),g(k.defaultEdgeStyle,"targetPerimeterSpacing","8"));k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName():
-mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
-EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],
-"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=g.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,
-function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==m.parentNode&&document.getElementsByTagName("head")[0].appendChild(m):
+null!=m.parentNode&&m.parentNode.removeChild(m)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
+d){var g=function(n,q,p){null==n[q]&&(n[q]=p)},k=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;k.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);g(k.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);k.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);g(k.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);g(k.defaultEdgeStyle,"edgeStyle","none");g(k.defaultEdgeStyle,"rounded","0");g(k.defaultEdgeStyle,"curved","1");g(k.defaultEdgeStyle,
+"jettySize","auto");g(k.defaultEdgeStyle,"orthogonalLoop","1");g(k.defaultEdgeStyle,"endArrow","open");g(k.defaultEdgeStyle,"endSize","14");g(k.defaultEdgeStyle,"startSize","14");d&&(g(k.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultVertexStyle,"fontSource",Editor.sketchFontSource),g(k.defaultVertexStyle,"hachureGap","4"),g(k.defaultVertexStyle,"sketch","1"),g(k.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),g(k.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
+g(k.defaultEdgeStyle,"sketch","1"),g(k.defaultEdgeStyle,"hachureGap","4"),g(k.defaultEdgeStyle,"sourcePerimeterSpacing","8"),g(k.defaultEdgeStyle,"targetPerimeterSpacing","8"));k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),
+g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=mxResources.get("action"));return g};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var g=d.indexOf(",");if(d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
+mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=g.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
+mxUtils.bind(this,function(d,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,q){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),A=parseInt(q.getAttribute("width")),E=parseInt(q.getAttribute("height"));this.writeImageToClipboard(p,A,E,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,q){try{this.spinner.stop();var p=this.createImageDataUri(n,g,"png"),y=parseInt(q.getAttribute("width")),A=parseInt(q.getAttribute("height"));this.writeImageToClipboard(p,y,A,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,
function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,n){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](n)};
EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),q=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(q));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=q,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;
-g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n){var q=this.editor.graph,p=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var A=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(d))p=this.importXml(d,A,A),q.setSelectionCells(p);else if(g&&1==q.getSelectionCount()){A=q.getStartEditingCell(q.getSelectionCell(),
-n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(A)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[A]);else{q.model.beginUpdate();try{q.labelChanged(A,d),Graph.isLink(d)&&q.setLinkForCell(A,d)}finally{q.model.endUpdate()}}q.setSelectionCell(A)}else p=q.getInsertPoint(),q.isMouseInsertPoint()&&(A=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),p=this.insertTextAt(d,p.x+A,p.y+A,!0),q.setSelectionCells(p);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var q=g,p=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),E=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var z=decodeURIComponent(A);this.isCompatibleString(z)&&(E=!0,A=z)}catch(G){}E=E?null:d.clipboardData.getData("text/html");null!=E&&0<E.length?(q=
-this.parseHtmlData(E),p="text/plain"!=q.getAttribute("data-type")):null!=A&&0<A.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,E))}A=q.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(G){var I=this.editor.graph;I.lastPasteXml==G?I.pasteCounter++:(I.lastPasteXml=G,I.pasteCounter=0);var F=
-I.pasteCounter*I.gridSize;I.setSelectionCells(this.importXml(G,F,F));I.scrollCellToVisible(I.getSelectionCell())}),mxUtils.bind(this,function(G){this.handleError(G)})),mxEvent.consume(d));else{var B=p?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),J=!1;try{var M=B.lastIndexOf("%3E");0<=M&&M<B.length-3&&(B=B.substring(0,M+3))}catch(G){}try{A=q.getElementsByTagName("span"),(z=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(B))&&
-(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,B=z)}catch(G){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,J,d)}catch(G){console.log("Miro import error:",G)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(B,n,J,d);try{mxEvent.consume(d)}catch(G){}}else if(!k){var u=
-this.editor.graph;u.lastPasteXml=null;u.pasteCounter=0}}catch(G){this.handleError(G)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<
+g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n){var q=this.editor.graph,p=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var y=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(d))p=this.importXml(d,y,y),q.setSelectionCells(p);else if(g&&1==q.getSelectionCount()){y=q.getStartEditingCell(q.getSelectionCell(),
+n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[y]);else{q.model.beginUpdate();try{q.labelChanged(y,d),Graph.isLink(d)&&q.setLinkForCell(y,d)}finally{q.model.endUpdate()}}q.setSelectionCell(y)}else p=q.getInsertPoint(),q.isMouseInsertPoint()&&(y=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),p=this.insertTextAt(d,p.x+y,p.y+y,!0),q.setSelectionCells(p);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return p};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var q=g,p=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var y=d.clipboardData.getData("text/plain"),A=!1;if(null!=y&&0<y.length&&"%3CmxGraphModel%3E"==y.substring(0,18))try{var C=decodeURIComponent(y);this.isCompatibleString(C)&&(A=!0,y=C)}catch(u){}A=A?null:d.clipboardData.getData("text/html");null!=A&&0<A.length?(q=
+this.parseHtmlData(A),p="text/plain"!=q.getAttribute("data-type")):null!=y&&0<y.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,A))}y=q.getElementsByTagName("span");if(null!=y&&0<y.length&&"application/vnd.lucid.chart.objects"===y[0].getAttribute("data-lucid-type"))k=y[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(u){var z=this.editor.graph;z.lastPasteXml==u?z.pasteCounter++:(z.lastPasteXml=u,z.pasteCounter=0);var F=
+z.pasteCounter*z.gridSize;z.setSelectionCells(this.importXml(u,F,F));z.scrollCellToVisible(z.getSelectionCell())}),mxUtils.bind(this,function(u){this.handleError(u)})),mxEvent.consume(d));else{var B=p?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),I=!1;try{var M=B.lastIndexOf("%3E");0<=M&&M<B.length-3&&(B=B.substring(0,M+3))}catch(u){}try{y=q.getElementsByTagName("span"),(C=null!=y&&0<y.length?mxUtils.trim(decodeURIComponent(y[0].textContent)):decodeURIComponent(B))&&
+(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,B=C)}catch(u){}try{if(null!=B&&0<B.length){if(0==B.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var G=mxUtils.bind(this,function(){try{B=(new MiroImporter).importMiroJson(JSON.parse(B)),this.pasteXml(B,n,I,d)}catch(u){console.log("Miro import error:",u)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",G):G()}else this.pasteXml(B,n,I,d);try{mxEvent.consume(d)}catch(u){}}else if(!k){var S=
+this.editor.graph;S.lastPasteXml=null;S.pasteCounter=0}}catch(u){this.handleError(u)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<
document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,
!0);else{var q=this.extractGraphModelFromEvent(n);if(null==q){var p=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?q=p.getData("Text"):(q=null,q=0<=mxUtils.indexOf(p.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(p.types,"text/html")?p.getData("text/html"):null,null!=q&&0<q.length?(p=document.createElement("div"),p.innerHTML=this.editor.graph.sanitizeHtml(q),p=p.getElementsByTagName("img"),0<p.length&&
-(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&this.openLocalFile(A.getText(),
+(q=p[0].getAttribute("src"))):0<=mxUtils.indexOf(p.types,"text/plain")&&(q=p.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()&&this.openLocalFile(y.getText(),
null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var n=document.body;var q=document.documentElement;var p=(n.clientWidth||q.clientWidth)-3;n=
Math.max(n.clientHeight||0,q.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,p=d.clientWidth,n=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=g+"px";q.style.left=k+"px";q.style.width=Math.max(0,p-3)+"px";q.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);
return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)d.push(n.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,n,q){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=
-g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(E){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==E.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,E,g))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(E,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,
-mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(E){4==E.readyState&&(this.spinner.stop(),200<=E.status&&299>=E.status?p(E.responseText):this.handleError({message:mxResources.get(413==
-E.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(E){this.spinner.stop();this.openLocalFile(E,g,n)}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(E){this.spinner.stop();p(E)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var A=Editor.extractGraphModelFromPdf(d);null!=A&&(q=null,n=!0,
-d=A)}this.spinner.stop();this.openLocalFile(d,g,n,q,null!=q?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var q=new FileReader;q.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(A){this.handleError(A)}});q.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0,
-5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?q.readAsText(n):q.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,q){var p=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var E=mxUtils.parseXml(d);null!=E&&(this.editor.setGraphXml(E.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,n,q))});if(null!=
-d&&0<d.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?A():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(A){if(null!=
-A){var E=A.lastIndexOf(".");0<E&&(A=A.substring(E+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,q=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=n.model.getChildCount(d);for(var p=0;p<q;p++)this.addBasenamesForCell(n.model.getChildAt(d,p),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=
+g.substring(0,g.length-4)+".drawio");var p=mxUtils.bind(this,function(A){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==A.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,A,g))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(A,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,
+mxUtils.bind(this,function(A){this.spinner.stop();p(A)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(A){this.spinner.stop();p(A)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(A){4==A.readyState&&(this.spinner.stop(),200<=A.status&&299>=A.status?p(A.responseText):this.handleError({message:mxResources.get(413==
+A.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(A){this.spinner.stop();this.openLocalFile(A,g,n)}),mxUtils.bind(this,function(A){this.spinner.stop();this.handleError(A)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(A){this.spinner.stop();p(A)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var y=Editor.extractGraphModelFromPdf(d);null!=y&&(q=null,n=!0,
+d=y)}this.spinner.stop();this.openLocalFile(d,g,n,q,null!=q?k:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var q=new FileReader;q.onload=mxUtils.bind(this,function(p){try{this.openFileHandle(p.target.result,n.name,n,g)}catch(y){this.handleError(y)}});q.onerror=mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p);window.openFile=null});"image"!==n.type.substring(0,
+5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?q.readAsText(n):q.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,q){var p=this.getCurrentFile(),y=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var A=mxUtils.parseXml(d);null!=A&&(this.editor.setGraphXml(A.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,k,n,q))});if(null!=
+d&&0<d.length)null==p||!p.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?y():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=p&&p.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function k(y){if(null!=
+y){var A=y.lastIndexOf(".");0<A&&(y=y.substring(A+1,y.length));null==g[y]&&(g[y]=!0)}}var n=this.editor.graph,q=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=n.model.getChildCount(d);for(var p=0;p<q;p++)this.addBasenamesForCell(n.model.getChildAt(d,p),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=
d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=
-!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(q)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var A=p.model.cells,E;for(E in A){var z=A[E];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?
+!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(q)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var y=p.model.cells,A;for(A in y){var C=y[A];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?
"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(q){k.postMessage(JSON.stringify({event:"export",
point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(d){var g=null,k=!1,n=!1,q=null,p=mxUtils.bind(this,function(z,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var B=z.data,J=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
-"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var v=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[B])}catch(Y){B=null}try{if(null==B)return;
-if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var u=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Y){null!=
-Y?A.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==B.action){var G=M(B.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),G,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",
-message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{u.init()}catch(Y){A.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var I=1==B.enableRecent,F=1==B.enableSearch,L=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var K=this.getCurrentUser(),H=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}),
-"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,I?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,F?mxUtils.bind(this,function(Y,Z,ba,ea){this.remoteInvoke("searchDiagrams",[Y,ea],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
-!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,Z,ba,ea){Y=Y||this.emptyDiagramXml;null!=B.callback?A.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:ea,builtIn:!0,message:B}),"*"):(d(Y,z,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
-null,I?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){A.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,L?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
-B.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==B.action){var Q=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:Q,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));
+function(d){var g=null,k=!1,n=!1,q=null,p=mxUtils.bind(this,function(C,B){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(C){if(C.source==(window.opener||window.parent)){var B=C.data,I=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
+"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(aa){}return Y});if("json"==urlParams.proto){var G=!1;try{B=JSON.parse(B),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[B])}catch(Y){B=null}try{if(null==B)return;
+if("dialog"==B.action){this.showError(null!=B.titleKey?mxResources.get(B.titleKey):B.title,null!=B.messageKey?mxResources.get(B.messageKey):B.message,null!=B.buttonKey?mxResources.get(B.buttonKey):B.button);null!=B.modified&&(this.editor.modified=B.modified);return}if("layout"==B.action){this.executeLayouts(this.editor.graph.createLayouts(B.layouts));return}if("prompt"==B.action){this.spinner.stop();var S=new FilenameDialog(this,B.defaultValue||"",null!=B.okKey?mxResources.get(B.okKey):B.ok,function(Y){null!=
+Y?y.postMessage(JSON.stringify({event:"prompt",value:Y,message:B}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:B}),"*")},null!=B.titleKey?mxResources.get(B.titleKey):B.title);this.showDialog(S.container,300,80,!0,!1);S.init();return}if("draft"==B.action){var u=M(B.xml);this.spinner.stop();S=new DraftDialog(this,mxResources.get("draftFound",[B.name||this.defaultFilename]),u,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"edit",
+message:B}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"discard",message:B}),"*")}),B.editKey?mxResources.get(B.editKey):null,B.discardKey?mxResources.get(B.discardKey):null,B.ignore?mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:B}),"*")}):null);this.showDialog(S.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{S.init()}catch(Y){y.postMessage(JSON.stringify({event:"draft",
+error:Y.toString(),message:B}),"*")}return}if("template"==B.action){this.spinner.stop();var z=1==B.enableRecent,F=1==B.enableSearch,J=1==B.enableCustomTemp;if("1"==urlParams.newTempDlg&&!B.templatesOnly&&null!=B.callback){var K=this.getCurrentUser(),H=new TemplatesDialog(this,function(Y,aa,ba){Y=Y||this.emptyDiagramXml;y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:aa,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:B}),
+"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,z?mxUtils.bind(this,function(Y,aa,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,aa)}):null,F?mxUtils.bind(this,function(Y,aa,ba,ea){this.remoteInvoke("searchDiagrams",[Y,ea],null,aa,ba)}):null,mxUtils.bind(this,function(Y,aa,ba){this.remoteInvoke("getFileContent",[Y.url],null,aa,ba)}),null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):
+null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}S=new NewDialog(this,!1,B.templatesOnly?!1:null!=B.callback,mxUtils.bind(this,function(Y,aa,ba,ea){Y=Y||this.emptyDiagramXml;null!=B.callback?y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:aa,tempUrl:ba,libs:ea,builtIn:!0,message:B}),"*"):(d(Y,C,Y!=this.emptyDiagramXml,B.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,
+null,null,null,z?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(Y,aa){this.remoteInvoke("searchDiagrams",[Y,null],null,aa,function(){aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,aa,ba){y.postMessage(JSON.stringify({event:"template",docUrl:Y,info:aa,name:ba}),"*")}),null,null,J?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},
+0)})}):null,1==B.withoutType);this.showDialog(S.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));S.init();return}if("textContent"==B.action){var N=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:N,message:B}),"*");return}if("status"==B.action){null!=B.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(B.messageKey))):null!=B.message&&this.editor.setStatus(mxUtils.htmlEntities(B.message));
null!=B.modified&&(this.editor.modified=B.modified);return}if("spinner"==B.action){var U=null!=B.messageKey?mxResources.get(B.messageKey):B.message;null==B.show||B.show?this.spinner.spin(document.body,U):this.spinner.stop();return}if("exit"==B.action){this.actions.get("exit").funct();return}if("viewport"==B.action){null!=B.viewport&&(this.embedViewport=B.viewport);return}if("snapshot"==B.action){this.sendEmbeddedSvgExport(!0);return}if("export"==B.action){if("png"==B.format||"xmlpng"==B.format){if(null==
-B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var T=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=B.format;Z.message=B;Z.data=Y;Z.xml=T;A.postMessage(JSON.stringify(Z),"*")}),t=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&&
-(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(T)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),C=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var N=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=C){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
-C){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);V.getGlobalVariable=function(pa){return"page"==pa?Z.getName():"pagenumber"==pa?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(Z.root)}if(null!=B.layerIds){var ea=V.model,ma=ea.getChildCells(ea.getRoot()),ia={};for(ba=0;ba<B.layerIds.length;ba++)ia[B.layerIds[ba]]=!0;for(ba=0;ba<ma.length;ba++)ea.setVisible(ma[ba],ia[ma[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(pa){t(pa.toDataURL("image/png"))}),
-B.width,null,B.background,mxUtils.bind(this,function(){t(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(T),k=!1);N()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=C?"&pageId="+C:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,
-function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else if(N=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=B.format}else if("html"==B.format)Z=this.editor.getGraphXml(),
-Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=B.background?B.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ea);A.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==B.spin&&
-null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,B.embedImages,Z,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,null,B.keepTheme),
-(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(ea){B.embedImages||null==B.embedImages?this.editor.convertImages(ea,mxUtils.bind(this,function(ma){ba(mxUtils.getXml(ma))})):ba(mxUtils.getXml(ea))}));return}A.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var R=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){R.apply(this,arguments);N()}}k=!0;this.setFileData(B.xml);
-k=!1;this.editor.graph.mathEnabled||N()}else N();return}if("load"==B.action){v=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin)){var Q=null!=B.xml?B.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var V=this.editor.graph,W=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var aa=this.createLoadMessage("export");aa.format=B.format;aa.message=B;aa.data=Y;aa.xml=Q;y.postMessage(JSON.stringify(aa),"*")}),t=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==B.format&&
+(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(Q)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);W(Y)}),D=B.pageId||(null!=this.pages?B.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=D){var Y=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var aa,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
+D){aa=this.updatePageRoot(this.pages[ba]);break}null==aa&&(aa=this.currentPage);V.getGlobalVariable=function(ra){return"page"==ra?aa.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(aa.root)}if(null!=B.layerIds){var ea=V.model,ja=ea.getChildCells(ea.getRoot()),fa={};for(ba=0;ba<B.layerIds.length;ba++)fa[B.layerIds[ba]]=!0;for(ba=0;ba<ja.length;ba++)ea.setVisible(ja[ba],fa[ja[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){t(ra.toDataURL("image/png"))}),
+B.width,null,B.background,mxUtils.bind(this,function(){t(null)}),null,null,B.scale,B.transparent,B.shadow,null,V,B.border,null,B.grid,B.keepTheme)});null!=B.xml&&0<B.xml.length&&(k=!0,this.setFileData(Q),k=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==B.format?"1":"0")+(null!=D?"&pageId="+D:"")+(null!=B.layerIds&&0<B.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:B.layerIds})):"")+(null!=B.scale?"&scale="+B.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,
+function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?W("data:image/png;base64,"+Y.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=B;if("html2"==B.format||"html"==B.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();Y.xml=mxUtils.getXml(aa);Y.data=this.getFileData(null,null,!0,null,null,null,aa);Y.format=B.format}else if("html"==B.format)aa=this.editor.getGraphXml(),
+Y.data=this.getHtml(aa,this.editor.graph),Y.xml=mxUtils.getXml(aa),Y.format=B.format;else{mxSvgCanvas2D.prototype.foAltText=null;aa=null!=B.background?B.background:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ea);y.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==B.format)(null==
+B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,B.embedImages,aa,B.scale,B.border,B.shadow,B.keepTheme);else if(null==B.spin&&null==B.spinKey||this.spinner.spin(document.body,null!=B.spinKey?mxResources.get(B.spinKey):B.spin))this.editor.graph.setEnabled(!1),aa=this.editor.graph.getSvg(aa,B.scale,B.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||B.shadow,
+null,B.keepTheme),(this.editor.graph.shadowVisible||B.shadow)&&this.editor.graph.addSvgShadow(aa),this.embedFonts(aa,mxUtils.bind(this,function(ea){B.embedImages||null==B.embedImages?this.editor.convertImages(ea,mxUtils.bind(this,function(ja){ba(mxUtils.getXml(ja))})):ba(mxUtils.getXml(ea))}));return}y.postMessage(JSON.stringify(Y),"*")}),null!=B.xml&&0<B.xml.length){if(this.editor.graph.mathEnabled){var T=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){T.apply(this,arguments);L()}}k=!0;this.setFileData(B.xml);
+k=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==B.action){G=B.toSketch;n=1==B.autosave;this.hideDialog();null!=B.modified&&null==urlParams.modified&&(urlParams.modified=B.modified);null!=B.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=B.saveAndExit);null!=B.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=B.noSaveBtn);if(null!=B.rough){var O=Editor.sketchMode;this.doSetSketchMode(B.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
B.dark&&(O=Editor.darkMode,this.doSetDarkMode(B.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=B.border&&(this.embedExportBorder=B.border);null!=B.background&&(this.embedExportBackground=B.background);null!=B.viewport&&(this.embedViewport=B.viewport);this.embedExitPoint=null;if(null!=B.rect){var P=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=B.rect.top+"px";this.diagramContainer.style.left=B.rect.left+
-"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";J=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*P);Y.maxFitScale=Z;Y.container.scrollTop-=2*P;Y.container.scrollLeft-=2*P;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=B.noExitBtn);
-null!=B.title&&null!=this.buttonContainer&&(G=document.createElement("span"),mxUtils.write(G,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(G),this.embedFilenameSpan=G);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var S=this.getCurrentFile();null!=S&&(G=M(B.xml),null!=G&&""!=
-G&&S.mergeFile(new LocalFile(this,G),function(){A.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){A.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,z.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){k=!0;try{d(Y,Z,null,v)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");q=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,ea){ba=X();ba==q||k||(ea=this.createLoadMessage("autosave"),ea.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ea),"*"));q=ba}),
+"px";this.diagramContainer.style.height=B.rect.height+"px";this.diagramContainer.style.width=B.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,aa=Y.maxFitScale;Y.maxFitScale=B.maxFitScale;Y.fit(2*P);Y.maxFitScale=aa;Y.container.scrollTop-=2*P;Y.container.scrollLeft-=2*P;this.fireEvent(new mxEventObject("editInlineStart","data",[B]))})}null!=B.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
+B.noExitBtn);null!=B.title&&null!=this.buttonContainer&&(u=document.createElement("span"),mxUtils.write(u,B.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(u),this.embedFilenameSpan=u);try{B.libs&&this.sidebar.showEntries(B.libs)}catch(Y){}B=null!=B.xmlpng?this.extractGraphModelFromPng(B.xmlpng):null!=B.descriptor?B.descriptor:B.xml}else{if("merge"==B.action){var R=this.getCurrentFile();null!=R&&(u=M(B.xml),
+null!=u&&""!=u&&R.mergeFile(new LocalFile(this,u),function(){y.postMessage(JSON.stringify({event:"merge",message:B}),"*")},function(Y){y.postMessage(JSON.stringify({event:"merge",message:B,error:Y}),"*")}))}else"remoteInvokeReady"==B.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==B.action?this.handleRemoteInvoke(B,C.origin):"remoteInvokeResponse"==B.action?this.handleRemoteInvokeResponse(B):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(B)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Z=mxUtils.bind(this,function(Y,aa){k=!0;try{d(Y,aa,null,G)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");q=X();n&&null==g&&(g=mxUtils.bind(this,function(ba,ea){ba=X();ba==q||k||(ea=this.createLoadMessage("autosave"),ea.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ea),"*"));q=ba}),
this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",
-g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,A.postMessage(JSON.stringify(Z),"*");null!=J&&J()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(M="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){aa(Y,z)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,z)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B||
-null==B.format||null==B.data&&null==B.url?(B=M(B),aa(B,z)):this.loadDescriptor(B,mxUtils.bind(this,function(Y){aa(X(),z)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(p,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(z,B,J){E.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",
-href:z,target:B,allowOpener:J}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var g=document.createElement("button");g.className="geBigButton";if("1"==
+g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)aa=this.createLoadMessage("load"),aa.xml=Y,y.postMessage(JSON.stringify(aa),"*");null!=I&&I()});null!=B&&"function"===typeof B.substring&&"data:application/vnd.visio;base64,"==B.substring(0,34)?(M="0M8R4KGxGuE"==B.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(B.substring(B.indexOf(",")+1)),function(Y){Z(Y,C)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=B&&"function"===typeof B.substring&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(B,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(B,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&Z(Y.responseText,C)}),""):null!=B&&"function"===typeof B.substring&&this.isLucidChartData(B)?this.convertLucidChart(B,mxUtils.bind(this,function(Y){Z(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==B||"object"!==typeof B||
+null==B.format||null==B.data&&null==B.url?(B=M(B),Z(B,C)):this.loadDescriptor(B,mxUtils.bind(this,function(Y){Z(X(),C)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(p,"*");if("json"==urlParams.proto){var A=this.editor.graph.openLink;this.editor.graph.openLink=function(C,B,I){A.apply(this,arguments);y.postMessage(JSON.stringify({event:"openLink",
+href:C,target:B,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var g=document.createElement("button");g.className="geBigButton";if("1"==
urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,k);g.setAttribute("title",k);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g));"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),
null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&&
(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),
-n=[],q=[],p=[],A={};if(0<k.length){var E={},z=this.editor.graph,B=null,J=null,M=null,v=null,u=null,G=null,I=null,F="whiteSpace=wrap;html=1;",L=null,K=null,H="",Q="auto",U="auto",T=!1,V=null,W=null,t=40,C=40,N=100,R=0,O=mxUtils.bind(this,function(){null!=g?g(ta):(z.setSelectionCells(ta),z.scrollCellToVisible(z.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),P=z.getFreeInsertPoint(),S=P.x,X=P.y;P=X;var aa=null,Y="auto";
-K=null;for(var Z=[],ba=null,ea=null,ma=0;ma<k.length&&"#"==k[ma].charAt(0);){d=k[ma].replace(/\r$/,"");for(ma++;ma<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ma].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ma].substring(1)),ma++;if("#"!=d.charAt(1)){var ia=d.indexOf(":");if(0<ia){var pa=mxUtils.trim(d.substring(1,ia)),na=mxUtils.trim(d.substring(ia+1));"label"==pa?aa=z.sanitizeHtml(na):"labelname"==pa&&0<na.length&&"-"!=na?u=na:"labels"==pa&&0<na.length&&"-"!=na?I=JSON.parse(na):"style"==
-pa?J=na:"parentstyle"==pa?F=na:"unknownStyle"==pa&&"-"!=na?G=na:"stylename"==pa&&0<na.length&&"-"!=na?v=na:"styles"==pa&&0<na.length&&"-"!=na?M=JSON.parse(na):"vars"==pa&&0<na.length&&"-"!=na?B=JSON.parse(na):"identity"==pa&&0<na.length&&"-"!=na?L=na:"parent"==pa&&0<na.length&&"-"!=na?K=na:"namespace"==pa&&0<na.length&&"-"!=na?H=na:"width"==pa?Q=na:"height"==pa?U=na:"collapsed"==pa&&"-"!=na?T="true"==na:"left"==pa&&0<na.length?V=na:"top"==pa&&0<na.length?W=na:"ignore"==pa?ea=na.split(","):"connect"==
-pa?Z.push(JSON.parse(na)):"link"==pa?ba=na:"padding"==pa?R=parseFloat(na):"edgespacing"==pa?t=parseFloat(na):"nodespacing"==pa?C=parseFloat(na):"levelspacing"==pa?N=parseFloat(na):"layout"==pa&&(Y=na)}}}if(null==k[ma])throw Error(mxResources.get("invalidOrMissingFile"));var Fa=this.editor.csvToArray(k[ma].replace(/\r$/,""));ia=d=null;pa=[];for(na=0;na<Fa.length;na++)L==Fa[na]&&(d=na),K==Fa[na]&&(ia=na),pa.push(mxUtils.trim(Fa[na]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==aa&&(aa="%"+pa[0]+"%");if(null!=Z)for(var Ga=0;Ga<Z.length;Ga++)null==E[Z[Ga].to]&&(E[Z[Ga].to]={});L=[];for(na=ma+1;na<k.length;na++){var xa=this.editor.csvToArray(k[na].replace(/\r$/,""));if(null==xa){var Ma=40<k[na].length?k[na].substring(0,40)+"...":k[na];throw Error(Ma+" ("+na+"):\n"+mxResources.get("containsValidationErrors"));}0<xa.length&&L.push(xa)}z.model.beginUpdate();try{for(na=0;na<L.length;na++){xa=L[na];var va=null,Ea=null!=d?H+xa[d]:null;k=!1;null!=Ea&&(va=z.model.getCell(Ea),
-k=null==va||0<=mxUtils.indexOf(n,va));var Ba=new mxCell(aa,new mxGeometry(S,P,0,0),J||"whiteSpace=wrap;html=1;");Ba.collapsed=T;Ba.vertex=!0;Ba.id=Ea;null==va||k||z.model.setCollapsed(va,T);for(var za=0;za<xa.length;za++)z.setAttributeForCell(Ba,pa[za],xa[za]),null==va||k||z.setAttributeForCell(va,pa[za],xa[za]);if(null!=u&&null!=I){var Da=I[Ba.getAttribute(u)];null!=Da&&(z.labelChanged(Ba,Da),null==va||k||z.cellLabelChanged(va,Da))}if(null!=v&&null!=M){var la=M[Ba.getAttribute(v)];null!=la&&(Ba.style=
-la)}z.setAttributeForCell(Ba,"placeholders","1");Ba.style=z.replacePlaceholders(Ba,Ba.style,B);null==va||k?z.fireEvent(new mxEventObject("cellsInserted","cells",[Ba])):(z.model.setStyle(va,Ba.style),0>mxUtils.indexOf(p,va)&&p.push(va),z.fireEvent(new mxEventObject("cellsInserted","cells",[va])));k=null!=va;va=Ba;if(!k)for(Ga=0;Ga<Z.length;Ga++)E[Z[Ga].to][va.getAttribute(Z[Ga].to)]=va;null!=ba&&"link"!=ba&&(z.setLinkForCell(va,va.getAttribute(ba)),z.setAttributeForCell(va,ba,null));var Ha=this.editor.graph.getPreferredSizeForCell(va);
-K=null!=ia?z.model.getCell(H+xa[ia]):null;if(va.vertex){Ma=null!=K?0:S;ma=null!=K?0:X;null!=V&&null!=va.getAttribute(V)&&(va.geometry.x=Ma+parseFloat(va.getAttribute(V)));null!=W&&null!=va.getAttribute(W)&&(va.geometry.y=ma+parseFloat(va.getAttribute(W)));var ya="@"==Q.charAt(0)?va.getAttribute(Q.substring(1)):null;va.geometry.width=null!=ya&&"auto"!=ya?parseFloat(va.getAttribute(Q.substring(1))):"auto"==Q||"auto"==ya?Ha.width+R:parseFloat(Q);var Ia="@"==U.charAt(0)?va.getAttribute(U.substring(1)):
-null;va.geometry.height=null!=Ia&&"auto"!=Ia?parseFloat(Ia):"auto"==U||"auto"==Ia?Ha.height+R:parseFloat(U);P+=va.geometry.height+C}k?(null==A[Ea]&&(A[Ea]=[]),A[Ea].push(va)):(n.push(va),null!=K?(K.style=z.replacePlaceholders(K,F,B),z.addCell(va,K),q.push(K)):p.push(z.addCell(va)))}for(na=0;na<q.length;na++)ya="@"==Q.charAt(0)?q[na].getAttribute(Q.substring(1)):null,Ia="@"==U.charAt(0)?q[na].getAttribute(U.substring(1)):null,"auto"!=Q&&"auto"!=ya||"auto"!=U&&"auto"!=Ia||z.updateGroupBounds([q[na]],
-R,!0);var ka=p.slice(),ta=p.slice();for(Ga=0;Ga<Z.length;Ga++){var ra=Z[Ga];for(na=0;na<n.length;na++){va=n[na];var wa=mxUtils.bind(this,function(Ja,Na,Ra){var Ka=Na.getAttribute(Ra.from);if(null!=Ka&&""!=Ka){Ka=Ka.split(",");for(var Pa=0;Pa<Ka.length;Pa++){var Qa=E[Ra.to][Ka[Pa]];if(null==Qa&&null!=G){Qa=new mxCell(Ka[Pa],new mxGeometry(S,X,0,0),G);Qa.style=z.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Oa.width+R;Qa.geometry.height=Oa.height+
-R;E[Ra.to][Ka[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ka[Pa];p.push(z.addCell(Qa))}if(null!=Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=z.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+z.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ja;Sa=null!=Ra.style?z.replacePlaceholders(Sa,Ra.style,B):z.createCurrentEdgeStyle();
-Oa=z.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ja,Ra.invert?Ja:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],La=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ua.placeholders&&(La.value=z.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ja,La.value,B));if(null!=Ua.dx||null!=Ua.dy)La.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=
-Ua.dy?Ua.dy:0);Oa.insert(La)}ta.push(Oa);mxUtils.remove(Ra.invert?Ja:Qa,ka)}}}});wa(va,va,ra);if(null!=A[va.id])for(za=0;za<A[va.id].length;za++)wa(va,A[va.id][za],ra)}}if(null!=ea)for(na=0;na<n.length;na++)for(va=n[na],za=0;za<ea.length;za++)z.setAttributeForCell(va,mxUtils.trim(ea[za]),null);if(0<p.length){var ca=new mxParallelEdgeLayout(z);ca.spacing=t;ca.checkOverlap=!0;var fa=function(){0<ca.spacing&&ca.execute(z.getDefaultParent());for(var Ja=0;Ja<p.length;Ja++){var Na=z.getCellGeometry(p[Ja]);
-Na.x=Math.round(z.snap(Na.x));Na.y=Math.round(z.snap(Na.y));"auto"==Q&&(Na.width=Math.round(z.snap(Na.width)));"auto"==U&&(Na.height=Math.round(z.snap(Na.height)))}};if("["==Y.charAt(0)){var da=O;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(Y)),function(){fa();da()});O=null}else if("circle"==Y){var ha=new mxCircleLayout(z);ha.disableEdgeStyle=!1;ha.resetEdges=!1;var ja=ha.isVertexIgnored;ha.isVertexIgnored=function(Ja){return ja.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};
-this.executeLayout(function(){ha.execute(z.getDefaultParent());fa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&ta.length==2*p.length-1&&1==ka.length){z.view.validate();var sa=new mxCompactTreeLayout(z,"horizontaltree"==Y);sa.levelDistance=C;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(z.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){z.view.validate();var oa=
-new mxHierarchicalLayout(z,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=C;oa.parallelEdgeSpacing=t;oa.interRankCellSpacing=N;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(z.getDefaultParent(),ta);z.moveCells(ta,S,X)},!0,O);O=null}else if("orgchart"==Y){z.view.validate();var Ca=new mxOrgChartLayout(z,2,N,C),Aa=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ja){return Aa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){Ca.execute(z.getDefaultParent());
-fa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&ta.length>p.length){z.view.validate();var ua=new mxFastOrganicLayout(z);ua.forceConstant=3*C;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var qa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ja){return qa.apply(this,arguments)||0>mxUtils.indexOf(p,Ja)};this.executeLayout(function(){ua.execute(z.getDefaultParent());fa()},!0,O);O=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=O&&O()}}catch(Ja){this.handleError(Ja)}};EditorUi.prototype.getSearch=
+n=[],q=[],p=[],y={};if(0<k.length){var A={},C=this.editor.graph,B=null,I=null,M=null,G=null,S=null,u=null,z=null,F="whiteSpace=wrap;html=1;",J=null,K=null,H="",N="auto",U="auto",Q=!1,V=null,W=null,t=40,D=40,L=100,T=0,O=mxUtils.bind(this,function(){null!=g?g(da):(C.setSelectionCells(da),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),P=C.getFreeInsertPoint(),R=P.x,X=P.y;P=X;var Z=null,Y="auto";
+K=null;for(var aa=[],ba=null,ea=null,ja=0;ja<k.length&&"#"==k[ja].charAt(0);){d=k[ja].replace(/\r$/,"");for(ja++;ja<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ja].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ja].substring(1)),ja++;if("#"!=d.charAt(1)){var fa=d.indexOf(":");if(0<fa){var ra=mxUtils.trim(d.substring(1,fa)),ma=mxUtils.trim(d.substring(fa+1));"label"==ra?Z=C.sanitizeHtml(ma):"labelname"==ra&&0<ma.length&&"-"!=ma?S=ma:"labels"==ra&&0<ma.length&&"-"!=ma?z=JSON.parse(ma):"style"==
+ra?I=ma:"parentstyle"==ra?F=ma:"unknownStyle"==ra&&"-"!=ma?u=ma:"stylename"==ra&&0<ma.length&&"-"!=ma?G=ma:"styles"==ra&&0<ma.length&&"-"!=ma?M=JSON.parse(ma):"vars"==ra&&0<ma.length&&"-"!=ma?B=JSON.parse(ma):"identity"==ra&&0<ma.length&&"-"!=ma?J=ma:"parent"==ra&&0<ma.length&&"-"!=ma?K=ma:"namespace"==ra&&0<ma.length&&"-"!=ma?H=ma:"width"==ra?N=ma:"height"==ra?U=ma:"collapsed"==ra&&"-"!=ma?Q="true"==ma:"left"==ra&&0<ma.length?V=ma:"top"==ra&&0<ma.length?W=ma:"ignore"==ra?ea=ma.split(","):"connect"==
+ra?aa.push(JSON.parse(ma)):"link"==ra?ba=ma:"padding"==ra?T=parseFloat(ma):"edgespacing"==ra?t=parseFloat(ma):"nodespacing"==ra?D=parseFloat(ma):"levelspacing"==ra?L=parseFloat(ma):"layout"==ra&&(Y=ma)}}}if(null==k[ja])throw Error(mxResources.get("invalidOrMissingFile"));var Ga=this.editor.csvToArray(k[ja].replace(/\r$/,""));fa=d=null;ra=[];for(ma=0;ma<Ga.length;ma++)J==Ga[ma]&&(d=ma),K==Ga[ma]&&(fa=ma),ra.push(mxUtils.trim(Ga[ma]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
+null==Z&&(Z="%"+ra[0]+"%");if(null!=aa)for(var Fa=0;Fa<aa.length;Fa++)null==A[aa[Fa].to]&&(A[aa[Fa].to]={});J=[];for(ma=ja+1;ma<k.length;ma++){var ya=this.editor.csvToArray(k[ma].replace(/\r$/,""));if(null==ya){var Ma=40<k[ma].length?k[ma].substring(0,40)+"...":k[ma];throw Error(Ma+" ("+ma+"):\n"+mxResources.get("containsValidationErrors"));}0<ya.length&&J.push(ya)}C.model.beginUpdate();try{for(ma=0;ma<J.length;ma++){ya=J[ma];var xa=null,Ca=null!=d?H+ya[d]:null;k=!1;null!=Ca&&(xa=C.model.getCell(Ca),
+k=null==xa||0<=mxUtils.indexOf(n,xa));var oa=new mxCell(Z,new mxGeometry(R,P,0,0),I||"whiteSpace=wrap;html=1;");oa.collapsed=Q;oa.vertex=!0;oa.id=Ca;null==xa||k||C.model.setCollapsed(xa,Q);for(var Aa=0;Aa<ya.length;Aa++)C.setAttributeForCell(oa,ra[Aa],ya[Aa]),null==xa||k||C.setAttributeForCell(xa,ra[Aa],ya[Aa]);if(null!=S&&null!=z){var La=z[oa.getAttribute(S)];null!=La&&(C.labelChanged(oa,La),null==xa||k||C.cellLabelChanged(xa,La))}if(null!=G&&null!=M){var ta=M[oa.getAttribute(G)];null!=ta&&(oa.style=
+ta)}C.setAttributeForCell(oa,"placeholders","1");oa.style=C.replacePlaceholders(oa,oa.style,B);null==xa||k?C.fireEvent(new mxEventObject("cellsInserted","cells",[oa])):(C.model.setStyle(xa,oa.style),0>mxUtils.indexOf(p,xa)&&p.push(xa),C.fireEvent(new mxEventObject("cellsInserted","cells",[xa])));k=null!=xa;xa=oa;if(!k)for(Fa=0;Fa<aa.length;Fa++)A[aa[Fa].to][xa.getAttribute(aa[Fa].to)]=xa;null!=ba&&"link"!=ba&&(C.setLinkForCell(xa,xa.getAttribute(ba)),C.setAttributeForCell(xa,ba,null));var Da=this.editor.graph.getPreferredSizeForCell(xa);
+K=null!=fa?C.model.getCell(H+ya[fa]):null;if(xa.vertex){Ma=null!=K?0:R;ja=null!=K?0:X;null!=V&&null!=xa.getAttribute(V)&&(xa.geometry.x=Ma+parseFloat(xa.getAttribute(V)));null!=W&&null!=xa.getAttribute(W)&&(xa.geometry.y=ja+parseFloat(xa.getAttribute(W)));var wa="@"==N.charAt(0)?xa.getAttribute(N.substring(1)):null;xa.geometry.width=null!=wa&&"auto"!=wa?parseFloat(xa.getAttribute(N.substring(1))):"auto"==N||"auto"==wa?Da.width+T:parseFloat(N);var Ja="@"==U.charAt(0)?xa.getAttribute(U.substring(1)):
+null;xa.geometry.height=null!=Ja&&"auto"!=Ja?parseFloat(Ja):"auto"==U||"auto"==Ja?Da.height+T:parseFloat(U);P+=xa.geometry.height+D}k?(null==y[Ca]&&(y[Ca]=[]),y[Ca].push(xa)):(n.push(xa),null!=K?(K.style=C.replacePlaceholders(K,F,B),C.addCell(xa,K),q.push(K)):p.push(C.addCell(xa)))}for(ma=0;ma<q.length;ma++)wa="@"==N.charAt(0)?q[ma].getAttribute(N.substring(1)):null,Ja="@"==U.charAt(0)?q[ma].getAttribute(U.substring(1)):null,"auto"!=N&&"auto"!=wa||"auto"!=U&&"auto"!=Ja||C.updateGroupBounds([q[ma]],
+T,!0);var ka=p.slice(),da=p.slice();for(Fa=0;Fa<aa.length;Fa++){var ca=aa[Fa];for(ma=0;ma<n.length;ma++){xa=n[ma];var na=mxUtils.bind(this,function(Ha,Na,Ra){var Ia=Na.getAttribute(Ra.from);if(null!=Ia&&""!=Ia){Ia=Ia.split(",");for(var Pa=0;Pa<Ia.length;Pa++){var Qa=A[Ra.to][Ia[Pa]];if(null==Qa&&null!=u){Qa=new mxCell(Ia[Pa],new mxGeometry(R,X,0,0),u);Qa.style=C.replacePlaceholders(Na,Qa.style,B);var Oa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Oa.width+T;Qa.geometry.height=
+Oa.height+T;A[Ra.to][Ia[Pa]]=Qa;Qa.vertex=!0;Qa.id=Ia[Pa];p.push(C.addCell(Qa))}if(null!=Qa){Oa=Ra.label;null!=Ra.fromlabel&&(Oa=(Na.getAttribute(Ra.fromlabel)||"")+(Oa||""));null!=Ra.sourcelabel&&(Oa=C.replacePlaceholders(Na,Ra.sourcelabel,B)+(Oa||""));null!=Ra.tolabel&&(Oa=(Oa||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Oa=(Oa||"")+C.replacePlaceholders(Qa,Ra.targetlabel,B));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa=null!=Ra.style?C.replacePlaceholders(Sa,Ra.style,
+B):C.createCurrentEdgeStyle();Oa=C.insertEdge(null,null,Oa||"",Ra.invert?Qa:Ha,Ra.invert?Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=C.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,B));if(null!=Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=
+Ua.dx?Ua.dx:0,null!=Ua.dy?Ua.dy:0);Oa.insert(Ka)}da.push(Oa);mxUtils.remove(Ra.invert?Ha:Qa,ka)}}}});na(xa,xa,ca);if(null!=y[xa.id])for(Aa=0;Aa<y[xa.id].length;Aa++)na(xa,y[xa.id][Aa],ca)}}if(null!=ea)for(ma=0;ma<n.length;ma++)for(xa=n[ma],Aa=0;Aa<ea.length;Aa++)C.setAttributeForCell(xa,mxUtils.trim(ea[Aa]),null);if(0<p.length){var la=new mxParallelEdgeLayout(C);la.spacing=t;la.checkOverlap=!0;var qa=function(){0<la.spacing&&la.execute(C.getDefaultParent());for(var Ha=0;Ha<p.length;Ha++){var Na=C.getCellGeometry(p[Ha]);
+Na.x=Math.round(C.snap(Na.x));Na.y=Math.round(C.snap(Na.y));"auto"==N&&(Na.width=Math.round(C.snap(Na.width)));"auto"==U&&(Na.height=Math.round(C.snap(Na.height)))}};if("["==Y.charAt(0)){var ha=O;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(Y)),function(){qa();ha()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(C);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var pa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};
+this.executeLayout(function(){ia.execute(C.getDefaultParent());qa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&da.length==2*p.length-1&&1==ka.length){C.view.validate();var va=new mxCompactTreeLayout(C,"horizontaltree"==Y);va.levelDistance=D;va.edgeRouting=!1;va.resetEdges=!1;this.executeLayout(function(){va.execute(C.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){C.view.validate();var za=
+new mxHierarchicalLayout(C,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);za.intraCellSpacing=D;za.parallelEdgeSpacing=t;za.interRankCellSpacing=L;za.disableEdgeStyle=!1;this.executeLayout(function(){za.execute(C.getDefaultParent(),da);C.moveCells(da,R,X)},!0,O);O=null}else if("orgchart"==Y){C.view.validate();var Ea=new mxOrgChartLayout(C,2,L,D),Ba=Ea.isVertexIgnored;Ea.isVertexIgnored=function(Ha){return Ba.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){Ea.execute(C.getDefaultParent());
+qa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&da.length>p.length){C.view.validate();var ua=new mxFastOrganicLayout(C);ua.forceConstant=3*D;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var sa=ua.isVertexIgnored;ua.isVertexIgnored=function(Ha){return sa.apply(this,arguments)||0>mxUtils.indexOf(p,Ha)};this.executeLayout(function(){ua.execute(C.getDefaultParent());qa()},!0,O);O=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,n,q){d=new LinkDialog(this,d,g,k,!0,n,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);
this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(d){var g=x.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
+this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var v=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(d){var g=v.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);
this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=
-d&&null!=d.shape&&null!=d.shape.stencil)};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,q,p,A,E){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
-else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(n,q,p)),"image/svg+xml");else{var B=d.getFileData(!0,null,null,null,null,!0),J=z.getGraphBounds(),M=Math.floor(J.width*q/z.view.scale),v=Math.floor(J.height*q/z.view.scale);if(B.length<=MAX_REQUEST_SIZE&&M*v<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};E&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(G,
-I){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(I||"0")+(null!=G?"&filename="+encodeURIComponent(G):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+M+"&h="+v+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,E,A):d.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,q,p,y,A){var C=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
+else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(C.getSvg(n,q,p)),"image/svg+xml");else{var B=d.getFileData(!0,null,null,null,null,!0),I=C.getGraphBounds(),M=Math.floor(I.width*q/C.view.scale),G=Math.floor(I.height*q/C.view.scale);if(B.length<=MAX_REQUEST_SIZE&&M*G<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var S={globalVars:C.getExportVariables()};A&&(S.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});d.saveRequest(g,k,function(u,
+z){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(z||"0")+(null!=u?"&filename="+encodeURIComponent(u):"")+"&extras="+encodeURIComponent(JSON.stringify(S))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+M+"&h="+G+"&border="+p+"&xml="+encodeURIComponent(B))})}else"png"==k?d.exportImage(q,null==n||"none"==n,!0,!1,!1,p,!0,!1,null,A,y):d.exportImage(q,!1,!0,!1,!1,p,!0,!1,"jpeg",A);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var n=d;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=
-document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var E=A[d];if("R"==E.substring(0,1)){var z=JSON.parse(decodeURIComponent(E.substring(1)));
-p[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){q.innerText="";if(0==B.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<B.length;J++){var M=B[J];p[M.id]&&(g[M.id]=M);var v=this.addCheckbox(q,M.title,p[M.id]);(function(u,G){mxEvent.addListener(G,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(M,v)}},mxUtils.bind(this,
-function(B){q.innerText="";var J=document.createElement("div");J.style.padding="8px";J.style.textAlign="center";mxUtils.write(J,mxResources.get("error")+": ");mxUtils.write(J,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));q.appendChild(J)}));k.appendChild(q);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,J;for(J in g)null==p[J]&&(B++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],
-null,mxUtils.bind(this,function(v){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,v,M))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[J]));for(J in p)g[J]||this.closeLibrary(new RemoteLibrary(this,null,p[J]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,
+document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var y=mxSettings.getCustomLibraries();for(d=0;d<y.length;d++){var A=y[d];if("R"==A.substring(0,1)){var C=JSON.parse(decodeURIComponent(A.substring(1)));
+p[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(B){}this.remoteInvoke("getCustomLibraries",null,null,function(B){q.innerText="";if(0==B.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<B.length;I++){var M=B[I];p[M.id]&&(g[M.id]=M);var G=this.addCheckbox(q,M.title,p[M.id]);(function(S,u){mxEvent.addListener(u,"change",function(){this.checked?g[S.id]=S:delete g[S.id]})})(M,G)}},mxUtils.bind(this,
+function(B){q.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=B&&null!=B.message?B.message:mxResources.get("unknownError"));q.appendChild(I)}));k.appendChild(q);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var B=0,I;for(I in g)null==p[I]&&(B++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],
+null,mxUtils.bind(this,function(G){B--;0==B&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,G,M))}catch(S){this.handleError(S,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){B--;0==B&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[I]));for(I in p)g[I]||this.closeLibrary(new RemoteLibrary(this,null,p[I]));0==B&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,q){var p=!0,A=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(A);p&&n.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(A);p&&q.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,
-g){var k=mxUtils.bind(this,function(B,J){var M={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=J?M.error={errResp:J}:null!=B&&(M.resp=B);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var n=d.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,A=0;A<q.allowedDomains.length;A++)if(g=="https://"+q.allowedDomains[A]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var E=d.functionArgs;Array.isArray(E)||
-(E=[]);if(q.isAsync)E.push(function(){k(Array.prototype.slice.apply(arguments))}),E.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,E);else{var z=this[n].apply(this,E);k([z])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=
-function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var z=!0,B=!1,J,M=0,v=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){M++;G()}),G=mxUtils.bind(this,function(){try{if(M>=J.length)v();else{var F=J[M];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(L){null==L||".scratchpad"==F&&L==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):u()}),u)}}catch(L){console.log(L)}}),I=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title,
-size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],u,u,["filesInfo","files"])}catch(L){console.log(L)}});A=mxUtils.bind(this,function(F){try{if(F.source==E.contentWindow){var L={};try{L=JSON.parse(F.data)}catch(K){}"init"==L.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||B||
-(z?null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?(J=L.resp[0],z=!1,G()):v():null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?I(L.resp[0]):u())}}catch(K){console.log(K)}});window.addEventListener("message",A)}})));d(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(q){null!=g&&g(q)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=
-[q],d=[d],g=[g]);var A=p.transaction(q,"readwrite");A.oncomplete=k;A.onerror=n;for(p=0;p<q.length;p++)A.objectStore(q[p]).put(null!=d&&null!=d[p]?{key:d[p],data:g[p]}:g[p])}catch(E){null!=n&&n(E)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);q=q.transaction(n,"readwrite");q.oncomplete=g;q.onerror=k;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(d[p])}),k)};EditorUi.prototype.getDatabaseItem=
-function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(d);p.onsuccess=function(){g(p.result)};p.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(A){null==A.target.result?d(p):(p.push(A.target.result.value),
-A.target.result.continue())};q.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,q){var p=!0,y=window.setTimeout(mxUtils.bind(this,function(){p=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),A=mxUtils.bind(this,function(){window.clearTimeout(y);p&&n.apply(this,arguments)}),C=mxUtils.bind(this,function(){window.clearTimeout(y);p&&q.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:A,error:C});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,
+g){var k=mxUtils.bind(this,function(B,I){var M={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=I?M.error={errResp:I}:null!=B&&(M.resp=B);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var n=d.funtionName,q=this.remoteInvokableFns[n];if(null!=q&&"function"===typeof this[n]){if(q.allowedDomains){for(var p=!1,y=0;y<q.allowedDomains.length;y++)if(g=="https://"+q.allowedDomains[y]){p=!0;break}if(!p){k(null,"Invalid Call: "+n+" is not allowed.");return}}var A=d.functionArgs;Array.isArray(A)||
+(A=[]);if(q.isAsync)A.push(function(){k(Array.prototype.slice.apply(arguments))}),A.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,A);else{var C=this[n].apply(this,A);k([C])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=
+function(q){try{var p=n.result;1>q.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=g&&g(y)}};n.onsuccess=mxUtils.bind(this,function(q){var p=n.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var A=document.createElement("iframe");A.style.display="none";A.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(A);var C=!0,B=!1,I,M=0,G=mxUtils.bind(this,function(){B=!0;this.setDatabaseItem(".drawioMigrated3",!0);A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),S=mxUtils.bind(this,function(){M++;u()}),u=mxUtils.bind(this,function(){try{if(M>=I.length)G();else{var F=I[M];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(J){null==J||".scratchpad"==F&&J==this.emptyLibraryXml?A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):S()}),S)}}catch(J){console.log(J)}}),z=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title,
+size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],S,S,["filesInfo","files"])}catch(J){console.log(J)}});y=mxUtils.bind(this,function(F){try{if(F.source==A.contentWindow){var J={};try{J=JSON.parse(F.data)}catch(K){}"init"==J.event?(A.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),A.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=J.event||B||
+(C?null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?(I=J.resp[0],C=!1,u()):G():null!=J.resp&&0<J.resp.length&&null!=J.resp[0]?z(J.resp[0]):S())}}catch(K){console.log(K)}});window.addEventListener("message",y)}})));d(p);p.onversionchange=function(){p.close()}});n.onerror=g;n.onblocked=function(){}}catch(q){null!=g&&g(q)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";Array.isArray(q)||(q=
+[q],d=[d],g=[g]);var y=p.transaction(q,"readwrite");y.oncomplete=k;y.onerror=n;for(p=0;p<q.length;p++)y.objectStore(q[p]).put(null!=d&&null!=d[p]?{key:d[p],data:g[p]}:g[p])}catch(A){null!=n&&n(A)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){n=n||"objects";Array.isArray(n)||(n=[n],d=[d]);q=q.transaction(n,"readwrite");q.oncomplete=g;q.onerror=k;for(var p=0;p<n.length;p++)q.objectStore(n[p]).delete(d[p])}),k)};EditorUi.prototype.getDatabaseItem=
+function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(q){try{n=n||"objects";var p=q.transaction([n],"readonly").objectStore(n).get(d);p.onsuccess=function(){g(p.result)};p.onerror=k}catch(y){null!=k&&k(y)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),p=[];q.onsuccess=function(y){null==y.target.result?d(p):(p.push(y.target.result.value),
+y.target.result.continue())};q.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var q=n.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=g}catch(p){null!=g&&g(p)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=
this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var n=this.getCurrentFile();null!=n?n.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?
d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=
-k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,q,p,A,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(d,g,k,n,q,p,A,E)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,q,p,A,E,z,B,J,M,v,u,G,I){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,n,q,p,A,E,z,B,J,M,v,u,G,I)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,q,p,y,A){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(d,g,k,n,q,p,y,A)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,q,p,y,A,C,B,I,M,G,S,u,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,n,q,p,y,A,C,B,I,M,G,S,u,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(d,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,n,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,n,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var q=
"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(q||n)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,l,m){function x(){for(var F=B.getElementsByTagName("div"),L=0,K=0;K<F.length;K++)"none"!=F[K].style.display&&F[K].parentNode==B&&L++;J.style.display=0==L?"block":"none"}function y(F,L,K,H){function Q(){L.removeChild(V);L.removeChild(W);T.style.display="block";U.style.display="block"}A={div:L,comment:F,saveCallback:K,deleteOnCancel:H};var U=L.querySelector(".geCommentTxt"),T=L.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=F.content;L.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){H?(L.parentNode.removeChild(L),x()):Q();A=null});t.className="geCommentEditBtn";W.appendChild(t);var C=mxUtils.button(mxResources.get("save"),function(){U.innerText="";F.content=V.value;mxUtils.write(U,F.content);Q();K(F);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(C.click(),mxEvent.consume(N)):27==N.keyCode&&(t.click(),mxEvent.consume(N)))}));C.focus();C.className="geCommentEditBtn gePrimaryBtn";W.appendChild(C);L.insertBefore(W,U);T.style.display="none";U.style.display="none";V.focus()}function D(F,L){L.innerText="";F=new Date(F.modifiedDate);var K=b.timeSince(F);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(L,mxResources.get("timeAgo",
-[K],"{1} ago"));L.setAttribute("title",F.toLocaleDateString()+" "+F.toLocaleTimeString())}function d(F){var L=document.createElement("img");L.className="geCommentBusyImg";L.src=IMAGE_PATH+"/spin.gif";F.appendChild(L);F.busyImg=L}function g(F){F.style.border="1px solid red";F.removeChild(F.busyImg)}function k(F){F.style.border="";F.removeChild(F.busyImg)}function n(F,L,K,H,Q){function U(O,P,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className=
-"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){P(Y,F);Y.preventDefault();mxEvent.consume(Y)});R.appendChild(X);S&&(X.style.display="none")}function T(){function O(X){P.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var P=[],S=W;O(F);return{pdiv:S,replies:P}}function V(O,P,S,X,aa){function Y(){d(ma);F.addReply(ea,function(ia){ea.id=ia;F.replies.push(ea);k(ma);S&&S()},function(ia){Z();g(ma);b.handleError(ia,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){y(ea,ma,function(ia){Y()},!0)}var ba=T().pdiv,ea=b.newComment(O,b.getCurrentUser());ea.pCommentId=F.id;null==F.replies&&(F.replies=[]);var ma=n(ea,F.replies,ba,H+1);P?Z():Y()}if(Q||!F.isResolved){J.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",F.id);W.style.marginLeft=20*H+5+"px";F.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
-"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=F.user.pictureUrl||Editor.userImage;t.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";t.appendChild(C);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,F.user.displayName||"");C.appendChild(N);N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",
-F.id);D(F,N);C.appendChild(N);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,F.content||"");W.appendChild(t);F.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";t.appendChild(R);q||F.isLocked||0!=H&&!p||U(mxResources.get("reply"),function(){V("",!0)},F.isResolved);C=b.getCurrentUser();null==C||C.id!=F.user.id||q||F.isLocked||(U(mxResources.get("edit"),
-function(){function O(){y(F,W,function(){d(W);F.editComment(F.content,function(){k(W)},function(P){g(W);O();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},F.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(W);F.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var P=W.querySelectorAll(".geCommentAction");for(O=
-0;O<P.length;O++)P[O].parentNode.removeChild(P[O]);k(W);W.style.opacity="0.5"}else{P=T(F).replies;for(O=0;O<P.length;O++)B.removeChild(P[O]);for(O=0;O<L.length;O++)if(L[O]==F){L.splice(O,1);break}J.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},F.isResolved));q||F.isLocked||0!=H||U(F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function P(){var S=
-O.target;S.innerText="";F.isResolved=!F.isResolved;mxUtils.write(S,F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=F.isResolved?"none":"",aa=T(F).replies,Y=Editor.isDarkMode()?"transparent":F.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),ea=0;ea<ba.length;ea++)ba[ea]!=S.parentNode&&(ba[ea].style.display=X);u||(aa[Z].style.display="none")}x()}F.isResolved?V(mxResources.get("reOpened")+
-": ",!0,P,!1,!0):V(mxResources.get("markedAsResolved"),!1,P,!0)});W.appendChild(t);null!=K?B.insertBefore(W,K.nextSibling):B.appendChild(W);for(K=0;null!=F.replies&&K<F.replies.length;K++)t=F.replies[K],t.isResolved=F.isResolved,n(t,F.replies,null,H+1,Q);null!=A&&(A.comment.id==F.id?(Q=F.content,F.content=A.comment.content,y(F,W,A.saveCallback,A.deleteOnCancel),F.content=Q):null==A.comment.id&&A.comment.pCommentId==F.id&&(B.appendChild(A.div),y(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}}
-var q=!b.canComment(),p=b.canReplyToReplies(),A=null,E=document.createElement("div");E.className="geCommentsWin";E.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(z)+7+"px";E.appendChild(B);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(J,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=z;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!q){var v=z.cloneNode();v.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(v,"click",function(F){function L(){y(K,H,function(Q){d(H);b.addComment(Q,function(U){Q.id=U;G.push(Q);k(H)},function(U){g(H);L();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),H=n(K,G,null,0);L();F.preventDefault();mxEvent.consume(F)});M.appendChild(v)}v=z.cloneNode();v.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';v.setAttribute("title",mxResources.get("showResolved"));
-v.className="geAdaptiveAsset";var u=!1;mxEvent.addListener(v,"click",function(F){this.className=(u=!u)?"geButton geCheckedBtn":"geButton";I();F.preventDefault();mxEvent.consume(F)});M.appendChild(v);b.commentsRefreshNeeded()&&(v=z.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',v.setAttribute("title",mxResources.get("refresh")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(F){I();F.preventDefault();mxEvent.consume(F)}),M.appendChild(v));
-b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geAdaptiveAsset",mxEvent.addListener(z,"click",function(F){m();F.preventDefault();mxEvent.consume(F)}),M.appendChild(z));E.appendChild(M);var G=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);var F=A.div.querySelector(".geCommentEditTxtArea"),L=A.div.querySelector(".geCommentEditBtns");
-A.comment.content=F.value;F.parentNode.removeChild(F);L.parentNode.removeChild(L)}catch(K){b.handleError(K)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function H(Q){if(null!=Q){Q.sort(function(T,V){return new Date(T.modifiedDate)-new Date(V.modifiedDate)});for(var U=0;U<Q.length;U++)H(Q[U].replies)}}
-K.sort(function(Q,U){return new Date(Q.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(J);J.style.display="block";G=K;for(K=0;K<G.length;K++)H(G[K].replies),n(G[K],G,null,0,u);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(B.appendChild(A.div),y(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(K){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-I();this.refreshComments=I;M=mxUtils.bind(this,function(){function F(U){var T=K[U.id];if(null!=T)for(D(U,T),T=0;null!=U.replies&&T<U.replies.length;T++)F(U.replies[T])}if(this.window.isVisible()){for(var L=B.querySelectorAll(".geCommentDate"),K={},H=0;H<L.length;H++){var Q=L[H];K[Q.getAttribute("data-commentId")]=Q}for(H=0;H<G.length;H++)F(G[H])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),E,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,
-0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,m,x,y,D,d,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+
+var CommentsWindow=function(b,e,f,c,l,m){function v(){for(var F=B.getElementsByTagName("div"),J=0,K=0;K<F.length;K++)"none"!=F[K].style.display&&F[K].parentNode==B&&J++;I.style.display=0==J?"block":"none"}function x(F,J,K,H){function N(){J.removeChild(V);J.removeChild(W);Q.style.display="block";U.style.display="block"}y={div:J,comment:F,saveCallback:K,deleteOnCancel:H};var U=J.querySelector(".geCommentTxt"),Q=J.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
+"geCommentEditTxtArea";V.style.minHeight=U.offsetHeight+"px";V.value=F.content;J.insertBefore(V,U);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){H?(J.parentNode.removeChild(J),v()):N();y=null});t.className="geCommentEditBtn";W.appendChild(t);var D=mxUtils.button(mxResources.get("save"),function(){U.innerText="";F.content=V.value;mxUtils.write(U,F.content);N();K(F);y=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(D.click(),mxEvent.consume(L)):27==L.keyCode&&(t.click(),mxEvent.consume(L)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);J.insertBefore(W,U);Q.style.display="none";U.style.display="none";V.focus()}function E(F,J){J.innerText="";F=new Date(F.modifiedDate);var K=b.timeSince(F);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
+[K],"{1} ago"));J.setAttribute("title",F.toLocaleDateString()+" "+F.toLocaleTimeString())}function d(F){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";F.appendChild(J);F.busyImg=J}function g(F){F.style.border="1px solid red";F.removeChild(F.busyImg)}function k(F){F.style.border="";F.removeChild(F.busyImg)}function n(F,J,K,H,N){function U(O,P,R){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
+"geCommentActionLnk";mxUtils.write(Z,O);X.appendChild(Z);mxEvent.addListener(Z,"click",function(Y){P(Y,F);Y.preventDefault();mxEvent.consume(Y)});T.appendChild(X);R&&(X.style.display="none")}function Q(){function O(X){P.push(R);if(null!=X.replies)for(var Z=0;Z<X.replies.length;Z++)R=R.nextSibling,O(X.replies[Z])}var P=[],R=W;O(F);return{pdiv:R,replies:P}}function V(O,P,R,X,Z){function Y(){d(ja);F.addReply(ea,function(fa){ea.id=fa;F.replies.push(ea);k(ja);R&&R()},function(fa){aa();g(ja);b.handleError(fa,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Z)}function aa(){x(ea,ja,function(fa){Y()},!0)}var ba=Q().pdiv,ea=b.newComment(O,b.getCurrentUser());ea.pCommentId=F.id;null==F.replies&&(F.replies=[]);var ja=n(ea,F.replies,ba,H+1);P?aa():Y()}if(N||!F.isResolved){I.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",F.id);W.style.marginLeft=20*H+5+"px";F.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
+"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=F.user.pictureUrl||Editor.userImage;t.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";t.appendChild(D);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,F.user.displayName||"");D.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
+F.id);E(F,L);D.appendChild(L);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,F.content||"");W.appendChild(t);F.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);q||F.isLocked||0!=H&&!p||U(mxResources.get("reply"),function(){V("",!0)},F.isResolved);D=b.getCurrentUser();null==D||D.id!=F.user.id||q||F.isLocked||(U(mxResources.get("edit"),
+function(){function O(){x(F,W,function(){d(W);F.editComment(F.content,function(){k(W)},function(P){g(W);O();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},F.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(W);F.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var P=W.querySelectorAll(".geCommentAction");for(O=
+0;O<P.length;O++)P[O].parentNode.removeChild(P[O]);k(W);W.style.opacity="0.5"}else{P=Q(F).replies;for(O=0;O<P.length;O++)B.removeChild(P[O]);for(O=0;O<J.length;O++)if(J[O]==F){J.splice(O,1);break}I.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(O){g(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},F.isResolved));q||F.isLocked||0!=H||U(F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function P(){var R=
+O.target;R.innerText="";F.isResolved=!F.isResolved;mxUtils.write(R,F.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=F.isResolved?"none":"",Z=Q(F).replies,Y=Editor.isDarkMode()?"transparent":F.isResolved?"ghostWhite":"white",aa=0;aa<Z.length;aa++){Z[aa].style.backgroundColor=Y;for(var ba=Z[aa].querySelectorAll(".geCommentAction"),ea=0;ea<ba.length;ea++)ba[ea]!=R.parentNode&&(ba[ea].style.display=X);S||(Z[aa].style.display="none")}v()}F.isResolved?V(mxResources.get("reOpened")+
+": ",!0,P,!1,!0):V(mxResources.get("markedAsResolved"),!1,P,!0)});W.appendChild(t);null!=K?B.insertBefore(W,K.nextSibling):B.appendChild(W);for(K=0;null!=F.replies&&K<F.replies.length;K++)t=F.replies[K],t.isResolved=F.isResolved,n(t,F.replies,null,H+1,N);null!=y&&(y.comment.id==F.id?(N=F.content,F.content=y.comment.content,x(F,W,y.saveCallback,y.deleteOnCancel),F.content=N):null==y.comment.id&&y.comment.pCommentId==F.id&&(B.appendChild(y.div),x(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return W}}
+var q=!b.canComment(),p=b.canReplyToReplies(),y=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(C)+7+"px";A.appendChild(B);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(I,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=C;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");C.className="geButton";if(!q){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(G,"click",function(F){function J(){x(K,H,function(N){d(H);b.addComment(N,function(U){N.id=U;u.push(N);k(H)},function(U){g(H);J();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),H=n(K,u,null,0);J();F.preventDefault();mxEvent.consume(F)});M.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));
+G.className="geAdaptiveAsset";var S=!1;mxEvent.addListener(G,"click",function(F){this.className=(S=!S)?"geButton geCheckedBtn":"geButton";z();F.preventDefault();mxEvent.consume(F)});M.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(F){z();F.preventDefault();mxEvent.consume(F)}),M.appendChild(G));
+b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(F){m();F.preventDefault();mxEvent.consume(F)}),M.appendChild(C));A.appendChild(M);var u=[],z=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var F=y.div.querySelector(".geCommentEditTxtArea"),J=y.div.querySelector(".geCommentEditBtns");
+y.comment.content=F.value;F.parentNode.removeChild(F);J.parentNode.removeChild(J)}catch(K){b.handleError(K)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";p=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function H(N){if(null!=N){N.sort(function(Q,V){return new Date(Q.modifiedDate)-new Date(V.modifiedDate)});for(var U=0;U<N.length;U++)H(N[U].replies)}}
+K.sort(function(N,U){return new Date(N.modifiedDate)-new Date(U.modifiedDate)});B.innerText="";B.appendChild(I);I.style.display="block";u=K;for(K=0;K<u.length;K++)H(u[K].replies),n(u[K],u,null,0,S);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(B.appendChild(y.div),x(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(K){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+z();this.refreshComments=z;M=mxUtils.bind(this,function(){function F(U){var Q=K[U.id];if(null!=Q)for(E(U,Q),Q=0;null!=U.replies&&Q<U.replies.length;Q++)F(U.replies[Q])}if(this.window.isVisible()){for(var J=B.querySelectorAll(".geCommentDate"),K={},H=0;H<J.length;H++){var N=J[H];K[N.getAttribute("data-commentId")]=N}for(H=0;H<u.length;H++)F(u[H])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),A,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,
+0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,m,v,x,E,d,g){var k=document.createElement("div");k.style.textAlign="center";g=null!=g?g:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=g+
"px";n.style.lineHeight="1.2em";mxUtils.write(n,e);k.appendChild(n);null!=d&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),n.appendChild(e),k.appendChild(n));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";
-null!=y&&(m.innerHTML=y+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&d.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(q.checked)});d.appendChild(p);null!=x?(p.innerHTML=x+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-d.appendChild(m);k.appendChild(d);D?(d.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(A){q.checked=!q.checked;mxEvent.consume(A)})):d.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+null!=x&&(m.innerHTML=x+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&d.appendChild(m);var p=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(q.checked)});d.appendChild(p);null!=v?(p.innerHTML=v+"<br>"+p.innerHTML+"<br>",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.className="geBtn",p.style.width="40%"):p.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+d.appendChild(m);k.appendChild(d);E?(d.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(q),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),n.appendChild(l),k.appendChild(n),mxEvent.addListener(l,"click",function(y){q.checked=!q.checked;mxEvent.consume(y)})):d.style.marginTop="12px";this.init=function(){p.focus()};this.container=k};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var m=0;m<e.length;m++)null!=e[m]&&(b=this.patchPages(b,e[m],f,c,l));return b};
-EditorUi.prototype.patchPages=function(b,e,f,c,l){var m={},x=[],y={},D={},d={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)D[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)y[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(k in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var q=b[c].getId();d[q]=b[c];null!=g[n]||D[q]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][q]&&null!=e[EditorUi.DIFF_UPDATE][q].previous||(g[n]=q);n=q}}var p={},A=mxUtils.bind(this,function(z){var B=null!=z?z.getId():"";if(null!=z&&!p[B]){p[B]=!0;x.push(z);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][B]:null;null!=J&&(this.updatePageRoot(z),null!=J.name&&z.setName(J.name),
-null!=J.view&&this.patchViewState(z,J.view),null!=J.cells&&this.patchPage(z,J.cells,m[z.getId()],l),!f||null==J.cells&&null==J.view||(z.needsUpdate=!0))}z=g[B];null!=z&&(delete g[B],A(d[z]));z=y[B];null!=z&&(delete y[B],E(z))}),E=mxUtils.bind(this,function(z){z=mxUtils.parseXml(z.data).documentElement;z=new DiagramPage(z);this.updatePageRoot(z);var B=d[z.getId()];null==B?A(z):(this.patchPage(B,this.diffPages([B],[z]),m[B.getId()],l),f&&(B.needsUpdate=!0))});A();for(k in g)A(d[g[k]]),delete g[k];for(k in y)E(y[k]),
-delete y[k];return x};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
-EditorUi.prototype.createParentLookup=function(b,e){function f(d){var g=c[d];null==g&&(g={inserted:[],moved:{}},c[d]=g);return g}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var m=e[EditorUi.DIFF_INSERT][l],x=null!=m.parent?m.parent:"",y=null!=m.previous?m.previous:"";f(x).inserted[y]=m}if(null!=e[EditorUi.DIFF_UPDATE])for(var D in e[EditorUi.DIFF_UPDATE])m=e[EditorUi.DIFF_UPDATE][D],null!=m.previous&&(x=m.parent,null==x&&(l=b.getCell(D),null!=l&&(l=
-b.getParent(l),null!=l&&(x=l.getId()))),null!=x&&(f(x).moved[m.previous]=D));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,e);l.beginUpdate();try{var x=l.updateEdgeParent,y=new mxDictionary,D=[];l.updateEdgeParent=function(E,z){!y.get(E)&&c&&(y.put(E,!0),D.push(E))};var d=m[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=d&&null!=d.moved?d.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k),
-b.root=k);this.patchCellRecursive(b,l,l.root,m,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var q=0;q<e[EditorUi.DIFF_REMOVE].length;q++){var p=l.getCell(e[EditorUi.DIFF_REMOVE][q]);null!=p&&l.remove(p)}if(null!=e[EditorUi.DIFF_UPDATE]){var A=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in e[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),e[EditorUi.DIFF_UPDATE][n],null!=A?A[n]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(q=0;q<e[EditorUi.DIFF_INSERT].length;q++)g=e[EditorUi.DIFF_INSERT][q],
-p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=x;if(c&&0<D.length)for(q=0;q<D.length;q++)l.contains(D[q])&&l.updateEdgeParent(D[q])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var m=c[f.getId()],x=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var y=0,D=e.getChildCount(f),d="",g=0;g<D;g++){var k=e.getChildAt(f,g).getId();null==m[d]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[d]=k);d=k}D=mxUtils.bind(this,function(n,q){var p=null!=n?n.getId():"";null!=n&&q&&(q=
-e.getCell(p),null!=q&&q!=n&&(n=null));null!=n&&(e.getChildAt(f,y)!=n&&e.add(f,n,y),this.patchCellRecursive(b,e,n,c,l),y++);return p});for(d=[null];0<d.length;)if(g=d.shift(),g=D(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],d.push({child:e.getCell(k)})),k=x[g],null!=k&&(delete x[g],d.push({child:this.getCellForJson(k),insert:!0})),0==d.length){for(g in m)d.push({child:e.getCell(m[g])}),delete m[g];for(g in x)d.push({child:this.getCellForJson(x[g]),insert:!0}),delete x[g]}}};
+EditorUi.prototype.patchPages=function(b,e,f,c,l){var m={},v=[],x={},E={},d={},g={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var k in c[EditorUi.DIFF_UPDATE])m[k]=c[EditorUi.DIFF_UPDATE][k];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)E[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)x[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(k in e[EditorUi.DIFF_UPDATE])c=
+e[EditorUi.DIFF_UPDATE][k],null!=c.previous&&(g[c.previous]=k);if(null!=b){var n="";for(c=0;c<b.length;c++){var q=b[c].getId();d[q]=b[c];null!=g[n]||E[q]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][q]&&null!=e[EditorUi.DIFF_UPDATE][q].previous||(g[n]=q);n=q}}var p={},y=mxUtils.bind(this,function(C){var B=null!=C?C.getId():"";if(null!=C&&!p[B]){p[B]=!0;v.push(C);var I=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][B]:null;null!=I&&(this.updatePageRoot(C),null!=I.name&&C.setName(I.name),
+null!=I.view&&this.patchViewState(C,I.view),null!=I.cells&&this.patchPage(C,I.cells,m[C.getId()],l),!f||null==I.cells&&null==I.view||(C.needsUpdate=!0))}C=g[B];null!=C&&(delete g[B],y(d[C]));C=x[B];null!=C&&(delete x[B],A(C))}),A=mxUtils.bind(this,function(C){C=mxUtils.parseXml(C.data).documentElement;C=new DiagramPage(C);this.updatePageRoot(C);var B=d[C.getId()];null==B?y(C):(this.patchPage(B,this.diffPages([B],[C]),m[B.getId()],l),f&&(B.needsUpdate=!0))});y();for(k in g)y(d[g[k]]),delete g[k];for(k in x)A(x[k]),
+delete x[k];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
+EditorUi.prototype.createParentLookup=function(b,e){function f(d){var g=c[d];null==g&&(g={inserted:[],moved:{}},c[d]=g);return g}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var m=e[EditorUi.DIFF_INSERT][l],v=null!=m.parent?m.parent:"",x=null!=m.previous?m.previous:"";f(v).inserted[x]=m}if(null!=e[EditorUi.DIFF_UPDATE])for(var E in e[EditorUi.DIFF_UPDATE])m=e[EditorUi.DIFF_UPDATE][E],null!=m.previous&&(v=m.parent,null==v&&(l=b.getCell(E),null!=l&&(l=
+b.getParent(l),null!=l&&(v=l.getId()))),null!=v&&(f(v).moved[m.previous]=E));return c};
+EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,e);l.beginUpdate();try{var v=l.updateEdgeParent,x=new mxDictionary,E=[];l.updateEdgeParent=function(A,C){!x.get(A)&&c&&(x.put(A,!0),E.push(A))};var d=m[""],g=null!=d&&null!=d.inserted?d.inserted[""]:null,k=null;null!=g&&(k=this.getCellForJson(g));if(null==k){var n=null!=d&&null!=d.moved?d.moved[""]:null;null!=n&&(k=l.getCell(n))}null!=k&&(l.setRoot(k),
+b.root=k);this.patchCellRecursive(b,l,l.root,m,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var q=0;q<e[EditorUi.DIFF_REMOVE].length;q++){var p=l.getCell(e[EditorUi.DIFF_REMOVE][q]);null!=p&&l.remove(p)}if(null!=e[EditorUi.DIFF_UPDATE]){var y=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(n in e[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(n),e[EditorUi.DIFF_UPDATE][n],null!=y?y[n]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(q=0;q<e[EditorUi.DIFF_INSERT].length;q++)g=e[EditorUi.DIFF_INSERT][q],
+p=l.getCell(g.id),null!=p&&(l.setTerminal(p,l.getCell(g.source),!0),l.setTerminal(p,l.getCell(g.target),!1));l.updateEdgeParent=v;if(c&&0<E.length)for(q=0;q<E.length;q++)l.contains(E[q])&&l.updateEdgeParent(E[q])}finally{l.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var m=c[f.getId()],v=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var x=0,E=e.getChildCount(f),d="",g=0;g<E;g++){var k=e.getChildAt(f,g).getId();null==m[d]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][k]||null==l[EditorUi.DIFF_UPDATE][k].previous&&null==l[EditorUi.DIFF_UPDATE][k].parent)&&(m[d]=k);d=k}E=mxUtils.bind(this,function(n,q){var p=null!=n?n.getId():"";null!=n&&q&&(q=
+e.getCell(p),null!=q&&q!=n&&(n=null));null!=n&&(e.getChildAt(f,x)!=n&&e.add(f,n,x),this.patchCellRecursive(b,e,n,c,l),x++);return p});for(d=[null];0<d.length;)if(g=d.shift(),g=E(null!=g?g.child:null,null!=g?g.insert:!1),k=m[g],null!=k&&(delete m[g],d.push({child:e.getCell(k)})),k=v[g],null!=k&&(delete v[g],d.push({child:this.getCellForJson(k),insert:!0})),0==d.length){for(g in m)d.push({child:e.getCell(m[g])}),delete m[g];for(g in v)d.push({child:this.getCellForJson(v[g]),insert:!0}),delete v[g]}}};
EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=
1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};
EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),f.push(c));return f};
-EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},m={},x={},y=null;if(null!=b&&null!=e){for(var D=0;D<e.length;D++)m[e[D].getId()]={page:e[D],prev:y},y=e[D];y=null;for(D=0;D<b.length;D++){var d=b[D].getId();e=m[d];if(null==e)c.push(d);else{var g=this.diffPage(b[D],e.page),k={};mxUtils.isEmptyObject(g)||(k.cells=g);g=this.diffViewState(b[D],e.page);mxUtils.isEmptyObject(g)||(k.view=g);if((null!=e.prev?null==y:null!=y)||null!=y&&null!=e.prev&&y.getId()!=e.prev.getId())k.previous=null!=e.prev?
-e.prev.getId():"";null!=e.page.getName()&&b[D].getName()!=e.page.getName()&&(k.name=e.page.getName());mxUtils.isEmptyObject(k)||(x[d]=k)}delete m[b[D].getId()];y=b[D]}for(d in m)e=m[d],f.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(x)||(l[EditorUi.DIFF_UPDATE]=x);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
+EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},m={},v={},x=null;if(null!=b&&null!=e){for(var E=0;E<e.length;E++)m[e[E].getId()]={page:e[E],prev:x},x=e[E];x=null;for(E=0;E<b.length;E++){var d=b[E].getId();e=m[d];if(null==e)c.push(d);else{var g=this.diffPage(b[E],e.page),k={};mxUtils.isEmptyObject(g)||(k.cells=g);g=this.diffViewState(b[E],e.page);mxUtils.isEmptyObject(g)||(k.view=g);if((null!=e.prev?null==x:null!=x)||null!=x&&null!=e.prev&&x.getId()!=e.prev.getId())k.previous=null!=e.prev?
+e.prev.getId():"";null!=e.page.getName()&&b[E].getName()!=e.page.getName()&&(k.name=e.page.getName());mxUtils.isEmptyObject(k)||(v[d]=k)}delete m[b[E].getId()];x=b[E]}for(d in m)e=m[d],f.push({data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(v)||(l[EditorUi.DIFF_UPDATE]=v);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var m=b.getChildAt(l);this.createCellLookup(m,e,f);e=m}return f};
-EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var x=this.diffCell(b,m.cell);if(null!=x.parent||(null!=m.prev?null==e:null!=e)||null!=e&&null!=m.prev&&e.getId()!=m.prev.getId())x.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(x)||(c[b.getId()]=x)}m=b.getChildCount();e=null;for(x=0;x<m;x++){var y=b.getChildAt(x);this.diffCellRecursive(y,e,f,c,l);e=y}return c};
-EditorUi.prototype.diffPage=function(b,e){var f=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(e);e=this.createCellLookup(e.root);var m=this.diffCellRecursive(b.root,null,e,m,c),x;for(x in e)b=e[x],f.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f);return l};
+EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var v=this.diffCell(b,m.cell);if(null!=v.parent||(null!=m.prev?null==e:null!=e)||null!=e&&null!=m.prev&&e.getId()!=m.prev.getId())v.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(v)||(c[b.getId()]=v)}m=b.getChildCount();e=null;for(v=0;v<m;v++){var x=b.getChildAt(v);this.diffCellRecursive(x,e,f,c,l);e=x}return c};
+EditorUi.prototype.diffPage=function(b,e){var f=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(e);e=this.createCellLookup(e.root);var m=this.diffCellRecursive(b.root,null,e,m,c),v;for(v in e)b=e[v],f.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f);return l};
EditorUi.prototype.diffViewState=function(b,e){b=b.viewState;var f=e.viewState,c={};e==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var l in this.viewStateProperties)this.diffViewStateProperty(b,f,l,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,e,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));e=JSON.stringify(this.getViewStateProperty(e,f));b!=e&&(c[f]=e)};
EditorUi.prototype.getViewStateProperty=function(b,e){b=b[e];"backgroundImage"==e&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==e&&null==b&&(b=[]);return b};
EditorUi.prototype.getCellForJson=function(b){var e=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,f=b.value;null!=b.xmlValue&&(f=mxUtils.parseXml(b.xmlValue).documentElement);e=new mxCell(f,e,b.style);e.connectable=0!=b.connectable;e.collapsed=1==b.collapsed;e.visible=0!=b.visible;e.vertex=1==b.vertex;e.edge=1==b.edge;e.id=b.id;for(var c in b)this.cellProperties[c]||(e[c]=b[c]);return e};
EditorUi.prototype.getJsonForCell=function(b,e){var f={id:b.getId()};b.vertex&&(f.vertex=1);b.edge&&(f.edge=1);b.connectable||(f.connectable=0);null!=b.parent&&(f.parent=b.parent.getId());null!=e&&(f.previous=e.getId());null!=b.source&&(f.source=b.source.getId());null!=b.target&&(f.target=b.target.getId());null!=b.style&&(f.style=b.style);null!=b.geometry&&(f.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(f.collapsed=1);b.visible||(f.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?f.xmlValue=mxUtils.getXml(b.value):f.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(f[c]=b[c]);return f};
-EditorUi.prototype.diffCell=function(b,e){function f(x){return null!=x&&"object"===typeof x&&"number"===typeof x.nodeType&&"string"===typeof x.nodeName&&"function"===typeof x.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";
+EditorUi.prototype.diffCell=function(b,e){function f(v){return null!=v&&"object"===typeof v&&"number"===typeof v.nodeType&&"string"===typeof v.nodeName&&"function"===typeof v.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";
if((null!=b.source?null==e.source:null!=e.source)||null!=b.source&&null!=e.source&&b.source.getId()!=e.source.getId())c.source=null!=e.source?e.source.getId():"";if((null!=b.target?null==e.target:null!=e.target)||null!=b.target&&null!=e.target&&b.target.getId()!=e.target.getId())c.target=null!=e.target?e.target.getId():"";f(b.value)&&f(e.value)?b.value.isEqualNode(e.value)||(c.xmlValue=mxUtils.getXml(e.value)):b.value!=e.value&&(f(e.value)?c.xmlValue=mxUtils.getXml(e.value):c.value=null!=e.value?
e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var l=this.codec.encode(e.geometry);null!=l&&(c.geometry=mxUtils.getXml(l))}for(var m in b)this.cellProperties[m]||"function"===typeof b[m]||"function"===typeof e[m]||b[m]==e[m]||(c[m]=void 0===e[m]?null:e[m]);for(m in e)m in b||this.cellProperties[m]||"function"===typeof b[m]||"function"===
typeof e[m]||b[m]==e[m]||(c[m]=void 0===e[m]?null:e[m]);return c};EditorUi.prototype.isObjectEqual=function(b,e,f){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(l,m){return null==f||f[l]!=m?!0===m?1:m:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
@@ -11975,33 +12003,33 @@ DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatc
DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,m){return l.id<m.id?-1:l.id>m.id?1:0});for(var e=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=e&&this.doReceiveRemoteChanges(this.receivedData[f].c);
e=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(e){this.file.handleFileError(e)}))}),this.cleanupDelay))};
DrawioFileSync.prototype.cleanup=function(b,e,f){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",f);f?this.file.getLatestVersion(mxUtils.bind(this,function(l){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(l.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",l,"patches",c)}null!=b&&b()}catch(x){null!=e&&e(x)}}),e):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};
+!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(l.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",l,"patches",c)}null!=b&&b()}catch(v){null!=e&&e(v)}}),e):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
DrawioFileSync.prototype.extractRemove=function(b){var e={};null!=b[EditorUi.DIFF_REMOVE]&&(e[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var f in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][f];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==e[EditorUi.DIFF_UPDATE]&&(e[EditorUi.DIFF_UPDATE]={});e[EditorUi.DIFF_UPDATE][f]={};var l=e[EditorUi.DIFF_UPDATE][f];l.cells={};l.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return e};
DrawioFileSync.prototype.patchRealtime=function(b,e,f){var c=null;if(this.file.isRealtime()){c=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var l=this.extractRemove(this.extractLocal(c)),m=(null==f?b:b.concat(f)).concat([l]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,m,!0,e);mxUtils.isEmptyObject(l)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",e,"own",f,"all",c,"local",
l,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([e])}this.localFileWasChanged=!1}catch(f){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,e,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var x=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var y=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(y,this.ui.pages):null;var D=this.file.isRealtime()?this.ui.diffPages(y,this.file.ownPages):null;y=this.ui.applyPatches(y,b);var d=null==e?null:this.ui.getHashValueForPages(y);
-this.file.setShadowPages(y);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",D,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",x,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=d){var g=this.ui.hashValue(x),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nCurrent: "+d,x,"merge",
-e,d,x);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(y)]);return}null==this.patchRealtime(b,null,D)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(x),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,p)}}catch(A){}}};
+DrawioFileSync.prototype.merge=function(b,e,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var v=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var x=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(x,this.ui.pages):null;var E=this.file.isRealtime()?this.ui.diffPages(x,this.file.ownPages):null;x=this.ui.applyPatches(x,b);var d=null==e?null:this.ui.getHashValueForPages(x);
+this.file.setShadowPages(x);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",E,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",v,"etag",this.file.getDescriptorEtag(f));if(null!=e&&e!=d){var g=this.ui.hashValue(v),k=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nCurrent: "+d,v,"merge",
+e,d,v);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(x)]);return}null==this.patchRealtime(b,null,E)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(p){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=l&&l(p);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),g=this.ui.hashValue(v),this.file.sendErrorReport("Error in merge","From: "+k+"\nTo: "+g+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),p);else{var n=this.file.getCurrentUser(),q=null!=n?n.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),q,p)}}catch(y){}}};
DrawioFileSync.prototype.fileChanged=function(b,e,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,e,f):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var x=this.file.getDescriptorSecret(b);if(null==x||"1"==urlParams.lockdown)this.reload(e,f,c);else{var y=0,D=!1,d=mxUtils.bind(this,function(){if(null==
-c||!c())if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&&
-(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var q=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",y,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var E=0;E<A.length;E++){var z=this.stringToObject(A[E]);if(z.v>DrawioFileSync.PROTOCOL){D=!0;p=[];break}else if(z.v===
-DrawioFileSync.PROTOCOL&&null!=z.d)q=z.d.checksum,p.push(z.d.patch);else{D=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",D,"temp",p,"checksum",q)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,q,b,e,f,c)):y<=this.maxCacheReadyRetries-1&&!D&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(y++,this.file.stats.cacheMiss++,window.setTimeout(d,(y+1)*this.cacheReadyDelay)):
+DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorSecret(b);if(null==v||"1"==urlParams.lockdown)this.reload(e,f,c);else{var x=0,E=!1,d=mxUtils.bind(this,function(){if(null==
+c||!c())if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=v?"&secret="+encodeURIComponent(v):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&&
+(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var q=null,p=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[n],"status",n.getStatus(),"cacheReadyRetryCount",x,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var y=JSON.parse(n.getText());if(null!=y&&0<y.length)for(var A=0;A<y.length;A++){var C=this.stringToObject(y[A]);if(C.v>DrawioFileSync.PROTOCOL){E=!0;p=[];break}else if(C.v===
+DrawioFileSync.PROTOCOL&&null!=C.d)q=C.d.checksum,p.push(C.d.patch);else{E=!0;p=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[y],"failed",E,"temp",p,"checksum",q)}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,q,b,e,f,c)):x<=this.maxCacheReadyRetries-1&&!E&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(x++,this.file.stats.cacheMiss++,window.setTimeout(d,(x+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(B){null!=f&&f(B)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(d,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(l){null!=e&&e(l)}),f,c)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(l);c&&(200<=m.getStatus()&&299>=m.getStatus()?e(m.getText()):f({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),x=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.file.getDescriptorRevisionId(e),D=this.file.getCurrentRevisionId();if(null==
-x||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",y,"to",D,"etag",this.file.getCurrentEtag());else{var d=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:d,checksum:g}));this.file.stats.bytesSent+=k.length;
-this.file.stats.msgSent++;var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(D)+"&msg="+encodeURIComponent(m)+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l):
-""),mxUtils.bind(this,function(p){window.clearTimeout(q);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",d,k.length,"bytes","from",y,"to",D,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),v=this.file.getDescriptorSecret(this.file.getDescriptor()),x=this.file.getDescriptorRevisionId(e),E=this.file.getCurrentRevisionId();if(null==
+v||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",x,"to",E,"etag",this.file.getCurrentEtag());else{var d=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);var g=this.ui.getHashValueForPages(b),k=this.objectToString(this.createMessage({patch:d,checksum:g}));this.file.stats.bytesSent+=k.length;
+this.file.stats.msgSent++;var n=!0,q=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(x)+"&to="+encodeURIComponent(E)+"&msg="+encodeURIComponent(m)+(null!=v?"&secret="+encodeURIComponent(v):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(k.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(k):"")+(null!=l?"&token="+encodeURIComponent(l):
+""),mxUtils.bind(this,function(p){window.clearTimeout(q);n&&(200<=p.getStatus()&&299>=p.getStatus()?null!=f&&f():c({code:p.getStatus(),message:p.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",d,k.length,"bytes","from",x,"to",E,"etag",this.file.getCurrentEtag(),"checksum",g)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
@@ -12012,29 +12040,29 @@ Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-s
mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,f,c,l){};
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxAsyncCanvas.prototype.image=function(b,e,f,c,l,m,x,y){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,e,f,c,l,m,x,y,D,d,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==D&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(q){this.htmlCanvas.subCanvas[n]=q;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.image=function(b,e,f,c,l,m,v,x){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,e,f,c,l,m,v,x,E,d,g,k){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==E&&"function"===typeof html2canvas)){this.incWaitCounter();var n=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(q){this.htmlCanvas.subCanvas[n]=q;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};
mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,m,x,y,D){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=e;c.gradientAlpha=null!=D?D:1;c.gradientDirection=x;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
+mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,m,v,x,E){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=x?x:1;c.gradientColor=e;c.gradientAlpha=null!=E?E:1;c.gradientDirection=v;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(b,e){this.ctx.moveTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(b,e){this.ctx.lineTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(b,e,f,c){this.ctx.quadraticCurveTo(b,e,f,c);this.lastMoveX=f;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,m,x){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,m,x);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,m){this.ctx.bezierCurveTo(b,e,f,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};
+mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,m,v){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,m,v);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,m){this.ctx.bezierCurveTo(b,e,f,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};
mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,m){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+m);this.lineTo(b+f,e+c-m);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-m);this.lineTo(b,e+m);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,e,f,c,l,m,x,y){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var D=this.ctx;D.save();if(m){m=l.width;var d=l.height,g=Math.min(f/m,c/d);b+=(f-m*g)/2;e+=(c-d*g)/2;f=m*g;c=d*g}x&&(D.translate(2*b+f,0),D.scale(-1,1));y&&(D.translate(0,2*e+c),D.scale(1,-1));D.drawImage(l,b,e,f,c);D.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(b,e,f,c,l,m,v,x){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var E=this.ctx;E.save();if(m){m=l.width;var d=l.height,g=Math.min(f/m,c/d);b+=(f-m*g)/2;e+=(c-d*g)/2;f=m*g;c=d*g}v&&(E.translate(2*b+f,0),E.scale(-1,1));x&&(E.translate(0,2*e+c),E.scale(1,-1));E.drawImage(l,b,e,f,c);E.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,e,f,c,l,m,x,y,D,d,g,k){if(null!=l&&0!=l.length){f=this.state.scale;0!=k&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==D){l=this.subCanvas[this.canvasIndex++];D=l.height;k=l.width;switch(x){case mxConstants.ALIGN_MIDDLE:e-=D/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=D/f}switch(m){case mxConstants.ALIGN_CENTER:b-=k/2/f;break;case mxConstants.ALIGN_RIGHT:b-=k/f}this.ctx.save();
+mxJsCanvas.prototype.text=function(b,e,f,c,l,m,v,x,E,d,g,k){if(null!=l&&0!=l.length){f=this.state.scale;0!=k&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(k*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==E){l=this.subCanvas[this.canvasIndex++];E=l.height;k=l.width;switch(v){case mxConstants.ALIGN_MIDDLE:e-=E/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=E/f}switch(m){case mxConstants.ALIGN_CENTER:b-=k/2/f;break;case mxConstants.ALIGN_RIGHT:b-=k/f}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,
-Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=l;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);D=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);l=l.split("\n");k=D[1];this.ctx.textBaseline="top";D=e;switch(x){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(l.length-1)*k/2;D=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=k*(l.length-1),D=e-this.state.fontSize}x=[];k=[];for(f=0;f<l.length;f++)k[f]=b,x[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(k[f]-=x[f],m==mxConstants.ALIGN_CENTER&&(k[f]+=x[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=k[0];m=x[0];for(f=1;f<l.length;f++)b=Math.min(b,k[f]),m=Math.max(m,x[f]);this.ctx.save();
-b=Math.round(b)-.5;D=Math.round(D)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,D,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,D,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],k[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();k=document.createElement("div");k.innerHTML=l;k.style.position="absolute";k.style.top="-9999px";k.style.left="-9999px";k.style.fontFamily=this.state.fontFamily;k.style.fontWeight="bold";k.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(k);E=[k.offsetWidth,k.offsetHeight];document.body.removeChild(k);l=l.split("\n");k=E[1];this.ctx.textBaseline="top";E=e;switch(v){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";e-=(l.length-1)*k/2;E=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=k*(l.length-1),E=e-this.state.fontSize}v=[];k=[];for(f=0;f<l.length;f++)k[f]=b,v[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(k[f]-=v[f],m==mxConstants.ALIGN_CENTER&&(k[f]+=v[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=k[0];m=v[0];for(f=1;f<l.length;f++)b=Math.min(b,k[f]),m=Math.max(m,v[f]);this.ctx.save();
+b=Math.round(b)-.5;E=Math.round(E)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,E,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,E,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],k[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,e=f.indexOf(";",c),0>e?e=f.length:postCookie=f.substring(e),e=f.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+
@@ -12042,9 +12070,9 @@ f.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioCl
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};
-DriveFile.prototype.saveFile=function(b,e,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(x,y){var D=mxUtils.bind(this,function(d,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,q){try{this.savingFile=!1,0!=n?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
-Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=n,null!=y?this.fileSaved(q,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,y):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,q){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(q,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);D(d,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,d,null,x)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});D(m,e)}))):null!=f&&f()}catch(x){if(null!=c)c(x);else throw x;}};
+DriveFile.prototype.saveFile=function(b,e,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(v,x){var E=mxUtils.bind(this,function(d,g){try{var k=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,g,mxUtils.bind(this,function(n,q){try{this.savingFile=!1,0!=n?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
+Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=n,null!=x?this.fileSaved(q,k,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(n)}),c,x):null!=f&&f(n)):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),mxUtils.bind(this,function(n,q){try{this.savingFile=!1,this.isConflict(n)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(q,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);E(d,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(n)}catch(p){if(this.savingFile=!1,null!=c)c(p);else throw p;}}),l,l,d,null,v)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});E(m,e)}))):null!=f&&f()}catch(v){if(null!=c)c(v);else throw v;}};
DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};
DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};
DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
@@ -12052,13 +12080,13 @@ DriveFile.prototype.move=function(b,e,f){this.ui.drive.moveFile(this.getId(),b,m
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};
DriveFile.prototype.setRealtimeEnabled=function(b,e,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),e()):f()}),
f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
-DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,x){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(y){m(y.getData())}),x)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
+DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,v){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(x){m(x.getData())}),v)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
m?"&page="+m:""))+window.location.hash})})(f.items[c]);b(f.items)}),e)};DriveFile.prototype.getLatestVersion=function(b,e){this.ui.drive.getFile(this.getId(),b,e,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,e){function f(l,m,x){if(m.deleted)return null;x=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),x);for(var y=0;null!=m.replies&&y<m.replies.length;y++)x.addReplyDirect(f(l,m.replies[y],m.commentId));return x}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],x=0;x<l.items.length;x++){var y=f(this,l.items[x]);null!=y&&m.push(y)}b(m)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.getComments=function(b,e){function f(l,m,v){if(m.deleted)return null;v=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),v);for(var x=0;null!=m.replies&&x<m.replies.length;x++)v.addReplyDirect(f(l,m.replies[x],m.commentId));return v}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],v=0;v<l.items.length;v++){var x=f(this,l.items[v]);null!=x&&m.push(x)}b(m)}),e)};DriveFile.prototype.addComment=function(b,e,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){e(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,f){DriveFile.call(this,b,e,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
@@ -12066,90 +12094,90 @@ DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeT
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&f.push(c[m].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,x){this.authorize(!1,mxUtils.bind(this,function(){null!=x&&x();f()}),mxUtils.bind(this,function(y){var D=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(D=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-D,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,x=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var D=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=x&&window.clearTimeout(x);x=window.setTimeout(mxUtils.bind(this,
-function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})}),this.ui.timeout);var d=null,g=!1;"string"===typeof f.params?d=f.params:null!=f.params&&(d=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,d,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(q,p){if(null!=f.headers)for(var A in f.headers)q.setRequestHeader(A,f.headers[A]);else null!=f.contentType?
-q.setRequestHeader("Content-Type",f.contentType):g&&q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(q){try{if(window.clearTimeout(x),m){try{var p=JSON.parse(q.getText())}catch(z){p=null}if(200<=q.getStatus()&&299>=q.getStatus())null!=c&&c(p);else{var A=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,E=null!=A&&0<A.length?A[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&&
-(403!=p.error.code||"domainPolicy"!=E&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=E)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==E?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(D)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(D,
-Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(z){if(null!=l)l(z);else throw z;}}))}catch(q){if(null!=l)l(q);else throw q;}});null!=b&&this.authCalled?D():this.execute(D)}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
-DriveClient.prototype.authorize=function(f,c,l,m,x){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),f,c,l,m,x):null!=l&&l(y)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,x){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
-f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var y=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var D=JSON.parse(y);this.setPersistentToken(D,!c);null!=m&&m()}),x)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,x,y){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var D=
-JSON.parse(this.getPersistentToken(!0));D&&null!=D.current&&(this.userId=D.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var d=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(x?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(d),
-y=null):null==y?y=this.createAuthWin(d):y.location=d;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(g,k){window.onGoogleDriveCallback=null;try{null==g?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(g,x,!0,l,m)}catch(n){null!=m&&m(n)}finally{null!=k&&k.close()}}),y.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(g){if(null!=m)m(g);else throw g;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
+this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(x){var E=null!=x.message?x.message:mxResources.get("cannotLogin");null!=x&&null!=x.error&&403==x.error.code&&null!=x.error.data&&0<x.error.data.length&&"domainPolicy"==x.error.data[0].reason&&(E=x.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+E,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,v=null,x=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var E=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
+function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})}),this.ui.timeout);var d=null,g=!1;"string"===typeof f.params?d=f.params:null!=f.params&&(d=JSON.stringify(f.params),g=!0);var k=f.fullUrl||this.GDriveBaseUrl+f.url;g&&(k+=(0<k.indexOf("?")?"&":"?")+"alt=json");var n=new mxXmlRequest(k,d,f.method||"GET");n.setRequestHeaders=mxUtils.bind(this,function(q,p){if(null!=f.headers)for(var y in f.headers)q.setRequestHeader(y,f.headers[y]);else null!=f.contentType?
+q.setRequestHeader("Content-Type",f.contentType):g&&q.setRequestHeader("Content-Type","application/json");q.setRequestHeader("Authorization","Bearer "+b)});n.send(mxUtils.bind(this,function(q){try{if(window.clearTimeout(v),m){try{var p=JSON.parse(q.getText())}catch(C){p=null}if(200<=q.getStatus()&&299>=q.getStatus())null!=c&&c(p);else{var y=null!=p&&null!=p.error?null!=p.error.data?p.error.data:p.error.errors:null,A=null!=y&&0<y.length?y[0].reason:null;null==l||null==p||null==p.error||-1!=p.error.code&&
+(403!=p.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=p.error.message)?null!=p&&null!=p.error&&(401==p.error.code||403==p.error.code&&"rateLimitExceeded"!=A)?403==p.error.code&&this.retryAuth||401==p.error.code&&this.retryAuth&&"authError"==A?(null!=l&&l(p),this.retryAuth=!1):(this.retryAuth=!0,this.execute(E)):null!=p&&null!=p.error&&412!=p.error.code&&404!=p.error.code&&400!=p.error.code&&this.currentRequest==f&&x<this.maxRetries?(x++,this.requestThread=window.setTimeout(E,
+Math.round(Math.pow(2,x)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(p):l(p)}}}catch(C){if(null!=l)l(C);else throw C;}}))}catch(q){if(null!=l)l(q);else throw q;}});null!=b&&this.authCalled?E():this.execute(E)}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+DriveClient.prototype.authorize=function(f,c,l,m,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(x){this.updateAuthInfo(x,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?this.authorizeStep2(x.getText(),f,c,l,m,v):null!=l&&l(x)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
+f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var x=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var E=JSON.parse(x);this.setPersistentToken(E,!c);null!=m&&m()}),v)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,v,x){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var E=
+JSON.parse(this.getPersistentToken(!0));E&&null!=E.current&&(this.userId=E.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),this.updateAuthInfo(g,!0,!1,l,m)):(0!=g.getStatus()&&this.logout(),null!=m&&m(g))}),m);else{var d=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(v?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(d),
+x=null):null==x?x=this.createAuthWin(d):x.location=d;null!=x?(window.onGoogleDriveCallback=mxUtils.bind(this,function(g,k){window.onGoogleDriveCallback=null;try{null==g?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(g,v,!0,l,m)}catch(n){null!=m&&m(n)}finally{null!=k&&k.close()}}),x.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(g){if(null!=m)m(g);else throw g;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?
-this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var x=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var D=mxResources.get("notAvailable"),d=D,g=null;null!=y&&null!=y.user&&(D=y.user.emailAddress,d=y.user.displayName,
-g=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(x.id,D,d,g,x.locale));this.userId=x.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile=
+this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var v=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(x){var E=mxResources.get("notAvailable"),d=E,g=null;null!=x&&null!=x.user&&(E=x.user.emailAddress,d=x.user.displayName,
+g=null!=x.user.picture?x.user.picture.url:null);this.setUser(new DrawioUser(v.id,E,d,g,v.locale));this.userId=v.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile=
function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,m)};DriveClient.prototype.moveFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,m)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,
-l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,m){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,m,x){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":
-""))+"&orderBy=modifiedDate desc,title"},m,x)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,x){m=null!=m?m:!1;x=null!=x?x:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=f;this.getXmlFile(y,
-c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(y){try{if(null!=this.user){var D=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!this.ui.useCanvasForExport&&D?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||x||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,c,l,!0,x):this.getXmlFile(y,c,l)}else l({message:mxResources.get("loggedOut")})}catch(d){if(null!=l)l(d);
-else throw d;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,x){try{var y={Authorization:"Bearer "+b},D=f.downloadUrl;if(null==D)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var d=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(D,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")});
-else if(f.mimeType==this.libraryMimeType||x)f.mimeType!=this.libraryMimeType||x?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var q=k.lastIndexOf(",");if(0<q){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(q+1);var A=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),E=this.ui.editor.extractGraphModel(mxUtils.parseXml(A).documentElement,!0);null==E||0<E.getElementsByTagName("parsererror").length?
-n=!0:k=A}catch(z){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(A=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,D)?this.ui.parseFileData(k,mxUtils.bind(this,function(z){try{4==z.readyState&&(200<=z.status&&299>=z.status?c(new LocalFile(this.ui,z.responseText,f.title+this.extension,
-!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(z){if(null!=l)l(z);else throw z;}}),mxUtils.bind(this,function(k,n){if(d<this.maxRetries&&null!=n&&403==n.getStatus())d++,window.setTimeout(g,2*d*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
-9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,y)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,x,y,D,d,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(G){if(null!=m)m(G);else throw G;try{if(!f.isConflict(G)){var I="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(G)||"unknown");null!=G&&null!=G.error&&null!=G.error.code&&(I+="-code_"+G.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:I,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(F){}}),q=mxUtils.bind(this,function(G){n(G);try{EditorUi.logError(G.message,null,null,
-G)}catch(I){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),A=f.desc.etag,E=f.desc.modifiedDate,z=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());y=null!=y?y:!1;var J=null,M=!1,v={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(v.mimeType))v.mimeType=this.xmlMimeType,J=f.desc,M=c=!0;else if("application/octet-stream"==v.mimeType||"1"==urlParams["override-mime"]&&v.mimeType!=this.xmlMimeType)v.mimeType=this.xmlMimeType;
-var u=mxUtils.bind(this,function(G,I,F){try{f.saveLevel=3;f.constructor==DriveFile&&(null==d&&(d=[]),null==f.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));F||(null!=G||y||(G=this.placeholderThumbnail,I=this.placeholderMimeType),null!=G&&null!=I&&(v.thumbnail={image:G,mimeType:I}));var L=f.getData(),K=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()-
-p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var T=(new Date(U.modifiedDate)).getTime()-(new Date(E)).getTime();if(0>=T||A==U.etag||c&&z==U.headRevisionId){f.saveLevel=12;var V=[];0>=T&&V.push("invalid modified time");A==U.etag&&V.push("stale etag");c&&z==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+z+"."+E+"-"+this.ui.hashValue(A)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,l(U,L),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+
-J.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){q(t)}}),H=mxUtils.bind(this,function(U,T){f.saveLevel=4;try{null!=d&&(v.properties=d);var V=D||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),W=mxUtils.bind(this,function(N){f.saveLevel=5;try{var R=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(f.getId(),v,U,c||N||R,T,N?null:V,M),mxUtils.bind(this,function(S){window.clearTimeout(P);O&&K(S)}),mxUtils.bind(this,function(S){window.clearTimeout(P);
-if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var aa=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,aa);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",aa)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote",
-X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(S,X)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){n(S)})):n(S)}catch(X){q(X)}}}))}catch(S){q(S)}}),t=mxUtils.bind(this,function(N){f.saveLevel=9;if(N||null==V)W(N);else{var R=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){R=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(O);
-if(R){f.saveLevel=10;try{null!=P&&P.headRevisionId==z?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,W(N)):n({error:{code:412}},P)}catch(S){q(S)}}}),mxUtils.bind(this,function(P){window.clearTimeout(O);R&&(f.saveLevel=11,n(P))}))}});if(B&&null==G){f.saveLevel=8;var C=new Image;C.onload=mxUtils.bind(this,function(){try{var N=this.thumbnailWidth/C.width,R=document.createElement("canvas");
-R.width=this.thumbnailWidth;R.height=Math.floor(C.height*N);R.getContext("2d").drawImage(C,0,0,R.width,R.height);var O=R.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");v.thumbnail={image:O,mimeType:"image/png"};t(!1)}catch(P){try{t(!1)}catch(S){q(S)}}});C.src="data:image/png;base64,"+U}else t(!1)}catch(N){q(N)}});if(B){var Q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){H(U,!0)}),n,this.ui.getCurrentFile()!=f?
-L:null,Q.scale,Q.border)}else H(L,!1)}catch(U){q(U)}});try{f.saveLevel=2,(y||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=v.mimeType&&"application/vnd.jgraph.mxfile"!=v.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(G){try{var I=null;try{null!=G&&(I=G.toDataURL("image/png")),null!=I&&(I=I.length>this.maxThumbnailSize?null:I.substring(I.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){I=null}u(I,"image/png")}catch(F){q(F)}})))&&
-u(null,null,f.constructor!=DriveLibrary)}catch(G){q(G)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(G){q(G)}};DriveClient.prototype.insertFile=function(f,c,l,m,x,y,D){y=null!=y?y:this.xmlMimeType;f={mimeType:y,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,D),mxUtils.bind(this,function(d){y==this.libraryMimeType?m(new DriveLibrary(this.ui,c,d)):0==d?null!=x&&x({message:mxResources.get("errorSavingFile")}):
-m(new DriveFile(this.ui,c,d))}),x)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,x,y,D){x=null!=x?x:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=y&&(d["If-Match"]=y);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
-JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?x?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");D&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
+l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,m){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,m,v){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":
+""))+"&orderBy=modifiedDate desc,title"},m,v)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,v){m=null!=m?m:!1;v=null!=v?v:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(x){x.title=x.originalFilename;x.headRevisionId=x.id;x.id=f;this.getXmlFile(x,
+c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(x){try{if(null!=this.user){var E=/\.png$/i.test(x.title);/\.v(dx|sdx?)$/i.test(x.title)||/\.gliffy$/i.test(x.title)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(x.downloadUrl,x.title,x.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||v||x.mimeType==this.libraryMimeType||x.mimeType==this.xmlMimeType?this.getXmlFile(x,c,l,!0,v):this.getXmlFile(x,c,l)}else l({message:mxResources.get("loggedOut")})}catch(d){if(null!=l)l(d);
+else throw d;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,v){try{var x={Authorization:"Bearer "+b},E=f.downloadUrl;if(null==E)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var d=0,g=mxUtils.bind(this,function(){this.ui.editor.loadUrl(E,mxUtils.bind(this,function(k){try{if(null==k)l({message:mxResources.get("invalidOrMissingFile")});
+else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,k,f)):l({message:mxResources.get("notADiagramFile")});else{var n=!1;if(/\.png$/i.test(f.title)){var q=k.lastIndexOf(",");if(0<q){var p=this.ui.extractGraphModelFromPng(k);if(null!=p&&0<p.length)k=p;else try{p=k.substring(q+1);var y=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?
+n=!0:k=y}catch(C){n=!0}}}else/\.pdf$/i.test(f.title)?(p=Editor.extractGraphModelFromPdf(k),null!=p&&0<p.length&&(n=!0,k=p)):"data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)&&(y=k.substring(22),k=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,E)?this.ui.parseFileData(k,mxUtils.bind(this,function(C){try{4==C.readyState&&(200<=C.status&&299>=C.status?c(new LocalFile(this.ui,C.responseText,f.title+this.extension,
+!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(B){if(null!=l)l(B);else throw B;}}),f.title):c(n?new LocalFile(this.ui,k,f.title,!0):new DriveFile(this.ui,k,f))}}catch(C){if(null!=l)l(C);else throw C;}}),mxUtils.bind(this,function(k,n){if(d<this.maxRetries&&null!=n&&403==n.getStatus())d++,window.setTimeout(g,2*d*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(k);else throw k;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
+9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,x)});g()}}catch(k){if(null!=l)l(k);else throw k;}};DriveClient.prototype.saveFile=function(f,c,l,m,v,x,E,d,g){try{var k=0;f.saveLevel=1;var n=mxUtils.bind(this,function(u){if(null!=m)m(u);else throw u;try{if(!f.isConflict(u)){var z="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(u)||"unknown");null!=u&&null!=u.error&&null!=u.error.code&&(z+="-code_"+u.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:z,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(F){}}),q=mxUtils.bind(this,function(u){n(u);try{EditorUi.logError(u.message,null,null,
+u)}catch(z){}});if(f.isEditable()&&null!=f.desc){var p=(new Date).getTime(),y=f.desc.etag,A=f.desc.modifiedDate,C=f.desc.headRevisionId,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());x=null!=x?x:!1;var I=null,M=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,I=f.desc,M=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;
+var S=mxUtils.bind(this,function(u,z,F){try{f.saveLevel=3;f.constructor==DriveFile&&(null==d&&(d=[]),null==f.getChannelId()&&d.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&d.push({key:"key",value:Editor.guid(32)}),d.push({key:"secret",value:null!=g?g:Editor.guid(32)}));F||(null!=u||x||(u=this.placeholderThumbnail,z=this.placeholderMimeType),null!=u&&null!=z&&(G.thumbnail={image:u,mimeType:z}));var J=f.getData(),K=mxUtils.bind(this,function(U){try{if(f.saveDelay=(new Date).getTime()-
+p,f.saveLevel=11,null==U)n({message:mxResources.get("errorSavingFile")+": Empty response"});else{var Q=(new Date(U.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=Q||y==U.etag||c&&C==U.headRevisionId){f.saveLevel=12;var V=[];0>=Q&&V.push("invalid modified time");y==U.etag&&V.push("stale etag");c&&C==U.headRevisionId&&V.push("stale revision");var W=V.join(", ");n({message:mxResources.get("errorSavingFile")+": "+W},U);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
+null,"from-"+C+"."+A+"-"+this.ui.hashValue(y)+"-to-"+U.headRevisionId+"."+U.modifiedDate+"-"+this.ui.hashValue(U.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,l(U,J),null!=I){this.executeRequest({url:"/files/"+I.id+"/revisions/"+I.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+I.id+"/revisions/"+
+I.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+I.id+"."+I.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){q(t)}}),H=mxUtils.bind(this,function(U,Q){f.saveLevel=4;try{null!=d&&(G.properties=d);var V=E||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:f.getCurrentEtag(),W=mxUtils.bind(this,function(L){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){O=!1;n({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(R){}this.executeRequest(this.createUploadRequest(f.getId(),G,U,c||L||T,Q,L?null:V,M),mxUtils.bind(this,function(R){window.clearTimeout(P);O&&K(R)}),mxUtils.bind(this,function(R){window.clearTimeout(P);
+if(O){f.saveLevel=6;try{f.isConflict(R)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(k<this.staleEtagMaxRetries){k++;var Z=2*k*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,Z);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",k,"delay",Z)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Y){}}else"1"==urlParams.test&&X.headRevisionId==C&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,"remote",
+X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),n(R,X)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){n(R)})):n(R)}catch(X){q(X)}}}))}catch(R){q(R)}}),t=mxUtils.bind(this,function(L){f.saveLevel=9;if(L||null==V)W(L);else{var T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;n({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(O);
+if(T){f.saveLevel=10;try{null!=P&&P.headRevisionId==C?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,W(L)):n({error:{code:412}},P)}catch(R){q(R)}}}),mxUtils.bind(this,function(P){window.clearTimeout(O);T&&(f.saveLevel=11,n(P))}))}});if(B&&null==u){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var L=this.thumbnailWidth/D.width,T=document.createElement("canvas");
+T.width=this.thumbnailWidth;T.height=Math.floor(D.height*L);T.getContext("2d").drawImage(D,0,0,T.width,T.height);var O=T.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:O,mimeType:"image/png"};t(!1)}catch(P){try{t(!1)}catch(R){q(R)}}});D.src="data:image/png;base64,"+U}else t(!1)}catch(L){q(L)}});if(B){var N=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(U){H(U,!0)}),n,this.ui.getCurrentFile()!=f?
+J:null,N.scale,N.border)}else H(J,!1)}catch(U){q(U)}});try{f.saveLevel=2,(x||B||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(u){try{var z=null;try{null!=u&&(z=u.toDataURL("image/png")),null!=z&&(z=z.length>this.maxThumbnailSize?null:z.substring(z.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(F){z=null}S(z,"image/png")}catch(F){q(F)}})))&&
+S(null,null,f.constructor!=DriveLibrary)}catch(u){q(u)}}else this.ui.editor.graph.reset(),n({message:mxResources.get("readOnly")})}catch(u){q(u)}};DriveClient.prototype.insertFile=function(f,c,l,m,v,x,E){x=null!=x?x:this.xmlMimeType;f={mimeType:x,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,E),mxUtils.bind(this,function(d){x==this.libraryMimeType?m(new DriveLibrary(this.ui,c,d)):0==d?null!=v&&v({message:mxResources.get("errorSavingFile")}):
+m(new DriveFile(this.ui,c,d))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,v,x,E){v=null!=v?v:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=x&&(d["If-Match"]=x);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?v?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");E&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=
-null!=f?f:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",x=mxUtils.bind(this,function(n){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(n).className&&(mxEvent.removeListener(document,
-"click",x),this[m].setVisible(!1),l&&l())});if(null==e[m]||e[m+"Token"]!=b){e[m+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),D=(new google.picker.DocsView).setIncludeFolders(!0),d=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),D.setMimeTypes("*/*"),d.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),D.setMimeTypes(this.mimeTypes),
-d.setMimeTypes(this.mimeTypes));e[m]=(new google.picker.PickerBuilder).setOAuthToken(e[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(D).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e[m]=e[m].setSize(k[0],k[1])}urlParams.topBaseUrl&&(e[m]=e[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[m]=e[m].setCallback(mxUtils.bind(this,
-function(n){if(n.action==google.picker.Action.PICKED||n.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",x),l&&n.action==google.picker.Action.CANCEL&&l();n.action==google.picker.Action.PICKED&&this.filePicked(n)})).build()}mxEvent.addListener(document,"click",x);e[m].setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
-mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",m),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var x=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),D=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(x).addView(y).addView(D).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+null!=f?f:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",v=mxUtils.bind(this,function(n){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(n).className&&(mxEvent.removeListener(document,
+"click",v),this[m].setVisible(!1),l&&l())});if(null==e[m]||e[m+"Token"]!=b){e[m+"Token"]=b;var x=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),E=(new google.picker.DocsView).setIncludeFolders(!0),d=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),g=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(x.setMimeTypes("*/*"),E.setMimeTypes("*/*"),d.setMimeTypes("*/*")):(x.setMimeTypes(this.mimeTypes),E.setMimeTypes(this.mimeTypes),
+d.setMimeTypes(this.mimeTypes));e[m]=(new google.picker.PickerBuilder).setOAuthToken(e[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(x).addView(E).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(g);if(urlParams.gPickerSize){var k=urlParams.gPickerSize.split(",");e[m]=e[m].setSize(k[0],k[1])}urlParams.topBaseUrl&&(e[m]=e[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[m]=e[m].setCallback(mxUtils.bind(this,
+function(n){if(n.action==google.picker.Action.PICKED||n.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",v),l&&n.action==google.picker.Action.CANCEL&&l();n.action==google.picker.Action.PICKED&&this.filePicked(n)})).build()}mxEvent.addListener(document,"click",v);e[m].setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
+mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=mxUtils.bind(this,function(g){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(g).className&&(mxEvent.removeListener(document,"click",m),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var v=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
+x=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),E=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(v).addView(x).addView(E).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
if(urlParams.gPickerSize){var d=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(d[0],d[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(g){g.action!=google.picker.Action.PICKED&&g.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",m);this.folderPickerCallback(g)})).build()}mxEvent.addListener(document,"click",m);e.folderPicker.setVisible(!0)}catch(g){this.ui.spinner.stop(),
this.ui.handleError(g)}}))}catch(m){this.ui.handleError(m)}});c?l():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?
this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=
-b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),x=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-y=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(x).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var D=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(D[0],D[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
+b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),v=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
+x=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(v).addView(google.picker.ViewId.RECENTLY_PICKED).addView(x);if(urlParams.gPickerSize){var E=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(E[0],E[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(d){d.action!=google.picker.Action.PICKED&&d.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.showPermissions=function(f){var c=mxUtils.bind(this,function(){var l=new ConfirmDialog(this.ui,
mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+f)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(l.container,360,190,!0,!0);l.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var l=new gapi.drive.share.ShareClient(this.appId);l.setOAuthToken(b);l.setItemIds([f]);l.showSettingsDialog();"MutationObserver"in window&&(null!=
-this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var x=!1,y=0;y<m.length;y++)for(var D=0;D<m[y].addedNodes.length;D++){var d=m[y].addedNodes[D];"BUTTON"==d.nodeName&&"ok"==d.getAttribute("name")&&null!=d.parentNode&&null!=d.parentNode.parentNode&&"dialog"==d.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,d.click(),c(),x=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&&
-(x=!0)}x&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=
+this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var v=!1,x=0;x<m.length;x++)for(var E=0;E<m[x].addedNodes.length;E++){var d=m[x].addedNodes[E];"BUTTON"==d.nodeName&&"ok"==d.getAttribute("name")&&null!=d.parentNode&&null!=d.parentNode.parentNode&&"dialog"==d.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,d.click(),c(),v=!0):"DIV"==d.nodeName&&"shr-q-shr-r-shr-xb"==d.className&&
+(v=!0)}v&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=
JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(x){l.push({modifiedDate:x.client_modified,fileSize:x.size,getXml:mxUtils.bind(this,function(y,D){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:x.rev},y,D)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
-x.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(x){e(x)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
-DropboxFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=x;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
-DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(y){var D=this.stat.path_display.lastIndexOf("/");D=1<D?this.stat.path_display.substring(1,D+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=d;this.contentChanged();
-null!=f&&f()}),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c(d)}),D)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var x=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){m(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,x.scale,x.border)}else m(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
+DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(v){l.push({modifiedDate:v.client_modified,fileSize:v.size,getXml:mxUtils.bind(this,function(x,E){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:v.rev},x,E)}),getUrl:mxUtils.bind(this,function(x){return this.ui.getUrl(window.location.pathname+"?rev="+
+v.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=x?"&page="+x:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(v){e(v)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
+DropboxFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=v;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
+DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(x){var E=this.stat.path_display.lastIndexOf("/");E=1<E?this.stat.path_display.substring(1,E+1):null;this.ui.dropbox.saveFile(b,x,mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=d;this.contentChanged();
+null!=f&&f()}),mxUtils.bind(this,function(d){this.savingFile=!1;null!=c&&c(d)}),E)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var v=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){m(this.ui.base64ToBlob(x,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,v.scale,v.border)}else m(this.getData())}catch(x){if(this.savingFile=!1,null!=c)c(x);else throw x;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+
"/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),
-x=this.client.usersGetCurrentAccount();x.then(mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),e())}));x["catch"](mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(null==y||401!==y.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=
+v=this.client.usersGetCurrentAccount();v.then(mxUtils.bind(this,function(x){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(x.account_id,x.email,x.name.display_name)),e())}));v["catch"](mxUtils.bind(this,function(x){window.clearTimeout(m);l&&(null==x||401!==x.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=
function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+
-"&token="+e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
-(x?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(D,d){if(m){window.onDropboxCallback=null;m=!1;try{null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.client.setAccessToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"),
-f())}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(x){var y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
-d=e();d.then(mxUtils.bind(this,function(g){window.clearTimeout(D);y&&null!=f&&f(g)}));d["catch"](mxUtils.bind(this,function(g){window.clearTimeout(D);y&&(null==g||500!=g.status&&400!=g.status&&401!=g.status?c({message:mxResources.get("error")+" "+g.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this,
-function(x){null==this.user?this.updateUser(function(){m(!0)},c,x):l(x)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m){var x=mxUtils.bind(this,function(){var y=e.split("/");this.ui.convertFile(e,0<y.length?
-y[y.length-1]:e,null,this.extension,f,c)});null!=b?x():this.authenticate(x,c)}else x={path:"/"+e},null!=urlParams.rev&&(x.rev=urlParams.rev),this.readFile(x,mxUtils.bind(this,function(y,D){var d=null;if(0<(m?y.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(y);null!=g&&0<g.length?y=g:d=new LocalFile(this,y,e,!0)}f(null!=d?d:l?new DropboxLibrary(this.ui,y,D):new DropboxFile(this.ui,y,D))}),c,m)};DropboxClient.prototype.readFile=function(e,f,c,l){var m=mxUtils.bind(this,function(y){var D=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){D=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(d);D&&null!=k&&409==k.status&&(D=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(e);g.then(mxUtils.bind(this,function(k){window.clearTimeout(d);if(D){D=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this,
-function(q){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(q){c(q)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(d);D&&(D=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
-x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!0)},c,y):m(y)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})};
-DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=e&&null!=f){var m=e.stat.path_display.substring(1),x=m.lastIndexOf("/");0<x&&(f=m.substring(0,x+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(y,D,d){y?(y=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+
-f,autorename:!1})});this.executePromise(g,c,l)}),D&&d.path_lower.substring(1)!==f.toLowerCase()?(D=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(D,y,l)):y()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,m){m=null!=m?m:!1;this.checkExists(e,mxUtils.bind(this,function(x){x?this.saveFile(e,f,mxUtils.bind(this,
-function(y){m?c(new DropboxLibrary(this.ui,f,y)):c(new DropboxFile(this.ui,f,y))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var x=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],
-{type:"text/plain"})})});this.executePromise(x,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(x){this.ui.spinner.stop();this.ui.handleError(x)}),l=f[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
-function(x,y){if(null!=y&&y.id==f[0].id)try{this.ui.spinner.stop(),e(m.substring(1),new DropboxLibrary(this.ui,x,y))}catch(D){this.ui.handleError(D)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,
-function(m){try{this.ui.spinner.stop(),f(m.getHash().substring(1),m)}catch(x){c(x)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),
-e(c[0].link);else{var l=mxUtils.bind(this,function(d){this.ui.spinner.stop();this.ui.handleError(d)}),m=mxUtils.bind(this,function(d,g){this.ui.spinner.stop();e(d,g)}),x=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&x)m(c[0].link);else{var y=c[0].link.indexOf(this.appPath);if(0<y){var D=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:D},mxUtils.bind(this,function(d,g){if(null!=g&&g.id==c[0].id){var k=
-x?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,D,!0));e(D.substring(1),null!=n?n:new DropboxFile(this.ui,d,g))}else this.createFile(c[0],m,l)}),l,x)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(m){null!=
-m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){var x=l?m.lastIndexOf(","):-1;0<x&&(x=this.ui.extractGraphModelFromPng(m.substring(x+1)),null!=x&&0<x.length&&(m=x));this.insertFile(e.name,m,mxUtils.bind(this,function(y){f(e.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
+(v?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(E,d){if(m){window.onDropboxCallback=null;m=!1;try{null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.client.setAccessToken(b),this.setUser(null),v&&this.setPersistentToken("remembered"),
+f())}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(v){var x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
+d=e();d.then(mxUtils.bind(this,function(g){window.clearTimeout(E);x&&null!=f&&f(g)}));d["catch"](mxUtils.bind(this,function(g){window.clearTimeout(E);x&&(null==g||500!=g.status&&400!=g.status&&401!=g.status?c({message:mxResources.get("error")+" "+g.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,v?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this,
+function(v){null==this.user?this.updateUser(function(){m(!0)},c,v):l(v)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m){var v=mxUtils.bind(this,function(){var x=e.split("/");this.ui.convertFile(e,0<x.length?
+x[x.length-1]:e,null,this.extension,f,c)});null!=b?v():this.authenticate(v,c)}else v={path:"/"+e},null!=urlParams.rev&&(v.rev=urlParams.rev),this.readFile(v,mxUtils.bind(this,function(x,E){var d=null;if(0<(m?x.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(x);null!=g&&0<g.length?x=g:d=new LocalFile(this,x,e,!0)}f(null!=d?d:l?new DropboxLibrary(this.ui,x,E):new DropboxFile(this.ui,x,E))}),c,m)};DropboxClient.prototype.readFile=function(e,f,c,l){var m=mxUtils.bind(this,function(x){var E=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(k){}));g["catch"](function(k){window.clearTimeout(d);E&&null!=k&&409==k.status&&(E=!1,c({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(e);g.then(mxUtils.bind(this,function(k){window.clearTimeout(d);if(E){E=!1;try{var n=new FileReader;n.onload=mxUtils.bind(this,
+function(q){f(n.result,k)});l?n.readAsDataURL(k.fileBlob):n.readAsText(k.fileBlob)}catch(q){c(q)}}}));g["catch"](mxUtils.bind(this,function(k){window.clearTimeout(d);E&&(E=!1,null==k||500!=k.status&&400!=k.status&&401!=k.status?c({message:mxResources.get("error")+" "+k.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){v(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
+v=mxUtils.bind(this,function(x){null==this.user?this.updateUser(function(){v(!0)},c,x):m(x)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})};
+DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=e&&null!=f){var m=e.stat.path_display.substring(1),v=m.lastIndexOf("/");0<v&&(f=m.substring(0,v+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(x,E,d){x?(x=mxUtils.bind(this,function(g){g=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+
+f,autorename:!1})});this.executePromise(g,c,l)}),E&&d.path_lower.substring(1)!==f.toLowerCase()?(E=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(E,x,l)):x()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,m){m=null!=m?m:!1;this.checkExists(e,mxUtils.bind(this,function(v){v?this.saveFile(e,f,mxUtils.bind(this,
+function(x){m?c(new DropboxLibrary(this.ui,f,x)):c(new DropboxFile(this.ui,f,x))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var v=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],
+{type:"text/plain"})})});this.executePromise(v,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(v){this.ui.spinner.stop();this.ui.handleError(v)}),l=f[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
+function(v,x){if(null!=x&&x.id==f[0].id)try{this.ui.spinner.stop(),e(m.substring(1),new DropboxLibrary(this.ui,v,x))}catch(E){this.ui.handleError(E)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,
+function(m){try{this.ui.spinner.stop(),f(m.getHash().substring(1),m)}catch(v){c(v)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),
+e(c[0].link);else{var l=mxUtils.bind(this,function(d){this.ui.spinner.stop();this.ui.handleError(d)}),m=mxUtils.bind(this,function(d,g){this.ui.spinner.stop();e(d,g)}),v=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&v)m(c[0].link);else{var x=c[0].link.indexOf(this.appPath);if(0<x){var E=decodeURIComponent(c[0].link.substring(x+this.appPath.length-1));this.readFile({path:E},mxUtils.bind(this,function(d,g){if(null!=g&&g.id==c[0].id){var k=
+v?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,E,!0));e(E.substring(1),null!=n?n:new DropboxFile(this.ui,d,g))}else this.createFile(c[0],m,l)}),l,v)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(m){null!=
+m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){var v=l?m.lastIndexOf(","):-1;0<v&&(v=this.ui.extractGraphModelFromPng(m.substring(v+1)),null!=v&&0<v.length&&(m=v));this.insertFile(e.name,m,mxUtils.bind(this,function(x){f(e.name,x)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length-
e.length-this.meta.name.length-(0<e.length?1:0));f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+f+"&parent="+
e}}catch(l){}this.ui.editor.graph.openLink(b)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};
@@ -12158,172 +12186,172 @@ OneDriveFile.prototype.isSyncEnabled=function(){return!0};OneDriveFile.prototype
OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?b(JSON.parse(f.getText())):null!=e&&e()}),e)};OneDriveFile.prototype.getLatestVersion=function(b,e){this.ui.oneDrive.getFile(this.getId(),b,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};
OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};
OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
-OneDriveFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=x;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
-OneDriveFile.prototype.saveFile=function(b,e,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var x=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),D=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,g){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=d;this.fileSaved(g,D,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();x()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),y)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});x()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=v;this.saveFile(b,e,f,c,l,m)}),c,l,m])};
+OneDriveFile.prototype.saveFile=function(b,e,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var v=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var x=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),E=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(d,g){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=d;this.fileSaved(g,E,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();v()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),x)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});v()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(x){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(x)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents",
"/_layouts/15/onedrive.aspx"):e.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;
OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;
-return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,m){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(x){window.clearTimeout(m);l&&(200>x.getStatus()||300<=x.getStatus()?c?f({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):(x=JSON.parse(x.getText()),this.setUser(new DrawioUser(x.id,x.mail,x.displayName)),e()))}),mxUtils.bind(this,function(x){window.clearTimeout(m);l&&f(x)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,m){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(v){window.clearTimeout(m);l&&(200>v.getStatus()||300<=v.getStatus()?c?f({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):(v=JSON.parse(v.getText()),this.setUser(new DrawioUser(v.id,v.mail,v.displayName)),e()))}),mxUtils.bind(this,function(v){window.clearTimeout(m);l&&f(v)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!=
-f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,m){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var x=
-!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(D){200<=D.getStatus()&&299>=D.getStatus()?this.updateAuthInfo(JSON.parse(D.getText()),y.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=D.getStatus()&&400!=D.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
-!0,mxUtils.bind(this,function(D,d){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(D?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
-Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(x){window.onOneDriveCallback=null;x=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),this.updateAuthInfo(k,D,!0,f,c))}catch(q){c(q)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){x&&(window.onOneDriveCallback=null,x=!1,c({message:mxResources.get("accessDenied"),
+f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,m){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var v=
+!0,x=JSON.parse(this.getPersistentToken(!0));null!=x?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()?this.updateAuthInfo(JSON.parse(E.getText()),x.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=E.getStatus()&&400!=E.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
+!0,mxUtils.bind(this,function(E,d){var g="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(E?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e);g=window.open(g,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,n){if(v){window.onOneDriveCallback=null;v=!1;try{null==k?c({message:mxResources.get("accessDenied"),retry:m}):(null!=d&&d(),this.updateAuthInfo(k,E,!0,f,c))}catch(q){c(q)}finally{null!=n&&n.close()}}else null!=n&&n.close()}),g.focus())}),mxUtils.bind(this,function(){v&&(window.onOneDriveCallback=null,v=!1,c({message:mxResources.get("accessDenied"),
retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
-this.setPersistentToken(JSON.stringify(m),!m.remember));e();return}}catch(x){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var l=mxUtils.bind(this,function(m){var x=!0,y=window.setTimeout(mxUtils.bind(this,function(){x=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(D){window.clearTimeout(y);x&&(200<=D.getStatus()&&299>=D.getStatus()||404==D.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(D)):m||401!==D.getStatus()&&400!==D.getStatus()?c(this.parseRequestText(D)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(D){window.clearTimeout(y);x&&c(D)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):
+this.setPersistentToken(JSON.stringify(m),!m.remember));e();return}}catch(v){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(e,f,c){var l=mxUtils.bind(this,function(m){var v=!0,x=window.setTimeout(mxUtils.bind(this,function(){v=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(E){window.clearTimeout(x);v&&(200<=E.getStatus()&&299>=E.getStatus()||404==E.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(E)):m||401!==E.getStatus()&&400!==E.getStatus()?c(this.parseRequestText(E)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(E){window.clearTimeout(x);v&&c(E)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):
e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(x){if(200<=x.getStatus()&&299>=x.getStatus()){var y=JSON.parse(x.getText()),D=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!this.ui.useCanvasForExport&&D)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,f,c);
-else{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),d){/\.html$/i.test(y.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(D?k.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(k);null!=q&&0<q.length?k=q:n=new LocalFile(this.ui,k,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p=
-k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?f(new LocalFile(this.ui,A.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=c)c(E);else throw E;}}),y.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui,
-k,y)):f(new OneDriveFile(this.ui,k,y))}}catch(A){if(null!=c)c(A);else throw A;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&c(this.parseRequestText(k))}),D||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(x))}),c)};OneDriveClient.prototype.renameFile=
+0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(e),mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var x=JSON.parse(v.getText()),E=/\.png$/i.test(x.name);if(/\.v(dx|sdx?)$/i.test(x.name)||/\.gliffy$/i.test(x.name)||/\.pdf$/i.test(x.name)||!this.ui.useCanvasForExport&&E)this.ui.convertFile(x["@microsoft.graph.downloadUrl"],x.name,null!=x.file?x.file.mimeType:null,this.extension,f,c);
+else{var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(x["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(k){try{if(window.clearTimeout(g),d){/\.html$/i.test(x.name)&&(k=this.removeExtraHtmlContent(k));var n=null;if(0<(E?k.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(k);null!=q&&0<q.length?k=q:n=new LocalFile(this.ui,k,x.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==k.substring(0,32)){var p=
+k.substring(22);k=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(k,x["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(k,mxUtils.bind(this,function(y){try{4==y.readyState&&(200<=y.status&&299>=y.status?f(new LocalFile(this.ui,y.responseText,x.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),x.name):null!=n?f(n):m?f(new OneDriveLibrary(this.ui,
+k,x)):f(new OneDriveFile(this.ui,k,x))}}catch(y){if(null!=c)c(y);else throw y;}}),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&c(this.parseRequestText(k))}),E||null!=x.file&&null!=x.file.mimeType&&("image/"==x.file.mimeType.substring(0,6)&&"image/svg"!=x.file.mimeType.substring(0,9)||"application/pdf"==x.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),c)};OneDriveClient.prototype.renameFile=
function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var m=this.getItemRef(e);f.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive",
-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,m){this.insertFile(e,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(e,f,c,l,m,x){this.isValidFilename(e)?(m=null!=m?m:!1,this.checkExists(x,e,!0,mxUtils.bind(this,function(y){if(y){y="/me/drive/root";null!=x&&(y=this.getItemURL(x,!0));var D=mxUtils.bind(this,function(d){m?
-c(new OneDriveLibrary(this.ui,f,d)):c(new OneDriveFile(this.ui,f,d))});y=this.baseUrl+y+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(d){this.writeLargeFile(this.getItemURL(d.id),f,D,l)}),l):this.writeFile(y,f,"PUT",null,D,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
-c,l){var m="/me/drive/root";null!=e&&(m=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(x){404==x.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(x){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
-f,c,l){try{var m=e.getData(),x=mxUtils.bind(this,function(D){var d=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(e.getId());4E6<=D.length?this.writeLargeFile(g,D,d,c,l):this.writeFile(g+"/content/",D,"PUT",null,d,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){x(this.ui.base64ToBlob(D,"image/png"))}),c,this.ui.getCurrentFile()!=e?m:null,y.scale,y.border)}else x(m)}catch(D){c(D)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,m){try{if(null!=f){var x=mxUtils.bind(this,function(D,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var q=f.substr(d,4194304),p=new mxXmlRequest(D,q,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(A,E){A.setRequestHeader("Content-Length",q.length);A.setRequestHeader("Content-Range","bytes "+d+"-"+(d+q.length-1)+"/"+f.length)});p.send(mxUtils.bind(this,
-function(A){window.clearTimeout(n);if(k){var E=A.getStatus();200<=E&&299>=E?(E=d+q.length,E==f.length?c(JSON.parse(A.getText())):x(D,E,g)):500<=E&&599>=E&&2>g?(g++,x(D,d,g)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(n);k&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),y=mxUtils.bind(this,function(D){try{var d=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(e+
-"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,q){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);d&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),x(n.uploadUrl,0)):D||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){y(!0)},l,D))}),mxUtils.bind(this,function(n){window.clearTimeout(g);
-d&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){y(!0)},l):y(!1)}else l({message:mxResources.get("unknownError")})}catch(D){l(D)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,m,x,y){try{if(null!=e&&null!=f){var D=mxUtils.bind(this,function(d){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;x({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var n=new mxXmlRequest(e,f,c);n.setRequestHeaders=
-mxUtils.bind(this,function(q,p){q.setRequestHeader("Content-Type",l||" ");q.setRequestHeader("Authorization","Bearer "+b);null!=y&&q.setRequestHeader("If-Match",y)});n.send(mxUtils.bind(this,function(q){window.clearTimeout(k);g&&(200<=q.getStatus()&&299>=q.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(q.getText()))):d||401!==q.getStatus()?x(this.parseRequestText(q),q):this.authenticate(function(){D(!0)},x,d))}),mxUtils.bind(this,function(q){window.clearTimeout(k);
-g&&x(this.parseRequestText(q))}))}catch(q){x(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){D(!0)},x):D(!1)}else x({message:mxResources.get("unknownError")})}catch(d){x(d)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
-OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var x=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var y=l.getSelectedItem();if(null!=y)if(f&&"object"==typeof y.folder)e({value:[y]});else{if(!y.folder){var D=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(D),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(d=JSON.parse(d.getText()),
-e(D,{value:[d]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(x.container,550,500,!0,!0);m.style.width=x.container.parentNode.style.width;m.style.height=parseInt(x.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(y,D,d,g){this.executeRequest(g?y:this.baseUrl+y,function(k){D(JSON.parse(k.getText()))},d)}),mxUtils.bind(this,function(y,D,d,g){this.executeRequest(this.baseUrl+
-"/drives/"+D+"/items/"+y,function(k){d(JSON.parse(k.getText()))},g)}),null,null,function(y){f?e({value:[y]}):e(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var x=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,
-function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){e(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?x():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",
-name:"root",parentReference:{driveId:"me"}}]})}),x,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(f)};OneDriveClient.prototype.pickFile=function(e,f){e=null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,m){this.insertFile(e,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(e,f,c,l,m,v){this.isValidFilename(e)?(m=null!=m?m:!1,this.checkExists(v,e,!0,mxUtils.bind(this,function(x){if(x){x="/me/drive/root";null!=v&&(x=this.getItemURL(v,!0));var E=mxUtils.bind(this,function(d){m?
+c(new OneDriveLibrary(this.ui,f,d)):c(new OneDriveFile(this.ui,f,d))});x=this.baseUrl+x+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(x,"","PUT",null,mxUtils.bind(this,function(d){this.writeLargeFile(this.getItemURL(d.id),f,E,l)}),l):this.writeFile(x,f,"PUT",null,E,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
+c,l){var m="/me/drive/root";null!=e&&(m=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(v){404==v.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(v){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
+f,c,l){try{var m=e.getData(),v=mxUtils.bind(this,function(E){var d=mxUtils.bind(this,function(k){f(k,m)}),g=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(g,E,d,c,l):this.writeFile(g+"/content/",E,"PUT",null,d,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var x=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){v(this.ui.base64ToBlob(E,"image/png"))}),c,this.ui.getCurrentFile()!=e?m:null,x.scale,x.border)}else v(m)}catch(E){c(E)}};
+OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,m){try{if(null!=f){var v=mxUtils.bind(this,function(E,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var q=f.substr(d,4194304),p=new mxXmlRequest(E,q,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(y,A){y.setRequestHeader("Content-Length",q.length);y.setRequestHeader("Content-Range","bytes "+d+"-"+(d+q.length-1)+"/"+f.length)});p.send(mxUtils.bind(this,
+function(y){window.clearTimeout(n);if(k){var A=y.getStatus();200<=A&&299>=A?(A=d+q.length,A==f.length?c(JSON.parse(y.getText())):v(E,A,g)):500<=A&&599>=A&&2>g?(g++,v(E,d,g)):l(this.parseRequestText(y),y)}}),mxUtils.bind(this,function(y){window.clearTimeout(n);k&&l(this.parseRequestText(y))}))}catch(y){l(y)}}),x=mxUtils.bind(this,function(E){try{var d=!0,g=null;try{g=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(n){}var k=new mxXmlRequest(e+
+"/createUploadSession","{}","POST");k.setRequestHeaders=mxUtils.bind(this,function(n,q){n.setRequestHeader("Content-Type","application/json");n.setRequestHeader("Authorization","Bearer "+b);null!=m&&n.setRequestHeader("If-Match",m)});k.send(mxUtils.bind(this,function(n){window.clearTimeout(g);d&&(200<=n.getStatus()&&299>=n.getStatus()?(n=JSON.parse(n.getText()),v(n.uploadUrl,0)):E||401!==n.getStatus()?l(this.parseRequestText(n),n):this.authenticate(function(){x(!0)},l,E))}),mxUtils.bind(this,function(n){window.clearTimeout(g);
+d&&l(this.parseRequestText(n))}))}catch(n){l(n)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){x(!0)},l):x(!1)}else l({message:mxResources.get("unknownError")})}catch(E){l(E)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,m,v,x){try{if(null!=e&&null!=f){var E=mxUtils.bind(this,function(d){try{var g=!0,k=null;try{k=window.setTimeout(mxUtils.bind(this,function(){g=!1;v({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(q){}var n=new mxXmlRequest(e,f,c);n.setRequestHeaders=
+mxUtils.bind(this,function(q,p){q.setRequestHeader("Content-Type",l||" ");q.setRequestHeader("Authorization","Bearer "+b);null!=x&&q.setRequestHeader("If-Match",x)});n.send(mxUtils.bind(this,function(q){window.clearTimeout(k);g&&(200<=q.getStatus()&&299>=q.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(q.getText()))):d||401!==q.getStatus()?v(this.parseRequestText(q),q):this.authenticate(function(){E(!0)},v,d))}),mxUtils.bind(this,function(q){window.clearTimeout(k);
+g&&v(this.parseRequestText(q))}))}catch(q){v(q)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},v):E(!1)}else v({message:mxResources.get("unknownError")})}catch(d){v(d)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
+OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var v=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var x=l.getSelectedItem();if(null!=x)if(f&&"object"==typeof x.folder)e({value:[x]});else{if(!x.folder){var E=OneDriveFile.prototype.getIdOf(x);this.executeRequest(this.getItemURL(E),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(d=JSON.parse(d.getText()),
+e(E,{value:[d]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(v.container,550,500,!0,!0);m.style.width=v.container.parentNode.style.width;m.style.height=parseInt(v.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(x,E,d,g){this.executeRequest(g?x:this.baseUrl+x,function(k){E(JSON.parse(k.getText()))},d)}),mxUtils.bind(this,function(x,E,d,g){this.executeRequest(this.baseUrl+
+"/drives/"+E+"/items/"+x,function(k){d(JSON.parse(k.getText()))},g)}),null,null,function(x){f?e({value:[x]}):e(OneDriveFile.prototype.getIdOf(x))},mxUtils.bind(this,function(x){this.ui.showError(mxResources.get("error"),x)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(e,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var v=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,
+function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(x){e(x);mxClient.IS_IE11&&(b=x.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?v():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",
+name:"root",parentReference:{driveId:"me"}}]})}),v,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(f)};OneDriveClient.prototype.pickFile=function(e,f){e=null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
m&&m.message?m.message:m)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),e(OneDriveFile.prototype.getIdOf(m.value[0]),
m))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");
null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};
-GitHubFile.prototype.save=function(b,e,f,c,l,m){this.doSave(this.getTitle(),e,f,c,l,m)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,m){var x=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=x;this.saveFile(b,!1,e,f,c,l,m)}),f,c,l])};
-GitHubFile.prototype.saveFile=function(b,e,f,c,l,m,x){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(D){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var d=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,k);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged();
-null!=f&&f()}),c)}),mxUtils.bind(this,function(k){this.savingFile=!1;this.isConflict(k)?(this.inConflictState=!0,null!=c&&c({commitMessage:D})):null!=c&&c(k)}),m,D)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(k){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-f&&f();this.ui.fileLoaded(n)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k,D)}))});null!=x?y(x):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(D){y(D)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
-GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),x=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;x.setRequestHeaders=function(D,d){D.setRequestHeader("Authorization",y)};x.send(mxUtils.bind(this,function(){window.clearTimeout(m);
-l&&(401===x.getStatus()?c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>x.getStatus()||300<=x.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(x.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",
-null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(x){200<=
-x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=
-mxUtils.bind(this,function(D,d){m?(window.onGitHubCallback=null,m=!1,null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
+GitHubFile.prototype.save=function(b,e,f,c,l,m){this.doSave(this.getTitle(),e,f,c,l,m)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,m){var v=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=v;this.saveFile(b,!1,e,f,c,l,m)}),f,c,l])};
+GitHubFile.prototype.saveFile=function(b,e,f,c,l,m,v){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var x=mxUtils.bind(this,function(E){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var d=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,k);this.fileSaved(g,d,mxUtils.bind(this,function(){this.contentChanged();
+null!=f&&f()}),c)}),mxUtils.bind(this,function(k){this.savingFile=!1;this.isConflict(k)?(this.inConflictState=!0,null!=c&&c({commitMessage:E})):null!=c&&c(k)}),m,E)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(k){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+f&&f();this.ui.fileLoaded(n)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k,E)}))});null!=v?x(v):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(E){x(E)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
+GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),v=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),x=this.authToken+" "+b;v.setRequestHeaders=function(E,d){E.setRequestHeader("Authorization",x)};v.send(mxUtils.bind(this,function(){window.clearTimeout(m);
+l&&(401===v.getStatus()?c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>v.getStatus()||300<=v.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(v.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",
+null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(v){200<=
+v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=
+mxUtils.bind(this,function(E,d){m?(window.onGitHubCallback=null,m=!1,null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?
-"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,m){var x=mxUtils.bind(this,function(D){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),k=this.authToken+" "+b;e.setRequestHeaders=function(n,q){n.setRequestHeader("Authorization",k)};e.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n=
-mxUtils.bind(this,function(){var A=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){A();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(d)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())D?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},c)})}):this.authenticate(function(){x(!0)},c);else if(403===e.getStatus()){var q=
-!1;try{var p=JSON.parse(e.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(q="too_large"==p.errors[0].code),c({message:mxResources.get(q?"drawingTooLarge":"forbidden")}))}catch(A){c({message:mxResources.get(q?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?m?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):n():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
-message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);d&&c(n)}))}),y=mxUtils.bind(this,function(D){null==this.user?this.updateUser(function(){y(!0)},c,D):x(D)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,m,x,y){var D="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+
-f+"/contents/"+c+"?ref="+l+D,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(d){try{m(d.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){x(g)}}),x,null,y)};GitHubClient.prototype.getFile=function(e,f,c,l,m){l=null!=l?l:!1;var x=e.split("/"),y=x[0],D=x[1],d=x[2];e=x.slice(3,x.length).join("/");x=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&x))if(null!=b){m=this.baseUrl+"/repos/"+y+"/"+D+"/contents/"+
-e+"?ref="+d;var g={Authorization:"token "+b};x=e.split("/");this.ui.convertFile(m,0<x.length?x[x.length-1]:e,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else x="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+D+"/contents/"+e+"?ref="+d+x,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(y,D,d,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
+"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,m){var v=mxUtils.bind(this,function(E){var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:x})}),this.ui.timeout),k=this.authToken+" "+b;e.setRequestHeaders=function(n,q){n.setRequestHeader("Authorization",k)};e.send(mxUtils.bind(this,function(){window.clearTimeout(g);var n=
+mxUtils.bind(this,function(){var y=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){y();x()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(d)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())E?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var q=
+!1;try{var p=JSON.parse(e.getText());null!=p&&"Resource not accessible by integration"==p.message?n():(null!=p&&null!=p.errors&&0<p.errors.length&&(q="too_large"==p.errors[0].code),c({message:mxResources.get(q?"drawingTooLarge":"forbidden")}))}catch(y){c({message:mxResources.get(q?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?m?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):n():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),
+message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(n){window.clearTimeout(g);d&&c(n)}))}),x=mxUtils.bind(this,function(E){null==this.user?this.updateUser(function(){x(!0)},c,E):v(E)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,m,v,x){var E="&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+
+f+"/contents/"+c+"?ref="+l+E,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(d){try{m(d.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(g){v(g)}}),v,null,x)};GitHubClient.prototype.getFile=function(e,f,c,l,m){l=null!=l?l:!1;var v=e.split("/"),x=v[0],E=v[1],d=v[2];e=v.slice(3,v.length).join("/");v=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&v))if(null!=b){m=this.baseUrl+"/repos/"+x+"/"+E+"/contents/"+
+e+"?ref="+d;var g={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(m,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,g)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+x+"/"+E+"/contents/"+e+"?ref="+d+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(k){try{f(this.createGitHubFile(x,E,d,JSON.parse(k.getText()),l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
c,l,m){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return m?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
-f,c,l,m){this.insertFile(e,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,m,x,y){m=null!=m?m:!1;x=x.split("/");var D=x[0],d=x[1],g=x[2],k=x.slice(3,x.length).join("/");0<k.length&&(k+="/");k+=e;this.checkExists(D+"/"+d+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,q){n?m?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(p){this.writeFile(D,d,g,k,p,f,q,mxUtils.bind(this,function(A){try{var E=JSON.parse(A.getText());c(this.createGitHubFile(D,d,g,E.content,
-m))}catch(z){l(z)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:D,repo:d,ref:g,name:e,path:k,sha:q,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,l){var m=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){m();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
-function(e,f,c,l,m,x,y,D,d){x.length>=this.maxFileSize?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:x},null!=y&&(c.sha=y),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(g){D(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
-g.code=null);d(g)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),m=l[0],x=l[1],y=l[2];e=l.slice(3,l.length).join("/");this.getSha(m,x,e,y,mxUtils.bind(this,function(D){if(f){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){d();c(!0,D)},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(D){c(!0)}),
-!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,y=e.meta.repo,D=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,y,D,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.sha,
-q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(x,y,d,D,mxUtils.bind(this,function(n){e.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
-function(e,f){var c=null,l=null,m=null,x=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var D=document.createElement("h3");mxUtils.write(D,mxResources.get(e?"selectFile":"selectFolder"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(D);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";
-d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";y.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){J()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,v,u,G){var I=document.createElement("a");I.setAttribute("title",M);I.style.cursor="pointer";mxUtils.write(I,M);mxEvent.addListener(I,"click",v);
-G&&(I.style.textDecoration="underline");null!=u&&(M=g.cloneNode(),M.style.padding=u,M.appendChild(I),I=M);return I}),q=mxUtils.bind(this,function(M){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=null;J()}),null,!0));M||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(M=0;M<u.length;M++)(function(G){mxUtils.write(v,
-" / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");z()}),null,!0))})(M)}d.appendChild(v)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,J()):this.ui.hideDialog()}),null,{})}),A=null,E=null,z=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+x+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
-M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){z(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==M&&(q(),
-d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var K=x.split("/");x=K.slice(0,K.length-1).join("/");z()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=!0,L=0;G=mxUtils.bind(this,function(K){for(var H=0;H<I.length;H++)mxUtils.bind(this,function(Q,U){if(K==("dir"==Q.type)){U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var T=document.createElement("img");
-T.src=IMAGE_PATH+"/"+("dir"==Q.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(Q.name+("dir"==Q.type?"/":""),mxUtils.bind(this,function(){"dir"==Q.type?(x=Q.path,z()):e&&"file"==Q.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+Q.path))})));d.appendChild(U);L++}})(I[H],H)});G(!0);e&&G(!1)}}),p,!0)}),B=mxUtils.bind(this,function(M,v){null==M&&(d.innerText="",M=1);var u=
-new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(A,"click",
-G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",z();else{for(var F=0;F<I.length;F++)mxUtils.bind(this,function(L,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(L.name,mxUtils.bind(this,
-function(){m=L.name;x="";z()})));d.appendChild(H)})(I[F],F);100==I.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)}),J=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&mxEvent.removeListener(d,"scroll",E);null!=A&&null!=
-A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){J(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var F=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(L){if(null!=L){var K=L.split("/");if(1<K.length){L=K[0];var H=K[1];3>K.length?(c=L,l=H,x=m=null,B()):this.ui.spinner.spin(d,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(L+"/"+H+"/"+K,mxUtils.bind(this,function(Q){this.ui.spinner.stop();c=Q.meta.org;l=Q.meta.repo;m=decodeURIComponent(Q.meta.ref);x="";z()}),mxUtils.bind(this,function(Q){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(d),mxUtils.br(d));for(var I=0;I<G.length;I++)mxUtils.bind(this,function(F,L){var K=g.cloneNode();K.style.backgroundColor=0==L%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(n(F.full_name,mxUtils.bind(this,function(){c=F.owner.login;
-l=F.name;x="";B(null,!0)})));d.appendChild(K)})(G[I],I)}100==G.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}),p)});J()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+f,c,l,m){this.insertFile(e,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,m,v,x){m=null!=m?m:!1;v=v.split("/");var E=v[0],d=v[1],g=v[2],k=v.slice(3,v.length).join("/");0<k.length&&(k+="/");k+=e;this.checkExists(E+"/"+d+"/"+g+"/"+k,!0,mxUtils.bind(this,function(n,q){n?m?(x||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(p){this.writeFile(E,d,g,k,p,f,q,mxUtils.bind(this,function(y){try{var A=JSON.parse(y.getText());c(this.createGitHubFile(E,d,g,A.content,
+m))}catch(C){l(C)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:E,repo:d,ref:g,name:e,path:k,sha:q,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,l){var m=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){m();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
+function(e,f,c,l,m,v,x,E,d){v.length>=this.maxFileSize?d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:v},null!=x&&(c.sha=x),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(g){E(g)}),mxUtils.bind(this,function(g){404==g.code&&(g.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
+g.code=null);d(g)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),m=l[0],v=l[1],x=l[2];e=l.slice(3,l.length).join("/");this.getSha(m,v,e,x,mxUtils.bind(this,function(E){if(f){var d=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){d();c(!0,E)},function(){d();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(E){c(!0)}),
+!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,m){var v=e.meta.org,x=e.meta.repo,E=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(v,x,E,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;f(JSON.parse(p.getText()).content.sha)}),mxUtils.bind(this,function(p){c(p)}))}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.sha,
+q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(v,x,d,E,mxUtils.bind(this,function(n){e.meta.sha=n;k()}),c):k()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
+function(e,f){var c=null,l=null,m=null,v=null,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(e?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(E);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";
+d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";x.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,x,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+v)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
+function(){I()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(k.container,420,370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,G,S,u){var z=document.createElement("a");z.setAttribute("title",M);z.style.cursor="pointer";mxUtils.write(z,M);mxEvent.addListener(z,"click",G);
+u&&(z.style.textDecoration="underline");null!=S&&(M=g.cloneNode(),M.style.padding=S,M.appendChild(z),z=M);return z}),q=mxUtils.bind(this,function(M){var G=document.createElement("div");G.style.marginBottom="8px";G.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){v=null;I()}),null,!0));M||(mxUtils.write(G," / "),G.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){v=null;B()}),null,!0)));if(null!=v&&0<v.length){var S=v.split("/");for(M=0;M<S.length;M++)(function(u){mxUtils.write(G,
+" / ");G.appendChild(n(S[u],mxUtils.bind(this,function(){v=S.slice(0,u+1).join("/");C()}),null,!0))})(M)}d.appendChild(G)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=m=l=c=null,I()):this.ui.hideDialog()}),null,{})}),y=null,A=null,C=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+v+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
+M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==M&&(q(),
+d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,I();else{var K=v.split("/");v=K.slice(0,K.length-1).join("/");C()}}),"4px")));var z=JSON.parse(u.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=!0,J=0;u=mxUtils.bind(this,function(K){for(var H=0;H<z.length;H++)mxUtils.bind(this,function(N,U){if(K==("dir"==N.type)){U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var Q=document.createElement("img");
+Q.src=IMAGE_PATH+"/"+("dir"==N.type?"folder.png":"file.png");Q.setAttribute("align","absmiddle");Q.style.marginRight="4px";Q.style.marginTop="-4px";Q.width=20;U.appendChild(Q);U.appendChild(n(N.name+("dir"==N.type?"/":""),mxUtils.bind(this,function(){"dir"==N.type?(v=N.path,C()):e&&"file"==N.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+N.path))})));d.appendChild(U);J++}})(z[H],H)});u(!0);e&&u(!1)}}),p,!0)}),B=mxUtils.bind(this,function(M,G){null==M&&(d.innerText="",M=1);var S=
+new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(y,"click",
+u);this.executeRequest(S,mxUtils.bind(this,function(z){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){v=null;I()}),"4px")));z=JSON.parse(z.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==z.length&&G)m=z[0].name,v="",C();else{for(var F=0;F<z.length;F++)mxUtils.bind(this,function(J,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(J.name,mxUtils.bind(this,
+function(){m=J.name;v="";C()})));d.appendChild(H)})(z[F],F);100==z.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",A))}}),p)}),I=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&mxEvent.removeListener(d,"scroll",A);null!=y&&null!=
+y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){I(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();u=JSON.parse(u.getText());if(null==u||0==u.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var F=
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(J){if(null!=J){var K=J.split("/");if(1<K.length){J=K[0];var H=K[1];3>K.length?(c=J,l=H,v=m=null,B()):this.ui.spinner.spin(d,mxResources.get("loading"))&&(K=encodeURIComponent(K.slice(2,K.length).join("/")),this.getFile(J+"/"+H+"/"+K,mxUtils.bind(this,function(N){this.ui.spinner.stop();c=N.meta.org;l=N.meta.repo;m=decodeURIComponent(N.meta.ref);v="";C()}),mxUtils.bind(this,function(N){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(d),mxUtils.br(d));for(var z=0;z<u.length;z++)mxUtils.bind(this,function(F,J){var K=g.cloneNode();K.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";K.appendChild(n(F.full_name,mxUtils.bind(this,function(){c=F.owner.login;
+l=F.name;v="";B(null,!0)})));d.appendChild(K)})(u[z],z)}100==u.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&S()},mxEvent.addListener(d,"scroll",A))}),p)});I()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)};
-TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var x=b.split(this.SEPARATOR),y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(x[0]+"/attachments/"+x[1],mxUtils.bind(this,function(d){window.clearTimeout(D);if(y){var g=/\.png$/i.test(d.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(d.name)||
-/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,e,f,null,k):(y=!0,D=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(n){window.clearTimeout(D);if(y){d.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(n);null!=q&&0<q.length&&
-(n=q)}l?e(new TrelloLibrary(this.ui,n,d)):e(new TrelloFile(this.ui,n,d))}}),mxUtils.bind(this,function(n,q){window.clearTimeout(D);y&&(401==q.status?this.authenticate(m,f,!0):f())}),g||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(d){window.clearTimeout(D);y&&(null!=d&&401==d.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};
-TrelloClient.prototype.insertFile=function(b,e,f,c,l,m){l=null!=l?l:!1;var x=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(D){this.writeFile(b,D,m,mxUtils.bind(this,function(d){l?f(new TrelloLibrary(this.ui,e,d)):f(new TrelloFile(this.ui,e,d))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){y(this.ui.base64ToBlob(D,"image/png"))}),c,e):y(e)});this.authenticate(x,c)};
-TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(x){this.writeFile(b.meta.name,x,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(y)}),mxUtils.bind(this,function(D){null!=D&&401==D.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(this.ui.base64ToBlob(x,
+TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var v=b.split(this.SEPARATOR),x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(v[0]+"/attachments/"+v[1],mxUtils.bind(this,function(d){window.clearTimeout(E);if(x){var g=/\.png$/i.test(d.name),k={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(d.name)||
+/\.gliffy$/i.test(d.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(d.url),d.name,d.mimeType,this.extension,e,f,null,k):(x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(d.url),mxUtils.bind(this,function(n){window.clearTimeout(E);if(x){d.compoundId=b;if(0<(g?n.lastIndexOf(","):-1)){var q=this.ui.extractGraphModelFromPng(n);null!=q&&0<q.length&&
+(n=q)}l?e(new TrelloLibrary(this.ui,n,d)):e(new TrelloFile(this.ui,n,d))}}),mxUtils.bind(this,function(n,q){window.clearTimeout(E);x&&(401==q.status?this.authenticate(m,f,!0):f())}),g||null!=d.mimeType&&"image/"==d.mimeType.substring(0,6),null,null,null,k))}}),mxUtils.bind(this,function(d){window.clearTimeout(E);x&&(null!=d&&401==d.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};
+TrelloClient.prototype.insertFile=function(b,e,f,c,l,m){l=null!=l?l:!1;var v=mxUtils.bind(this,function(){var x=mxUtils.bind(this,function(E){this.writeFile(b,E,m,mxUtils.bind(this,function(d){l?f(new TrelloLibrary(this.ui,e,d)):f(new TrelloFile(this.ui,e,d))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){x(this.ui.base64ToBlob(E,"image/png"))}),c,e):x(e)});this.authenticate(v,c)};
+TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(v){this.writeFile(b.meta.name,v,c[0],function(x){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(x)}),mxUtils.bind(this,function(E){null!=E&&401==E.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(v){l(this.ui.base64ToBlob(v,
"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,f)};
-TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var x=!0,y=window.setTimeout(mxUtils.bind(this,function(){x=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),D=new FormData;D.append("key",Trello.key());D.append("token",Trello.token());D.append("file","string"===typeof e?new Blob([e]):e,b);D.append("name",
-b);var d=new XMLHttpRequest;d.responseType="json";d.onreadystatechange=mxUtils.bind(this,function(){if(4===d.readyState&&(window.clearTimeout(y),x))if(200==d.status){var g=d.response;g.compoundId=f+this.SEPARATOR+g.id;c(g)}else 401==d.status?this.authenticate(m,l,!0):l()});d.open("POST",this.baseUrl+"cards/"+f+"/attachments");d.send(D)});this.authenticate(m,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var v=!0,x=window.setTimeout(mxUtils.bind(this,function(){v=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),E=new FormData;E.append("key",Trello.key());E.append("token",Trello.token());E.append("file","string"===typeof e?new Blob([e]):e,b);E.append("name",
+b);var d=new XMLHttpRequest;d.responseType="json";d.onreadystatechange=mxUtils.bind(this,function(){if(4===d.readyState&&(window.clearTimeout(x),v))if(200==d.status){var g=d.response;g.compoundId=f+this.SEPARATOR+g.id;c(g)}else 401==d.status?this.authenticate(m,l,!0):l()});d.open("POST",this.baseUrl+"cards/"+f+"/attachments");d.send(E)});this.authenticate(m,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var x=document.createElement("h3");mxUtils.write(x,b?mxResources.get("selectFile"):mxResources.get("selectCard"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(x);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height=
-"194px";m.appendChild(y);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var D=mxUtils.bind(this,function(p,A,E){l++;var z=document.createElement("div");z.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=E){var J=document.createElement("img");
-J.src=E.url;J.width=E.width;J.height=E.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(J)}mxUtils.write(B,p);mxEvent.addListener(B,"click",A);z.appendChild(B);return z}),d=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(A){this.ui.spinner.stop();y.appendChild(D("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(y);null==A||0==A.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var E=0;E<A.length;E++)mxUtils.bind(this,function(z){y.appendChild(D(z.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+z.id)}),null!=z.previews?z.previews[0]:null))})(A[E])})()}),mxUtils.bind(this,function(A){401==
-A.status?this.authenticate(p,d,!0):null!=d&&d(A)}))});p()}),k=null,n=null,q=mxUtils.bind(this,function(p){null==p&&(l=0,y.innerText="",p=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",n);q(p+1)});mxEvent.addListener(k,"click",A);var E=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(z){this.ui.spinner.stop();z=null!=z?z.cards:null;if(null==z||0==z.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==p&&(y.appendChild(D(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(M){null!=M&&(c=M,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(y));for(var B=0;B<z.length;B++)mxUtils.bind(this,function(J){y.appendChild(D(J.name,mxUtils.bind(this,function(){b?(f=J.id,g()):(this.ui.hideDialog(),e(J.id))})))})(z[B]);100==z.length&&(y.appendChild(k),n=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&A()},mxEvent.addListener(y,"scroll",n))}}),mxUtils.bind(this,function(z){401==z.status?this.authenticate(E,d,!0):null!=d&&d({message:z.responseText})}))});E()});q()};
+TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(v);var x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="auto";x.style.height=
+"194px";m.appendChild(x);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var E=mxUtils.bind(this,function(p,y,A){l++;var C=document.createElement("div");C.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var B=document.createElement("a");B.style.cursor="pointer";if(null!=A){var I=document.createElement("img");
+I.src=A.url;I.width=A.width;I.height=A.height;I.style="border: 1px solid black;margin:5px;vertical-align:middle";B.appendChild(I)}mxUtils.write(B,p);mxEvent.addListener(B,"click",y);C.appendChild(B);return C}),d=mxUtils.bind(this,function(p){this.ui.handleError(p,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),g=mxUtils.bind(this,function(){l=0;x.innerText="";this.ui.spinner.spin(x,mxResources.get("loading"));var p=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(y){this.ui.spinner.stop();x.appendChild(E("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(x);null==y||0==y.length?mxUtils.write(x,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<y.length;A++)mxUtils.bind(this,function(C){x.appendChild(E(C.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+C.id)}),null!=C.previews?C.previews[0]:null))})(y[A])})()}),mxUtils.bind(this,function(y){401==
+y.status?this.authenticate(p,d,!0):null!=d&&d(y)}))});p()}),k=null,n=null,q=mxUtils.bind(this,function(p){null==p&&(l=0,x.innerText="",p=1);this.ui.spinner.spin(x,mxResources.get("loading"));null!=k&&null!=k.parentNode&&k.parentNode.removeChild(k);k=document.createElement("a");k.style.display="block";k.style.cursor="pointer";mxUtils.write(k,mxResources.get("more")+"...");var y=mxUtils.bind(this,function(){mxEvent.removeListener(x,"scroll",n);q(p+1)});mxEvent.addListener(k,"click",y);var A=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:p-1},mxUtils.bind(this,function(C){this.ui.spinner.stop();C=null!=C?C.cards:null;if(null==C||0==C.length)mxUtils.write(x,mxResources.get("noFiles"));else{1==p&&(x.appendChild(E(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var I=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(M){null!=M&&(c=M,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(I.container,300,80,!0,!1);I.init()}))),mxUtils.br(x));for(var B=0;B<C.length;B++)mxUtils.bind(this,function(I){x.appendChild(E(I.name,mxUtils.bind(this,function(){b?(f=I.id,g()):(this.ui.hideDialog(),e(I.id))})))})(C[B]);100==C.length&&(x.appendChild(k),n=function(){x.scrollTop>=x.scrollHeight-x.offsetHeight&&y()},mxEvent.addListener(x,"scroll",n))}}),mxUtils.bind(this,function(C){401==C.status?this.authenticate(A,d,!0):null!=d&&d({message:C.responseText})}))});A()});q()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-e),null,"GET")).send(mxUtils.bind(this,function(x){200<=x.getStatus()&&299>=x.getStatus()?(b=JSON.parse(x.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==x.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(x,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(D,d){m?(window.onGitLabCallback=null,m=!1,null==D?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=D.access_token,this.setToken(b),this.setUser(null),x&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var m=mxUtils.bind(this,function(y){var D=!0,d=window.setTimeout(mxUtils.bind(this,function(){D=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;e.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization",
-g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(d);if(D)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&&
-null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(d);D&&c(k)}))}),x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!0)},
-c,y):m(y)});null==b?this.authenticate(function(){x(!0)},c):x(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,m,x){if(null!=m)c(e,m);else{var y=e.length-2,D=mxUtils.bind(this,function(){if(2>y)l({message:mxResources.get("fileNotFound")});else{var d=Math.max(y-1,0),g=e.slice(0,d).join("/");d=e[d];var k=e[y],n=e.slice(y+1,e.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(f?x?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+
-"?ref="+k);var q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,mxUtils.bind(this,function(){200==q.getStatus()?c(e,y):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(y--,D()):l({message:mxResources.get("fileNotFound")})}))}});D()}};GitLabClient.prototype.getFile=function(e,f,c,l,m,x){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(y,D){var d=Math.max(D-1,0),g=y.slice(0,d).join("/"),k=y[d],n=y[D];e=y.slice(D+1,y.length).join("/");
-y=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&y))if(null!=b){d="&t="+(new Date).getTime();var q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n;y=e.split("/");this.ui.convertFile(q+d,0<y.length?y[y.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(p,A,E){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(z){try{A(this.getFileContent(JSON.parse(z.getText())))}catch(B){E(B)}}),
-E)}))}else c({message:mxResources.get("accessDenied")});else d="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n,y=new mxXmlRequest(q+d,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,D))}catch(A){c(A)}}),c)}),c,x)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
-c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,m,x){var y=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:y+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:y+e+"/"+f+"/raw/"+c+"/"+l.file_path+
-"?inline=false",last_commit_id:l.last_commit_id,refPos:x};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,m,x,y){m=null!=m?m:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(D,d){var g=Math.max(d-1,0),k=D.slice(0,g).join("/"),n=D[g],q=D[d];path=D.slice(d+1,D.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(k+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(p,A){p?
-m?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(E){this.writeFile(k,n,q,path,E,f,A,mxUtils.bind(this,function(z){try{var B=JSON.parse(z.getText());c(this.createGitLabFile(k,n,q,null!=B.content?B.content:B,m,d))}catch(J){l(J)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:q,name:e,path:path,html_url:p+k+"/"+n+"/blob/"+q+"/"+path,download_url:p+k+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:d,last_commit_id:A,isNew:!0}))):l()}))}),
-l,null,4>=x.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){m();c(!0,l.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
-f,c,l,m,x,y,D,d){if(x.length>=this.maxFileSize)d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:x,encoding:"base64"};null!=y&&(c.last_commit_id=y,g="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(e,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){D(k)}),
-d)}};GitLabClient.prototype.saveFile=function(e,f,c,l,m){var x=e.meta.org,y=e.meta.repo,D=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(x,y,D,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;this.getFile(x+"/"+y+"/"+D+"/"+d,mxUtils.bind(this,function(A){A.getData()==e.getData()?f(A.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.last_commit_id,q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(x+"/"+y+"/"+D+"/"+d,mxUtils.bind(this,function(n){e.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
-encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,l=null,m=null,x=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var D=document.createElement("h3");mxUtils.write(D,mxResources.get(e?"selectFile":"selectFolder"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(D);var d=document.createElement("div");d.style.whiteSpace=
-"nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";y.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+x)}));this.ui.showDialog(k.container,420,
-370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,v,u,G){var I=document.createElement("a");I.setAttribute("title",M);I.style.cursor="pointer";mxUtils.write(I,M);mxEvent.addListener(I,"click",v);G&&(I.style.textDecoration="underline");null!=u&&(M=g.cloneNode(),M.style.padding=u,M.appendChild(I),I=M);return I}),q=mxUtils.bind(this,function(M){var v=document.createElement("div");v.style.marginBottom="8px";v.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){x=
-null;J()}),null,!0));M||(mxUtils.write(v," / "),v.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){x=null;B()}),null,!0)));if(null!=x&&0<x.length){var u=x.split("/");for(M=0;M<u.length;M++)(function(G){mxUtils.write(v," / ");v.appendChild(n(u[G],mxUtils.bind(this,function(){x=u.slice(0,G+1).join("/");z()}),null,!0))})(M)}d.appendChild(v)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(x=m=l=c=null,
-J()):this.ui.hideDialog()}))}),A=null,E=null,z=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var v=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+x+"&ref="+m+"&per_page=100&page="+M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display=
-"block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){z(M+1)});mxEvent.addListener(A,"click",u);this.executeRequest(v,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==M&&(q(!m),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==x)x=null,J();else{var K=x.split("/");x=K.slice(0,K.length-1).join("/");z()}}),"4px")));var I=JSON.parse(G.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=
-!0,L=0;G=mxUtils.bind(this,function(K){for(var H=0;H<I.length;H++)mxUtils.bind(this,function(Q){if(K==("tree"==Q.type)){var U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var T=document.createElement("img");T.src=IMAGE_PATH+"/"+("tree"==Q.type?"folder.png":"file.png");T.setAttribute("align","absmiddle");T.style.marginRight="4px";T.style.marginTop="-4px";T.width=20;U.appendChild(T);U.appendChild(n(Q.name+("tree"==Q.type?"/":""),mxUtils.bind(this,function(){"tree"==
-Q.type?(x=Q.path,z()):e&&"blob"==Q.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+Q.path))})));d.appendChild(U);L++}})(I[H])});G(!0);e&&G(!1);100==L&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",E))}}),p,!0)}),B=mxUtils.bind(this,function(M,v){null==M&&(d.innerText="",M=1);var u=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var G=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(A,"click",G);this.executeRequest(u,mxUtils.bind(this,function(I){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,
-function(){x=null;J()}),"4px")));I=JSON.parse(I.getText());if(null==I||0==I.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==I.length&&v)m=I[0].name,x="",z();else{for(var F=0;F<I.length;F++)mxUtils.bind(this,function(L,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(L.name,mxUtils.bind(this,function(){m=encodeURIComponent(L.name);x="";z()})));d.appendChild(H)})(I[F],F);100==I.length&&(d.appendChild(A),E=function(){d.scrollTop>=
-d.scrollHeight-d.offsetHeight&&G()},mxEvent.addListener(d,"scroll",E))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));var J=mxUtils.bind(this,function(M){var v=this.ui.spinner,u=0;this.ui.spinner.stop();var G=function(){v.spin(d,mxResources.get("loading"));u+=1},I=function(){--u;0===u&&v.stop()};null==M&&(d.innerText="",M=1);null!=E&&(mxEvent.removeListener(d,"scroll",E),E=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a");
-A.style.display="block";A.style.cursor="pointer";mxUtils.write(A,mxResources.get("more")+"...");var F=mxUtils.bind(this,function(){0===u&&J(M+1)});mxEvent.addListener(A,"click",F);var L=mxUtils.bind(this,function(H){G();var Q=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(U){H(JSON.parse(U.getText()));I()}),p)}),K=mxUtils.bind(this,function(H,Q){G();var U=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(U,mxUtils.bind(this,function(T){Q(H,JSON.parse(T.getText()));I()}),p)});L(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(d,mxResources.get("loggedOut"));else{G();var Q=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+M,null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=H&&0!=H.length){1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===u){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],l=t[1],m=x=null,2<t.length?(m=encodeURIComponent(t.slice(2,t.length).join("/")),z()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(d),mxUtils.br(d));for(var T=!0,V=0;V<U.length;V++)mxUtils.bind(this,
-function(W){var t=g.cloneNode();t.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;t.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===u&&(c=W.owner.username,l=W.path,x="",B(null,!0))})));d.appendChild(t)})(U[V]);for(V=0;V<H.length;V++)G(),K(H[V],mxUtils.bind(this,function(W,t){I();for(var C=0;C<t.length;C++){var N=g.cloneNode();N.style.backgroundColor=T?Editor.isDarkMode()?"#000000":"#eeeeee":"";T=!T;mxUtils.bind(this,function(R){N.appendChild(n(R.name_with_namespace,
-mxUtils.bind(this,function(){0===u&&(c=W.full_path,l=R.path,x="",B(null,!0))})));d.appendChild(N)})(t[C])}}));I()}else I(),mxUtils.write(d,mxResources.get("noFiles"));100==U.length&&(d.appendChild(A),E=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&F()},mxEvent.addListener(d,"scroll",E))}),p)}}))});b?this.user?J():this.updateUser(function(){J()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){J()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
-"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,m,x){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,m,x,y){DrawioComment.call(this,b,e,f,c,l,m,x);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){e(m.replyId)}),f)};
+e),null,"GET")).send(mxUtils.bind(this,function(v){200<=v.getStatus()&&299>=v.getStatus()?(b=JSON.parse(v.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==v.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(v,x){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(E,d){m?(window.onGitLabCallback=null,m=!1,null==E?c({message:mxResources.get("accessDenied"),retry:l}):(null!=x&&x(),b=E.access_token,this.setToken(b),this.setUser(null),v&&this.setPersistentToken("remembered"),f(),null!=d&&d.close())):null!=d&&d.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var m=mxUtils.bind(this,function(x){var E=!0,d=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),g=this.authToken+" "+b;e.setRequestHeaders=function(k,n){k.setRequestHeader("Authorization",
+g);k.setRequestHeader("PRIVATE_TOKEN",g);k.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(d);if(E)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())x?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){v(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&&
+null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code)}catch(q){}c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(k){window.clearTimeout(d);E&&c(k)}))}),v=mxUtils.bind(this,function(x){null==this.user?this.updateUser(function(){v(!0)},
+c,x):m(x)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,m,v){if(null!=m)c(e,m);else{var x=e.length-2,E=mxUtils.bind(this,function(){if(2>x)l({message:mxResources.get("fileNotFound")});else{var d=Math.max(x-1,0),g=e.slice(0,d).join("/");d=e[d];var k=e[x],n=e.slice(x+1,e.length).join("/");g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+d)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+k:"tree?path="+n+"&ref="+k:"files/"+encodeURIComponent(n)+
+"?ref="+k);var q=new mxXmlRequest(g,null,"HEAD");this.executeRequest(q,mxUtils.bind(this,function(){200==q.getStatus()?c(e,x):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==q.getStatus()?(x--,E()):l({message:mxResources.get("fileNotFound")})}))}});E()}};GitLabClient.prototype.getFile=function(e,f,c,l,m,v){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(x,E){var d=Math.max(E-1,0),g=x.slice(0,d).join("/"),k=x[d],n=x[E];e=x.slice(E+1,x.length).join("/");
+x=/\.png$/i.test(e);if(!m&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&x))if(null!=b){d="&t="+(new Date).getTime();var q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n;x=e.split("/");this.ui.convertFile(q+d,0<x.length?x[x.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(p,y,A){p=new mxXmlRequest(p,null,"GET");this.executeRequest(p,mxUtils.bind(this,function(C){try{y(this.getFileContent(JSON.parse(C.getText())))}catch(B){A(B)}}),
+A)}))}else c({message:mxResources.get("accessDenied")});else d="&t="+(new Date).getTime(),q=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+k)+"/repository/files/"+encodeURIComponent(e)+"?ref="+n,x=new mxXmlRequest(q+d,null,"GET"),this.executeRequest(x,mxUtils.bind(this,function(p){try{f(this.createGitLabFile(g,k,n,JSON.parse(p.getText()),l,E))}catch(y){c(y)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
+c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,m,v){var x=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:x+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:x+e+"/"+f+"/raw/"+c+"/"+l.file_path+
+"?inline=false",last_commit_id:l.last_commit_id,refPos:v};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,m,v,x){m=null!=m?m:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(E,d){var g=Math.max(d-1,0),k=E.slice(0,g).join("/"),n=E[g],q=E[d];path=E.slice(d+1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(k+"/"+n+"/"+q+"/"+path,!0,mxUtils.bind(this,function(p,y){p?
+m?(x||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(k,n,q,path,A,f,y,mxUtils.bind(this,function(C){try{var B=JSON.parse(C.getText());c(this.createGitLabFile(k,n,q,null!=B.content?B.content:B,m,d))}catch(I){l(I)}}),l)}),l)):(p=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:k,repo:n,ref:q,name:e,path:path,html_url:p+k+"/"+n+"/blob/"+q+"/"+path,download_url:p+k+"/"+n+"/raw/"+q+"/"+path+"?inline=false",refPos:d,last_commit_id:y,isNew:!0}))):l()}))}),
+l,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){m();c(!0,l.getCurrentEtag())},function(){m();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
+f,c,l,m,v,x,E,d){if(v.length>=this.maxFileSize)d({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var g="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:v,encoding:"base64"};null!=x&&(c.last_commit_id=x,g="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(l);g=new mxXmlRequest(e,JSON.stringify(c),g);this.executeRequest(g,mxUtils.bind(this,function(k){E(k)}),
+d)}};GitLabClient.prototype.saveFile=function(e,f,c,l,m){var v=e.meta.org,x=e.meta.repo,E=e.meta.ref,d=e.meta.path,g=mxUtils.bind(this,function(n,q){this.writeFile(v,x,E,d,m,q,n,mxUtils.bind(this,function(p){delete e.meta.isNew;this.getFile(v+"/"+x+"/"+E+"/"+d,mxUtils.bind(this,function(y){y.getData()==e.getData()?f(y.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),k=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d)){var n=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(q){g(e.meta.last_commit_id,q)}),c,this.ui.getCurrentFile()!=e?e.getData():null,n.scale,n.border)}else g(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(v+"/"+x+"/"+E+"/"+d,mxUtils.bind(this,function(n){e.meta.last_commit_id=n.meta.last_commit_id;k()}),c):k()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,l=null,m=null,v=null,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.height="304px";var E=document.createElement("h3");mxUtils.write(E,mxResources.get(e?"selectFile":"selectFolder"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(E);var d=document.createElement("div");d.style.whiteSpace=
+"nowrap";d.style.border="1px solid lightgray";d.style.boxSizing="border-box";d.style.padding="4px";d.style.overflow="auto";d.style.lineHeight="1.2em";d.style.height="274px";x.appendChild(d);var g=document.createElement("div");g.style.textOverflow="ellipsis";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.padding="4px";g.style.width="100%";var k=new CustomDialog(this.ui,x,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+v)}));this.ui.showDialog(k.container,420,
+370,!0,!0);e&&k.okButton.parentNode.removeChild(k.okButton);var n=mxUtils.bind(this,function(M,G,S,u){var z=document.createElement("a");z.setAttribute("title",M);z.style.cursor="pointer";mxUtils.write(z,M);mxEvent.addListener(z,"click",G);u&&(z.style.textDecoration="underline");null!=S&&(M=g.cloneNode(),M.style.padding=S,M.appendChild(z),z=M);return z}),q=mxUtils.bind(this,function(M){var G=document.createElement("div");G.style.marginBottom="8px";G.appendChild(n(c+"/"+l,mxUtils.bind(this,function(){v=
+null;I()}),null,!0));M||(mxUtils.write(G," / "),G.appendChild(n(decodeURIComponent(m),mxUtils.bind(this,function(){v=null;B()}),null,!0)));if(null!=v&&0<v.length){var S=v.split("/");for(M=0;M<S.length;M++)(function(u){mxUtils.write(G," / ");G.appendChild(n(S[u],mxUtils.bind(this,function(){v=S.slice(0,u+1).join("/");C()}),null,!0))})(M)}d.appendChild(G)}),p=mxUtils.bind(this,function(M){this.ui.handleError(M,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=m=l=c=null,
+I()):this.ui.hideDialog()}))}),y=null,A=null,C=mxUtils.bind(this,function(M){null==M&&(d.innerText="",M=1);var G=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+v+"&ref="+m+"&per_page=100&page="+M,null,"GET");this.ui.spinner.spin(d,mxResources.get("loading"));k.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display=
+"block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var S=mxUtils.bind(this,function(){C(M+1)});mxEvent.addListener(y,"click",S);this.executeRequest(G,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==M&&(q(!m),d.appendChild(n("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,I();else{var K=v.split("/");v=K.slice(0,K.length-1).join("/");C()}}),"4px")));var z=JSON.parse(u.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else{var F=
+!0,J=0;u=mxUtils.bind(this,function(K){for(var H=0;H<z.length;H++)mxUtils.bind(this,function(N){if(K==("tree"==N.type)){var U=g.cloneNode();U.style.backgroundColor=F?Editor.isDarkMode()?"#000000":"#eeeeee":"";F=!F;var Q=document.createElement("img");Q.src=IMAGE_PATH+"/"+("tree"==N.type?"folder.png":"file.png");Q.setAttribute("align","absmiddle");Q.style.marginRight="4px";Q.style.marginTop="-4px";Q.width=20;U.appendChild(Q);U.appendChild(n(N.name+("tree"==N.type?"/":""),mxUtils.bind(this,function(){"tree"==
+N.type?(v=N.path,C()):e&&"blob"==N.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+N.path))})));d.appendChild(U);J++}})(z[H])});u(!0);e&&u(!1);100==J&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&S()},mxEvent.addListener(d,"scroll",A))}}),p,!0)}),B=mxUtils.bind(this,function(M,G){null==M&&(d.innerText="",M=1);var S=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+M,null,"GET");k.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(d,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){B(M+1)});mxEvent.addListener(y,"click",u);this.executeRequest(S,mxUtils.bind(this,function(z){this.ui.spinner.stop();1==M&&(q(!0),d.appendChild(n("../ [Up]",mxUtils.bind(this,
+function(){v=null;I()}),"4px")));z=JSON.parse(z.getText());if(null==z||0==z.length)mxUtils.write(d,mxResources.get("noFiles"));else if(1==z.length&&G)m=z[0].name,v="",C();else{for(var F=0;F<z.length;F++)mxUtils.bind(this,function(J,K){var H=g.cloneNode();H.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(n(J.name,mxUtils.bind(this,function(){m=encodeURIComponent(J.name);v="";C()})));d.appendChild(H)})(z[F],F);100==z.length&&(d.appendChild(y),A=function(){d.scrollTop>=
+d.scrollHeight-d.offsetHeight&&u()},mxEvent.addListener(d,"scroll",A))}}),p)});k.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(d,mxResources.get("loading"));var I=mxUtils.bind(this,function(M){var G=this.ui.spinner,S=0;this.ui.spinner.stop();var u=function(){G.spin(d,mxResources.get("loading"));S+=1},z=function(){--S;0===S&&G.stop()};null==M&&(d.innerText="",M=1);null!=A&&(mxEvent.removeListener(d,"scroll",A),A=null);null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y);y=document.createElement("a");
+y.style.display="block";y.style.cursor="pointer";mxUtils.write(y,mxResources.get("more")+"...");var F=mxUtils.bind(this,function(){0===S&&I(M+1)});mxEvent.addListener(y,"click",F);var J=mxUtils.bind(this,function(H){u();var N=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(N,mxUtils.bind(this,function(U){H(JSON.parse(U.getText()));z()}),p)}),K=mxUtils.bind(this,function(H,N){u();var U=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(U,mxUtils.bind(this,function(Q){N(H,JSON.parse(Q.getText()));z()}),p)});J(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(d,mxResources.get("loggedOut"));else{u();var N=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+M,null,"GET");this.executeRequest(N,mxUtils.bind(this,function(U){U=JSON.parse(U.getText());if(null!=U&&0!=U.length||null!=H&&0!=H.length){1==M&&(d.appendChild(n(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===S){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],l=t[1],m=v=null,2<t.length?(m=encodeURIComponent(t.slice(2,t.length).join("/")),C()):B(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(d),mxUtils.br(d));for(var Q=!0,V=0;V<U.length;V++)mxUtils.bind(this,
+function(W){var t=g.cloneNode();t.style.backgroundColor=Q?Editor.isDarkMode()?"#000000":"#eeeeee":"";Q=!Q;t.appendChild(n(W.name_with_namespace,mxUtils.bind(this,function(){0===S&&(c=W.owner.username,l=W.path,v="",B(null,!0))})));d.appendChild(t)})(U[V]);for(V=0;V<H.length;V++)u(),K(H[V],mxUtils.bind(this,function(W,t){z();for(var D=0;D<t.length;D++){var L=g.cloneNode();L.style.backgroundColor=Q?Editor.isDarkMode()?"#000000":"#eeeeee":"";Q=!Q;mxUtils.bind(this,function(T){L.appendChild(n(T.name_with_namespace,
+mxUtils.bind(this,function(){0===S&&(c=W.full_path,l=T.path,v="",B(null,!0))})));d.appendChild(L)})(t[D])}}));z()}else z(),mxUtils.write(d,mxResources.get("noFiles"));100==U.length&&(d.appendChild(y),A=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&F()},mxEvent.addListener(d,"scroll",A))}),p)}}))});b?this.user?I():this.updateUser(function(){I()},p,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){I()},p,!0)}),p)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,m,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,m,v,x){DrawioComment.call(this,b,e,f,c,l,m,v);this.pCommentId=x};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(m){e(m.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,m,x,y,D,d,g,k,n,q){function p(P,S){S=S||document;return S.querySelector(P)}function A(P,S,X){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)X();else{c(P.id,P.parentReference.driveId,function(Z){A(Z,S,X)},X);return}var aa=new XMLHttpRequest;aa.open("GET",P["@microsoft.graph.downloadUrl"]);var Y=P.file?"image/png"==P.file.mimeType:!1;aa.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=aa.responseText;
-Y&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var ba=mxUtils.parseXml(Z),ea="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=ea){S(ea.ownerDocument);return}}catch(ma){}X()}};Y&&aa.overrideMimeType&&aa.overrideMimeType("text/plain; charset=x-user-defined");aa.send()}function E(){k&&null!=K?L.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");x(H,P);m(H)},400,
-null,null,function(P){console.log(P)},600,null,null,null,null,null,K):(x(H,void 0),m(H))}function z(P){function S(X){N.style.background="transparent";N.innerText="";var aa=document.createElement("div");aa.className="odPreviewStatus";mxUtils.write(aa,X);N.appendChild(aa);F.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==P||P.folder||/\.drawiolib$/.test(P.name))S(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),W=P,F.spin(N),A(P,function(X){F.stop();
-if(W==P)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var aa=X.getElementsByTagName("diagram");K=AspectDialog.prototype.createViewer(N,0==aa.length?X.documentElement:aa[0],null,"transparent")}},function(){H=null;S(mxResources.get("notADiagramFile"))})}catch(X){H=null,S(mxResources.get("notADiagramFile"))}}function B(){var P=p(".odFilesBreadcrumb");if(null!=P){P.innerText="";for(var S=0;S<T.length-1;S++){var X=document.createElement("span");X.className="odBCFolder";
-X.innerHTML=mxUtils.htmlEntities(T[S].name||mxResources.get("home"));P.appendChild(X);(function(Y,Z){X.addEventListener("click",function(){e(null);T=T.slice(0,Z);M(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[S],S);var aa=document.createElement("span");aa.innerHTML=" &gt; ";P.appendChild(aa)}null!=T[T.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get("officeSelDiag"):T[T.length-1].name||mxResources.get("home")),P.appendChild(S))}}function J(){if(null!=
-H&&!U)if("sharepoint"==Q)M("site",null,H.id,H.displayName);else if("site"==Q)M("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var S=(H.parentReference?H.parentReference.driveId:null)||Q,X=H.id;P?M(S,X,null,H.name):E()}}function M(P,S,X,aa,Y){function Z(va){F.stop();var Ea=document.createElement("table");Ea.className="odFileListGrid";for(var Ba=null,za=0,Da=0;null!=va&&Da<va.length;Da++){var la=va[Da];if(1!=ma||!la.webUrl||0<la.webUrl.indexOf("sharepoint.com/sites/")||
-0>la.webUrl.indexOf("sharepoint.com/")){var Ha=la.displayName||la.name,ya=mxUtils.htmlEntities(la.description||Ha);ma&&(la.folder=2==ma?{isRoot:!0}:!0);var Ia=null!=la.folder;if(!D||Ia){var ka=document.createElement("tr");ka.className=za++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ra=document.createElement("img");ra.src="/images/"+(Ia?"folder.png":"file.png");ra.className="odFileImg";ta.appendChild(ra);ka.appendChild(ta);ta=document.createElement("td");
-Ia=document.createElement("div");Ia.className="odFileTitle";Ia.innerHTML=mxUtils.htmlEntities(Ha);Ia.setAttribute("title",ya);ta.appendChild(Ia);ka.appendChild(ta);Ea.appendChild(ka);null==Ba&&(Ba=ka,Ba.className+=" odRowSelected",H=la,Q=P,q||e(H));(function(wa,ca){ka.addEventListener("dblclick",J);ka.addEventListener("click",function(){Ba!=ca&&(Ba.className=Ba.className.replace("odRowSelected",""),Ba=ca,Ba.className+=" odRowSelected",H=wa,Q=P,q||e(H))})})(la,ka)}}}0==za?(va=document.createElement("div"),
-va.className="odEmptyFolder",va.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),pa.appendChild(va)):pa.appendChild(Ea);B();U=!1}function ba(va){f(va?va:xa,function(Ea){if(ea){var Ba=Ea.value||[];if(q||ma)Array.prototype.push.apply(Ma,Ba);else for(var za=0;za<Ba.length;za++){var Da=Ba[za],la=Da.file?Da.file.mimeType:null;(Da.folder||"text/html"==la||"text/xml"==la||"application/xml"==la||"image/png"==la||/\.svg$/.test(Da.name)||/\.html$/.test(Da.name)||/\.xml$/.test(Da.name)||
-/\.png$/.test(Da.name)||/\.drawio$/.test(Da.name)||/\.drawiolib$/.test(Da.name))&&Ma.push(Da)}Ea["@odata.nextLink"]&&1E3>Ma.length?ba(Ea["@odata.nextLink"]):(clearTimeout(ia),Z(Ma))}},function(Ea){if(ea){clearTimeout(ia);var Ba=null;try{Ba=JSON.parse(Ea.responseText).error.message}catch(za){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Ba?" ("+Ba+")":""));U=!1;F.stop()}},null!=va)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block";
-null!=N&&(N.innerText="",N.style.top="50%");var ea=U=!0,ma=0;V=arguments;var ia=setTimeout(function(){U=ea=!1;F.stop();y(mxResources.get("timeout"))},2E4),pa=p(".odFilesList");pa.innerText="";F.spin(pa);switch(P){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:P}];var na=l()||{},Fa=[],Ga;for(Ga in na)Fa.push(na[Ga]);clearTimeout(ia);Z(Fa);return;case "shared":var xa="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":xa=
-"/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ma=1;break;case "site":T.push({name:aa,driveId:P,folderId:S,siteId:X});xa="/sites/"+X+"/drives";ma=2;break;case "subsite":T.push({name:aa,driveId:P,folderId:S,siteId:X});xa="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":P=Q;T=[{driveId:P,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));xa=P?"/drives/"+P+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+
-Y+"')";break;default:null==S?T=[{driveId:P}]:T.push({name:aa,driveId:P,folderId:S}),xa=(P?"/drives/"+P:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ma||(xa+=(0<xa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function v(P){R.className=R.className.replace("odCatSelected","");R=P;R.className+=" odCatSelected"}function u(P){U||(O=null,M("search",null,null,null,
-P))}var G="";null==e&&(e=z,G='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return P});null==m&&(m=function(P){if(null!=P){var S=l()||{};delete P["@microsoft.graph.downloadUrl"];S[P.id]=P;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,m,v,x,E,d,g,k,n,q){function p(P,R){R=R||document;return R.querySelector(P)}function y(P,R,X){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)X();else{c(P.id,P.parentReference.driveId,function(aa){y(aa,R,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",P["@microsoft.graph.downloadUrl"]);var Y=P.file?"image/png"==P.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var aa=Z.responseText;
+Y&&(aa="data:image/png;base64,"+Editor.base64Encode(aa),aa=Editor.extractGraphModelFromPng(aa));var ba=mxUtils.parseXml(aa),ea="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=ea){R(ea.ownerDocument);return}}catch(ja){}X()}};Y&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");Z.send()}function A(){k&&null!=K?J.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");v(H,P);m(H)},400,
+null,null,function(P){console.log(P)},600,null,null,null,null,null,K):(v(H,void 0),m(H))}function C(P){function R(X){L.style.background="transparent";L.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);L.appendChild(Z);F.stop()}if(null!=L)if(L.style.background="transparent",L.innerText="",null==P||P.folder||/\.drawiolib$/.test(P.name))R(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),W=P,F.spin(L),y(P,function(X){F.stop();
+if(W==P)if("mxlibrary"==X.documentElement.nodeName)R(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");K=AspectDialog.prototype.createViewer(L,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){H=null;R(mxResources.get("notADiagramFile"))})}catch(X){H=null,R(mxResources.get("notADiagramFile"))}}function B(){var P=p(".odFilesBreadcrumb");if(null!=P){P.innerText="";for(var R=0;R<Q.length-1;R++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=
+mxUtils.htmlEntities(Q[R].name||mxResources.get("home"));P.appendChild(X);(function(Y,aa){X.addEventListener("click",function(){e(null);Q=Q.slice(0,aa);M(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(Q[R],R);var Z=document.createElement("span");Z.innerHTML=" &gt; ";P.appendChild(Z)}null!=Q[Q.length-1]&&(R=document.createElement("span"),R.innerHTML=mxUtils.htmlEntities(1==Q.length?mxResources.get("officeSelDiag"):Q[Q.length-1].name||mxResources.get("home")),P.appendChild(R))}}function I(){if(null!=H&&
+!U)if("sharepoint"==N)M("site",null,H.id,H.displayName);else if("site"==N)M("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var R=(H.parentReference?H.parentReference.driveId:null)||N,X=H.id;P?M(R,X,null,H.name):A()}}function M(P,R,X,Z,Y){function aa(xa){F.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var oa=null,Aa=0,La=0;null!=xa&&La<xa.length;La++){var ta=xa[La];if(1!=ja||!ta.webUrl||0<ta.webUrl.indexOf("sharepoint.com/sites/")||0>
+ta.webUrl.indexOf("sharepoint.com/")){var Da=ta.displayName||ta.name,wa=mxUtils.htmlEntities(ta.description||Da);ja&&(ta.folder=2==ja?{isRoot:!0}:!0);var Ja=null!=ta.folder;if(!E||Ja){var ka=document.createElement("tr");ka.className=Aa++%2?"odOddRow":"odEvenRow";var da=document.createElement("td");da.style.width="36px";var ca=document.createElement("img");ca.src="/images/"+(Ja?"folder.png":"file.png");ca.className="odFileImg";da.appendChild(ca);ka.appendChild(da);da=document.createElement("td");Ja=
+document.createElement("div");Ja.className="odFileTitle";Ja.innerHTML=mxUtils.htmlEntities(Da);Ja.setAttribute("title",wa);da.appendChild(Ja);ka.appendChild(da);Ca.appendChild(ka);null==oa&&(oa=ka,oa.className+=" odRowSelected",H=ta,N=P,q||e(H));(function(na,la){ka.addEventListener("dblclick",I);ka.addEventListener("click",function(){oa!=la&&(oa.className=oa.className.replace("odRowSelected",""),oa=la,oa.className+=" odRowSelected",H=na,N=P,q||e(H))})})(ta,ka)}}}0==Aa?(xa=document.createElement("div"),
+xa.className="odEmptyFolder",xa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ra.appendChild(xa)):ra.appendChild(Ca);B();U=!1}function ba(xa){f(xa?xa:ya,function(Ca){if(ea){var oa=Ca.value||[];if(q||ja)Array.prototype.push.apply(Ma,oa);else for(var Aa=0;Aa<oa.length;Aa++){var La=oa[Aa],ta=La.file?La.file.mimeType:null;(La.folder||"text/html"==ta||"text/xml"==ta||"application/xml"==ta||"image/png"==ta||/\.svg$/.test(La.name)||/\.html$/.test(La.name)||/\.xml$/.test(La.name)||
+/\.png$/.test(La.name)||/\.drawio$/.test(La.name)||/\.drawiolib$/.test(La.name))&&Ma.push(La)}Ca["@odata.nextLink"]&&1E3>Ma.length?ba(Ca["@odata.nextLink"]):(clearTimeout(fa),aa(Ma))}},function(Ca){if(ea){clearTimeout(fa);var oa=null;try{oa=JSON.parse(Ca.responseText).error.message}catch(Aa){}x(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=oa?" ("+oa+")":""));U=!1;F.stop()}},null!=xa)}if(!U){p(".odCatsList").style.display="block";p(".odFilesSec").style.display="block";
+null!=L&&(L.innerText="",L.style.top="50%");var ea=U=!0,ja=0;V=arguments;var fa=setTimeout(function(){U=ea=!1;F.stop();x(mxResources.get("timeout"))},2E4),ra=p(".odFilesList");ra.innerText="";F.spin(ra);switch(P){case "recent":Q=[{name:mxResources.get("recent",null,"Recent"),driveId:P}];var ma=l()||{},Ga=[],Fa;for(Fa in ma)Ga.push(ma[Fa]);clearTimeout(fa);aa(Ga);return;case "shared":var ya="/me/drive/sharedWithMe";Q=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":ya=
+"/sites?search=";Q=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ja=1;break;case "site":Q.push({name:Z,driveId:P,folderId:R,siteId:X});ya="/sites/"+X+"/drives";ja=2;break;case "subsite":Q.push({name:Z,driveId:P,folderId:R,siteId:X});ya="/drives/"+X+(R?"/items/"+R:"/root")+"/children";break;case "search":P=N;Q=[{driveId:P,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ya=P?"/drives/"+P+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+
+Y+"')";break;default:null==R?Q=[{driveId:P}]:Q.push({name:Z,driveId:P,folderId:R}),ya=(P?"/drives/"+P:"/me/drive")+(R?"/items/"+R:"/root")+"/children"}ja||(ya+=(0<ya.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Ma=[];ba()}}function G(P){T.className=T.className.replace("odCatSelected","");T=P;T.className+=" odCatSelected"}function S(P){U||(O=null,M("search",null,null,null,
+P))}var u="";null==e&&(e=C,u='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(R){}return P});null==m&&(m=function(P){if(null!=P){var R=l()||{};delete P["@microsoft.graph.downloadUrl"];R[P.id]=P;localStorage.setItem("mxODPickerRecentList",JSON.stringify(R))}});u='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+
-mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(d?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(D?"save":"open"))+"</button>":"");var I=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();I=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
-(I?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(I?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),L=new Editor,K=null,H=null,Q=null,U=!1,T=[],V=null,W=null;this.getSelectedItem=function(){null!=H&&m(H);return H};if(null==p("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");t.appendChild(C);C.type="text/css";C.id="mxODPickerCss";C.appendChild(document.createTextNode(I))}b.innerHTML=
-G;var N=p(".odPreview"),R=p("#odFiles");b=function(P,S){S=S||document;return S.querySelectorAll(P)}(".odCatListTitle");for(G=0;G<b.length;G++)b[G].addEventListener("click",function(){H=W=null;if(!U)switch(v(this),this.id){case "odFiles":M();break;case "odRecent":M("recent");break;case "odShared":M("shared");break;case "odSharepoint":M("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(P){var S=this;null!=O&&clearTimeout(O);13==P.keyCode?u(S.value):O=setTimeout(function(){u(S.value)},
-500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),M.apply(this,V))});d&&p("#odBackBtn").addEventListener("click",d);g&&p("#odSubmitBtn").addEventListener("click",E);null!=n?(d=n.pop(),"sharepoint"==n[0].driveId&&v(p("#odSharepoint")),T=n,M(d.driveId,d.folderId,d.siteId,d.name)):M()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+u+(d?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(g?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(E?"save":"open"))+"</button>":"");var z=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();z=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+(z?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(z?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
+var F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,K=null,H=null,N=null,U=!1,Q=[],V=null,W=null;this.getSelectedItem=function(){null!=H&&m(H);return H};if(null==p("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");t.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(z))}b.innerHTML=
+u;var L=p(".odPreview"),T=p("#odFiles");b=function(P,R){R=R||document;return R.querySelectorAll(P)}(".odCatListTitle");for(u=0;u<b.length;u++)b[u].addEventListener("click",function(){H=W=null;if(!U)switch(G(this),this.id){case "odFiles":M();break;case "odRecent":M("recent");break;case "odShared":M("shared");break;case "odSharepoint":M("sharepoint")}});var O=null;p("#odSearchBox").addEventListener("keyup",function(P){var R=this;null!=O&&clearTimeout(O);13==P.keyCode?S(R.value):O=setTimeout(function(){S(R.value)},
+500)});p("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),M.apply(this,V))});d&&p("#odBackBtn").addEventListener("click",d);g&&p("#odSubmitBtn").addEventListener("click",A);null!=n?(d=n.pop(),"sharepoint"==n[0].driveId&&G(p("#odSharepoint")),Q=n,M(d.driveId,d.folderId,d.siteId,d.name)):M()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var l={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(l.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(l)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,l,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var x=null;try{x=window.open(c)}catch(y){}null==x||void 0===x?this.showDialog((new PopupDialog(this,c,l,m)).container,320,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,l,m){if("1"==urlParams.openInSameWin||navigator.standalone)m();else{var v=null;try{v=window.open(c)}catch(x){}null==v||void 0===v?this.showDialog((new PopupDialog(this,c,l,m)).container,320,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
@@ -12337,23 +12365,23 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};
-App.main=function(b,e){function f(d){mxUtils.getAll("1"!=urlParams.dev?[d]:[d,STYLE_PATH+"/default.xml"],function(g){function k(){var E=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,e){function f(d){mxUtils.getAll("1"!=urlParams.dev?[d]:[d,STYLE_PATH+"/default.xml"],function(g){function k(){var A=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(E);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[E,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var q=localStorage.getItem(Editor.configurationKey);if(null!=q)try{var p=JSON.parse(q),A;for(A in n.merge)p[A]=n.merge[A];n=p}catch(E){window.location.hash="",alert(E)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(E){window.location.hash=
-"",alert(E)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(A);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[A,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(g[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var q=localStorage.getItem(Editor.configurationKey);if(null!=q)try{var p=JSON.parse(q),y;for(y in n.merge)p[y]=n.merge[y];n=p}catch(A){window.location.hash="",alert(A)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(A){window.location.hash=
+"",alert(A)}1<g.length&&(Graph.prototype.defaultThemes["default-style2"]=g[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=g[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?k():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],k))},function(g){g=document.getElementById("geStatus");null!=g&&(g.innerHTML="Error loading page. <a>Please try refreshing.</a>",g.getElementsByTagName("a")[0].onclick=
function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var d=parseInt(mxSettings.settings.autosaveDelay);!isNaN(d)&&0<d?(DrawioFile.prototype.autosaveDelay=d,EditorUi.debug("Setting autosaveDelay",
d)):EditorUi.debug("Invalid autosaveDelay",d)}null!=mxSettings.settings.defaultEdgeLength&&(d=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(d)&&0<d?(Graph.prototype.defaultEdgeLength=d,EditorUi.debug("Using defaultEdgeLength",d)):EditorUi.debug("Invalid defaultEdgeLength",d))}}catch(k){null!=window.console&&console.error(k)}if(null!=Menus.prototype.defaultFonts)for(d=0;d<Menus.prototype.defaultFonts.length;d++){var g=Menus.prototype.defaultFonts[d];"string"!==typeof g&&null!=g.fontFamily&&
null!=g.fontUrl&&Graph.addFont(g.fontFamily,g.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(d,g,k,n,q){EditorUi.logError("Global: "+(null!=d?d:""),g,k,n,q,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=
document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(d){null!=window.console&&console.error(d)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
-urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){l=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var x=JSON.parse(localStorage.getItem(mxSettings.key));null!=x&&(l=x.plugins)}catch(d){}x=urlParams.p;App.initPluginCallback();null!=x&&App.loadPlugins(x.split(";"));if(null!=
-l&&0<l.length&&"0"!=urlParams.plugins)for(x=0;x<l.length;x++)try{("/"==l[x].charAt(0)&&(l[x]=PLUGINS_BASE_PATH+l[x]),App.isSameDomain(l[x]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(l[x])?null==App.pluginsLoaded[l[x]]&&(App.pluginsLoaded[l[x]]=!0,App.embedModePluginsCount++,mxscript(l[x])):null!=window.console&&console.log("Unknown plugin:",l[x]):null!=window.console&&console.log("Blocked plugin:",l[x])}catch(d){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,D=function(d){if(d.source==y)try{var g=JSON.parse(d.data);null!=g&&"configure"==
-g.action&&(mxEvent.removeListener(window,"message",D),Editor.configure(g.config),mxSettings.load(),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,d.data)}};mxEvent.addListener(window,"message",D);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
-mxSettings.load()}catch(d){null!=window.console&&console.error(d)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(x=localStorage.getItem(Editor.configurationKey),null!=x))try{x=JSON.parse(x),null!=x&&(EditorUi.debug("Using local configuration",x),Editor.configure(x),mxSettings.load())}catch(d){null!=window.console&&console.error(d)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
+urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){l=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var v=JSON.parse(localStorage.getItem(mxSettings.key));null!=v&&(l=v.plugins)}catch(d){}v=urlParams.p;App.initPluginCallback();null!=v&&App.loadPlugins(v.split(";"));if(null!=
+l&&0<l.length&&"0"!=urlParams.plugins)for(v=0;v<l.length;v++)try{("/"==l[v].charAt(0)&&(l[v]=PLUGINS_BASE_PATH+l[v]),App.isSameDomain(l[v]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(l[v])?null==App.pluginsLoaded[l[v]]&&(App.pluginsLoaded[l[v]]=!0,App.embedModePluginsCount++,mxscript(l[v])):null!=window.console&&console.log("Unknown plugin:",l[v]):null!=window.console&&console.log("Blocked plugin:",l[v])}catch(d){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var x=window.opener||window.parent,E=function(d){if(d.source==x)try{var g=JSON.parse(d.data);null!=g&&"configure"==
+g.action&&(mxEvent.removeListener(window,"message",E),Editor.configure(g.config),mxSettings.load(),g.colorSchemeMeta&&mxmeta("color-scheme","dark light"),c())}catch(k){null!=window.console&&console.log("Error in configure message: "+k,d.data)}};mxEvent.addListener(window,"message",E);x.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+mxSettings.load()}catch(d){null!=window.console&&console.error(d)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(v=localStorage.getItem(Editor.configurationKey),null!=v))try{v=JSON.parse(v),null!=v&&(EditorUi.debug("Using local configuration",v),Editor.configure(v),mxSettings.load())}catch(d){null!=window.console&&console.error(d)}}c()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=";
App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC";
@@ -12388,21 +12416,21 @@ f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute(
b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(l);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","4 star");m.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(m);this.bannerShowing=!0;var x=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(y){mxEvent.consume(y);x()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);x()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");x()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(m);this.bannerShowing=!0;var v=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(x){mxEvent.consume(x);v()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);v()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(x){mxEvent.consume(x);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");v()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){v()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var x=JSON.parse(m);null!=x&&this.handleLicense(x,
-c)}}}catch(y){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var f=e.lastIndexOf("@"),c=0<=f?e.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var v=JSON.parse(m);null!=v&&this.handleLicense(v,
+c)}}}catch(x){}}))}};App.prototype.handleLicense=function(b,e){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var f=0;f<e.length;f++)e[f].id==b.id&&e.splice(f,1);null!=e&&(e.unshift(b),e=e.slice(0,10),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(e){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),m=mxUtils.bind(this,function(I){window.clearTimeout(l);c&&e(I)});null==this.thumbImageCache&&(this.thumbImageCache={});var x=this.editor.graph,y=x.backgroundImage,D=null!=x.themes&&"darkTheme"==x.defaultThemeName;if(null!=this.pages&&(D||this.currentPage!=this.pages[0])){var d=x.getGlobalVariable;x=this.createTemporaryGraph(x.getStylesheet());x.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?x.setBackgroundImage(y):null!=g.viewState&&null!=g.viewState&&(y=g.viewState.backgroundImage,x.setBackgroundImage(y));x.getGlobalVariable=function(I){return"page"==I?g.getName():"pagenumber"==I?1:d.apply(this,arguments)};x.getGlobalVariable=d;document.body.appendChild(x.container);x.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{x!=this.editor.graph&&
-null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(F){I=null}m(I)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,x,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=x.getGraphBounds(),q=x.view.translate,p=x.view.scale;null!=y&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((q.x+y.x)*p,(q.y+y.y)*p,y.width*p,y.height*p)));var A=b/n.width;
-A=Math.min(1,Math.min(3*b/(4*n.height),A));var E=Math.floor(n.x),z=Math.floor(n.y);k.setAttribute("width",Math.ceil(A*(n.width+4)));k.setAttribute("height",Math.ceil(A*(n.height+4)));var B=k.getContext("2d");B.scale(A,A);B.translate(-E,-z);var J=x.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";B.save();B.fillStyle=J;B.fillRect(E,z,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=y){var M=new Image;M.src=y.src;B.drawImage(M,y.x*A,y.y*A,y.width*A,y.height*A)}var v=new mxJsCanvas(k),
-u=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(I,F){I.shape instanceof mxShape&&I.shape.checkBounds()&&(F.save(),F.translate(.5,.5),I.shape.paint(F),F.translate(-.5,-.5),F.restore())};G.drawText=function(I,F){};G.drawState(x.getView().getState(x.model.root),u);u.finish(mxUtils.bind(this,function(){try{G.drawState(x.getView().getState(x.model.root),v),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(I){k=
-null}m(k)}));f=!0}}catch(I){f=!1,null!=x&&x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+App.prototype.getThumbnail=function(b,e){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),m=mxUtils.bind(this,function(z){window.clearTimeout(l);c&&e(z)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,x=v.backgroundImage,E=null!=v.themes&&"darkTheme"==v.defaultThemeName;if(null!=this.pages&&(E||this.currentPage!=this.pages[0])){var d=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var g=this.pages[0];this.currentPage==g?v.setBackgroundImage(x):null!=g.viewState&&null!=g.viewState&&(x=g.viewState.backgroundImage,v.setBackgroundImage(x));v.getGlobalVariable=function(z){return"page"==z?g.getName():"pagenumber"==z?1:d.apply(this,arguments)};v.getGlobalVariable=d;document.body.appendChild(v.container);v.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(z){try{v!=this.editor.graph&&
+null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(F){z=null}m(z)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=v.getGraphBounds(),q=v.view.translate,p=v.view.scale;null!=x&&(n=mxRectangle.fromRectangle(n),n.add(new mxRectangle((q.x+x.x)*p,(q.y+x.y)*p,x.width*p,x.height*p)));var y=b/n.width;
+y=Math.min(1,Math.min(3*b/(4*n.height),y));var A=Math.floor(n.x),C=Math.floor(n.y);k.setAttribute("width",Math.ceil(y*(n.width+4)));k.setAttribute("height",Math.ceil(y*(n.height+4)));var B=k.getContext("2d");B.scale(y,y);B.translate(-A,-C);var I=v.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";B.save();B.fillStyle=I;B.fillRect(A,C,Math.ceil(n.width+4),Math.ceil(n.height+4));B.restore();if(null!=x){var M=new Image;M.src=x.src;B.drawImage(M,x.x*y,x.y*y,x.width*y,x.height*y)}var G=new mxJsCanvas(k),
+S=new mxAsyncCanvas(this.thumbImageCache);G.images=this.thumbImageCache.images;var u=new mxImageExport;u.drawShape=function(z,F){z.shape instanceof mxShape&&z.shape.checkBounds()&&(F.save(),F.translate(.5,.5),z.shape.paint(F),F.translate(-.5,-.5),F.restore())};u.drawText=function(z,F){};u.drawState(v.getView().getState(v.model.root),S);S.finish(mxUtils.bind(this,function(){try{u.drawState(v.getView().getState(v.model.root),G),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(z){k=
+null}m(k)}));f=!0}}catch(z){f=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}f||window.clearTimeout(l);return f};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(m){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),f=null!=e?e.getMode():null;f==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?null!=
@@ -12418,20 +12446,20 @@ App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,x,y,D,d){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),x,y,D,d,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(m){var x=this.getCurrentFile();EditorUi.debug("storage event",[m],[x]);null!=x&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=x.draftId&&(this.draftAliveCheck=m.newValue,x.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog();
-var x=this.getDiagramId(),y=this.getCurrentFile();null!=y&&y.getHash()==x||this.loadFile(x,!0)}catch(D){null!=document.body&&this.handleError(D,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m,
-mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(D){Editor.isPngDataUrl(D)&&(D=Editor.extractGraphModelFromPng(D));var d=urlParams.title;d=null!=d?decodeURIComponent(d):
-this.defaultFilename;D=new LocalFile(this,D,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(D.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(D);this.getCurrentFile().setModified(!this.editor.chromeless)}),x=window.opener||window.parent;if(x!=window){var y=urlParams.create;null!=y?m(x[decodeURIComponent(y)]):(y=urlParams.data,null!=y?m(decodeURIComponent(y)):this.installMessageHandler(mxUtils.bind(this,function(D,d){d.source==x&&m(D)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)y=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=y;else{y=!1;try{y=null!=window.opener&&null!=window.opener.openFile}catch(D){}y?this.spinner.spin(document.body,mxResources.get("loading")):(y=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=y&&0!=y.length||this.editor.isChromelessView()?null!=y&&0<y.length?this.loadFile(y,null,null,mxUtils.bind(this,
-function(){var D=decodeURIComponent(urlParams.viewbox||"");if(""!=D)try{var d=JSON.parse(D);this.editor.graph.fitWindow(d,d.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var x=urlParams.title;x=null!=x?decodeURIComponent(x):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var y=4>=
-m?2:6<m?4:3;x=new CreateDialog(this,x,mxUtils.bind(this,function(D,d){if(null==d){this.hideDialog();var g=Editor.useLocalStorage;this.createFile(0<D.length?D:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(D,this.getFileData(!0),null,d,null,!0,k)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,y,null,null,null,this.editor.fileExtensions);this.showDialog(x.container,420,m>y?
-390:280,!0,!1,mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&this.showSplash()}));x.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,v,x,E,d){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),v,x,E,d,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(m){var v=this.getCurrentFile();EditorUi.debug("storage event",[m],[v]);null!=v&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=v.draftId&&(this.draftAliveCheck=m.newValue,v.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog();
+var v=this.getDiagramId(),x=this.getCurrentFile();null!=x&&x.getHash()==v||this.loadFile(v,!0)}catch(E){null!=document.body&&this.handleError(E,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"))}))}catch(m){this.handleError(m,
+mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var e=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(E){Editor.isPngDataUrl(E)&&(E=Editor.extractGraphModelFromPng(E));var d=urlParams.title;d=null!=d?decodeURIComponent(d):
+this.defaultFilename;E=new LocalFile(this,E,d,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(E.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(E);this.getCurrentFile().setModified(!this.editor.chromeless)}),v=window.opener||window.parent;if(v!=window){var x=urlParams.create;null!=x?m(v[decodeURIComponent(x)]):(x=urlParams.data,null!=x?m(decodeURIComponent(x)):this.installMessageHandler(mxUtils.bind(this,function(E,d){d.source==v&&m(E)})))}}else if(null==
+this.dialog)if("1"==urlParams.demo)x=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=x;else{x=!1;try{x=null!=window.opener&&null!=window.opener.openFile}catch(E){}x?this.spinner.spin(document.body,mxResources.get("loading")):(x=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=x&&0!=x.length||this.editor.isChromelessView()?null!=x&&0<x.length?this.loadFile(x,null,null,mxUtils.bind(this,
+function(){var E=decodeURIComponent(urlParams.viewbox||"");if(""!=E)try{var d=JSON.parse(E);this.editor.graph.fitWindow(d,d.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body,
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var v=urlParams.title;v=null!=v?decodeURIComponent(v):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var x=4>=
+m?2:6<m?4:3;v=new CreateDialog(this,v,mxUtils.bind(this,function(E,d){if(null==d){this.hideDialog();var g=Editor.useLocalStorage;this.createFile(0<E.length?E:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(E,this.getFileData(!0),null,d,null,!0,k)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,x,null,null,null,this.editor.fileExtensions);this.showDialog(v.container,420,m>x?
+390:280,!0,!1,mxUtils.bind(this,function(E){E&&null==this.getCurrentFile()&&this.showSplash()}));v.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),
c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
e())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var x=0;x<m.length;x++)try{var y=m[x].key;if(null!=y&&".draft_"==y.substring(0,7)){var D=JSON.parse(m[x].data);null!=D&&"draft"==D.type&&D.aliveCheck!=e&&(null==b&&null==D.fileObject||null!=D.fileObject&&D.fileObject.path==b)&&(D.key=y,l.push(D))}}catch(d){}c()},c))}catch(m){c()}};
+App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var v=0;v<m.length;v++)try{var x=m[v].key;if(null!=x&&".draft_"==x.substring(0,7)){var E=JSON.parse(m[v].data);null!=E&&"draft"==E.type&&E.aliveCheck!=e&&(null==b&&null==E.fileObject||null!=E.fileObject&&E.fileObject.path==b)&&(E.key=x,l.push(E))}}catch(d){}c()},c))}catch(m){c()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key);null!=l&&l()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<e.length?e:null);this.showDialog(f.container,
640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
@@ -12439,94 +12467,94 @@ App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var e=this.ge
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<e?320:210,!0,!1)}}};
App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor=
"pointer",c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
-var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var x=mxUtils.getOffset(c);m.popup(x.x,x.y+c.offsetHeight,null,l);this.setCurrentMenu(m)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=e){var x=m.target.result;"image/png"==c.type&&(x=this.extractGraphModelFromPng(x));e(new LocalFile(this,x,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(y){f(y)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
+var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var v=mxUtils.getOffset(c);m.popup(v.x,v.y+c.offsetHeight,null,l);this.setCurrentMenu(m)})),b.appendChild(c));return c};
+App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=e){var v=m.target.result;"image/png"==c.type&&(v=this.extractGraphModelFromPng(v));e(new LocalFile(this,v,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(x){f(x)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};
App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,
l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(x){null!=x&&0<x.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(x[0])}),
-mxUtils.bind(this,function(x){"AbortError"!=x.name&&this.handleError(x)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(x,y){StorageFile.listFiles(this,"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,D){StorageFile.getFileContent(this,x,y,D)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,D){StorageFile.deleteFile(this,x,y,D)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(x,y){var D=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,x,y):new LocalFile(this,x,y))}),d=this.getCurrentFile();null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=
-c;m.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(x){this.handleError(x)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(l,m){if(null!=m)try{this.loadLibrary(m)}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&e.getLibrary(l,mxUtils.bind(this,function(x){this.spinner.stop();try{this.loadLibrary(x)}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(x){this.handleError(x,null!=x?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=
-f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var x=new FileReader;x.onload=mxUtils.bind(this,function(y){try{this.loadLibrary(new LocalLibrary(this,y.target.result,m.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}});x.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(l,m){StorageFile.listFiles(this,"L",l,m)});window.openBrowserFile=mxUtils.bind(this,function(l,m,x){StorageFile.getFileContent(this,l,m,x)});window.deleteBrowserFile=mxUtils.bind(this,function(l,m,x){StorageFile.deleteFile(this,l,m,x)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(l){this.hideDialog(l)}));window.openFile.setConsumer(mxUtils.bind(this,function(l,m){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,l,m):new LocalLibrary(this,l,m))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,e,f,c,l,m,x){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var y=this.createLibraryDataFromImages(e),D=mxUtils.bind(this,function(k){this.spinner.stop();null!=x&&x();this.handleError(k,null!=k?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,y,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(k){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,y,k,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),D,k):c==App.MODE_BROWSER?(k=mxUtils.bind(this,function(){var n=new StorageLibrary(this,y,b);n.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(n,e)}),D)}),null==localStorage.getItem(b)?
-k():this.confirm(mxResources.get("replaceIt",[b]),k)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(y);var d=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,e);null!=x&&x()}),D)});if(b!=f.getTitle()){var g=f.getHash();f.rename(b,mxUtils.bind(this,function(k){f.constructor!=LocalLibrary&&g!=f.getHash()&&
-(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(g);d()}),D)}else d()}}catch(k){this.handleError(k)}};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(v){null!=v&&0<v.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(v[0])}),
+mxUtils.bind(this,function(v){"AbortError"!=v.name&&this.handleError(v)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,E){StorageFile.getFileContent(this,v,x,E)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,E){StorageFile.deleteFile(this,v,x,E)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(v,x){var E=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=x.substring(x.length-4)||(x=x.substring(0,x.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,v,x):new LocalFile(this,v,x))}),d=this.getCurrentFile();null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=
+c;m.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(v){this.handleError(v)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(l,m){if(null!=m)try{this.loadLibrary(m)}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&e.getLibrary(l,mxUtils.bind(this,function(v){this.spinner.stop();try{this.loadLibrary(v)}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(v){this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=
+f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var v=new FileReader;v.onload=mxUtils.bind(this,function(x){try{this.loadLibrary(new LocalLibrary(this,x.target.result,m.name))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}});v.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(l,m){StorageFile.listFiles(this,"L",l,m)});window.openBrowserFile=mxUtils.bind(this,function(l,m,v){StorageFile.getFileContent(this,l,m,v)});window.deleteBrowserFile=mxUtils.bind(this,function(l,m,v){StorageFile.deleteFile(this,l,m,v)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(l){this.hideDialog(l)}));window.openFile.setConsumer(mxUtils.bind(this,function(l,m){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,l,m):new LocalLibrary(this,l,m))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,e,f,c,l,m,v){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var x=this.createLibraryDataFromImages(e),E=mxUtils.bind(this,function(k){this.spinner.stop();null!=v&&v();this.handleError(k,null!=k?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,x,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(k){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,x,k,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,x,mxUtils.bind(this,function(n){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(n,e)}),E,k):c==App.MODE_BROWSER?(k=mxUtils.bind(this,function(){var n=new StorageLibrary(this,x,b);n.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(n,e)}),E)}),null==localStorage.getItem(b)?
+k():this.confirm(mxResources.get("replaceIt",[b]),k)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(x);var d=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(k){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,e);null!=v&&v()}),E)});if(b!=f.getTitle()){var g=f.getHash();f.rename(b,mxUtils.bind(this,function(k){f.constructor!=LocalLibrary&&g!=f.getHash()&&
+(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(g);d()}),E)}else d()}}catch(k){this.handleError(k)}};
App.prototype.saveFile=function(b,e){var f=this.getCurrentFile();if(null!=f){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(D,d){f.invalidFileHandle=null;f.fileHandle=D;f.title=d.name;f.desc=d;this.save(d.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,x=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var y=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(D,d,g){null!=D&&0<D.length&&(/(\.pdf)$/i.test(D)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){g.value=D.split(".").slice(0,-1).join(".");g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==x&&d==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,n){f.fileHandle=k;f.mode=App.MODE_DEVICE;f.title=n.name;
-f.desc=n;this.setMode(App.MODE_DEVICE);this.save(n.name,c)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,c)):"download"==d?(new LocalFile(this,null,D)).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)):x!=d?this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(D,
-this.getFileData(/(\.xml)$/i.test(D)||0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,d,c,null==this.mode,k)})):null!=d&&this.save(D,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,y,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>y?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}};
-App.prototype.loadTemplate=function(b,e,f,c,l){var m=!1,x=b,y=null!=c?c:b,D=/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y);c=/\.png$/i.test(y)||/\.pdf$/i.test(y);this.editor.isCorsEnabledForUrl(x)||(m=c||D,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(m?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(d){try{var g=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(D||this.isVisioData(g))D||(y=l?this.isRemoteVisioData(g)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(k){e(k)},f,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,y))this.isExternalDataComms()?this.parseFileData(g,mxUtils.bind(this,function(k){4==k.readyState&&200<=k.status&&299>=k.status&&"<mxGraphModel"==k.responseText.substring(0,13)&&e(k.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);
-else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(k){e(k)}),mxUtils.bind(this,function(k){f(k)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(g))g=Editor.extractGraphModelFromPng(d);e(g)}}catch(k){f(k)}}),f,/(\.png)($|\?)/i.test(y)||/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y),null,null,m)};
+function(E,d){f.invalidFileHandle=null;f.fileHandle=E;f.title=d.name;f.desc=d;this.save(d.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,v=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var x=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(E,d,g){null!=E&&0<E.length&&(/(\.pdf)$/i.test(E)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){g.value=E.split(".").slice(0,-1).join(".");g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==v&&d==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(k,n){f.fileHandle=k;f.mode=App.MODE_DEVICE;f.title=n.name;
+f.desc=n;this.setMode(App.MODE_DEVICE);this.save(n.name,c)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&this.handleError(k)}),this.createFileSystemOptions(E)):(this.setMode(App.MODE_DEVICE),this.save(E,c)):"download"==d?(new LocalFile(this,null,E)).save():"_blank"==d?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):v!=d?this.pickFolder(d,mxUtils.bind(this,function(k){this.createFile(E,
+this.getFileData(/(\.xml)$/i.test(E)||0>E.indexOf(".")||/(\.drawio)$/i.test(E),/(\.svg)$/i.test(E),/(\.html)$/i.test(E)),null,d,c,null==this.mode,k)})):null!=d&&this.save(E,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,x,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>x?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}};
+App.prototype.loadTemplate=function(b,e,f,c,l){var m=!1,v=b,x=null!=c?c:b,E=/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x);c=/\.png$/i.test(x)||/\.pdf$/i.test(x);this.editor.isCorsEnabledForUrl(v)||(m=c||E,v="t="+(new Date).getTime(),v=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+v+(m?"&base64=1":""));this.editor.loadUrl(v,mxUtils.bind(this,function(d){try{var g=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(d):atob(d):d;if(E||this.isVisioData(g))E||(x=l?this.isRemoteVisioData(g)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(g)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(d.substring(d.indexOf(",")+1)),function(k){e(k)},f,x);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,x))this.isExternalDataComms()?this.parseFileData(g,mxUtils.bind(this,function(k){4==k.readyState&&200<=k.status&&299>=k.status&&"<mxGraphModel"==k.responseText.substring(0,13)&&e(k.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);
+else if(this.isLucidChartData(g))this.convertLucidChart(g,mxUtils.bind(this,function(k){e(k)}),mxUtils.bind(this,function(k){f(k)}));else{if(/(\.png)($|\?)/i.test(x)||Editor.isPngData(g))g=Editor.extractGraphModelFromPng(d);e(g)}}catch(k){f(k)}}),f,/(\.png)($|\?)/i.test(x)||/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x),null,null,m)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,e,f,c,l,m,x,y,D){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){d();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),
-this.drive.insertFile(b,e,x,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,
-!1,x):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g,!1,x):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,D)}),g):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(d(),this.showSaveFilePicker(mxUtils.bind(this,
-function(k,n){var q=new LocalFile(this,e,n.name,null,k,n);q.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(q,f,m,l,D)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(d(),this.fileCreated(new LocalFile(this,e,b,null==c),f,m,l,D))}catch(k){d(),this.handleError(k)}}};
-App.prototype.fileCreated=function(b,e,f,c,l){var m=window.location.pathname;null!=e&&0<e.length&&(m+="?libs="+e);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var x=b.getData();x=0<x.length?this.editor.extractGraphModel(mxUtils.parseXml(x).documentElement,!0):null;var y=window.location.protocol+"//"+window.location.hostname+m,D=x,d=null;null!=x&&/\.svg$/i.test(b.getTitle())&&
-(d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),D=this.decodeNodeIntoGraph(D,d));b.setData(this.createFileData(x,d,b,y));null!=d&&d.container.parentNode.removeChild(d.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var q=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var A=[],E=l.split(";"),z=0;z<E.length;z++)A.push(decodeURIComponent(E[z]));this.loadLibraries(A)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?q():this.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+App.prototype.createFile=function(b,e,f,c,l,m,v,x,E){c=x?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(k){d();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==v&&null!=this.stateArg&&null!=this.stateArg.folderId&&(v=this.stateArg.folderId),
+this.drive.insertFile(b,e,v,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,
+!1,v):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g,!1,v):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(k){d();this.fileCreated(k,f,m,l,E)}),g):!x&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(d(),this.showSaveFilePicker(mxUtils.bind(this,
+function(k,n){var q=new LocalFile(this,e,n.name,null,k,n);q.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(q,f,m,l,E)}),g,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&g(k)}),this.createFileSystemOptions(b))):(d(),this.fileCreated(new LocalFile(this,e,b,null==c),f,m,l,E))}catch(k){d(),this.handleError(k)}}};
+App.prototype.fileCreated=function(b,e,f,c,l){var m=window.location.pathname;null!=e&&0<e.length&&(m+="?libs="+e);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var x=window.location.protocol+"//"+window.location.hostname+m,E=v,d=null;null!=v&&/\.svg$/i.test(b.getTitle())&&
+(d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),E=this.decodeNodeIntoGraph(E,d));b.setData(this.createFileData(v,d,b,x));null!=d&&d.container.parentNode.removeChild(d.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(){g();var n=this.getCurrentFile();null==f&&null!=n&&(f=!n.isModified()&&null==n.getMode());var q=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
+null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var y=[],A=l.split(";"),C=0;C<A.length;C++)y.push(decodeURIComponent(A[C]));this.loadLibraries(y)}}),p=mxUtils.bind(this,function(){f||null==n||!n.isModified()?q():this.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=c&&c(),window.openWindow(m,null,p))});b.constructor==LocalFile?k():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){k()}),mxUtils.bind(this,function(n){g();null!=n&&"AbortError"==n.name||this.handleError(n)}))}};
-App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var D=mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
-window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(q){null!=q?(this.fileLoaded(new StorageFile(this,q,b)),null!=c&&c()):D({message:mxResources.get("fileNotFound")})}),D)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else if(null!=f)this.spinner.stop(),
+App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var m=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var E=mxUtils.bind(this,function(q){this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
+window.location.hash=null!=p?p.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(q){null!=q?(this.fileLoaded(new StorageFile(this,q,b)),null!=c&&c()):E({message:mxResources.get("fileNotFound")})}),E)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var d=decodeURIComponent(b.substring(1));"<"!=d.charAt(0)&&(d=Graph.decompress(d));d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);d.getHash=function(){return b};this.fileLoaded(d);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(q,p){this.spinner.stop();this.fileLoaded(new EmbedFile(this,q,p));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var q=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,e,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+p},window.location.hash="#"+A.getHash());null!=c&&c()}));return!0}return!1});!q()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",q);return!0});this.loadTemplate(g,mxUtils.bind(this,function(q){this.spinner.stop();if(null!=q&&0<q.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=g,E=g.lastIndexOf("."),z=A.lastIndexOf("/");E>z&&0<z&&(A=A.substring(z+1,E),E=g.substring(E),
-this.useCanvasForExport||".png"!=E||(E=".drawio"),".svg"===E||".xml"===E||".html"===E||".png"===E||".drawio"===E)&&(p=A+E)}q=new LocalFile(this,q,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);q.getHash=function(){return b};this.fileLoaded(q,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var g=decodeURIComponent(b.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var q=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var p=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+p,e,null,mxUtils.bind(this,function(){var y=this.getCurrentFile();null!=y&&this.editor.chromeless&&
+!this.editor.editable&&(y.getHash=function(){return"G"+p},window.location.hash="#"+y.getHash());null!=c&&c()}));return!0}return!1});!q()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",q);return!0});this.loadTemplate(g,mxUtils.bind(this,function(q){this.spinner.stop();if(null!=q&&0<q.length){var p=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var y=g,A=g.lastIndexOf("."),C=y.lastIndexOf("/");A>C&&0<C&&(y=y.substring(C+1,A),A=g.substring(A),
+this.useCanvasForExport||".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(p=y+A)}q=new LocalFile(this,q,null!=urlParams.title?decodeURIComponent(urlParams.title):p,!0);q.getHash=function(){return b};this.fileLoaded(q,!0)?null!=c&&c():k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){k()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(d=null,"G"==b.charAt(0)?d=this.drive:"D"==b.charAt(0)?d=this.dropbox:"W"==b.charAt(0)?d=this.oneDrive:"H"==b.charAt(0)?d=this.gitHub:"A"==b.charAt(0)?d=this.gitLab:"T"==b.charAt(0)&&(d=this.trello),null==d)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();window.location.hash=null!=q?q.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));d.getFile(b,mxUtils.bind(this,function(q){this.spinner.stop();this.fileLoaded(q);var p=this.getCurrentFile();null==p?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(p.getHash=function(){return n+b},window.location.hash="#"+p.getHash()):q==p&&null==q.getMode()&&
-(q=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+q+'" class="geStatusAlert">'+q+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(q){null!=window.console&&null!=q&&console.log("error in loadFile:",b,q);var p=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==q||"AbortError"!=q.name?this.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}),
-x=this.getCurrentFile(),y=mxUtils.bind(this,function(){l||null==x||!x.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==x||e?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,320,140,!0,!0)};
+(q=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+q+'" class="geStatusAlert">'+q+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(q){null!=window.console&&null!=q&&console.log("error in loadFile:",b,q);var p=mxUtils.bind(this,function(){var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):window.location.hash="#"+y.getHash()});null==q||"AbortError"!=q.name?this.handleError(q,null!=q?mxResources.get("errorLoadingFile"):null,p,null,null,"#"+n+b):p()}))}}),
+v=this.getCurrentFile(),x=mxUtils.bind(this,function(){l||null==v||!v.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?x():null==v||e?x():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,x)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(d,g){g||mxSettings.removeCustomLibrary(d);delete this.loadedLibraries[d]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=l[d]&&this.loadLibrary(l[d],d<=m);null!=e&&e()}});if(null!=b)for(var y=0;y<b.length;y++){var D=encodeURIComponent(decodeURIComponent(b[y]));
-mxUtils.bind(this,function(d,g){if(null!=d&&0<d.length&&null==this.loadedLibraries[d]&&null==this.sidebar.palettes[d]){this.loadedLibraries[d]=!0;c++;var k=mxUtils.bind(this,function(z){l[g]=z;c--;x()}),n=mxUtils.bind(this,function(z){f(d,z);c--;x()}),q=d.substring(0,1);if("L"==q)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var z=decodeURIComponent(d.substring(1));StorageFile.getFileContent(this,z,mxUtils.bind(this,function(B){".scratchpad"==z&&null==
-B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,z)):n()}),n)}catch(B){n()}}),0);else if("U"==q){var p=decodeURIComponent(d.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(z){null!=z&&0<z.length?k(new UrlLibrary(this,z,p)):n()}),function(){n()},null,!0)}else if("R"==q){q=decodeURIComponent(d.substring(1));try{q=JSON.parse(q);var A={id:q[0],title:q[1],downloadUrl:q[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(z){try{k(new RemoteLibrary(this,
-z,A))}catch(B){n()}}),function(){n()})}catch(z){n()}}else if("S"==q&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(d.substring(1)),function(z){k(z)},n)}catch(z){n()}else{var E=null;"G"==q?null!=this.drive&&null!=this.drive.user&&(E=this.drive):"H"==q?null!=this.gitHub&&null!=this.gitHub.getUser()&&(E=this.gitHub):"T"==q?null!=this.trello&&this.trello.isAuthorized()&&(E=this.trello):"D"==q?null!=this.dropbox&&null!=this.dropbox.getUser()&&(E=this.dropbox):"W"==q&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(E=this.oneDrive);null!=E?E.getLibrary(decodeURIComponent(d.substring(1)),mxUtils.bind(this,function(z){try{k(z)}catch(B){n()}}),function(z){n()}):n(!0)}}})(D,y)}x()}};
+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(d,g){g||mxSettings.removeCustomLibrary(d);delete this.loadedLibraries[d]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=l[d]&&this.loadLibrary(l[d],d<=m);null!=e&&e()}});if(null!=b)for(var x=0;x<b.length;x++){var E=encodeURIComponent(decodeURIComponent(b[x]));
+mxUtils.bind(this,function(d,g){if(null!=d&&0<d.length&&null==this.loadedLibraries[d]&&null==this.sidebar.palettes[d]){this.loadedLibraries[d]=!0;c++;var k=mxUtils.bind(this,function(C){l[g]=C;c--;v()}),n=mxUtils.bind(this,function(C){f(d,C);c--;v()}),q=d.substring(0,1);if("L"==q)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var C=decodeURIComponent(d.substring(1));StorageFile.getFileContent(this,C,mxUtils.bind(this,function(B){".scratchpad"==C&&null==
+B&&(B=this.emptyLibraryXml);null!=B?k(new StorageLibrary(this,B,C)):n()}),n)}catch(B){n()}}),0);else if("U"==q){var p=decodeURIComponent(d.substring(1));this.isOffline()||this.loadTemplate(p,mxUtils.bind(this,function(C){null!=C&&0<C.length?k(new UrlLibrary(this,C,p)):n()}),function(){n()},null,!0)}else if("R"==q){q=decodeURIComponent(d.substring(1));try{q=JSON.parse(q);var y={id:q[0],title:q[1],downloadUrl:q[2]};this.remoteInvoke("getFileContent",[y.downloadUrl],null,mxUtils.bind(this,function(C){try{k(new RemoteLibrary(this,
+C,y))}catch(B){n()}}),function(){n()})}catch(C){n()}}else if("S"==q&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(d.substring(1)),function(C){k(C)},n)}catch(C){n()}else{var A=null;"G"==q?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==q?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==q?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==q?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==q&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(d.substring(1)),mxUtils.bind(this,function(C){try{k(C)}catch(B){n()}}),function(C){n()}):n(!0)}}})(E,x)}v()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",
mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=
b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,
"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(D){return!D.targets||-1<D.targets.indexOf(b)||null!=e&&-1<D.targets.indexOf(e)});for(var m=b+"NotifReadTS",x=isLocalStorage?parseInt(localStorage.getItem(m)):!0,y=0;y<l.length;y++)l[y].isNew=!x||l[y].timestamp>x;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,x){return x.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(f.notifs)}};
+App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(E){return!E.targets||-1<E.targets.indexOf(b)||null!=e&&-1<E.targets.indexOf(e)});for(var m=b+"NotifReadTS",v=isLocalStorage?parseInt(localStorage.getItem(m)):!0,x=0;x<l.length;x++)l[x].isNew=!v||l[x].timestamp>v;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,v){return v.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(f.notifs)}};
App.prototype.showNotification=function(b,e){function f(d){var g=document.querySelector(".geNotification-count");null!=g&&(g.innerHTML=d,g.style.display=0==d?"none":"",g=document.querySelector(".geNotification-bell"),g.style.animation=0==d?"none":"",g.className="geNotification-bell"+(0==d?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==d?"none":"")}var c=b.length;if("min"==uiTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&&
(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var d=this.notificationWin.querySelectorAll(".circle.active"),g=0;g<d.length;g++)d[g].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==uiTheme?"0.5":"";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);
l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className=
-"header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";l.appendChild(x);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var d=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=d.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=d.right-this.notificationWin.clientWidth+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var y=0,D=document.getElementById("geNotifList");
-if(null!=D){D.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(d,g){g.isNew&&y++;var k=document.createElement("div");k.className="notification";d=d.timeSince(new Date(g.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));k.innerHTML='<div class="circle'+(g.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(g.content)+"</p>";g.link&&mxEvent.addListener(k,"click",function(){window.open(g.link,
-"notifWin")});D.appendChild(k)})(this,b[l]);f(y)}}};
+"header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var v=document.createElement("div");v.setAttribute("id","geNotifList");v.style.position="relative";l.appendChild(v);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,
+"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var d=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=d.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=d.right-this.notificationWin.clientWidth+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var x=0,E=document.getElementById("geNotifList");
+if(null!=E){E.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(d,g){g.isNew&&x++;var k=document.createElement("div");k.className="notification";d=d.timeSince(new Date(g.timestamp));null==d&&(d=mxResources.get("lessThanAMinute"));k.innerHTML='<div class="circle'+(g.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[d],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(g.content)+"</p>";g.link&&mxEvent.addListener(k,"click",function(){window.open(g.link,
+"notifWin")});E.appendChild(k)})(this,b[l]);f(x)}}};
App.prototype.save=function(b,e){var f=this.getCurrentFile();if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){f.handleFileSuccess(!0);null!=e&&e()}),l=mxUtils.bind(this,function(m){f.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,e)}));f.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==f.getTitle()?f.save(!0,c,
l):f.saveAs(b,c,l)}catch(m){l(m)}}};
-App.prototype.pickFolder=function(b,e,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(x){m();if(x.action==google.picker.Action.PICKED){var y=null;null!=x.docs&&0<x.docs.length&&"folder"==x.docs[0].type&&(y=x.docs[0].id);e(y)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(x){m();null!=x&&null!=x.value&&0<x.value.length&&(x=OneDriveFile.prototype.getIdOf(x.value[0]),
-e(x))}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(x){m();e(x)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,e,f,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,m,mxUtils.bind(this,function(x){this.spinner.stop()}),
-mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,m,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!0,m,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,
-f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),!1,m):l==App.MODE_BROWSER&&(f=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.confirm(mxResources.get("replaceIt",[e]),f))};
+App.prototype.pickFolder=function(b,e,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(v){m();if(v.action==google.picker.Action.PICKED){var x=null;null!=v.docs&&0<v.docs.length&&"folder"==v.docs[0].type&&(x=v.docs[0].id);e(x)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(v){m();null!=v&&null!=v.value&&0<v.value.length&&(v=OneDriveFile.prototype.getIdOf(v.value[0]),
+e(v))}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(v){m();e(v)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,e,f,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,m,mxUtils.bind(this,function(v){this.spinner.stop()}),
+mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!0,m,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!0,m,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,
+f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),!1,m):l==App.MODE_BROWSER&&(f=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.confirm(mxResources.get("replaceIt",[e]),f))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?
window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,e,f,c,l,m,x,y){var D=e;/\.svg$/i.test(D)||(D=D.substring(0,e.lastIndexOf("."))+c);var d=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(d=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);d||(g.responseType="blob");if(y)for(var k in y)g.setRequestHeader(k,y[k]);g.onload=mxUtils.bind(this,function(){if(200<=
-g.status&&299>=g.status){var q=null;d?(q=JSON.parse(g.responseText),q=this.base64ToBlob(q.content,"application/octet-stream")):q=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(q,mxUtils.bind(this,function(p){l(new LocalFile(this,p,D,!0))}),m,e)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(q){try{if(/\.pdf$/i.test(e)){var p=Editor.extractGraphModelFromPdf(q);null!=p&&0<p.length&&l(new LocalFile(this,
-p,D,!0))}else/\.png$/i.test(e)?(p=this.extractGraphModelFromPng(q),null!=p?l(new LocalFile(this,p,D,!0)):l(new LocalFile(this,q,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(q,b)?this.parseFileData(q,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?l(new LocalFile(this,A.responseText,D,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,q,D,!0))}catch(A){null!=m&&m(A)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
+App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(v){this.editor.setStatus(mxUtils.htmlEntities(v.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,e,f,c,l,m,v,x){var E=e;/\.svg$/i.test(E)||(E=E.substring(0,e.lastIndexOf("."))+c);var d=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(d=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var g=new XMLHttpRequest;g.open("GET",b,!0);d||(g.responseType="blob");if(x)for(var k in x)g.setRequestHeader(k,x[k]);g.onload=mxUtils.bind(this,function(){if(200<=
+g.status&&299>=g.status){var q=null;d?(q=JSON.parse(g.responseText),q=this.base64ToBlob(q.content,"application/octet-stream")):q=new Blob([g.response],{type:"application/octet-stream"});this.importVisio(q,mxUtils.bind(this,function(p){l(new LocalFile(this,p,E,!0))}),m,e)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});g.onerror=m;g.send()}else{var n=mxUtils.bind(this,function(q){try{if(/\.pdf$/i.test(e)){var p=Editor.extractGraphModelFromPdf(q);null!=p&&0<p.length&&l(new LocalFile(this,
+p,E,!0))}else/\.png$/i.test(e)?(p=this.extractGraphModelFromPng(q),null!=p?l(new LocalFile(this,p,E,!0)):l(new LocalFile(this,q,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(q,b)?this.parseFileData(q,mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?l(new LocalFile(this,y.responseText,E,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,q,E,!0))}catch(y){null!=m&&m(y)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);d?mxUtils.get(b,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus()){if(null!=l){q=JSON.parse(q.getText());var p=q.content;"base64"===q.encoding&&(p=/\.png$/i.test(e)?"data:image/png;base64,"+p:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+p:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(p):atob(p));n(p)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=x?x(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,y)}};
+function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},x):null!=v?v(b,n,m,f):this.editor.loadUrl(b,n,m,f,null,null,null,x)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(l){this.appIconClicked(l)}));var e=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",e);e();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l=l.getMode(),l==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
@@ -12547,185 +12575,204 @@ function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility=
"visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",
this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')");this.compactMode=!b};
-App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=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(e){e.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(e){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.zIndex=5;f.style.right="36px";f.style.padding="0px";f.style.cursor="default";f.style.minWidth="300px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var c=!1;this.userPanel.innerText="";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.className="geDialogClose";l.style.top="8px";l.style.right="8px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(l);if(null!=this.drive){var m=this.drive.getUsersList();if(0<m.length){var x=mxUtils.bind(this,
-function(D,d){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,d),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();D()}),2E3)):D()});f=mxUtils.bind(this,function(D){var d=document.createElement("tr");d.setAttribute("title","User ID: "+D.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50");
-k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=D.pictureUrl?D.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,D.displayName+(D.isCurrent&&1<m.length?" ("+mxResources.get("default")+
-")":""));null!=D.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,D.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);d.appendChild(g);D.isCurrent||(d.style.cursor="pointer",d.style.opacity="0.3",mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(D);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(q)})));return d});c=!0;l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width="100%";l.style.padding="10px";for(var y=0;y<m.length;y++)l.appendChild(f(m[y]));this.userPanel.appendChild(l);f=document.createElement("div");f.style.textAlign=
-"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";f.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),
-mxUtils.bind(this,function(){var D=this.drive.createAuthWin();D.blur();window.focus();x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0,D)}),mxResources.get("closingFile")+"...")}));l.className="geBtn";l.style.margin="0px";f.appendChild(l);this.userPanel.appendChild(f)}}l=mxUtils.bind(this,function(D,d,g,k){if(null!=D){c&&this.userPanel.appendChild(document.createElement("hr"));
-c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var q=document.createElement("tbody"),p=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=d){var E=document.createElement("img");E.setAttribute("width","40");E.setAttribute("height","40");E.setAttribute("border","0");E.setAttribute("src",d);E.style.marginRight="6px";A.appendChild(E)}p.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,D.displayName);null!=D.email&&(mxUtils.br(A),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,D.email),A.appendChild(d));null!=k&&(D=document.createElement("div"),D.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,k),D.appendChild(d),A.appendChild(D));p.appendChild(A);q.appendChild(p);
-n.appendChild(q);this.userPanel.appendChild(n);D=document.createElement("div");D.style.textAlign="center";D.style.padding="10px";D.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",D.appendChild(g));this.userPanel.appendChild(D)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==DropboxFile){var d=mxUtils.bind(this,function(){this.dropbox.logout();
-window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==OneDriveFile){var d=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
-""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==GitHubFile){var d=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&l(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==GitLabFile){var d=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):
-d()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&l(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var D=this.getCurrentFile();if(null!=D&&D.constructor==TrelloFile){var d=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});D.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.trello.logout()}),mxResources.get("trello"));"min"==
-uiTheme&&(l=this.getCurrentFile(),null!=l&&l.isRealtimeEnabled()&&l.isRealtimeSupported()&&(f=f.cloneNode(!1),f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",y=l.getRealtimeError(),1!=l.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(e)})),mxEvent.addListener(document.body,"click",
-mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&
-(b=this.gitLab.getUser());null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};
+App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(e){e.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(e){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.zIndex=5;f.style.right="36px";f.style.padding="0px";f.style.cursor="default";f.style.minWidth="300px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
+else{var c=!1;this.userPanel.innerText="";f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.className="geDialogClose";f.style.top="8px";f.style.right="8px";mxEvent.addListener(f,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(f);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var m=mxUtils.bind(this,
+function(E,d){var g=this.getCurrentFile();null!=g&&g.constructor==DriveFile?(this.spinner.spin(document.body,d),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();E()}),2E3)):E()});f=mxUtils.bind(this,function(E){var d=document.createElement("tr");d.setAttribute("title","User ID: "+E.id);var g=document.createElement("td");g.setAttribute("valig","middle");g.style.height="59px";g.style.width="66px";var k=document.createElement("img");k.setAttribute("width","50");
+k.setAttribute("height","50");k.setAttribute("border","0");k.setAttribute("src",null!=E.pictureUrl?E.pictureUrl:this.defaultUserPicture);k.style.borderRadius="50%";k.style.margin="4px 8px 0 8px";g.appendChild(k);d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.paddingTop="4px";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,E.displayName+(E.isCurrent&&1<l.length?" ("+mxResources.get("default")+
+")":""));null!=E.email&&(mxUtils.br(g),k=document.createElement("small"),k.style.color="gray",mxUtils.write(k,E.email),g.appendChild(k));k=document.createElement("div");k.style.marginTop="4px";var n=document.createElement("i");mxUtils.write(n,mxResources.get("googleDrive"));k.appendChild(n);g.appendChild(k);d.appendChild(g);E.isCurrent||(d.style.cursor="pointer",d.style.opacity="0.3",mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(E);
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(p){this.handleError(p)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(q)})));return d});c=!0;var v=document.createElement("table");v.style.borderSpacing="0";v.style.fontSize="10pt";v.style.width="100%";v.style.padding="10px";for(var x=0;x<l.length;x++)v.appendChild(f(l[x]));this.userPanel.appendChild(v);f=document.createElement("div");f.style.textAlign=
+"left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";v=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));v.className="geBtn";v.style.float="right";f.appendChild(v);v=mxUtils.button(mxResources.get("addAccount"),
+mxUtils.bind(this,function(){var E=this.drive.createAuthWin();E.blur();window.focus();m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0,E)}),mxResources.get("closingFile")+"...")}));v.className="geBtn";v.style.margin="0px";f.appendChild(v);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(E,d,g,k){if(null!=E){c&&this.userPanel.appendChild(document.createElement("hr"));
+c=!0;var n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";var q=document.createElement("tbody"),p=document.createElement("tr"),y=document.createElement("td");y.setAttribute("valig","top");y.style.width="40px";if(null!=d){var A=document.createElement("img");A.setAttribute("width","40");A.setAttribute("height","40");A.setAttribute("border","0");A.setAttribute("src",d);A.style.marginRight="6px";y.appendChild(A)}p.appendChild(y);
+y=document.createElement("td");y.setAttribute("valign","middle");y.style.whiteSpace="nowrap";y.style.maxWidth="0";y.style.overflow="hidden";y.style.textOverflow="ellipsis";mxUtils.write(y,E.displayName);null!=E.email&&(mxUtils.br(y),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,E.email),y.appendChild(d));null!=k&&(E=document.createElement("div"),E.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,k),E.appendChild(d),y.appendChild(E));p.appendChild(y);q.appendChild(p);
+n.appendChild(q);this.userPanel.appendChild(n);E=document.createElement("div");E.style.textAlign="center";E.style.padding="10px";E.style.whiteSpace="nowrap";null!=g&&(g=mxUtils.button(mxResources.get("signOut"),g),g.className="geBtn",E.appendChild(g));this.userPanel.appendChild(E)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==DropboxFile){var d=mxUtils.bind(this,function(){this.dropbox.logout();
+window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==OneDriveFile){var d=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
+""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==GitHubFile){var d=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&f(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==GitLabFile){var d=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):
+d()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&f(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var E=this.getCurrentFile();if(null!=E&&E.constructor==TrelloFile){var d=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});E.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}else this.trello.logout()}),mxResources.get("trello"));"min"==
+uiTheme&&(v=this.getCurrentFile(),null!=v&&v.isRealtimeEnabled()&&v.isRealtimeSupported()&&(f=document.createElement("div"),f.style.padding="10px",f.style.whiteSpace="nowrap",f.style.borderTop="1px solid rgb(224, 224, 224)",f.style.marginTop="4px",f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",x=v.getRealtimeError(),1!=v.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=x&&null!=x.message?x.message:mxResources.get("disconnected"))),
+this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(e)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(e){mxEvent.isConsumed(e)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?
+b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
+this.userElement=null);this.updateUserElementStyle();this.updateUserElementIcon()};
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var e=mxResources.get("changeUser");if("none"!=b.style.display){var f=this.getCurrentFile();if(null!=f&&f.isRealtimeEnabled()&&f.isRealtimeSupported()){var c=document.createElement("img");c.setAttribute("border","0");c.style.position="absolute";c.style.left="16px";c.style.top="2px";c.style.width="12px";c.style.height="12px";var l=f.getRealtimeError();f=f.getRealtimeState();e+=" ("+mxResources.get("realtimeCollaboration")+
+": ";1==f?(c.src=Editor.syncImage,e+=mxResources.get("online")):(c.src=Editor.syncProblemImage,e=null!=l&&null!=l.message?e+l.message:e+mxResources.get("disconnected"));e+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(c))}b.setAttribute("title",e)}}};
+App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("sketch"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.top="3px",b.style.right=""):(b.className="geItem",b.style.backgroundImage=
+"url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||"1"!=urlParams["live-ui"]?"8px":"30px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";return b};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function f(v,u,G){this.ui=v;this.previousExtFonts=this.extFonts=u;this.prevCustomFonts=this.customFonts=G}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),x=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),y=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),D=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),d="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(v){return"file"!=v}));c.actions.addAction("new...",function(){var v=c.isOffline();if(v||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var u=new NewDialog(c,v,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(u.container,v?350:620,v?70:460,!0,!0,function(I){c.sidebar.hideTooltip();I&&null==c.getCurrentFile()&&c.showSplash()});
-u.init()}else{var G=function(I){return{id:I.id,isExt:!0,url:I.downloadUrl,title:I.title,imgUrl:I.thumbnailLink,changedBy:I.lastModifyingUserName,lastModifiedOn:I.modifiedDate}};v=new TemplatesDialog(c,function(I,F,L){var K=L.libs,H=L.clibs;c.pickFolder(c.mode,function(Q){c.createFile(F,I,null!=K&&0<K.length?K:null,null,function(){c.hideDialog()},null,Q,null,null!=H&&0<H.length?H:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(I,F,L){var K=new Date;K.setDate(K.getDate()-
-7);c.drive.listFiles(null,K,L?!0:!1,function(H){for(var Q=[],U=0;U<H.items.length;U++)Q.push(G(H.items[U]));I(Q)},F)},function(I,F,L,K){c.drive.listFiles(I,null,K?!0:!1,function(H){for(var Q=[],U=0;U<H.items.length;U++)Q.push(G(H.items[U]));F(Q)},L)},function(I,F,L){c.drive.getFile(I.id,function(K){F(K.data)},L)},null,null,!1,!1);c.showDialog(v.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&
-!l.isCellLocked(l.getDefaultParent())){var v=new NewDialog(c,null,!1,function(u){c.hideDialog();if(null!=u){var G=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(u,Math.max(G.x,20),Math.max(G.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(v.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});v.init()}})).isEnabled=m;var g=c.actions.addAction("shareCursor",
+Menus.prototype.init=function(){function f(u,z,F){this.ui=u;this.previousExtFonts=this.extFonts=z;this.prevCustomFonts=this.customFonts=F}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),x=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),E=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),d="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var z=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(z.container,u?350:620,u?70:460,!0,!0,function(J){c.sidebar.hideTooltip();J&&null==c.getCurrentFile()&&c.showSplash()});
+z.init()}else{var F=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};u=new TemplatesDialog(c,function(J,K,H){var N=H.libs,U=H.clibs;c.pickFolder(c.mode,function(Q){c.createFile(K,J,null!=N&&0<N.length?N:null,null,function(){c.hideDialog()},null,Q,null,null!=U&&0<U.length?U:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(J,K,H){var N=new Date;N.setDate(N.getDate()-
+7);c.drive.listFiles(null,N,H?!0:!1,function(U){for(var Q=[],V=0;V<U.items.length;V++)Q.push(F(U.items[V]));J(Q)},K)},function(J,K,H,N){c.drive.listFiles(J,null,N?!0:!1,function(U){for(var Q=[],V=0;V<U.items.length;V++)Q.push(F(U.items[V]));K(Q)},H)},function(J,K,H){c.drive.getFile(J.id,function(N){K(N.data)},H)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&
+!l.isCellLocked(l.getDefaultParent())){var u=new NewDialog(c,null,!1,function(z){c.hideDialog();if(null!=z){var F=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(z,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=m;var g=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShareCursorPosition()});g=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.isShowRemoteCursors()});g=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});g=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});g=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});g=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
-g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,["points","inches","millimeters","meters"],u)})));g=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});g.setEnabled(c.canvasSupported&&9!=document.documentMode);
+g.setToggleAction(!0);g.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,["points","inches","millimeters","meters"],z)})));g=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});g.setEnabled(c.canvasSupported&&9!=document.documentMode);
g.setToggleAction(!0);g.setSelectedCallback(function(){return null!=c.ruler});g=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});g.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;g.setToggleAction(!0);g.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});g=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(v){c.setDarkMode(!Editor.isDarkMode());v=mxSettings.getUi();"atlas"!=v&&"min"!=v&&"sketch"!=v&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.addAction("properties...",function(){var v=new FilePropertiesDialog(c);c.showDialog(v.container,320,120,!0,!0);v.init()}).isEnabled=
-m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==this.freehandWindow){var v=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,v?120:84,v)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();this.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",
-new Action(mxResources.get("formatXml")+"...",function(){var v=document.createElement("div");v.style.whiteSpace="nowrap";var u=null==c.pages||1>=c.pages.length,G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatXml"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(G);var I=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),F=c.addCheckbox(v,mxResources.get("compressed"),!0),L=c.addCheckbox(v,mxResources.get("allPages"),
-!u,u);L.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?L.setAttribute("disabled","disabled"):L.removeAttribute("disabled")});v=new CustomDialog(c,v,mxUtils.bind(this,function(){c.downloadFile("xml",!F.checked,null,!I.checked,u||!L.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,
-null,function(v,u,G,I,F,L,K,H,Q){K=[];Q&&K.push("tags=%7B%7D");v=new EmbedDialog(c,c.createLink(v,u,G,I,F,L,null,!0,K));c.showDialog(v.container,450,240,!0,!0);v.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,v,function(u,G,I,F,L,K,H,Q,U,T,V){c.createHtml(u,G,I,F,L,K,H,Q,U,
-T,V,mxUtils.bind(this,function(W,t){var C=c.getBaseFilename(H);W='\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(C)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+W+"\n"+t+"\n</body>\n</html>";c.saveData(C+(".drawio"==C.substring(C.lenth-7)?"":".drawio")+".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!c.isOffline()&&!c.printPdfExport){var v=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatPdf"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=function(){H!=this&&this.checked?(t.removeAttribute("disabled"),t.checked=!l.pageVisible):(t.setAttribute("disabled","disabled"),t.checked=!1)};G=200;var F=1,L=null;if(c.pdfPageExport&&
-!v){var K=function(){V.value=Math.max(1,Math.min(F,Math.max(parseInt(V.value),parseInt(U.value))));U.value=Math.max(1,Math.min(F,Math.min(parseInt(V.value),parseInt(U.value))))},H=c.addRadiobox(u,"pages",mxResources.get("allPages"),!0),Q=c.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("type","number");U.setAttribute("min","1");U.style.width="50px";u.appendChild(U);var T=
-document.createElement("span");mxUtils.write(T,mxResources.get("to"));u.appendChild(T);var V=U.cloneNode(!0);u.appendChild(V);mxEvent.addListener(U,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"focus",function(){Q.checked=!0});mxEvent.addListener(U,"change",K);mxEvent.addListener(V,"change",K);if(null!=c.pages&&(F=c.pages.length,null!=c.currentPage))for(K=0;K<c.pages.length;K++)if(c.currentPage==c.pages[K]){L=K+1;U.value=L;V.value=L;break}U.setAttribute("max",F);V.setAttribute("max",F);
-mxUtils.br(u);var W=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!1,!0),C=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(H,"change",I);mxEvent.addListener(Q,"change",I);mxEvent.addListener(W,"change",I);G+=64}else W=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),t=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),C=c.addCheckbox(u,mxResources.get("grid"),
-!1,!1),c.pdfPageExport||mxEvent.addListener(W,"change",I);I=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var N=null,R=null;if(EditorUi.isElectronApp||I)R=c.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),G+=30;I&&(N=c.addCheckbox(u,mxResources.get("transparentBackground"),!1),G+=30);u=new CustomDialog(c,u,mxUtils.bind(this,function(){var O=null;if(!v){O=parseInt(U.value);var P=parseInt(V.value);O=H.checked||O==L&&P==L?null:{from:Math.max(0,
-Math.min(F-1,O-1)),to:Math.max(0,Math.min(F-1,P-1))}}c.downloadFile("pdf",null,null,!W.checked,v?!0:!H.checked&&null==O,!t.checked,null!=N&&N.checked,null,null,C.checked,null!=R&&R.checked,O)}),null,mxResources.get("export"));c.showDialog(u.container,300,G,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});
-c.actions.addAction("close",function(){function v(){null!=u&&u.removeDraft();c.fileLoaded(null)}var u=c.getCurrentFile();null!=u&&u.isModified()?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var v=l.getSelectionCell(),u=l.view.getState(v);null!=u&&null!=u.shape&&null!=u.shape.stencil&&(v=new EditShapeDialog(c,v,mxResources.get("editShape")+
-":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(v,u){c.spinner.stop();v=new RevisionDialog(c,v,u);c.showDialog(v.container,640,480,!0,!0);v.init()}),mxUtils.bind(this,function(v){c.handleError(v)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",
-function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");g=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(g.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var v=c.getCurrentFile();null!=v&&(window.drawdata=c.getFileData(),v=null!=v.getTitle()?v.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
-(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(v),null,!0))});"undefined"!==typeof MathJax&&(g=c.actions.addAction("mathematicalTypesetting",function(){var v=new ChangePageSetup(c);v.ignoreColor=!0;v.ignoreImage=!0;v.mathEnabled=!c.isMathEnabled();l.model.execute(v)}),g.setToggleAction(!0),g.setSelectedCallback(function(){return c.isMathEnabled()}),g.isEnabled=m);isLocalStorage&&(g=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var k=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var v=l.getSelectionCells(),u=[],G=0;G<v.length;G++)l.getModel().isVertex(v[G])&&u.push(v[G]);0<u.length&&(v=new EditGeometryDialog(c,u),c.showDialog(v.container,
-200,270,!0,!0),v.init())},null,null,Editor.ctrlKey+"+Shift+M");var n=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(n=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=n&&l.pasteStyle(n,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var v=
-new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(v.container,400,170,!0,!0);v.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W,t,C){Q=parseInt(v);!isNaN(Q)&&0<Q&&(C?c.downloadFile("remoteSvg",null,null,G,null,H,u,v,K,null,F):c.exportSvg(Q/100,u,G,
-I,F,L,K,!H,!1,U,V,W,t))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,u,G,I,F,K,!H,!1,null,T,null,V,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,F){c.downloadFile(u?"xmlpng":"png",null,null,v,null,null,G,I,F)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(v,u,G,I,F,L,K,H,Q,U,T,V,W){v=parseInt(v);!isNaN(v)&&0<v&&c.exportImage(v/100,!1,
-G,I,!1,K,!H,!1,"jpeg",T,null,V,W)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(v,u,G,I,F){c.downloadFile("jpeg",null,null,v,null,null,null,I,F)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var v=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),u=mxUtils.getXml(0==v.length?c.editor.getGraphXml():l.encodeCells(v));c.copyImage(v,u)}));g.visible=
+Editor.inlineFullscreen:null!=document.fullscreenElement});g=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(u){c.setDarkMode(!Editor.isDarkMode());u=mxSettings.getUi();"atlas"!=u&&"min"!=u&&"sketch"!=u&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return Editor.isDarkMode()});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=
+m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==c.freehandWindow){var u=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",
+new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=null==c.pages||1>=c.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(F);var J=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),K=c.addCheckbox(u,mxResources.get("compressed"),!0),H=c.addCheckbox(u,mxResources.get("allPages"),
+!z,z);H.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!K.checked,null,!J.checked,z||!H.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,
+null,function(u,z,F,J,K,H,N,U,Q){N=[];Q&&N.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,z,F,J,K,H,null,!0,N));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(z,F,J,K,H,N,U,Q,V,W,t){c.createHtml(z,F,J,K,H,N,U,Q,V,
+W,t,mxUtils.bind(this,function(D,L){var T=c.getBaseFilename(U);D='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(T)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+D+"\n"+L+"\n</body>\n</html>";c.saveData(T+(".drawio"==T.substring(T.lenth-7)?"":".drawio")+".html","html",D,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
+!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,z=document.createElement("div");z.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(F);var J=function(){U!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!l.pageVisible):(L.setAttribute("disabled","disabled"),L.checked=!1)};F=200;var K=1,H=null;if(c.pdfPageExport&&
+!u){var N=function(){t.value=Math.max(1,Math.min(K,Math.max(parseInt(t.value),parseInt(V.value))));V.value=Math.max(1,Math.min(K,Math.min(parseInt(t.value),parseInt(V.value))))},U=c.addRadiobox(z,"pages",mxResources.get("allPages"),!0),Q=c.addRadiobox(z,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");V.setAttribute("min","1");V.style.width="50px";z.appendChild(V);var W=
+document.createElement("span");mxUtils.write(W,mxResources.get("to"));z.appendChild(W);var t=V.cloneNode(!0);z.appendChild(t);mxEvent.addListener(V,"focus",function(){Q.checked=!0});mxEvent.addListener(t,"focus",function(){Q.checked=!0});mxEvent.addListener(V,"change",N);mxEvent.addListener(t,"change",N);if(null!=c.pages&&(K=c.pages.length,null!=c.currentPage))for(N=0;N<c.pages.length;N++)if(c.currentPage==c.pages[N]){H=N+1;V.value=H;t.value=H;break}V.setAttribute("max",K);t.setAttribute("max",K);
+mxUtils.br(z);var D=c.addRadiobox(z,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),L=c.addCheckbox(z,mxResources.get("crop"),!1,!0),T=c.addCheckbox(z,mxResources.get("grid"),!1,!1);mxEvent.addListener(U,"change",J);mxEvent.addListener(Q,"change",J);mxEvent.addListener(D,"change",J);F+=64}else D=c.addCheckbox(z,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),L=c.addCheckbox(z,mxResources.get("crop"),!l.pageVisible||!c.pdfPageExport,!c.pdfPageExport),T=c.addCheckbox(z,mxResources.get("grid"),
+!1,!1),c.pdfPageExport||mxEvent.addListener(D,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var O=null,P=null;if(EditorUi.isElectronApp||J)P=c.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;J&&(O=c.addCheckbox(z,mxResources.get("transparentBackground"),!1),F+=30);z=new CustomDialog(c,z,mxUtils.bind(this,function(){var R=null;if(!u){R=parseInt(V.value);var X=parseInt(t.value);R=U.checked||R==H&&X==H?null:{from:Math.max(0,
+Math.min(K-1,R-1)),to:Math.max(0,Math.min(K-1,X-1))}}c.downloadFile("pdf",null,null,!D.checked,u?!0:!U.checked&&null==R,!L.checked,null!=O&&O.checked,null,null,T.checked,null!=P&&P.checked,R)}),null,mxResources.get("export"));c.showDialog(z.container,300,F,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});
+c.actions.addAction("close",function(){function u(){null!=z&&z.removeDraft();c.fileLoaded(null)}var z=c.getCurrentFile();null!=z&&z.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var u=l.getSelectionCell(),z=l.view.getState(u);null!=z&&null!=z.shape&&null!=z.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+
+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,z){c.spinner.stop();u=new RevisionDialog(c,u,z);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",
+function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");g=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(g.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(u),null,!0))});"undefined"!==typeof MathJax&&(g=c.actions.addAction("mathematicalTypesetting",function(){var u=new ChangePageSetup(c);u.ignoreColor=!0;u.ignoreImage=!0;u.mathEnabled=!c.isMathEnabled();l.model.execute(u)}),g.setToggleAction(!0),g.setSelectedCallback(function(){return c.isMathEnabled()}),g.isEnabled=m);isLocalStorage&&(g=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
+mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var k=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return k.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=l.getSelectionCells(),z=[],F=0;F<u.length;F++)l.getModel().isVertex(u[F])&&z.push(u[F]);0<z.length&&(u=new EditGeometryDialog(c,z),c.showDialog(u.container,
+200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var n=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(n=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=n&&l.pasteStyle(n,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=
+new BackgroundImageDialog(c,function(z){c.setBackgroundImage(z)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D,L,T){Q=parseInt(u);!isNaN(Q)&&0<Q&&(T?c.downloadFile("remoteSvg",null,null,F,null,U,z,u,N,null,K):c.exportSvg(Q/100,z,F,
+J,K,H,N,!U,!1,V,t,D,L))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,z,F,J,K,N,!U,!1,null,W,null,t,D)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,z,F,J,K){c.downloadFile(z?"xmlpng":"png",null,null,u,null,null,F,J,K)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,z,F,J,K,H,N,U,Q,V,W,t,D){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,
+F,J,!1,N,!U,!1,"jpeg",W,null,t,D)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,z,F,J,K){c.downloadFile("jpeg",null,null,u,null,null,null,J,K)}),!0,!0)}));g=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),z=mxUtils.getXml(0==u.length?c.editor.getGraphXml():l.encodeCells(u));c.copyImage(u,z)}));g.visible=
Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;g=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));
c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var v=new FeedbackDialog(c);c.showDialog(v.container,610,360,!0,!1);v.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,
+c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,
212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));g=c.actions.addAction("findReplace",mxUtils.bind(this,function(v,u){var G=(v=l.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=G+"Window";if(null==this[u]){var I=v?"min"==uiTheme?330:300:240;this[u]=new FindWindow(c,document.body.offsetWidth-(I+20),100,I,v?"min"==uiTheme?304:288:170,v);this[u].window.addListener("show",function(){c.fireEvent(new mxEventObject(G))});this[u].window.addListener("hide",function(){c.fireEvent(new mxEventObject(G))});
-this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){var v=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[v]&&this[v].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var v=null==c.pages||1>=c.pages.length;if(v)c.exportVisio();else{var u=document.createElement("div");u.style.whiteSpace=
-"nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("formatVsdx"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(G);var I=c.addCheckbox(u,mxResources.get("allPages"),!v,v);I.style.marginBottom="16px";v=new CustomDialog(c,u,mxUtils.bind(this,function(){c.exportVisio(!I.checked)}),null,mxResources.get("export"));c.showDialog(v.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
-function(){var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginRight="4px";v.checked=mxSettings.getShowStartScreen();v.defaultChecked=v.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var u=document.createElement("span");u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-4px";u.appendChild(v);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,"click",function(F){mxEvent.getSource(F)!=v&&
-(v.checked=!v.checked)});header=u}var G=localStorage.getItem(Editor.configurationKey);u=[[mxResources.get("reset"),function(F,L){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(F)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(K){c.handleError(K)}})},"Shift+Click to Reset Settings"]];var I=c.actions.get("plugins");
-null!=I&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),I.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(F,L){if(0<L.value.length)try{var K=JSON.parse(L.value),H=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),Q=new EmbedDialog(c,H);c.showDialog(Q.container,450,240,!0);Q.init()}catch(U){c.handleError(U)}else c.handleError({message:mxResources.get("invalidInput")})}]);u=new TextareaDialog(c,mxResources.get("configuration")+
-":",null!=G?JSON.stringify(JSON.parse(G),null,2):"",function(F){if(null!=F)try{if(null!=v.parentNode&&(mxSettings.setShowStartScreen(v.checked),mxSettings.save()),F==G)c.hideDialog();else{if(0<F.length){var L=JSON.parse(F);localStorage.setItem(Editor.configurationKey,JSON.stringify(L))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(K){c.handleError(K)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-u,v.parentNode);c.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(v,u){var G=mxUtils.bind(this,function(F){var L=""==F?mxResources.get("automatic"):mxLanguageMap[F],K=null;""!=L&&(K=v.addItem(L,null,mxUtils.bind(this,function(){mxSettings.setLanguage(F);mxSettings.save();mxClient.language=F;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
-u),(F==mxLanguage||""==F&&null==mxLanguage)&&v.addCheckmark(K,Editor.checkmarkImage));return K});G("");v.addSeparator(u);for(var I in mxLanguageMap)G(I)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(v){var u=q.apply(this,arguments);if(null!=u&&"1"!=urlParams.embed&&("atlas"!=uiTheme||"1"==urlParams["live-ui"])){var G=this.get("1"==urlParams["live-ui"]?"theme":"language");if(null!=G){G=u.addMenu("",G.funct);G.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
-"preferences":"language"));G.className="geAdaptiveAsset";G.style.boxSizing="border-box";G.style.width="19px";G.style.height="19px";G.style.paddingTop="2px";G.style.paddingLeft="4px";G.style.zIndex="1";G.style.position="absolute";G.style.display="block";G.style.cursor="pointer";G.style.right="20px";G.style.top="min"==uiTheme?"2px":"0px";var I=document.createElement("div");I.className="geToolbarButton";I.style.backgroundImage="url("+Editor.globeImage+")";I.style.backgroundPosition="center center";I.style.backgroundRepeat=
-"no-repeat";I.style.backgroundSize="100% 100%";I.style.filter="none";I.style.position="absolute";I.style.height="100%";I.style.width="100%";I.style.marginTop="atlas"==uiTheme?"8px":"2px";I.style.marginLeft="2px";I.style.zIndex="1";G.appendChild(I);"1"!=urlParams["live-ui"]&&mxUtils.setOpacity(G,70);"1"==urlParams.winCtrls&&(G.style.right="95px",G.style.width="19px",G.style.height="19px",G.style.webkitAppRegion="no-drag",I.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(G.style.filter="invert(100%)",
-G.style.opacity="0.85");document.body.appendChild(G);u.langIcon=G;if("1"==urlParams["live-ui"]){var F=mxUtils.bind(this,function(){I.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"});this.editorUi.addListener("darkModeChanged",F);F()}this.editorUi.switchThemeElt=G}}return u}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
-c.actions.addAction("runLayout",function(){var v=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(u){if(0<u.length)try{var G=JSON.parse(u);c.executeLayouts(l.createLayouts(G));c.customLayoutConfig=G;c.hideDialog()}catch(I){c.handleError(I)}},null,null,null,null,function(u,G){var I=mxUtils.button(mxResources.get("copy"),function(){try{var F=G.value;G.value=JSON.stringify(JSON.parse(F));G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():
-document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));G.value=F}catch(L){c.handleError(L)}});I.setAttribute("title","copy");I.className="geBtn";u.appendChild(I)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(v.container,620,460,!0,!0);v.init()});g=this.get("layout");var p=g.funct;g.funct=function(v,u){p.apply(this,arguments);v.addItem(mxResources.get("orgChart"),null,function(){var G=null,I=20,F=20,L=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=G){var t=c.editor.graph,C=new mxOrgChartLayout(t,G,I,F),N=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(N=t.getSelectionCell());C.execute(N)}},K=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");K.appendChild(H);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";
-H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<H.length;U++){var T=document.createElement("option");mxUtils.write(T,H[U]);T.value=U;2==U&&T.setAttribute("selected","selected");Q.appendChild(T)}mxEvent.addListener(Q,"change",function(){G=Q.value});K.appendChild(Q);H=document.createElement("div");H.style.marginTop=
-"6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("parentChildSpacing")+": ");K.appendChild(H);var V=document.createElement("input");V.type="number";V.value=I;V.style.width="200px";V.style.boxSizing="border-box";K.appendChild(V);mxEvent.addListener(V,"change",function(){I=V.value});H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("siblingSpacing")+": ");K.appendChild(H);
-var W=document.createElement("input");W.type="number";W.value=F;W.style.width="200px";W.style.boxSizing="border-box";K.appendChild(W);mxEvent.addListener(W,"change",function(){F=W.value});K=new CustomDialog(c,K,function(){null==G&&(G=2);c.loadOrgChartLayouts(L)});c.showDialog(K.container,355,140,!0,!0)},u,null,m());v.addSeparator(u);v.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var G=new mxParallelEdgeLayout(l);G.checkOverlap=!0;c.prompt(mxResources.get("spacing"),G.spacing,
-mxUtils.bind(this,function(I){G.spacing=I;c.executeLayout(function(){G.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),u);v.addSeparator(u);c.menus.addMenuItem(v,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(v,u){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(v,["about"],u);else{var G=v.addItem("Search:",null,null,u,null,null,!1);G.style.backgroundColor=Editor.isDarkMode()?"#505759":
-"whiteSmoke";G.style.cursor="default";var I=document.createElement("input");I.setAttribute("type","text");I.setAttribute("size","25");I.style.marginLeft="8px";mxEvent.addListener(I,"keydown",mxUtils.bind(this,function(F){var L=mxUtils.trim(I.value);13==F.keyCode&&0<L.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(L)),I.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
-label:L}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==F.keyCode&&(I.value="")}));G.firstChild.nextSibling.appendChild(I);mxEvent.addGestureListeners(I,function(F){document.activeElement!=I&&I.focus();mxEvent.consume(F)},function(F){mxEvent.consume(F)},function(F){mxEvent.consume(F)});window.setTimeout(function(){I.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",
-function(){c.checkForUpdates()}),this.addMenuItems(v,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(v,["check4Updates"],u),this.addMenuItems(v,["openDevTools","-","about"],u)):this.addMenuItems(v,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(v.addSeparator(u),this.addSubmenu("testDevelop",v,u))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var v=
-prompt("Language Code",Graph.diagramLanguage||"");null!=v&&(Graph.diagramLanguage=0<v.length?v:null,l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
-mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var v=l.cloneCells(l.getSelectionCells()),u=l.getBoundingBoxFromGeometry(v);v=l.moveCells(v,-u.x,-u.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(v)))+
-"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var v=l.getGraphBounds(),u=l.view.translate,G=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",v.x/G-u.x,v.y/G-u.y,v.width/G,v.height/G,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var v=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";v=new TextareaDialog(c,"Paste Data:",v,function(u){if(0<u.length)try{var G=
-function(H){function Q(P){if(null==O[P]){if(O[P]=!0,null!=V[P]){for(;0<V[P].length;){var S=V[P].pop();Q(S)}delete V[P]}}else mxLog.debug(U+": Visited: "+P)}var U=H.parentNode.id,T=H.childNodes;H={};for(var V={},W=null,t={},C=0;C<T.length;C++){var N=T[C];if(null!=N.id&&0<N.id.length)if(null==H[N.id]){H[N.id]=N.id;var R=N.getAttribute("parent");null==R?null!=W?mxLog.debug(U+": Multiple roots: "+N.id):W=N.id:(null==V[R]&&(V[R]=[]),V[R].push(N.id))}else t[N.id]=N.id}T=Object.keys(t);0<T.length?(T=U+": "+
-T.length+" Duplicates: "+T.join(", "),mxLog.debug(T+" (see console)")):mxLog.debug(U+": Checked");var O={};null==W?mxLog.debug(U+": No root"):(Q(W),Object.keys(O).length!=Object.keys(H).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",V)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var I=mxUtils.parseXml(u),F=c.getPagesForNode(I.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var L=
-c.getHashValueForPages(F);mxLog.debug("Checksum: ",L)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum");var K=I.getElementsByTagName("root");for(u=0;u<K.length;u++)G(K[u]);mxLog.show()}catch(H){c.handleError(H),null!=window.console&&console.error(H)}});c.showDialog(v.container,620,460,!0,!0);v.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var v=new TextareaDialog(c,"Diff/Sync:","",function(u){var G=c.getCurrentFile();
-if(0<u.length&&null!=G)try{var I=JSON.parse(u);G.patch([I],null,!0);c.hideDialog()}catch(F){c.handleError(F)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,G){A=c.getPagesForXml(c.getFileData(!0));v.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(u,G){try{v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(I){c.handleError(I)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),v.textarea.value=
-"Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):v.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2);c.showDialog(v.container,620,460,!0,!0);v.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var v=c.getCurrentFile();console.log("editorUi",c,"file",v);if(null!=v&&v.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(v.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(v.theirPages));
-console.log("diff ownPages/theirPages",c.diffPages(v.ownPages,v.theirPages));var u=v.getShadowPages();null!=u&&(console.log("Checksum shadowPages",c.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",c.diffPages(u,v.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(v.ownPages,u)),console.log("diff theirPages/shadowPages",c.diffPages(v.theirPages,u)));null!=v.sync&&null!=v.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(v.sync.snapshot)),console.log("diff ownPages/snapshot",
-c.diffPages(v.ownPages,v.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(v.theirPages,v.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(v.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(v.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(v.theirPages,c.pages)))}null!=v&&console.log("Shadow pages",[c.getXmlForPages(v.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",
-c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var v=c.getCurrentFile();null!=v&&v.isRealtime()&&null!=v.shadowPages&&(console.log("patching actualPages to shadowPages",v.patch([c.diffPages(v.shadowPages,c.pages)])),v.ownPages=c.clonePages(c.pages),v.theirPages=c.clonePages(c.pages),v.shadowPages=c.clonePages(c.pages),null!=v.sync&&(v.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){l.model.beginUpdate();try{var v=l.model.cells,u=0,G=[],I=[],F;for(F in v){var L=v[F],K=l.getCurrentCellStyle(L)[mxConstants.STYLE_IMAGE];null!=K&&"data:"==K.substring(0,5)&&(null==G[K]&&(G[K]=(G[K]||0)+1,u++),I.push(L))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,I);console.log("Removed",u,"image(s) from",I.length,"cell(s): ",[I,G])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var v=new mxImageExport,u=l.getGraphBounds(),G=l.view.scale,I=mxUtils.createXmlDocument(),F=I.createElement("output");I.appendChild(F);I=new mxXmlCanvas2D(F);I.translate(Math.floor((1-u.x)/G),Math.floor((1-u.y)/G));I.scale(1/G);var L=0,K=I.save;I.save=function(){L++;K.apply(this,arguments)};var H=I.restore;I.restore=function(){L--;H.apply(this,arguments)};var Q=v.drawShape;v.drawShape=function(U){mxLog.debug("entering shape",U,L);Q.apply(this,arguments);mxLog.debug("leaving shape",
-U,L)};v.drawState(l.getView().getState(l.model.root),I);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",L)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
-u)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(v){l.isEnabled()&&(v=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),v.vertex=!0,v=new EditShapeDialog(c,
-v,mxResources.get("editShape")+":",630,400),c.showDialog(v.container,640,480,!0,!1),v.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",v,function(u,G,I,F,L,K,H,Q,U,T,V){c.createHtml(u,G,I,F,L,K,H,Q,U,T,V,mxUtils.bind(this,function(W,
-t){var C=new EmbedDialog(c,W+"\n"+t,null,null,function(){var N=window.open(),R=N.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(W);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&R.writeln(t);R.writeln("</body>");R.writeln("</html>");R.close();if(!O){var P=N.document.createElement("div");
-P.marginLeft="26px";P.marginTop="26px";mxUtils.write(P,mxResources.get("updatingDocument"));O=N.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";P.appendChild(O);N.document.body.insertBefore(P,N.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(t)[1];R.body.appendChild(S);P.parentNode.removeChild(P)},
-20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(C.container,450,240,!0,!0);C.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var v=c.getCurrentFile();null!=v&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();null!=u?(u=new EmbedDialog(c,'<img src="'+(v.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+v.getId())+'"/>'),c.showDialog(u.container,
-450,240,!0,!0),u.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,F,L){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(v,u,G,I,F,L,function(K){c.spinner.stop();K=new EmbedDialog(c,K);c.showDialog(K.container,450,240,!0,!0);K.init()},function(K){c.spinner.stop();c.handleError(K)})},mxResources.get("image"),mxResources.get("retina"),
-c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(v,u,G,I,F,L){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(v,u,G,I,F,L,function(K){c.spinner.stop();K=new EmbedDialog(c,K);c.showDialog(K.container,450,240,!0,!0);K.init()},function(K){c.spinner.stop();c.handleError(K)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var v=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(v.height/l.view.scale)+2,function(u,G,I,F,L,K,H,Q,U){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(T){c.spinner.stop();var V=[];U&&V.push("tags=%7B%7D");T=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+H+";height:"+Q+';" src="'+c.createLink(u,G,I,F,L,K,T,null,
-V)+'"></iframe>');c.showDialog(T.container,450,240,!0,!0);T.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.textAlign="center";v.style.width="100%";v.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));
-v.appendChild(u);mxEvent.addListener(u,"click",function(G){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(G)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(G,I,F,L,K,H,Q,U,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=["border=0"];T&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(G,I,F,L,K,H,V,null,W,!0));
-c.showDialog(V.container,450,240,!0,!0);V.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",v)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(v,u,G,I,F,L,K,H,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(U){c.spinner.stop();var T=[];Q&&T.push("tags=%7B%7D");U=new EmbedDialog(c,c.createLink(v,u,G,I,F,L,U,null,T));c.showDialog(U.container,450,240,
-!0,!0);U.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(v){c.spinner.stop();v=new GoogleSitesDialog(c,v);c.showDialog(v.container,420,256,!0,!0);v.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});g=c.actions.addAction("search",function(){var v=c.sidebar.isEntryVisible("search");
-c.sidebar.showPalette("search",!v);isLocalStorage&&(mxSettings.settings.search=!v,mxSettings.save())});g.label=mxResources.get("searchShapes");g.setToggleAction(!0);g.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(v){l.isEditing()&&l.stopEditing();var u="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var G=c.createLoadMessage("save");
-G.xml=u;v&&(G.exit=!0);u=JSON.stringify(G)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));v=c.getCurrentFile();null==v||v.constructor==EmbedFile||v.constructor==LocalFile&&null==v.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
-c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var v=function(){c.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(v,u){c.isExportToCanvas()?(this.addMenuItems(v,
-["exportPng"],u),c.jpgSupported&&this.addMenuItems(v,["exportJpg"],u)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPng","exportJpg"],u);this.addMenuItems(v,["exportSvg","-"],u);c.isOffline()||c.printPdfExport?this.addMenuItems(v,["exportPdf"],u):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(v,["exportVsdx"],u);this.addMenuItems(v,["-",
-"exportHtml","exportXml","exportUrl"],u);c.isOffline()||(v.addSeparator(u),this.addMenuItem(v,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(v,u){function G(L){L.pickFile(function(K){c.spinner.spin(document.body,mxResources.get("loading"))&&L.getFile(K,function(H){var Q="data:image/"==H.getData().substring(0,11)?F(H.getTitle()):"text/xml";/\.svg$/i.test(H.getTitle())&&!c.editor.isDataSvg(H.getData())&&(H.setData(Editor.createSvgDataUri(H.getData())),
-Q="image/svg+xml");I(H.getData(),Q,H.getTitle())},function(H){c.handleError(H,null!=H?mxResources.get("errorLoadingFile"):null)},L==c.drive)},!0)}var I=mxUtils.bind(this,function(L,K,H){var Q=l.view,U=l.getGraphBounds(),T=l.snap(Math.ceil(Math.max(0,U.x/Q.scale-Q.translate.x)+4*l.gridSize)),V=l.snap(Math.ceil(Math.max(0,(U.y+U.height)/Q.scale-Q.translate.y)+4*l.gridSize));"data:image/"==L.substring(0,11)?c.loadImage(L,mxUtils.bind(this,function(W){var t=!0,C=mxUtils.bind(this,function(){c.resizeImage(W,
-L,mxUtils.bind(this,function(N,R,O){N=t?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/O)):1;c.importFile(L,K,T,V,Math.round(R*N),Math.round(O*N),H,function(P){c.spinner.stop();l.setSelectionCells(P);l.scrollCellToVisible(l.getSelectionCell())})}),t)});L.length>c.resampleThreshold?c.confirmImageResize(function(N){t=N;C()}):C()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(L,K,T,V,0,0,H,function(W){c.spinner.stop();l.setSelectionCells(W);
-l.scrollCellToVisible(l.getSelectionCell())})}),F=mxUtils.bind(this,function(L){var K="text/xml";/\.png$/i.test(L)?K="image/png":/\.jpe?g$/i.test(L)?K="image/jpg":/\.gif$/i.test(L)?K="image/gif":/\.pdf$/i.test(L)&&(K="application/pdf");return K});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){G(c.drive)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){G(c.oneDrive)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){G(c.dropbox)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){G(c.gitHub)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){G(c.gitLab)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){G(c.trello)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&
-v.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var L=new FilenameDialog(c,"",mxResources.get("import"),function(K){if(null!=K&&0<K.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var H=/(\.png)($|\?)/i.test(K)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(K),function(Q){I(Q,H,K)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==H)}},mxResources.get("url"));c.showDialog(L.container,300,80,!0,!0);L.init()},u))}))).isEnabled=m;this.put("theme",new Menu(mxUtils.bind(this,function(v,u){var G="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(v,["toggleDarkMode"],u);v.addSeparator(u);
-var I=v.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("")},u);("kennedy"==G||"dark"==G||"atlas"!=G&&"min"!=G&&"sketch"!=G)&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},u);"sketch"==G&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},u);"min"==G&&v.addCheckmark(I,Editor.checkmarkImage);I=v.addItem(mxResources.get("atlas"),null,
-function(){c.setCurrentTheme("atlas")},u);"atlas"==G&&v.addCheckmark(I,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var v=this.editorUi.getCurrentFile();if(null!=v)if(v.constructor==LocalFile&&null!=v.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(G,I){v.invalidFileHandle=null;v.fileHandle=G;v.title=I.name;v.desc=I;c.save(I.name)}),null,c.createFileSystemOptions(v.getTitle()));else{var u=null!=v.getTitle()?v.getTitle():this.editorUi.defaultFilename;
-u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(G){null!=G&&0<G.length&&null!=v&&G!=v.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&v.rename(G,mxUtils.bind(this,function(I){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(I){this.editorUi.handleError(I,null!=I?mxResources.get("errorRenamingFile"):null)}))}),v.constructor==DriveFile||v.constructor==StorageFile?mxResources.get("diagramName"):null,function(G){if(null!=
-G&&0<G.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));g.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};g.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var v=c.getCurrentFile();if(null!=v){var u=c.getCopyFilename(v);v.constructor==DriveFile?(u=new CreateDialog(c,
-u,mxUtils.bind(this,function(G,I){"_blank"==I?c.editor.editAsNew(c.getFileData(),G):("download"==I&&(I=App.MODE_GOOGLE),null!=G&&0<G.length&&(I==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&v.saveAs(G,mxUtils.bind(this,function(F){v.desc=F;v.save(!1,mxUtils.bind(this,function(){c.spinner.stop();v.setModified(!1);v.addAllSavedStatus()}),mxUtils.bind(this,function(L){c.handleError(L)}))}),mxUtils.bind(this,function(F){c.handleError(F)})):c.createFile(G,c.getFileData(!0),
-null,I)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(u.container,420,380,!0,!0),u.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(v,u){c.appIconClicked(u)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var v=c.getCurrentFile();
-if(v.getMode()==App.MODE_GOOGLE||v.getMode()==App.MODE_ONEDRIVE){var u=!1;if(v.getMode()==App.MODE_GOOGLE&&null!=v.desc.parents)for(var G=0;G<v.desc.parents.length;G++)if(v.desc.parents[G].isRoot){u=!0;break}c.pickFolder(v.getMode(),mxUtils.bind(this,function(I){c.spinner.spin(document.body,mxResources.get("moving"))&&v.move(I,mxUtils.bind(this,function(F){c.spinner.stop()}),mxUtils.bind(this,function(F){c.handleError(F)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(v,
-u){this.addMenuItems(v,["publishLink"],u)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var v=c.getCurrentFile();null!=v&&v.share()}catch(u){c.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(v,u){var G=c.getCurrentFile();null==G||G.getMode()!=App.MODE_GOOGLE&&G.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(G.getTitle())||
-this.addMenuItems(v,["liveImage","-"],u);this.addMenuItems(v,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||c.isOffline()||this.addMenuItems(v,["embedIframe"],u);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(v,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));c.addInsertItem=function(v,u,G,I){("plantUml"!=I||EditorUi.enablePlantUml&&!c.isOffline())&&v.addItem(G,null,mxUtils.bind(this,function(){if("fromText"==I||"formatSql"==I||
-"plantUml"==I||"mermaid"==I){var F=new ParseDialog(c,G,I);c.showDialog(F.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else F=new CreateGraphDialog(c,G,I),c.showDialog(F.container,620,420,!0,!1);F.init()}),u,null,m())};var E=function(v){l.getModel().beginUpdate();try{v=l.addCell(v),l.fireEvent(new mxEventObject("cellsInserted","cells",[v]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(v);l.setSelectionCell(v);l.container.focus();l.editAfterInsert&&l.startEditing(v);window.setTimeout(function(){null!=
-c.hoverIcons&&c.hoverIcons.update(l.view.getState(v))},0);return v},z=function(v,u,G,I,F){v=new mxCell(v,new mxGeometry(0,0,u,G),I);v.vertex=!0;null==F&&(F=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([v],!0)));v.geometry.x=F.x;v.geometry.y=F.y;return E(v)};c.actions.put("insertText",new Action(mxResources.get("text"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",
-null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(v){l.isEnabled()&&
-!l.isCellLocked(l.getDefaultParent())&&z("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
-z("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(v){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(v){if(l.isEnabled()&&
-!l.isCellLocked(l.getDefaultParent())){var u=l.defaultEdgeLength;v=null==v||mxEvent.isControlDown(v)||mxEvent.isMetaDown(v)?null:l.getInsertPoint();null==v&&(v=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([G],!0)));var G=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");G.geometry.setTerminalPoint(v,!0);G.geometry.setTerminalPoint(new mxPoint(v.x+G.geometry.width,v.y),!1);G.geometry.points=[];G.geometry.relative=!0;G.edge=!0;E(G)}},null,null,"C")).isEnabled=
-m;c.addInsertMenuItems=mxUtils.bind(this,function(v,u,G){for(var I=0;I<G.length;I++)"-"==G[I]?v.addSeparator(u):c.addInsertItem(v,u,mxResources.get(G[I])+"...",G[I])});this.put("insert",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(v,["insertTemplate"],u);v.addSeparator(u);this.addSubmenu("insertLayout",
-v,u,mxResources.get("layout"));this.addSubmenu("insertAdvanced",v,u,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(v,u){c.addInsertMenuItems(v,u,["fromText","plantUml","mermaid","-","formatSql"]);v.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();
-c.showImportCsvDialog()},u,null,m());"min"==uiTheme&&this.addMenuItems(v,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(v,u){var G=c.getRecent();if(null!=G){for(var I=0;I<G.length;I++)(function(F){var L=F.mode;L==App.MODE_GOOGLE?L="googleDrive":L==App.MODE_ONEDRIVE&&(L="oneDrive");v.addItem(F.title+" ("+mxResources.get(L)+")",null,function(){c.loadFile(F.id)},u)})(G[I]);v.addSeparator(u)}v.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},u)}));this.put("openFrom",
-new Menu(function(v,u){null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},
-u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},
-u);c.isOffline()||(v.addSeparator(u),v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(I){null!=I&&0<I.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(I):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(I)))},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},u))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=
-c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u)})),this.put("openLibraryFrom",new Menu(function(v,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?v.addItem(mxResources.get("googleDrive")+
-"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},u):x&&"function"===typeof window.DriveClient&&v.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?v.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},u):D&&"function"===typeof window.OneDriveClient&&v.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?v.addItem(mxResources.get("dropbox")+
-"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&v.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);null!=c.gitHub&&v.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},u);null!=c.gitLab&&v.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},u);null!=c.trello?v.addItem(mxResources.get("trello")+"...",
-null,function(){c.pickLibrary(App.MODE_TRELLO)},u):d&&"function"===typeof window.TrelloClient&&v.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);v.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&v.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&v.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},u);c.isOffline()||(v.addSeparator(u),
-v.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(c,"",mxResources.get("open"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=I;c.editor.isCorsEnabledForUrl(I)||(F=PROXY_URL+"?url="+encodeURIComponent(I));mxUtils.get(F,function(L){if(200<=L.getStatus()&&299>=L.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,L.getText(),I))}catch(K){c.handleError(K,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),
-c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(G.container,300,80,!0,!0);G.init()},u));"1"==urlParams.confLib&&(v.addSeparator(u),v.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-g=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var v=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(v);this.commentsWindow.refreshCommentsTime();v&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));g=this.get("viewPanels");var B=g.funct;g.funct=
-function(v,u){B.apply(this,arguments);c.menus.addMenuItems(v,["tags"],u);c.commentsSupported()&&c.menus.addMenuItems(v,["comments"],u)};this.put("view",new Menu(mxUtils.bind(this,function(v,u){this.addMenuItems(v,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(v,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var G=this.addMenuItem(v,"scratchpad",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(v,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",v,u);this.addMenuItems(v,"- scrollbars tooltips ruler - grid guides".split(" "),u);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(v,"shadowVisible",u);this.addMenuItems(v,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(v,
-["-","fullscreen"],u)})));if(EditorUi.isElectronApp){var J="1"==urlParams.enableSpellCheck;g=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();J=!J;c.alert(mxResources.get("restartForChangeRequired"))});g.setToggleAction(!0);g.setSelectedCallback(function(){return J});var M="1"==urlParams.enableStoreBkp;g=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();M=!M});g.setToggleAction(!0);g.setSelectedCallback(function(){return M});c.actions.addAction("openDevTools",function(){c.openDevTools()});
-c.actions.addAction("drafts...",function(){var v=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(v.container,320,80,!0,!0);v.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(v,u){"1"==urlParams.embed&&null!=urlParams.lang||
-this.addSubmenu("language",v,u);"1"!=urlParams.embed&&this.addSubmenu("theme",v,u);v.addSeparator(u);if("undefined"!==typeof MathJax){var G=this.addMenuItem(v,"mathematicalTypesetting",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(G,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(v,["spellCheck","autoBkp","drafts"],u);this.addMenuItems(v,["copyConnect","collapseExpand","-"],u);"1"!=urlParams.embed&&(G=c.getCurrentFile(),
-null!=G&&G.isRealtimeEnabled()&&G.isRealtimeSupported()&&this.addMenuItems(v,["showRemoteCursors","shareCursor"],u),this.addMenuItems(v,["autosave"],u));v.addSeparator(u);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(v,"plugins",u);this.addMenuItems(v,["-","editDiagram"],u);Graph.translateDiagram&&this.addMenuItems(v,["diagramLanguage"]);v.addSeparator(u);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(v,["showStartScreen"],u);this.addMenuItems(v,["configuration"],
-u);v.addSeparator(u);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function I(L){return{id:L.id,isExt:!0,url:L.downloadUrl,title:L.title,imgUrl:L.thumbnailLink,changedBy:L.lastModifyingUserName,lastModifiedOn:L.modifiedDate}}var F=new TemplatesDialog(c,function(L){console.log(arguments)},null,null,null,"user",function(L,K,H){var Q=new Date;Q.setDate(Q.getDate()-7);c.drive.listFiles(null,Q,H?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(I(U.items[V]));L(T)},
-K)},function(L,K,H,Q){c.drive.listFiles(L,null,Q?!0:!1,function(U){for(var T=[],V=0;V<U.items.length;V++)T.push(I(U.items[V]));K(T)},H)},function(L,K,H){c.drive.getFile(L.id,function(Q){K(Q.data)},H)},null,function(L){L({Test:[]},1)},!0,!1);c.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(v,"templates",u))})));this.put("file",new Menu(mxUtils.bind(this,function(v,u){if("1"==urlParams.embed)this.addSubmenu("importFrom",v,u),this.addSubmenu("exportAs",
-v,u),this.addSubmenu("embed",v,u),"1"==urlParams.libraries&&(this.addMenuItems(v,["-"],u),this.addSubmenu("newLibrary",v,u),this.addSubmenu("openLibraryFrom",v,u)),c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u),this.addMenuItems(v,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(v,["saveAndExit"],u):(this.addMenuItems(v,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(v,
-["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(v,["exit"],u);else{var G=this.editorUi.getCurrentFile();if(null!=G&&G.constructor==DriveFile){G.isRestricted()&&this.addMenuItems(v,["exportOptionsDisabled"],u);this.addMenuItems(v,["save","-","share"],u);var I=this.addMenuItem(v,"synchronize",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(I,"https://www.diagrams.net/doc/faq/synchronize");v.addSeparator(u)}else this.addMenuItems(v,["new"],u);this.addSubmenu("openFrom",
-v,u);isLocalStorage&&this.addSubmenu("openRecent",v,u);null!=G&&G.constructor==DriveFile?this.addMenuItems(v,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==G||G.constructor==LocalFile&&null==G.fileHandle||(v.addSeparator(u),I=this.addMenuItem(v,"synchronize",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(I,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(v,["-","save","saveAs",
-"-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==G||this.addMenuItems(v,["share","-"],u),this.addMenuItems(v,["rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(v,["upload"],u):(this.addMenuItems(v,["makeCopy"],u),null!=G&&G.constructor==OneDriveFile&&this.addMenuItems(v,["moveToFolder"],u)));v.addSeparator(u);this.addSubmenu("importFrom",v,u);this.addSubmenu("exportAs",v,u);
-v.addSeparator(u);this.addSubmenu("embed",v,u);this.addSubmenu("publish",v,u);v.addSeparator(u);this.addSubmenu("newLibrary",v,u);this.addSubmenu("openLibraryFrom",v,u);c.isRevisionHistorySupported()&&this.addMenuItems(v,["-","revisionHistory"],u);null!=G&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(I=null!=G.getTitle()?G.getTitle():c.defaultFilename,(G.constructor==DriveFile&&null!=G.sync&&G.sync.isConnected()||!/(\.html)$/i.test(I)&&!/(\.svg)$/i.test(I))&&this.addMenuItems(v,["-","properties"]));
-this.addMenuItems(v,["-","pageSetup"],u);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(v,["print"],u);this.addMenuItems(v,["-","close"])}})));f.prototype.execute=function(){var v=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 u=v.extFonts,G=0;null!=u&&G<u.length;G++){var I=document.getElementById("extFont_"+
-u[G].name);null!=I&&I.parentNode.removeChild(I)}v.extFonts=[];for(G=0;null!=this.previousExtFonts&&G<this.previousExtFonts.length;G++)this.ui.editor.graph.addExtFont(this.previousExtFonts[G].name,this.previousExtFonts[G].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(v,u){for(var G=mxUtils.bind(this,function(V,W,t,C,N){var R=c.editor.graph;C=this.styleChange(v,C||V,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],null,u,function(){"1"!=urlParams["ext-fonts"]?R.setFont(V,W):(document.execCommand("fontname",!1,V),R.addExtFont(V,W));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[V,null!=W?encodeURIComponent(W):null,null]:[V],"cells",[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),
-function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&R.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(V,W)});t&&(t=document.createElement("span"),t.className="geSprite geSprite-delete",t.style.cursor="pointer",t.style.display="inline-block",C.firstChild.nextSibling.nextSibling.appendChild(t),mxEvent.addListener(t,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[V.toLowerCase()];
-for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==V&&this.customFonts[P].url==W){this.customFonts.splice(P,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(P=0;P<S.length;P++)if(S[P].name==V){S.splice(P,1);break}var X=mxUtils.clone(this.customFonts);for(P=0;P<X.length;P++)if(X[P].name==V){X.splice(P,1);break}P=new f(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(P)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(O)})));Graph.addFont(V,W);C.firstChild.nextSibling.style.fontFamily=V;null!=N&&C.setAttribute("title",N)}),I={},F=0;F<this.defaultFonts.length;F++){var L=this.defaultFonts[F];"string"===typeof L?G(L):null!=L.fontFamily&&null!=L.fontUrl&&(I[encodeURIComponent(L.fontFamily)+"@"+encodeURIComponent(L.fontUrl)]=!0,G(L.fontFamily,L.fontUrl))}v.addSeparator(u);if("1"!=urlParams["ext-fonts"]){L=function(V){var W=encodeURIComponent(V.name)+(null==V.url?"":"@"+encodeURIComponent(V.url));if(!I[W]){for(var t=
-V.name,C=0;null!=H[t.toLowerCase()];)t=V.name+" ("+ ++C+")";null==K[W]&&(Q.push({name:V.name,url:V.url,label:t,title:V.url}),H[t.toLowerCase()]=V,K[W]=V)}};var K={},H={},Q=[];for(F=0;F<this.customFonts.length;F++)L(this.customFonts[F]);for(var U in Graph.recentCustomFonts)L(Graph.recentCustomFonts[U]);Q.sort(function(V,W){return V.label<W.label?-1:V.label>W.label?1:0});if(0<Q.length){for(F=0;F<Q.length;F++)G(Q[F].name,Q[F].url,!0,Q[F].label,Q[F].url);v.addSeparator(u)}v.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),u);v.addSeparator(u)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){L={};var T=!1;for(F=0;F<this.customFonts.length;F++)L[this.customFonts[F].name]=!0;for(F=0;F<U.length;F++)L[U[F].name]||(this.customFonts.push(U[F]),T=!0);T&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(F=
-0;F<this.customFonts.length;F++)U=this.customFonts[F].name,L=this.customFonts[F].url,G(U,L,!0),this.editorUi.editor.graph.addExtFont(U,L,!0);v.addSeparator(u);v.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var V=new f(this.editorUi,[],[]);c.editor.graph.model.execute(V)}),u);v.addSeparator(u)}}v.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var V=this.editorUi.editor.graph,W=V.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],t=
-"s",C=null;if("1"!=urlParams["ext-fonts"]&&V.isEditing()){var N=V.getSelectedEditingElement();null!=N&&(N=mxUtils.getCurrentStyle(N),null!=N&&(W=Graph.stripQuotes(N.fontFamily),C=Graph.getFontUrl(W,null),null!=C&&(Graph.isGoogleFontUrl(C)?(C=null,t="g"):t="w")))}else N=V.getView().getState(V.getSelectionCell()),null!=N&&(W=N.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(N=N.style.fontSource,null!=N&&(N=decodeURIComponent(N),Graph.isGoogleFontUrl(N)?t="g":(t="w",C=N))):(t=N.style.FType||
-t,"w"==t&&(C=this.editorUi.editor.graph.extFonts,N=null,null!=C&&(N=C.find(function(O){return O.name==W})),C=null!=N?N.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=C&&C.substring(0,PROXY_URL.length)==PROXY_URL&&(C=decodeURIComponent(C.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==V.cellEditor.textarea&&(R=V.cellEditor.saveSelection());t=new FontDialog(this.editorUi,W,C,t,mxUtils.bind(this,function(O,P,S){null!=R&&(V.cellEditor.restoreSelection(R),R=null);
-if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&V.isEditing())V.setFont(O,P);else{V.getModel().beginUpdate();try{V.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),V.setCellStyles("fontSource",null!=P?encodeURIComponent(P):null),V.setCellStyles("FType",null)):(V.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(V.setCellStyles("FType",S),0==P.indexOf("http://")&&(P=PROXY_URL+"?url="+encodeURIComponent(P)),this.editorUi.editor.graph.addExtFont(O,
-P)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:P}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(t.container,380,Editor.enableWebFonts?250:180,!0,!0);t.init()}),u,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+this.tagsWindow.window.isVisible()}));g=c.actions.addAction("findReplace",mxUtils.bind(this,function(u,z){var F=(u=l.isEnabled()&&(null==z||!mxEvent.isShiftDown(z)))?"findReplace":"find";z=F+"Window";if(null==this[z]){var J=u?"min"==uiTheme?330:300:240;this[z]=new FindWindow(c,document.body.offsetWidth-(J+20),100,J,u?"min"==uiTheme?304:288:170,u);this[z].window.addListener("show",function(){c.fireEvent(new mxEventObject(F))});this[z].window.addListener("hide",function(){c.fireEvent(new mxEventObject(F))});
+this[z].window.setVisible(!0)}else this[z].window.setVisible(!this[z].window.isVisible())}),null,null,Editor.ctrlKey+"+F");g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){var u=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[u]&&this[u].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var u=null==c.pages||1>=c.pages.length;if(u)c.exportVisio();else{var z=document.createElement("div");z.style.whiteSpace=
+"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(F);var J=c.addCheckbox(z,mxResources.get("allPages"),!u,u);J.style.marginBottom="16px";u=new CustomDialog(c,z,mxUtils.bind(this,function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
+function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var z=document.createElement("span");z.style["float"]="right";z.style.cursor="pointer";z.style.userSelect="none";z.style.marginTop="-4px";z.appendChild(u);mxUtils.write(z,mxResources.get("showStartScreen"));mxEvent.addListener(z,"click",function(K){mxEvent.getSource(K)!=u&&
+(u.checked=!u.checked)});header=z}var F=localStorage.getItem(Editor.configurationKey);z=[[mxResources.get("reset"),function(K,H){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(K)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(N){c.handleError(N)}})},"Shift+Click to Reset Settings"]];var J=c.actions.get("plugins");
+null!=J&&"1"==urlParams.sketch&&z.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||z.push([mxResources.get("share"),function(K,H){if(0<H.value.length)try{var N=JSON.parse(H.value),U=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),Q=new EmbedDialog(c,U);c.showDialog(Q.container,450,240,!0);Q.init()}catch(V){c.handleError(V)}else c.handleError({message:mxResources.get("invalidInput")})}]);z=new TextareaDialog(c,mxResources.get("configuration")+
+":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(K){if(null!=K)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),K==F)c.hideDialog();else{if(0<K.length){var H=JSON.parse(K);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(N){c.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+z,u.parentNode);c.showDialog(z.container,620,460,!0,!1);z.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,z){var F=mxUtils.bind(this,function(K){var H=""==K?mxResources.get("automatic"):mxLanguageMap[K],N=null;""!=H&&(N=u.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(K);mxSettings.save();mxClient.language=K;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
+z),(K==mxLanguage||""==K&&null==mxLanguage)&&u.addCheckmark(N,Editor.checkmarkImage));return N});F("");u.addSeparator(z);for(var J in mxLanguageMap)F(J)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(u){var z=q.apply(this,arguments);if(null!=z&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var F=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=F){var J=z.addMenu("",F.funct);J.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
+"theme":"language"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundImage="url("+Editor.globeImage+")";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";J.style.display="inline-block";J.style.verticalAlign="top";J.style.marginLeft="2px";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right=
+"11px",J.style.top="10px"):(J.style.right="14px",J.style.top="5px");"1"==urlParams.winCtrls&&(J.style.right="95px",J.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(J);z.langIcon=J;"1"==urlParams["live-ui"]?(F=mxUtils.bind(this,function(){J.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",F),F()):mxUtils.setOpacity(J,40);this.editorUi.switchThemeElt=
+J}}return z}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(z){if(0<z.length)try{var F=JSON.parse(z);c.executeLayouts(l.createLayouts(F));c.customLayoutConfig=F;c.hideDialog()}catch(J){c.handleError(J)}},null,null,null,null,function(z,
+F){var J=mxUtils.button(mxResources.get("copy"),function(){try{var K=F.value;F.value=JSON.stringify(JSON.parse(K));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));F.value=K}catch(H){c.handleError(H)}});J.setAttribute("title","copy");J.className="geBtn";z.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,
+620,460,!0,!0);u.init()});g=this.get("viewZoom");var p=g.funct;g.funct=mxUtils.bind(this,function(u,z){p.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(u,["-","outline","fullscreen"],z)});g=this.get("layout");var y=g.funct;g.funct=function(u,z){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){var F=null,J=20,K=20,H=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=F){var L=c.editor.graph,T=new mxOrgChartLayout(L,
+F,J,K),O=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(O=L.getSelectionCell());T.execute(O)}},N=document.createElement("div"),U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,mxResources.get("orgChartType")+": ");N.appendChild(U);var Q=document.createElement("select");Q.style.width="200px";Q.style.boxSizing="border-box";U=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var V=0;V<U.length;V++){var W=document.createElement("option");mxUtils.write(W,U[V]);W.value=V;2==V&&W.setAttribute("selected","selected");Q.appendChild(W)}mxEvent.addListener(Q,"change",function(){F=Q.value});N.appendChild(Q);U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,
+mxResources.get("parentChildSpacing")+": ");N.appendChild(U);var t=document.createElement("input");t.type="number";t.value=J;t.style.width="200px";t.style.boxSizing="border-box";N.appendChild(t);mxEvent.addListener(t,"change",function(){J=t.value});U=document.createElement("div");U.style.marginTop="6px";U.style.display="inline-block";U.style.width="140px";mxUtils.write(U,mxResources.get("siblingSpacing")+": ");N.appendChild(U);var D=document.createElement("input");D.type="number";D.value=K;D.style.width=
+"200px";D.style.boxSizing="border-box";N.appendChild(D);mxEvent.addListener(D,"change",function(){K=D.value});N=new CustomDialog(c,N,function(){null==F&&(F=2);c.loadOrgChartLayouts(H)});c.showDialog(N.container,355,140,!0,!0)},z,null,m());u.addSeparator(z);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(l);F.checkOverlap=!0;c.prompt(mxResources.get("spacing"),F.spacing,mxUtils.bind(this,function(J){F.spacing=J;c.executeLayout(function(){F.execute(l.getDefaultParent(),
+l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),z);u.addSeparator(z);c.menus.addMenuItem(u,"runLayout",z,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,z){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],z);else{var F=u.addItem("Search:",null,null,z,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";F.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");
+J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(K){var H=mxUtils.trim(J.value);13==K.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
+K.keyCode&&(J.value="")}));F.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(K){document.activeElement!=J&&J.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickStart website support -".split(" "),
+z),"1"!=urlParams.disableUpdate&&this.addMenuItems(u,["check4Updates"],z),this.addMenuItems(u,["openDevTools","-","about"],z)):this.addMenuItems(u,"- keyboardShortcuts quickStart support - about".split(" "),z)}"1"==urlParams.test&&(u.addSeparator(z),this.addSubmenu("testDevelop",u,z))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var u=prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,
+l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
+mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var u=l.cloneCells(l.getSelectionCells()),z=l.getBoundingBoxFromGeometry(u);u=l.moveCells(u,-z.x,-z.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+z.width+", "+z.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(u)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=
+l.getGraphBounds(),z=l.view.translate,F=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",u.x/F-z.x,u.y/F-z.y,u.width/F,u.height/F,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(z){if(0<z.length)try{var F=function(U){function Q(X){if(null==R[X]){if(R[X]=!0,null!=t[X]){for(;0<t[X].length;){var Z=
+t[X].pop();Q(Z)}delete t[X]}}else mxLog.debug(V+": Visited: "+X)}var V=U.parentNode.id,W=U.childNodes;U={};for(var t={},D=null,L={},T=0;T<W.length;T++){var O=W[T];if(null!=O.id&&0<O.id.length)if(null==U[O.id]){U[O.id]=O.id;var P=O.getAttribute("parent");null==P?null!=D?mxLog.debug(V+": Multiple roots: "+O.id):D=O.id:(null==t[P]&&(t[P]=[]),t[P].push(O.id))}else L[O.id]=O.id}W=Object.keys(L);0<W.length?(W=V+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(V+": Checked");
+var R={};null==D?mxLog.debug(V+": No root"):(Q(D),Object.keys(R).length!=Object.keys(U).length&&(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",t)))};"<"!=z.charAt(0)&&(z=Graph.decompress(z),mxLog.debug("See console for uncompressed XML"),console.log("xml",z));var J=mxUtils.parseXml(z),K=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var H=c.getHashValueForPages(K);mxLog.debug("Checksum: ",H)}catch(U){mxLog.debug("Error: ",U.message)}else mxLog.debug("No pages found for checksum");
+var N=J.getElementsByTagName("root");for(z=0;z<N.length;z++)F(N[z]);mxLog.show()}catch(U){c.handleError(U),null!=window.console&&console.error(U)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var A=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(z){var F=c.getCurrentFile();if(0<z.length&&null!=F)try{var J=JSON.parse(z);F.patch([J],null,!0);c.hideDialog()}catch(K){c.handleError(K)}},null,"Close",null,null,
+null,!0,null,"Patch",null,[["Snapshot",function(z,F){A=c.getPagesForXml(c.getFileData(!0));u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)}],["Diff",function(z,F){try{u.textarea.value=JSON.stringify(c.diffPages(A,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==A?(A=c.getPagesForXml(c.getFileData(!0)),u.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(A)):u.textarea.value=JSON.stringify(c.diffPages(A,
+c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var z=u.getShadowPages();null!=z&&
+(console.log("Checksum shadowPages",c.getHashValueForPages(z)),console.log("diff shadowPages/ownPages",c.diffPages(z,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,z)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,z)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,
+u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
+c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var u=l.model.cells,z=0,F=[],J=[],K;for(K in u){var H=u[K],N=l.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];
+null!=N&&"data:"==N.substring(0,5)&&(null==F[N]&&(F[N]=(F[N]||0)+1,z++),J.push(H))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",z,"image(s) from",J.length,"cell(s): ",[J,F])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var u=new mxImageExport,z=l.getGraphBounds(),F=l.view.scale,J=mxUtils.createXmlDocument(),K=J.createElement("output");
+J.appendChild(K);J=new mxXmlCanvas2D(K);J.translate(Math.floor((1-z.x)/F),Math.floor((1-z.y)/F));J.scale(1/F);var H=0,N=J.save;J.save=function(){H++;N.apply(this,arguments)};var U=J.restore;J.restore=function(){H--;U.apply(this,arguments)};var Q=u.drawShape;u.drawShape=function(V){mxLog.debug("entering shape",V,H);Q.apply(this,arguments);mxLog.debug("leaving shape",V,H)};u.drawState(l.getView().getState(l.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",H)}));
+c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),z)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?
+c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(u){l.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),
+u.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(z,F,J,K,H,N,U,Q,V,W,t){c.createHtml(z,F,J,K,H,N,U,Q,V,W,t,mxUtils.bind(this,function(D,L){var T=new EmbedDialog(c,D+"\n"+L,null,null,function(){var O=window.open(),P=O.document;
+if(null!=P){"CSS1Compat"===document.compatMode&&P.writeln("<!DOCTYPE html>");P.writeln("<html>");P.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');P.writeln("<body>");P.writeln(D);var R=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;R&&P.writeln(L);P.writeln("</body>");P.writeln("</html>");P.close();if(!R){var X=O.document.createElement("div");X.marginLeft="26px";X.marginTop="26px";mxUtils.write(X,mxResources.get("updatingDocument"));
+R=O.document.createElement("img");R.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");R.style.marginLeft="6px";X.appendChild(R);O.document.body.insertBefore(X,O.document.body.firstChild);window.setTimeout(function(){var Z=document.createElement("script");Z.type="text/javascript";Z.src=/<script.*?src="(.*?)"/.exec(L)[1];P.body.appendChild(Z);X.parentNode.removeChild(X)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});
+c.showDialog(T.container,450,240,!0,!0);T.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(z){c.spinner.stop();null!=z?(z=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?z:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(z.container,450,240,!0,!0),z.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));
+c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,z,F,J,K,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,z,F,J,K,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){c.showEmbedImageDialog(function(u,z,F,J,K,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,z,F,J,K,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=l.getGraphBounds();
+c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/l.view.scale)+2,function(z,F,J,K,H,N,U,Q,V){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var t=[];V&&t.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+U+";height:"+Q+';" src="'+c.createLink(z,F,J,K,H,N,W,null,t)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",
+new Action(mxResources.get("notion")+"...",function(){var u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var z=document.createElement("a");z.setAttribute("href","javascript:void(0);");z.setAttribute("target","_blank");z.style.cursor="pointer";mxUtils.write(z,mxResources.get("getNotionChromeExtension"));u.appendChild(z);mxEvent.addListener(z,"click",function(F){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(F)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,J,K,H,N,U,Q,V,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(t){c.spinner.stop();var D=["border=0"];W&&D.push("tags=%7B%7D");t=new EmbedDialog(c,c.createLink(F,J,K,H,N,U,t,null,D,!0));c.showDialog(t.container,450,240,!0,!0);t.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,z,F,J,K,H,N,U,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=[];Q&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(u,z,F,J,K,H,V,null,W));c.showDialog(V.container,450,240,!0,!0);V.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});
+c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=c.actions.addAction("scratchpad",
+function(){c.toggleScratchpad()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});g=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});g.label=mxResources.get("searchShapes");g.setToggleAction(!0);g.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){l.isEditing()&&l.stopEditing();var z="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var F=c.createLoadMessage("save");F.xml=z;u&&(F.exit=!0);z=JSON.stringify(F)}(window.opener||window.parent).postMessage(z,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==
+EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var z="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
+"";(window.opener||window.parent).postMessage(z,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,z){c.isExportToCanvas()?(this.addMenuItems(u,["exportPng"],z),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],z)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],z);this.addMenuItems(u,["exportSvg",
+"-"],z);c.isOffline()||c.printPdfExport?this.addMenuItems(u,["exportPdf"],z):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],z);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],z);this.addMenuItems(u,["-","exportHtml","exportXml","exportUrl"],z);c.isOffline()||(u.addSeparator(z),this.addMenuItem(u,"export",z).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
+function(u,z){function F(H){H.pickFile(function(N){c.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(N,function(U){var Q="data:image/"==U.getData().substring(0,11)?K(U.getTitle()):"text/xml";/\.svg$/i.test(U.getTitle())&&!c.editor.isDataSvg(U.getData())&&(U.setData(Editor.createSvgDataUri(U.getData())),Q="image/svg+xml");J(U.getData(),Q,U.getTitle())},function(U){c.handleError(U,null!=U?mxResources.get("errorLoadingFile"):null)},H==c.drive)},!0)}var J=mxUtils.bind(this,function(H,
+N,U){var Q=l.view,V=l.getGraphBounds(),W=l.snap(Math.ceil(Math.max(0,V.x/Q.scale-Q.translate.x)+4*l.gridSize)),t=l.snap(Math.ceil(Math.max(0,(V.y+V.height)/Q.scale-Q.translate.y)+4*l.gridSize));"data:image/"==H.substring(0,11)?c.loadImage(H,mxUtils.bind(this,function(D){var L=!0,T=mxUtils.bind(this,function(){c.resizeImage(D,H,mxUtils.bind(this,function(O,P,R){O=L?Math.min(1,Math.min(c.maxImageSize/P,c.maxImageSize/R)):1;c.importFile(H,N,W,t,Math.round(P*O),Math.round(R*O),U,function(X){c.spinner.stop();
+l.setSelectionCells(X);l.scrollCellToVisible(l.getSelectionCell())})}),L)});H.length>c.resampleThreshold?c.confirmImageResize(function(O){L=O;T()}):T()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(H,N,W,t,0,0,U,function(D){c.spinner.stop();l.setSelectionCells(D);l.scrollCellToVisible(l.getSelectionCell())})}),K=mxUtils.bind(this,function(H){var N="text/xml";/\.png$/i.test(H)?N="image/png":/\.jpe?g$/i.test(H)?N="image/jpg":/\.gif$/i.test(H)?
+N="image/gif":/\.pdf$/i.test(H)&&(N="application/pdf");return N});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){F(c.drive)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){F(c.oneDrive)},z):E&&"function"===typeof window.OneDriveClient&&
+u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){F(c.dropbox)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){F(c.gitHub)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+
+"...",null,function(){F(c.gitLab)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){F(c.trello)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},
+z);c.isOffline()||(u.addSeparator(z),u.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var U=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(N),function(Q){J(Q,U,N)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==U)}},mxResources.get("url"));
+c.showDialog(H.container,300,80,!0,!0);H.init()},z))}))).isEnabled=m;this.put("appearance",new Menu(mxUtils.bind(this,function(u,z){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(u,["toggleDarkMode"],z);z=u.addItem(mxResources.get("simple"),null,function(){c.setCurrentTheme("sketch"==Editor.currentTheme?"":"sketch")},z);"sketch"==Editor.currentTheme&&u.addCheckmark(z,Editor.checkmarkImage)})));this.put("theme",new Menu(mxUtils.bind(this,function(u,z){var F="1"==urlParams.sketch?
+"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(u,["toggleDarkMode"],z);u.addSeparator(z);var J=u.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},z);"kennedy"!=F&&"atlas"!=F&&"dark"!=F&&"min"!=F&&"sketch"!=F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("default"),null,function(){c.setCurrentTheme("kennedy")},z);"kennedy"!=F&&"dark"!=F||u.addCheckmark(J,Editor.checkmarkImage);
+J=u.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},z);"sketch"==F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},z);"min"==F&&u.addCheckmark(J,Editor.checkmarkImage);J=u.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},z);"atlas"==F&&u.addCheckmark(J,Editor.checkmarkImage)})));g=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();
+if(null!=u)if(u.constructor==LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(F,J){u.invalidFileHandle=null;u.fileHandle=F;u.title=J.name;u.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var z=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;z=new FilenameDialog(this.editorUi,z,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=u&&F!=u.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+u.rename(F,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),u.constructor==DriveFile||u.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=F&&0<F.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(z.container,
+340,96,!0,!0);z.init()}}));g.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};g.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(null!=u){var z=c.getCopyFilename(u);u.constructor==DriveFile?(z=new CreateDialog(c,z,mxUtils.bind(this,function(F,J){"_blank"==J?c.editor.editAsNew(c.getFileData(),F):("download"==J&&(J=App.MODE_GOOGLE),null!=F&&0<F.length&&(J==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&
+u.saveAs(F,mxUtils.bind(this,function(K){u.desc=K;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(H){c.handleError(H)}))}),mxUtils.bind(this,function(K){c.handleError(K)})):c.createFile(F,c.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(z.container,420,380,!0,!0),
+z.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),z)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(u,z){c.appIconClicked(z)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var z=!1;if(u.getMode()==App.MODE_GOOGLE&&null!=u.desc.parents)for(var F=0;F<u.desc.parents.length;F++)if(u.desc.parents[F].isRoot){z=!0;break}c.pickFolder(u.getMode(),
+mxUtils.bind(this,function(J){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(J,mxUtils.bind(this,function(K){c.spinner.stop()}),mxUtils.bind(this,function(K){c.handleError(K)}))}),null,!0,z)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,["publishLink"],z)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var u=
+c.getCurrentFile();null!=u&&u.share()}catch(z){c.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||this.addMenuItems(u,["liveImage","-"],z);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],z);navigator.standalone||c.isOffline()||this.addMenuItems(u,["embedIframe"],z);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
+z)})));c.addInsertItem=function(u,z,F,J){("plantUml"!=J||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var K=new ParseDialog(c,F,J);c.showDialog(K.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else K=new CreateGraphDialog(c,F,J),c.showDialog(K.container,620,420,!0,!1);K.init()}),z,null,m())};var C=function(u){l.getModel().beginUpdate();try{u=l.addCell(u),l.fireEvent(new mxEventObject("cellsInserted",
+"cells",[u]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(u);l.setSelectionCell(u);l.container.focus();l.editAfterInsert&&l.startEditing(u);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(u))},0);return u},B=function(u,z,F,J,K){u=new mxCell(u,new mxGeometry(0,0,z,F),J);u.vertex=!0;null==K&&(K=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([u],!0)));u.geometry.x=K.x;u.geometry.y=K.y;return C(u)};c.actions.put("insertText",new Action(mxResources.get("text"),
+function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(B("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",
+120,60,"whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&B("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(u){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
+B("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(u){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var z=l.defaultEdgeLength;u=null==u||mxEvent.isControlDown(u)||mxEvent.isMetaDown(u)?null:l.getInsertPoint();null==u&&(u=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,z,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+F.geometry.setTerminalPoint(u,!0);F.geometry.setTerminalPoint(new mxPoint(u.x+F.geometry.width,u.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=m;g=c.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){null!=c.formatWindow&&c.formatWindow.window.setVisible(!c.formatWindow.window.isVisible())}));g.shortcut=c.actions.get("formatPanel").shortcut;g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=
+c.formatWindow&&c.formatWindow.window.isVisible()}));g=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow&&c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible())}));g.shortcut=c.actions.get("formatPanel").shortcut;g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()}));c.addInsertMenuItems=mxUtils.bind(this,function(u,z,F){for(var J=0;J<F.length;J++)"-"==
+F[J]?u.addSeparator(z):c.addInsertItem(u,z,mxResources.get(F[J])+"...",F[J])});this.put("insert",new Menu(mxUtils.bind(this,function(u,z){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(c.menus.addMenuItems(u,["toggleShapes"],z),c.menus.addSubmenu("table",u,z),u.addSeparator(z),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(u,["insertTemplate"],z),c.menus.addMenuItems(u,["insertImage","insertLink","-"],z),c.menus.addSubmenu("insertAdvanced",u,z,mxResources.get("advanced")),c.menus.addSubmenu("layout",
+u,z)):(this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),z),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],z),u.addSeparator(z),this.addSubmenu("insertLayout",u,z,mxResources.get("layout")),this.addSubmenu("insertAdvanced",u,z,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",u,z))})));this.put("table",new Menu(mxUtils.bind(this,
+function(u,z){c.menus.addInsertTableCellItem(u,z)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,z){c.addInsertMenuItems(u,z,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,z){c.addInsertMenuItems(u,z,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();c.showImportCsvDialog()},
+z,null,m());"min"==uiTheme&&this.addMenuItems(u,["-","createShape","editDiagram"],z)})));this.put("openRecent",new Menu(function(u,z){var F=c.getRecent();if(null!=F){for(var J=0;J<F.length;J++)(function(K){var H=K.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");u.addItem(K.title+" ("+mxResources.get(H)+")",null,function(){c.loadFile(K.id)},z)})(F[J]);u.addSeparator(z)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},z)}));this.put("openFrom",new Menu(function(u,
+z){null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
+function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},
+z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},
+z);c.isOffline()||(u.addSeparator(z),u.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(c,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));c.showDialog(F.container,300,80,!0,!0);F.init()},z))}));Editor.enableCustomLibraries&&
+(this.put("newLibrary",new Menu(function(u,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=
+c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},z)})),this.put("openLibraryFrom",new Menu(function(u,z){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+
+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},z):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},z):E&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+
+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},z):x&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},z);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},z);null!=c.trello?u.addItem(mxResources.get("trello")+"...",
+null,function(){c.pickLibrary(App.MODE_TRELLO)},z):d&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},z,null,!1);u.addSeparator(z);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},z);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},z);c.isOffline()||(u.addSeparator(z),
+u.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var K=J;c.editor.isCorsEnabledForUrl(J)||(K=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(K,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,H.getText(),J))}catch(N){c.handleError(N,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),
+c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));c.showDialog(F.container,300,80,!0,!0);F.init()},z));"1"==urlParams.confLib&&(u.addSeparator(z),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},z))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+g=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var u=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));g=this.get("viewPanels");var I=g.funct;g.funct=
+function(u,z){I.apply(this,arguments);c.menus.addMenuItems(u,["tags"],z);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],z)};this.put("view",new Menu(mxUtils.bind(this,function(u,z){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],z);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(u,"scratchpad",z);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(u,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",u,z);this.addMenuItems(u,"- scrollbars tooltips ruler - grid guides".split(" "),z);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(u,"shadowVisible",z);this.addMenuItems(u,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),z);"1"!=urlParams.sketch&&this.addMenuItems(u,
+["-","fullscreen"],z)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;g=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();M=!M;c.alert(mxResources.get("restartForChangeRequired"))});g.setToggleAction(!0);g.setSelectedCallback(function(){return M});var G="1"==urlParams.enableStoreBkp;g=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();G=!G});g.setToggleAction(!0);g.setSelectedCallback(function(){return G});c.actions.addAction("openDevTools",function(){c.openDevTools()});
+c.actions.addAction("drafts...",function(){var u=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(z){z=parseInt(z);0<=z&&(EditorUi.draftSaveDelay=1E3*z,EditorUi.enableDrafts=0<z,mxSettings.setDraftSaveDelay(z),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(u.container,320,80,!0,!0);u.init()})}var S=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(u,z){var F="sketch"==
+Editor.currentTheme||"1"==urlParams.sketch;if(F||"min"==uiTheme){null==S||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",u,z);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",u,z);c.menus.addSubmenu("units",u,z);u.addSeparator(z);F||c.menus.addMenuItems(u,["scrollbars","-","tooltips","copyConnect","collapseExpand"],z);"1"==urlParams.embedInline||F||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||c.mode==App.MODE_ATLAS||
+c.menus.addMenuItems(u,["-","showStartScreen","search","scratchpad"],z);u.addSeparator(z);F&&c.menus.addMenuItems(u,["copyConnect","collapseExpand","tooltips","-"],z);EditorUi.isElectronApp&&c.menus.addMenuItems(u,["-","spellCheck","autoBkp","drafts","-"],z);var J=c.getCurrentFile();null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(u,["-","showRemoteCursors","shareCursor","-"],z);Graph.translateDiagram&&c.menus.addMenuItems(u,["diagramLanguage"],z);c.mode!=App.MODE_ATLAS&&
+c.menus.addMenuItem(u,"configuration",z);F||!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(u,"plugins",z);u.addSeparator(z)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",u,z),"1"!=urlParams.embed&&this.addSubmenu("theme",u,z),u.addSeparator(z),"undefined"!==typeof MathJax&&(F=this.addMenuItem(u,"mathematicalTypesetting",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")),
+EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp","drafts"],z),this.addMenuItems(u,["copyConnect","collapseExpand","-"],z),"1"!=urlParams.embed&&(J=c.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],z),this.addMenuItems(u,["autosave"],z)),u.addSeparator(z),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",z),this.addMenuItems(u,["-","editDiagram"],z),Graph.translateDiagram&&this.addMenuItems(u,
+["diagramLanguage"]),u.addSeparator(z),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(u,["showStartScreen"],z),this.addMenuItems(u,["configuration"],z),u.addSeparator(z),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function K(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var H=new TemplatesDialog(c,function(N){console.log(arguments)},null,
+null,null,"user",function(N,U,Q){var V=new Date;V.setDate(V.getDate()-7);c.drive.listFiles(null,V,Q?!0:!1,function(W){for(var t=[],D=0;D<W.items.length;D++)t.push(K(W.items[D]));N(t)},U)},function(N,U,Q,V){c.drive.listFiles(N,null,V?!0:!1,function(W){for(var t=[],D=0;D<W.items.length;D++)t.push(K(W.items[D]));U(t)},Q)},function(N,U,Q){c.drive.getFile(N.id,function(V){U(V.data)},Q)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
+!0)}),this.addMenuItem(u,"templates",z))})));this.put("diagram",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();c.menus.addSubmenu("extras",u,z,mxResources.get("preferences"));u.addSeparator(z);var J="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(u,"new open - synchronize - save saveAs -".split(" "),z);else if("1"==urlParams.embed||c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
+c.menus.addMenuItems(u,["-","save"],z);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(u,["saveAndExit"],z),null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["revisionHistory"],z);u.addSeparator(z)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(u,["save","synchronize","-"],z):"1"!=urlParams.noFileMenu&&(J?c.menus.addSubmenu("file",u,z):(c.menus.addMenuItems(u,["new"],z),c.menus.addSubmenu("openFrom",
+u,z),isLocalStorage&&this.addSubmenu("openRecent",u,z),u.addSeparator(z),null!=F&&(F.constructor==DriveFile&&c.menus.addMenuItems(u,["share"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||F.constructor==LocalFile||c.menus.addMenuItems(u,["synchronize"],z)),u.addSeparator(z),c.menus.addSubmenu("save",u,z)));c.menus.addSubmenu("exportAs",u,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(u,["import"],z):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",u,z);c.menus.addMenuItems(u,
+["-","findReplace"],z);c.commentsSupported()&&c.menus.addMenuItems(u,["comments","-"],z);c.menus.addMenuItems(u,["toggleFormat","layers","tags","-","pageSetup"],z);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(u,["print"],z);J||null==F||null==c.fileNode||"1"==urlParams.embedInline||(F=null!=F.getTitle()?F.getTitle():c.defaultFilename,/(\.html)$/i.test(F)||/(\.svg)$/i.test(F)||this.addMenuItems(u,["-","properties"]));u.addSeparator(z);c.menus.addSubmenu("help",
+u,z);"1"==urlParams.embed||c.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||c.mode==App.MODE_ATLAS)&&c.menus.addMenuItems(u,["-","exit"],z):"1"!=urlParams.noFileMenu&&c.menus.addMenuItems(u,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(u,z){var F=c.getCurrentFile();null!=F&&F.constructor==DriveFile?c.menus.addMenuItems(u,["save","makeCopy","-","rename","moveToFolder"],z):(c.menus.addMenuItems(u,["save","saveAs","-","rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
+"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):c.menus.addMenuItems(u,["makeCopy"],z));c.menus.addMenuItems(u,["-","autosave"],z);null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["-","revisionHistory"],z)})));this.put("file",new Menu(mxUtils.bind(this,function(u,z){var F="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",u,z),this.addSubmenu("exportAs",u,z),this.addSubmenu("embed",u,z),"1"==urlParams.libraries&&
+(this.addMenuItems(u,["-"],z),this.addSubmenu("newLibrary",u,z),this.addSubmenu("openLibraryFrom",u,z)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],z),this.addMenuItems(u,["-","pageSetup","print","-","rename"],z),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],z):(this.addMenuItems(u,["save"],z),"1"==urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],z))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,
+["exit"],z);else if(F){F=c.getCurrentFile();c.menus.addMenuItems(u,["new"],z);c.menus.addSubmenu("openFrom",u,z);isLocalStorage&&this.addSubmenu("openRecent",u,z);u.addSeparator(z);c.menus.addMenuItems(u,["-","save"],z);null!=F&&F.constructor==DriveFile||c.menus.addMenuItems(u,["saveAs"],z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||c.menus.addMenuItems(u,["synchronize"],z);null!=F&&F.constructor==DriveFile?c.menus.addMenuItems(u,"- rename makeCopy - moveToFolder openFolder".split(" "),
+z):(c.menus.addMenuItems(u,["-","rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):c.menus.addMenuItems(u,["makeCopy"],z));null!=F&&F.isRevisionHistorySupported()&&c.menus.addMenuItems(u,["-","revisionHistory"],z);if(null!=F){if(null!=c.fileNode&&"1"!=urlParams.embedInline){var J=null!=F.getTitle()?F.getTitle():c.defaultFilename;(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
+this.addMenuItems(u,["properties"],z)}F.constructor==DriveFile&&c.menus.addMenuItems(u,["share"],z)}c.menus.addMenuItems(u,["-","autosave"],z)}else F=this.editorUi.getCurrentFile(),null!=F&&F.constructor==DriveFile?(F.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],z),this.addMenuItems(u,["save","-","share"],z),J=this.addMenuItem(u,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize"),u.addSeparator(z)):
+this.addMenuItems(u,["new"],z),this.addSubmenu("openFrom",u,z),isLocalStorage&&this.addSubmenu("openRecent",u,z),null!=F&&F.constructor==DriveFile?this.addMenuItems(u,"new - rename makeCopy openFolder moveToFolder".split(" "),z):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(u.addSeparator(z),J=this.addMenuItem(u,"synchronize",z),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),
+this.addMenuItems(u,["-","save","saveAs","-"],z),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==F||this.addMenuItems(u,["share","-"],z),this.addMenuItems(u,["rename"],z),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],z):(this.addMenuItems(u,["makeCopy"],z),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(u,["moveToFolder"],z))),u.addSeparator(z),this.addSubmenu("importFrom",
+u,z),this.addSubmenu("exportAs",u,z),u.addSeparator(z),this.addSubmenu("embed",u,z),this.addSubmenu("publish",u,z),u.addSeparator(z),this.addSubmenu("newLibrary",u,z),this.addSubmenu("openLibraryFrom",u,z),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],z),null!=F&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=F.getTitle()?F.getTitle():c.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
+this.addMenuItems(u,["-","properties"])),this.addMenuItems(u,["-","pageSetup"],z),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],z),this.addMenuItems(u,["-","close"])})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var z=u.extFonts,F=0;null!=z&&F<z.length;F++){var J=
+document.getElementById("extFont_"+z[F].name);null!=J&&J.parentNode.removeChild(J)}u.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=z};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,z){for(var F=mxUtils.bind(this,function(t,D,L,T,O){var P=c.editor.graph;T=this.styleChange(u,T||t,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
+"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[t,null!=D?encodeURIComponent(D):null,null]:[t],null,z,function(){"1"!=urlParams["ext-fonts"]?P.setFont(t,D):(document.execCommand("fontname",!1,t),P.addExtFont(t,D));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[t,null!=D?encodeURIComponent(D):null,null]:[t],"cells",
+[P.cellEditor.getEditingCell()]))},function(){P.updateLabelElements(P.getSelectionCells(),function(R){R.removeAttribute("face");R.style.fontFamily=null;"PRE"==R.nodeName&&P.replaceElement(R,"div")});"1"==urlParams["ext-fonts"]&&P.addExtFont(t,D)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",T.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
+function(R){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[t.toLowerCase()];for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==t&&this.customFonts[X].url==D){this.customFonts.splice(X,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Z=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Z&&0<Z.length)for(X=0;X<Z.length;X++)if(Z[X].name==t){Z.splice(X,1);break}var Y=mxUtils.clone(this.customFonts);for(X=0;X<Y.length;X++)if(Y[X].name==
+t){Y.splice(X,1);break}X=new f(this.editorUi,Z,Y);this.editorUi.editor.graph.model.execute(X)}this.editorUi.hideCurrentMenu();mxEvent.consume(R)})));Graph.addFont(t,D);T.firstChild.nextSibling.style.fontFamily=t;null!=O&&T.setAttribute("title",O)}),J={},K=0;K<this.defaultFonts.length;K++){var H=this.defaultFonts[K];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(J[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}u.addSeparator(z);if("1"!=
+urlParams["ext-fonts"]){H=function(t){var D=encodeURIComponent(t.name)+(null==t.url?"":"@"+encodeURIComponent(t.url));if(!J[D]){for(var L=t.name,T=0;null!=U[L.toLowerCase()];)L=t.name+" ("+ ++T+")";null==N[D]&&(Q.push({name:t.name,url:t.url,label:L,title:t.url}),U[L.toLowerCase()]=t,N[D]=t)}};var N={},U={},Q=[];for(K=0;K<this.customFonts.length;K++)H(this.customFonts[K]);for(var V in Graph.recentCustomFonts)H(Graph.recentCustomFonts[V]);Q.sort(function(t,D){return t.label<D.label?-1:t.label>D.label?
+1:0});if(0<Q.length){for(K=0;K<Q.length;K++)F(Q[K].name,Q[K].url,!0,Q[K].label,Q[K].url);u.addSeparator(z)}u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),z);u.addSeparator(z)}else{V=this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){H={};var W=!1;for(K=0;K<this.customFonts.length;K++)H[this.customFonts[K].name]=!0;for(K=0;K<V.length;K++)H[V[K].name]||(this.customFonts.push(V[K]),
+W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(K=0;K<this.customFonts.length;K++)V=this.customFonts[K].name,H=this.customFonts[K].url,F(V,H,!0),this.editorUi.editor.graph.addExtFont(V,H,!0);u.addSeparator(z);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var t=new f(this.editorUi,[],[]);c.editor.graph.model.execute(t)}),z);u.addSeparator(z)}}u.addItem(mxResources.get("custom")+"...",null,
+mxUtils.bind(this,function(){var t=this.editorUi.editor.graph,D=t.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",T=null;if("1"!=urlParams["ext-fonts"]&&t.isEditing()){var O=t.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(D=Graph.stripQuotes(O.fontFamily),T=Graph.getFontUrl(D,null),null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,L="g"):L="w")))}else O=t.getView().getState(t.getSelectionCell()),null!=O&&(D=O.style[mxConstants.STYLE_FONTFAMILY]||
+D,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?L="g":(L="w",T=O))):(L=O.style.FType||L,"w"==L&&(T=this.editorUi.editor.graph.extFonts,O=null,null!=T&&(O=T.find(function(R){return R.name==D})),T=null!=O?O.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=T&&T.substring(0,PROXY_URL.length)==PROXY_URL&&(T=decodeURIComponent(T.substr((PROXY_URL+"?url=").length)));var P=null;document.activeElement==t.cellEditor.textarea&&(P=
+t.cellEditor.saveSelection());L=new FontDialog(this.editorUi,D,T,L,mxUtils.bind(this,function(R,X,Z){null!=P&&(t.cellEditor.restoreSelection(P),P=null);if(null!=R&&0<R.length)if("1"!=urlParams["ext-fonts"]&&t.isEditing())t.setFont(R,X);else{t.getModel().beginUpdate();try{t.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(t.setCellStyles(mxConstants.STYLE_FONTFAMILY,R),t.setCellStyles("fontSource",null!=X?encodeURIComponent(X):null),t.setCellStyles("FType",null)):(t.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+R),"s"!=Z&&(t.setCellStyles("FType",Z),0==X.indexOf("http://")&&(X=PROXY_URL+"?url="+encodeURIComponent(X)),this.editorUi.editor.graph.addExtFont(R,X)));Z=!0;for(var Y=0;Y<this.customFonts.length;Y++)if(this.customFonts[Y].name==R){Z=!1;break}Z&&(this.customFonts.push({name:R,url:X}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{t.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);L.init()}),
+z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))}
@@ -12735,16 +12782,16 @@ function ChangePage(b,e,f,c,l){SelectPage.call(this,b,f);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){e=f;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var f=0;f<e.length;f++)if(e[f].getId()==b)return e[f];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,f){var c=b.indexOf(","),l=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=e&&(l=this.getImageForPage(c,e,f),l.originalSrc=b));null==l&&(l={originalSrc:b});return l};
-EditorUi.prototype.getImageForPage=function(b,e,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=e?e:this.currentPage);l.getGlobalVariable=function(y){return"pagenumber"==y?m+1:"page"==y&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(l.container);
-this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";f=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var x=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(f)),x.width,x.height,x.x,x.y)};
+EditorUi.prototype.getImageForPage=function(b,e,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=e?e:this.currentPage);l.getGlobalVariable=function(x){return"pagenumber"==x?m+1:"page"==x&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(l.container);
+this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";f=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var v=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(f)),v.width,v.height,v.x,v.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var l=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";l!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var f=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var l=this.currentPage;null!=l&&l!=f&&(null==l.viewState||null==l.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+l.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+l.viewState.scrollTop),f=l);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,
m){l=m.getProperty("edit").changes;for(m=0;m<l.length;m++)if(l[m]instanceof SelectPage||l[m]instanceof RenamePage||l[m]instanceof MovePage||l[m]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),x=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(D){D=D.split("^");return{name:D[0],url:D[1]}})}catch(D){console.log("ExtFonts format error: "+D.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:x,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),v=this.parseBackgroundImage(b.getAttribute("backgroundImage")),x=b.getAttribute("extFonts");if(x)try{x=x.split("|").map(function(E){E=E.split("^");return{name:E[0],url:E[1]}})}catch(E){console.log("ExtFonts format error: "+E.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:v,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:x||[]}};
Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(e.setAttribute("pageWidth",f.width),e.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",
JSON.stringify(c)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))};
@@ -12764,244 +12811,228 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},x=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,x),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);
-f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(D){this.handleError(D)}return f};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
+EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},v=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var x=new mxGraphModel;x.prefix=Editor.guid()+"-";x.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,v),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);
+f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(E){this.handleError(E)}return f};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],f=0;f<b.length;f++)e.push(this.clonePage(b[f]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-f)/this.pages.length)+
1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(d,g){this.pages[d]==this.currentPage?(g.className="geActivePage",g.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):g.className="geInactivePage";g.setAttribute("draggable","true");mxEvent.addListener(g,"dragstart",mxUtils.bind(this,function(k){b.isEnabled()?(mxClient.IS_FF&&k.dataTransfer.setData("Text","<diagram/>"),l=d):mxEvent.consume(k)}));mxEvent.addListener(g,"dragend",mxUtils.bind(this,function(k){l=null;k.stopPropagation();
k.preventDefault()}));mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(k){null!=l&&(k.dataTransfer.dropEffect="move");k.stopPropagation();k.preventDefault()}));mxEvent.addListener(g,"drop",mxUtils.bind(this,function(k){null!=l&&d!=l&&this.movePage(l,d);k.stopPropagation();k.preventDefault()}));e.appendChild(g)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
-c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var x=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");x.style.position="absolute";x.style.right=this.editor.chromeless?"29px":"55px";x.style.fontSize="13pt";this.tabContainer.appendChild(x);var y=this.createControlTab(4,"&nbsp;&#10095;");y.style.position="absolute";
-y.style.right=this.editor.chromeless?"0px":"29px";y.style.fontSize="13pt";this.tabContainer.appendChild(y);var D=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=D+"px";mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,D-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,D-20);mxUtils.setOpacity(x,0<e.scrollLeft?100:50);mxUtils.setOpacity(y,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var v=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");v.style.position="absolute";v.style.right=this.editor.chromeless?"29px":"55px";v.style.fontSize="13pt";this.tabContainer.appendChild(v);var x=this.createControlTab(4,"&nbsp;&#10095;");x.style.position="absolute";
+x.style.right=this.editor.chromeless?"0px":"29px";x.style.fontSize="13pt";this.tabContainer.appendChild(x);var E=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=E+"px";mxEvent.addListener(v,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,E-20);mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,E-20);mxUtils.setOpacity(v,0<e.scrollLeft?100:50);mxUtils.setOpacity(x,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(f){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return e};
EditorUi.prototype.createControlTab=function(b,e,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=e;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var l=new mxPopupMenu(mxUtils.bind(this,function(y,D){var d=mxUtils.bind(this,function(){for(var q=0;q<this.pages.length;q++)mxUtils.bind(this,function(p){var A=y.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),D),E=this.pages[p].getId();A.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=E?" ["+E+"]":""));this.pages[p]==this.currentPage&&y.addCheckmark(A,Editor.checkmarkImage)})(q)}),g=mxUtils.bind(this,
-function(){y.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),D)});e||d();if(this.editor.graph.isEnabled()){e||(y.addSeparator(D),g());var k=this.currentPage;if(null!=k){y.addSeparator(D);var n=this.getShortPageName(k);y.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),D);y.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),D);e||y.addSeparator(D);y.addItem(mxResources.get("duplicateIt",
-[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),D)}}e&&(y.addSeparator(D),g(),y.addSeparator(D),d())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),x=mxEvent.getClientY(c);l.popup(m,x,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
+var l=new mxPopupMenu(mxUtils.bind(this,function(x,E){var d=mxUtils.bind(this,function(){for(var q=0;q<this.pages.length;q++)mxUtils.bind(this,function(p){var y=x.addItem(this.getShortPageName(this.pages[p]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[p])}),E),A=this.pages[p].getId();y.setAttribute("title",this.pages[p].getName()+" ("+(p+1)+"/"+this.pages.length+")"+(null!=A?" ["+A+"]":""));this.pages[p]==this.currentPage&&x.addCheckmark(y,Editor.checkmarkImage)})(q)}),g=mxUtils.bind(this,
+function(){x.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),E)});e||d();if(this.editor.graph.isEnabled()){e||(x.addSeparator(E),g());var k=this.currentPage;if(null!=k){x.addSeparator(E);var n=this.getShortPageName(k);x.addItem(mxResources.get("removeIt",[n]),null,mxUtils.bind(this,function(){this.removePage(k)}),E);x.addItem(mxResources.get("renameIt",[n]),null,mxUtils.bind(this,function(){this.renamePage(k,k.getName())}),E);e||x.addSeparator(E);x.addItem(mxResources.get("duplicateIt",
+[n]),null,mxUtils.bind(this,function(){this.duplicatePage(k,mxResources.get("copyOf",[k.getName()]))}),E)}}e&&(x.addSeparator(E),g(),x.addSeparator(E),d())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),v=mxEvent.getClientY(c);l.popup(m,v,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,f,c){f=this.createTab(f);var l=b.getName()||mxResources.get("untitled"),m=b.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(f,l);f.style.maxWidth=e+"px";f.style.width=e+"px";this.addTabListeners(b,f);42<e&&(f.style.textOverflow="ellipsis");return f};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,l=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(m){c=null!=this.currentMenu;l=b==this.currentPage;f.isMouseDown||l||this.selectPage(b)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var x=new mxPopupMenu(this.createPageMenu(b));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);this.resetCurrentMenu();x.destroy()});var y=mxEvent.getClientX(m),D=mxEvent.getClientY(m);x.popup(y,D,null,m);this.setCurrentMenu(x,e)}mxEvent.consume(m)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var v=new mxPopupMenu(this.createPageMenu(b));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);this.resetCurrentMenu();v.destroy()});var x=mxEvent.getClientX(m),E=mxEvent.getClientY(m);v.popup(x,E,null,m);this.setCurrentMenu(v,e)}mxEvent.consume(m)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,f){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var l=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));l+=(0==l.length?"?":"&")+"page-id="+b.getId();null!=e&&(l+="&"+e.join("&"));return(f&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+l+"#"+c.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){var l=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(f.addSeparator(c),f.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,x,y,D,d,g){m=this.createUrlParameters(m,x,y,D,d,g);y||m.push("hide-pages=1");l.isSelectionEmpty()||(y=l.getBoundingBox(l.getSelectionCells()),x=l.view.translate,d=l.view.scale,y.width/=d,y.height/=d,y.x=y.x/d-x.x,y.y=y.y/d-x.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(y.x),y:Math.round(y.y),width:Math.round(y.width),height:Math.round(y.height),border:100}))));
-D=new EmbedDialog(this,this.getLinkForPage(b,m,D));this.showDialog(D.container,450,240,!0,!0);D.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(m,v,x,E,d,g){m=this.createUrlParameters(m,v,x,E,d,g);x||m.push("hide-pages=1");l.isSelectionEmpty()||(x=l.getBoundingBox(l.getSelectionCells()),v=l.view.translate,d=l.view.scale,x.width/=d,x.height/=d,x.x=x.x/d-v.x,x.y=x.y/d-v.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(x.x),y:Math.round(x.y),width:Math.round(x.width),height:Math.round(x.height),border:100}))));
+E=new EmbedDialog(this,this.getLinkForPage(b,m,E));this.showDialog(E.container,450,240,!0,!0);E.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?m:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,
c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l,
-!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==e.lookup(m)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,m,x,y){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var D=m.slice(),d=0;d<m.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[d]),"treeFolding","0")&&this.foldTreeCell(c,m[d]);m=D;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
-function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(y,D){var d=null!=D&&this.isTreeEdge(D);d&&m.push(D);y==l||null!=D&&!d||m.push(y);return(null==D||d)&&(y==l||!this.model.isCollapsed(y))}));this.model.setCollapsed(l,c);for(var x=0;x<m.length;x++)this.model.setVisible(m[x],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,x,y,D){return this.model.filterCells(this.getEdges(c,
-l,m,x,y,D),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return A.isVertex(H)&&m(H)}function l(H){var Q=
-!1;null!=H&&(Q="1"==p.getCurrentCellStyle(H).treeMoving);return Q}function m(H){var Q=!1;null!=H&&(H=A.getParent(H),Q=p.view.getState(H),Q="tree"==(null!=Q?Q.style:p.getCellStyle(H)).containerType);return Q}function x(H){var Q=!1;null!=H&&(H=A.getParent(H),Q=p.view.getState(H),p.view.getState(H),Q=null!=(null!=Q?Q.style:p.getCellStyle(H)).childLayout);return Q}function y(H){H=p.view.getState(H);if(null!=H){var Q=p.getIncomingTreeEdges(H.cell);if(0<Q.length&&(Q=p.view.getState(Q[0]),null!=Q&&(Q=Q.absolutePoints,
-null!=Q&&0<Q.length&&(Q=Q[Q.length-1],null!=Q)))){if(Q.y==H.y&&Math.abs(Q.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(Q.y==H.y+H.height&&Math.abs(Q.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(Q.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function D(H,Q){Q=null!=Q?Q:!0;p.model.beginUpdate();try{var U=p.model.getParent(H),T=p.getIncomingTreeEdges(H),V=p.cloneCells([T[0],H]);p.model.setTerminal(V[0],p.model.getTerminal(T[0],
-!0),!0);var W=y(H),t=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=Q?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=Q?H.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=t.x,V[1].geometry.y-=t.y);var C=p.view.getState(H),N=p.view.scale;if(null!=C){var R=mxRectangle.fromRectangle(C);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(Q?H.geometry.width+10:-V[1].geometry.width-10)*N:R.y+=(Q?
-H.geometry.height+10:-V[1].geometry.height-10)*N;var O=p.getOutgoingTreeEdges(p.model.getTerminal(T[0],!0));if(null!=O){for(var P=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=t=T=0;S<O.length;S++){var X=p.model.getTerminal(O[S],!1);if(W==y(X)){var aa=p.view.getState(X);X!=H&&null!=aa&&(P&&Q!=aa.getCenterX()<C.getCenterX()||!P&&Q!=aa.getCenterY()<C.getCenterY())&&mxUtils.intersects(R,aa)&&(T=10+Math.max(T,(Math.min(R.x+R.width,aa.x+aa.width)-Math.max(R.x,aa.x))/N),t=10+Math.max(t,
-(Math.min(R.y+R.height,aa.y+aa.height)-Math.max(R.y,aa.y))/N))}}P?t=0:T=0;for(S=0;S<O.length;S++)if(X=p.model.getTerminal(O[S],!1),W==y(X)&&(aa=p.view.getState(X),X!=H&&null!=aa&&(P&&Q!=aa.getCenterX()<C.getCenterX()||!P&&Q!=aa.getCenterY()<C.getCenterY()))){var Y=[];p.traverse(aa.cell,!0,function(Z,ba){var ea=null!=ba&&p.isTreeEdge(ba);ea&&Y.push(ba);(null==ba||ea)&&Y.push(Z);return null==ba||ea});p.moveCells(Y,(Q?1:-1)*T,(Q?1:-1)*t)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function d(H){p.model.beginUpdate();
-try{var Q=y(H),U=p.getIncomingTreeEdges(H),T=p.cloneCells([U[0],H]);p.model.setTerminal(U[0],T[1],!1);p.model.setTerminal(T[0],T[1],!0);p.model.setTerminal(T[0],H,!1);var V=p.model.getParent(H),W=V.geometry,t=[];p.view.currentRoot!=V&&(T[1].geometry.x-=W.x,T[1].geometry.y-=W.y);p.traverse(H,!0,function(R,O){var P=null!=O&&p.isTreeEdge(O);P&&t.push(O);(null==O||P)&&t.push(R);return null==O||P});var C=H.geometry.width+40,N=H.geometry.height+40;Q==mxConstants.DIRECTION_SOUTH?C=0:Q==mxConstants.DIRECTION_NORTH?
-(C=0,N=-N):Q==mxConstants.DIRECTION_WEST?(C=-C,N=0):Q==mxConstants.DIRECTION_EAST&&(N=0);p.moveCells(t,C,N);return p.addCells(T,V)}finally{p.model.endUpdate()}}function g(H,Q){p.model.beginUpdate();try{var U=p.model.getParent(H),T=p.getIncomingTreeEdges(H),V=y(H);0==T.length&&(T=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=Q);var W=p.cloneCells([T[0],H]);p.model.setTerminal(W[0],H,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var t=p.getCellStyle(W[1]).newEdgeStyle;
-if(null!=t)try{var C=JSON.parse(t),N;for(N in C)p.setCellStyles(N,C[N],[W[0]]),"edgeStyle"==N&&"elbowEdgeStyle"==C[N]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(aa){}}T=p.getOutgoingTreeEdges(H);var R=U.geometry;Q=[];p.view.currentRoot==U&&(R=new mxRectangle);for(t=0;t<T.length;t++){var O=p.model.getTerminal(T[t],!1);null!=O&&Q.push(O)}var P=p.view.getBounds(Q),S=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH?
-(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-S.x-R.x+10,W[1].geometry.y+=W[1].geometry.height-R.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-S.x+-R.x+10,W[1].geometry.y-=W[1].geometry.height+R.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+R.x+40):W[1].geometry.x+(W[1].geometry.width-R.x+40),W[1].geometry.y=null==P?H.geometry.y+
-(H.geometry.height-W[1].geometry.height)/2:(P.y+P.height)/X-S.y+-R.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(H,Q,U){H=p.getOutgoingTreeEdges(H);U=p.view.getState(U);var T=[];if(null!=U&&null!=H){for(var V=0;V<H.length;V++){var W=p.view.getState(p.model.getTerminal(H[V],!1));null!=W&&(!Q&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||Q&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&T.push(W)}T.sort(function(t,C){return Q?t.x+t.width-C.x-C.width:t.y+t.height-
-C.y-C.height})}return T}function n(H,Q){var U=y(H),T=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==T&&U!=Q?q.actions.get("selectParent").funct():U==Q?(Q=p.getOutgoingTreeEdges(H),null!=Q&&0<Q.length&&p.setSelectionCell(p.model.getTerminal(Q[0],!1))):(U=p.getIncomingTreeEdges(H),null!=U&&0<U.length&&(T=k(p.model.getTerminal(U[0],!0),T,H),H=p.view.getState(H),null!=H&&(H=mxUtils.indexOf(T,H),0<=H&&(H+=Q==mxConstants.DIRECTION_NORTH||
-Q==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=T.length-1&&p.setSelectionCell(T[H].cell)))))}var q=this,p=q.editor.graph,A=p.getModel(),E=q.menus.createPopupMenu;q.menus.createPopupMenu=function(H,Q,U){E.apply(this,arguments);if(1==p.getSelectionCount()){Q=p.getSelectionCell();var T=p.getOutgoingTreeEdges(Q);H.addSeparator();0<T.length&&(c(p.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));c(p.getSelectionCell())?(H.addSeparator(),
-0<p.getIncomingTreeEdges(Q).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(Q)&&this.addMenuItems(H,["selectConnections"],null,U)}};q.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getOutgoingTreeEdges(H);if(null!=H){for(var Q=[],U=0;U<H.length;U++)Q.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(Q)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
-1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=p.getOutgoingTreeEdges(p.model.getTerminal(H[0],!0)),null!=H)){for(var Q=[],U=0;U<H.length;U++)Q.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(Q)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);null!=H&&0<H.length&&p.setSelectionCell(p.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(H,Q){H=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(H)){if(null!=Q&&mxEvent.isAltDown(Q))p.setSelectionCells(p.model.getTreeEdges(H,null==Q||!mxEvent.isShiftDown(Q),null==Q||!mxEvent.isControlDown(Q)));else{var U=[];p.traverse(H,!0,function(T,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=Q&&mxEvent.isShiftDown(Q)||U.push(T);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D");
-var z=p.removeCells;p.removeCells=function(H,Q){Q=null!=Q?Q:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));Q&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],T=0;T<H.length;T++){var V=H[T];A.isEdge(V)&&m(V)&&(U.push(V),V=A.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(t,C){var N=null!=C&&p.isTreeEdge(C);N&&W.push(C);(null==C||N)&&W.push(t);return null==C||N});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(H[T]),H=H.concat(V))}else null!=V&&U.push(H[T])}H=
-U;return z.apply(this,arguments)};q.hoverIcons.getStateAt=function(H,Q,U){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(Q,U))};var B=p.duplicateCells;p.duplicateCells=function(H,Q){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),T=0;T<U.length;T++){var V=p.view.getState(U[T]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],H)}}this.model.beginUpdate();try{var t=B.call(this,H,Q);if(t.length==H.length)for(T=0;T<H.length;T++)if(c(H[T])){var C=
-p.getIncomingTreeEdges(t[T]);W=p.getIncomingTreeEdges(H[T]);if(0==C.length&&0<W.length){var N=this.cloneCell(W[0]);this.addEdge(N,p.getDefaultParent(),this.model.getTerminal(W[0],!0),t[T])}}}finally{this.model.endUpdate()}return t};var J=p.moveCells;p.moveCells=function(H,Q,U,T,V,W,t){var C=null;this.model.beginUpdate();try{var N=V,R=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<H.length;O++)if(c(H[O])||p.model.isEdge(H[O])&&null==p.model.getTerminal(H[O],
-!0)){V=p.model.getParent(H[O]);break}if(null!=N&&V!=N&&null!=this.view.getState(H[0])){var P=p.getIncomingTreeEdges(H[0]);if(0<P.length){var S=p.view.getState(p.model.getTerminal(P[0],!0));if(null!=S){var X=p.view.getState(N);null!=X&&(Q=(X.getCenterX()-S.getCenterX())/p.view.scale,U=(X.getCenterY()-S.getCenterY())/p.view.scale)}}}}C=J.apply(this,arguments);if(null!=C&&null!=H&&C.length==H.length)for(O=0;O<C.length;O++)if(this.model.isEdge(C[O]))c(N)&&0>mxUtils.indexOf(C,this.model.getTerminal(C[O],
-!0))&&this.model.setTerminal(C[O],N,!0);else if(c(H[O])&&(P=p.getIncomingTreeEdges(H[O]),0<P.length))if(!T)c(N)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],N,!0);else if(0==p.getIncomingTreeEdges(C[O]).length){R=N;if(null==R||R==p.model.getParent(H[O]))R=p.model.getTerminal(P[0],!0);T=this.cloneCell(P[0]);this.addEdge(T,p.getDefaultParent(),R,C[O])}}finally{this.model.endUpdate()}return C};if(null!=q.sidebar){var M=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=
-function(H,Q,U,T){var V=p.model,W=null;V.beginUpdate();try{if(W=M.apply(this,arguments),c(H))for(var t=0;t<W.length;t++)if(V.isEdge(W[t])&&null==V.getTerminal(W[t],!0)){V.setTerminal(W[t],H,!0);var C=p.getCellGeometry(W[t]);C.points=null;null!=C.getTerminalPoint(!0)&&C.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var v={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},u=q.onKeyDown;q.onKeyDown=function(H){try{if(p.isEnabled()&&
-!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var Q=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==H.which?Q=mxEvent.isShiftDown(H)?d(p.getSelectionCell()):g(p.getSelectionCell()):13==H.which&&(Q=D(p.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=Q&&0<Q.length)1==Q.length&&p.model.isEdge(Q[0])?p.setSelectionCell(p.model.getTerminal(Q[0],!1)):p.setSelectionCell(Q[Q.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(p.view.getState(p.getSelectionCell())),
-p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var U=v[H.keyCode];null!=U&&(U.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(T){q.handleError(T)}mxEvent.isConsumed(H)||u.apply(this,arguments)};var G=p.connectVertex;p.connectVertex=function(H,Q,U,T,V,W,t){var C=p.getIncomingTreeEdges(H);if(c(H)){var N=y(H),R=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST,O=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;return N==Q||0==C.length?g(H,Q):R==O?d(H):D(H,Q!=mxConstants.DIRECTION_NORTH&&Q!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};p.getSubtree=function(H){var Q=
-[H];!l(H)&&!c(H)||x(H)||p.traverse(H,!0,function(U,T){var V=null!=T&&p.isTreeEdge(T);V&&0>mxUtils.indexOf(Q,T)&&Q.push(T);(null==T||V)&&0>mxUtils.indexOf(Q,U)&&Q.push(U);return null==T||V});return Q};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==e.lookup(m)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,m,v,x){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var E=m.slice(),d=0;d<m.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[d]),"treeFolding","0")&&this.foldTreeCell(c,m[d]);m=E;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
+function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(x,E){var d=null!=E&&this.isTreeEdge(E);d&&m.push(E);x==l||null!=E&&!d||m.push(x);return(null==E||d)&&(x==l||!this.model.isCollapsed(x))}));this.model.setCollapsed(l,c);for(var v=0;v<m.length;v++)this.model.setVisible(m[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,v,x,E){return this.model.filterCells(this.getEdges(c,
+l,m,v,x,E),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return y.isVertex(H)&&m(H)}function l(H){var N=
+!1;null!=H&&(N="1"==p.getCurrentCellStyle(H).treeMoving);return N}function m(H){var N=!1;null!=H&&(H=y.getParent(H),N=p.view.getState(H),N="tree"==(null!=N?N.style:p.getCellStyle(H)).containerType);return N}function v(H){var N=!1;null!=H&&(H=y.getParent(H),N=p.view.getState(H),p.view.getState(H),N=null!=(null!=N?N.style:p.getCellStyle(H)).childLayout);return N}function x(H){H=p.view.getState(H);if(null!=H){var N=p.getIncomingTreeEdges(H.cell);if(0<N.length&&(N=p.view.getState(N[0]),null!=N&&(N=N.absolutePoints,
+null!=N&&0<N.length&&(N=N[N.length-1],null!=N)))){if(N.y==H.y&&Math.abs(N.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(N.y==H.y+H.height&&Math.abs(N.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(N.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(H,N){N=null!=N?N:!0;p.model.beginUpdate();try{var U=p.model.getParent(H),Q=p.getIncomingTreeEdges(H),V=p.cloneCells([Q[0],H]);p.model.setTerminal(V[0],p.model.getTerminal(Q[0],
+!0),!0);var W=x(H),t=U.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=N?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=N?H.geometry.height+10:-V[1].geometry.height-10;p.view.currentRoot!=U&&(V[1].geometry.x-=t.x,V[1].geometry.y-=t.y);var D=p.view.getState(H),L=p.view.scale;if(null!=D){var T=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?T.x+=(N?H.geometry.width+10:-V[1].geometry.width-10)*L:T.y+=(N?
+H.geometry.height+10:-V[1].geometry.height-10)*L;var O=p.getOutgoingTreeEdges(p.model.getTerminal(Q[0],!0));if(null!=O){for(var P=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,R=t=Q=0;R<O.length;R++){var X=p.model.getTerminal(O[R],!1);if(W==x(X)){var Z=p.view.getState(X);X!=H&&null!=Z&&(P&&N!=Z.getCenterX()<D.getCenterX()||!P&&N!=Z.getCenterY()<D.getCenterY())&&mxUtils.intersects(T,Z)&&(Q=10+Math.max(Q,(Math.min(T.x+T.width,Z.x+Z.width)-Math.max(T.x,Z.x))/L),t=10+Math.max(t,(Math.min(T.y+
+T.height,Z.y+Z.height)-Math.max(T.y,Z.y))/L))}}P?t=0:Q=0;for(R=0;R<O.length;R++)if(X=p.model.getTerminal(O[R],!1),W==x(X)&&(Z=p.view.getState(X),X!=H&&null!=Z&&(P&&N!=Z.getCenterX()<D.getCenterX()||!P&&N!=Z.getCenterY()<D.getCenterY()))){var Y=[];p.traverse(Z.cell,!0,function(aa,ba){var ea=null!=ba&&p.isTreeEdge(ba);ea&&Y.push(ba);(null==ba||ea)&&Y.push(aa);return null==ba||ea});p.moveCells(Y,(N?1:-1)*Q,(N?1:-1)*t)}}}return p.addCells(V,U)}finally{p.model.endUpdate()}}function d(H){p.model.beginUpdate();
+try{var N=x(H),U=p.getIncomingTreeEdges(H),Q=p.cloneCells([U[0],H]);p.model.setTerminal(U[0],Q[1],!1);p.model.setTerminal(Q[0],Q[1],!0);p.model.setTerminal(Q[0],H,!1);var V=p.model.getParent(H),W=V.geometry,t=[];p.view.currentRoot!=V&&(Q[1].geometry.x-=W.x,Q[1].geometry.y-=W.y);p.traverse(H,!0,function(T,O){var P=null!=O&&p.isTreeEdge(O);P&&t.push(O);(null==O||P)&&t.push(T);return null==O||P});var D=H.geometry.width+40,L=H.geometry.height+40;N==mxConstants.DIRECTION_SOUTH?D=0:N==mxConstants.DIRECTION_NORTH?
+(D=0,L=-L):N==mxConstants.DIRECTION_WEST?(D=-D,L=0):N==mxConstants.DIRECTION_EAST&&(L=0);p.moveCells(t,D,L);return p.addCells(Q,V)}finally{p.model.endUpdate()}}function g(H,N){p.model.beginUpdate();try{var U=p.model.getParent(H),Q=p.getIncomingTreeEdges(H),V=x(H);0==Q.length&&(Q=[p.createEdge(U,null,"",null,null,p.createCurrentEdgeStyle())],V=N);var W=p.cloneCells([Q[0],H]);p.model.setTerminal(W[0],H,!0);if(null==p.model.getTerminal(W[0],!1)){p.model.setTerminal(W[0],W[1],!1);var t=p.getCellStyle(W[1]).newEdgeStyle;
+if(null!=t)try{var D=JSON.parse(t),L;for(L in D)p.setCellStyles(L,D[L],[W[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==D[L]&&p.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Z){}}Q=p.getOutgoingTreeEdges(H);var T=U.geometry;N=[];p.view.currentRoot==U&&(T=new mxRectangle);for(t=0;t<Q.length;t++){var O=p.model.getTerminal(Q[t],!1);null!=O&&N.push(O)}var P=p.view.getBounds(N),R=p.view.translate,X=p.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-R.x-T.x+10,W[1].geometry.y+=W[1].geometry.height-T.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-W[1].geometry.width)/2:(P.x+P.width)/X-R.x+-T.x+10,W[1].geometry.y-=W[1].geometry.height+T.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+T.x+40):W[1].geometry.x+(W[1].geometry.width-T.x+40),W[1].geometry.y=null==P?H.geometry.y+
+(H.geometry.height-W[1].geometry.height)/2:(P.y+P.height)/X-R.y+-T.y+10);return p.addCells(W,U)}finally{p.model.endUpdate()}}function k(H,N,U){H=p.getOutgoingTreeEdges(H);U=p.view.getState(U);var Q=[];if(null!=U&&null!=H){for(var V=0;V<H.length;V++){var W=p.view.getState(p.model.getTerminal(H[V],!1));null!=W&&(!N&&Math.min(W.x+W.width,U.x+U.width)>=Math.max(W.x,U.x)||N&&Math.min(W.y+W.height,U.y+U.height)>=Math.max(W.y,U.y))&&Q.push(W)}Q.sort(function(t,D){return N?t.x+t.width-D.x-D.width:t.y+t.height-
+D.y-D.height})}return Q}function n(H,N){var U=x(H),Q=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==Q&&U!=N?q.actions.get("selectParent").funct():U==N?(N=p.getOutgoingTreeEdges(H),null!=N&&0<N.length&&p.setSelectionCell(p.model.getTerminal(N[0],!1))):(U=p.getIncomingTreeEdges(H),null!=U&&0<U.length&&(Q=k(p.model.getTerminal(U[0],!0),Q,H),H=p.view.getState(H),null!=H&&(H=mxUtils.indexOf(Q,H),0<=H&&(H+=N==mxConstants.DIRECTION_NORTH||
+N==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=Q.length-1&&p.setSelectionCell(Q[H].cell)))))}var q=this,p=q.editor.graph,y=p.getModel(),A=q.menus.createPopupMenu;q.menus.createPopupMenu=function(H,N,U){A.apply(this,arguments);if(1==p.getSelectionCount()){N=p.getSelectionCell();var Q=p.getOutgoingTreeEdges(N);H.addSeparator();0<Q.length&&(c(p.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));c(p.getSelectionCell())?(H.addSeparator(),
+0<p.getIncomingTreeEdges(N).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<p.model.getEdgeCount(N)&&this.addMenuItems(H,["selectConnections"],null,U)}};q.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getOutgoingTreeEdges(H);if(null!=H){for(var N=[],U=0;U<H.length;U++)N.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(N)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&
+1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=p.getOutgoingTreeEdges(p.model.getTerminal(H[0],!0)),null!=H)){for(var N=[],U=0;U<H.length;U++)N.push(p.model.getTerminal(H[U],!1));p.setSelectionCells(N)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var H=p.getSelectionCell();H=p.getIncomingTreeEdges(H);null!=H&&0<H.length&&p.setSelectionCell(p.model.getTerminal(H[0],
+!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(H,N){H=p.getSelectionCell();if(p.isEnabled()&&p.model.isVertex(H)){if(null!=N&&mxEvent.isAltDown(N))p.setSelectionCells(p.model.getTreeEdges(H,null==N||!mxEvent.isShiftDown(N),null==N||!mxEvent.isControlDown(N)));else{var U=[];p.traverse(H,!0,function(Q,V){var W=null!=V&&p.isTreeEdge(V);W&&U.push(V);null!=V&&!W||null!=N&&mxEvent.isShiftDown(N)||U.push(Q);return null==V||W})}p.setSelectionCells(U)}},null,null,"Alt+Shift+D");
+var C=p.removeCells;p.removeCells=function(H,N){N=null!=N?N:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));N&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],Q=0;Q<H.length;Q++){var V=H[Q];y.isEdge(V)&&m(V)&&(U.push(V),V=y.getTerminal(V,!1));if(c(V)){var W=[];p.traverse(V,!0,function(t,D){var L=null!=D&&p.isTreeEdge(D);L&&W.push(D);(null==D||L)&&W.push(t);return null==D||L});0<W.length&&(U=U.concat(W),V=p.getIncomingTreeEdges(H[Q]),H=H.concat(V))}else null!=V&&U.push(H[Q])}H=
+U;return C.apply(this,arguments)};q.hoverIcons.getStateAt=function(H,N,U){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(N,U))};var B=p.duplicateCells;p.duplicateCells=function(H,N){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),Q=0;Q<U.length;Q++){var V=p.view.getState(U[Q]);if(null!=V&&c(V.cell)){var W=p.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],H)}}this.model.beginUpdate();try{var t=B.call(this,H,N);if(t.length==H.length)for(Q=0;Q<H.length;Q++)if(c(H[Q])){var D=
+p.getIncomingTreeEdges(t[Q]);W=p.getIncomingTreeEdges(H[Q]);if(0==D.length&&0<W.length){var L=this.cloneCell(W[0]);this.addEdge(L,p.getDefaultParent(),this.model.getTerminal(W[0],!0),t[Q])}}}finally{this.model.endUpdate()}return t};var I=p.moveCells;p.moveCells=function(H,N,U,Q,V,W,t){var D=null;this.model.beginUpdate();try{var L=V,T=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var O=0;O<H.length;O++)if(c(H[O])||p.model.isEdge(H[O])&&null==p.model.getTerminal(H[O],
+!0)){V=p.model.getParent(H[O]);break}if(null!=L&&V!=L&&null!=this.view.getState(H[0])){var P=p.getIncomingTreeEdges(H[0]);if(0<P.length){var R=p.view.getState(p.model.getTerminal(P[0],!0));if(null!=R){var X=p.view.getState(L);null!=X&&(N=(X.getCenterX()-R.getCenterX())/p.view.scale,U=(X.getCenterY()-R.getCenterY())/p.view.scale)}}}}D=I.apply(this,arguments);if(null!=D&&null!=H&&D.length==H.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(L)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O],
+!0))&&this.model.setTerminal(D[O],L,!0);else if(c(H[O])&&(P=p.getIncomingTreeEdges(H[O]),0<P.length))if(!Q)c(L)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],L,!0);else if(0==p.getIncomingTreeEdges(D[O]).length){T=L;if(null==T||T==p.model.getParent(H[O]))T=p.model.getTerminal(P[0],!0);Q=this.cloneCell(P[0]);this.addEdge(Q,p.getDefaultParent(),T,D[O])}}finally{this.model.endUpdate()}return D};if(null!=q.sidebar){var M=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=
+function(H,N,U,Q){var V=p.model,W=null;V.beginUpdate();try{if(W=M.apply(this,arguments),c(H))for(var t=0;t<W.length;t++)if(V.isEdge(W[t])&&null==V.getTerminal(W[t],!0)){V.setTerminal(W[t],H,!0);var D=p.getCellGeometry(W[t]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var G={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"),80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},S=q.onKeyDown;q.onKeyDown=function(H){try{if(p.isEnabled()&&
+!p.isEditing()&&c(p.getSelectionCell())&&1==p.getSelectionCount()){var N=null;0<p.getIncomingTreeEdges(p.getSelectionCell()).length&&(9==H.which?N=mxEvent.isShiftDown(H)?d(p.getSelectionCell()):g(p.getSelectionCell()):13==H.which&&(N=E(p.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=N&&0<N.length)1==N.length&&p.model.isEdge(N[0])?p.setSelectionCell(p.model.getTerminal(N[0],!1)):p.setSelectionCell(N[N.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(p.view.getState(p.getSelectionCell())),
+p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var U=G[H.keyCode];null!=U&&(U.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(n(p.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(n(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(H))}}catch(Q){q.handleError(Q)}mxEvent.isConsumed(H)||S.apply(this,arguments)};var u=p.connectVertex;p.connectVertex=function(H,N,U,Q,V,W,t){var D=p.getIncomingTreeEdges(H);if(c(H)){var L=x(H),T=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;return L==N||0==D.length?g(H,N):T==O?d(H):E(H,N!=mxConstants.DIRECTION_NORTH&&N!=mxConstants.DIRECTION_WEST)}return u.apply(this,arguments)};p.getSubtree=function(H){var N=
+[H];!l(H)&&!c(H)||v(H)||p.traverse(H,!0,function(U,Q){var V=null!=Q&&p.isTreeEdge(Q);V&&0>mxUtils.indexOf(N,Q)&&N.push(Q);(null==Q||V)&&0>mxUtils.indexOf(N,U)&&N.push(U);return null==Q||V});return N};var z=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){z.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(H)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){L.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,Q){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container",
-function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var x=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var y=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-y.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;x.insertEdge(D,!0);y.insertEdge(D,!1);m.insert(D);m.insert(x);m.insert(y);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-m.vertex=!0;var x=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};');x.vertex=!0;var y=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};');
-y.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;x.insertEdge(D,!0);y.insertEdge(D,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;x.insertEdge(n,!0);k.insertEdge(n,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-q.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;x.insertEdge(p,!0);q.insertEdge(p,!1);m.insert(D);m.insert(g);m.insert(n);m.insert(p);m.insert(x);m.insert(y);m.insert(d);m.insert(k);m.insert(q);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
+this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(H)})))};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){J.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,N){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container",
+function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var x=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");E.geometry.relative=!0;E.edge=!0;v.insertEdge(E,!0);x.insertEdge(E,!1);m.insert(E);m.insert(v);m.insert(x);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
+m.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var x=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.relative=!0;E.edge=!0;v.insertEdge(E,!0);x.insertEdge(E,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+k.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");n.geometry.relative=!0;n.edge=!0;v.insertEdge(n,!0);k.insertEdge(n,!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+q.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;v.insertEdge(p,!0);q.insertEdge(p,!1);m.insert(E);m.insert(g);m.insert(n);m.insert(p);m.insert(v);m.insert(x);m.insert(d);m.insert(k);m.insert(q);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var m=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.setTerminalPoint(new mxPoint(-40,40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-m.vertex=!0;var x=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;var y=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"};');
-y.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;x.insertEdge(D,!0);y.insertEdge(D,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-g.geometry.relative=!0;g.edge=!0;x.insertEdge(g,!0);d.insertEdge(g,!1);m.insert(D);m.insert(g);m.insert(x);m.insert(y);m.insert(d);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(m,"treeRoot",
-"1");m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree division",function(){var m=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-x.geometry.setTerminalPoint(new mxPoint(0,0),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);return sb.createVertexTemplateFromCells([m,x],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-x.geometry.setTerminalPoint(new mxPoint(110,-40),!0);x.geometry.relative=!0;x.edge=!0;m.insertEdge(x,!1);var y=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");y.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;y.insertEdge(D,!1);return sb.createVertexTemplateFromCells([x,D,m,y],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(z,B){if(EditorUi.windowed){var J=z.editor.graph;J.popupMenuHandler.hideMenu();if(null==z.formatWindow){B="1"==urlParams.sketch?Math.max(10,z.diagramContainer.clientWidth-241):Math.max(10,z.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;J="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,J.container.clientHeight-10);z.formatWindow=new WrapperWindow(z,mxResources.get("format"),B,M,240,J,
-function(v){z.createFormat(v).init()});z.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.formatWindow.window.fit()}));z.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else z.formatWindow.window.setVisible(null!=B?B:!z.formatWindow.window.isVisible())}else null==z.formatElt&&(z.formatElt=z.createSidebarContainer(),z.createFormat(z.formatElt).init(),z.formatElt.style.border="none",z.formatElt.style.width="240px",z.formatElt.style.borderLeft="1px solid gray",
-z.formatElt.style.right="0px"),J=z.diagramContainer.parentNode,null!=z.formatElt.parentNode?(z.formatElt.parentNode.removeChild(z.formatElt),J.style.right="0px"):(J.parentNode.appendChild(z.formatElt),J.style.right=z.formatElt.style.width)}function e(z,B){function J(G,I){var F=z.menus.get(G);G=u.addMenu(I,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 M=document.createElement("div");M.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;";M.className="geTitle";var v=document.createElement("span");v.style.fontSize="18px";v.style.marginRight="5px";v.innerHTML="+";M.appendChild(v);mxUtils.write(M,mxResources.get("moreShapes"));B.appendChild(M);mxEvent.addListener(M,"click",function(){z.actions.get("shapes").funct()});
-var u=new Menubar(z,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=z.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",M.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("newLibrary")),M.appendChild(v),
-B.appendChild(M),mxEvent.addListener(M,"click",z.actions.get("newLibrary").funct),M=document.createElement("div"),M.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;",M.className="geTitle",v=document.createElement("span"),v.style.cssText="position:relative;top:6px;",mxUtils.write(v,mxResources.get("openLibrary")),M.appendChild(v),B.appendChild(M),mxEvent.addListener(M,
-"click",z.actions.get("openLibrary").funct)):(M=J("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=J("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");B.appendChild(z.sidebar.container);B.style.overflow="hidden"}
-function f(z,B){if(EditorUi.windowed){var J=z.editor.graph;J.popupMenuHandler.hideMenu();if(null==z.sidebarWindow){B=Math.min(J.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(J.container.clientHeight-40,650);z.sidebarWindow=new WrapperWindow(z,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(J.container.clientHeight-M)/2):56,B-6,M-6,function(v){e(z,v)});z.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){z.sidebarWindow.window.fit()}));z.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);z.sidebarWindow.window.setVisible(!0);isLocalStorage&&z.getLocalData("sidebar",function(v){z.sidebar.showEntries(v,null,!0)});z.restoreLibraries()}else z.sidebarWindow.window.setVisible(null!=B?B:!z.sidebarWindow.window.isVisible())}else null==z.sidebarElt&&(z.sidebarElt=z.createSidebarContainer(),e(z,z.sidebarElt),z.sidebarElt.style.border="none",z.sidebarElt.style.width="210px",
-z.sidebarElt.style.borderRight="1px solid gray"),J=z.diagramContainer.parentNode,null!=z.sidebarElt.parentNode?(z.sidebarElt.parentNode.removeChild(z.sidebarElt),J.style.left="0px"):(J.parentNode.appendChild(z.sidebarElt),J.style.left=z.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(z){}Editor.checkmarkImage=
+m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.setTerminalPoint(new mxPoint(-40,40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+m.vertex=!0;var v=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(v,"treeRoot","1");v.vertex=!0;var x=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");E.geometry.relative=!0;E.edge=!0;v.insertEdge(E,!0);x.insertEdge(E,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);m.insert(E);m.insert(g);m.insert(v);m.insert(x);m.insert(d);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree root",function(){var m=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(m,"treeRoot",
+"1");m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree division",function(){var m=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);return sb.createVertexTemplateFromCells([m,v],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;m.insertEdge(v,!1);var x=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=
+!0;E.edge=!0;x.insertEdge(E,!1);return sb.createVertexTemplateFromCells([v,E,m,x],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(A,C){if(EditorUi.windowed){var B=A.editor.graph;B.popupMenuHandler.hideMenu();if(null==A.formatWindow){C="1"==urlParams.sketch?Math.max(10,A.diagramContainer.clientWidth-241):Math.max(10,A.diagramContainer.clientWidth-248);var I="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;B="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,B.container.clientHeight-10);A.formatWindow=new WrapperWindow(A,mxResources.get("format"),C,I,240,B,
+function(M){A.createFormat(M).init()});A.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.formatWindow.window.fit()}));A.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else A.formatWindow.window.setVisible(null!=C?C:!A.formatWindow.window.isVisible())}else null==A.formatElt&&(A.formatElt=A.createSidebarContainer(),A.createFormat(A.formatElt).init(),A.formatElt.style.border="none",A.formatElt.style.width="240px",A.formatElt.style.borderLeft="1px solid gray",
+A.formatElt.style.right="0px"),B=A.diagramContainer.parentNode,null!=A.formatElt.parentNode?(A.formatElt.parentNode.removeChild(A.formatElt),B.style.right="0px"):(B.parentNode.appendChild(A.formatElt),B.style.right=A.formatElt.style.width)}function e(A,C){function B(S,u){var z=A.menus.get(S);S=G.addMenu(u,mxUtils.bind(this,function(){z.funct.apply(this,arguments)}));S.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+S.className="geTitle";C.appendChild(S);return S}var I=document.createElement("div");I.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";I.className="geTitle";var M=document.createElement("span");M.style.fontSize="18px";M.style.marginRight="5px";M.innerHTML="+";I.appendChild(M);mxUtils.write(I,mxResources.get("moreShapes"));C.appendChild(I);mxEvent.addListener(I,"click",function(){A.actions.get("shapes").funct()});
+var G=new Menubar(A,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?I.style.bottom="0":null!=A.actions.get("newLibrary")?(I=document.createElement("div"),I.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("newLibrary")),I.appendChild(M),
+C.appendChild(I),mxEvent.addListener(I,"click",A.actions.get("newLibrary").funct),I=document.createElement("div"),I.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("openLibrary")),I.appendChild(M),C.appendChild(I),mxEvent.addListener(I,
+"click",A.actions.get("openLibrary").funct)):(I=B("newLibrary",mxResources.get("newLibrary")),I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="0",I=B("openLibraryFrom",mxResources.get("openLibraryFrom")),I.style.borderLeft="1px solid lightgray",I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="50%");C.appendChild(A.sidebar.container);C.style.overflow="hidden"}
+function f(A,C){if(EditorUi.windowed){var B=A.editor.graph;B.popupMenuHandler.hideMenu();if(null==A.sidebarWindow){C=Math.min(B.container.clientWidth-10,218);var I="1"==urlParams.embedInline?650:Math.min(B.container.clientHeight-40,650);A.sidebarWindow=new WrapperWindow(A,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(B.container.clientHeight-I)/2):56,C-6,I-6,function(M){e(A,M)});A.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){A.sidebarWindow.window.fit()}));A.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);A.sidebarWindow.window.setVisible(!0);isLocalStorage&&A.getLocalData("sidebar",function(M){A.sidebar.showEntries(M,null,!0)});A.restoreLibraries()}else A.sidebarWindow.window.setVisible(null!=C?C:!A.sidebarWindow.window.isVisible())}else null==A.sidebarElt&&(A.sidebarElt=A.createSidebarContainer(),e(A,A.sidebarElt),A.sidebarElt.style.border="none",A.sidebarElt.style.width="210px",
+A.sidebarElt.style.borderRight="1px solid gray"),B=A.diagramContainer.parentNode,null!=A.sidebarElt.parentNode?(A.sidebarElt.parentNode.removeChild(A.sidebarElt),B.style.left="0px"):(B.parentNode.appendChild(A.sidebarElt),B.style.left=A.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(A){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");l.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var x=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(z,B){null!=B.shortcut&&900>c&&!mxClient.IS_IOS?z.firstChild.nextSibling.setAttribute("title",B.shortcut):x.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.apply(this,arguments);if(null!=this.userElement){var z=this.userElement;z.style.cssText="position:relative;cursor:pointer;display:"+z.style.display;z.className="geToolbarButton";
-z.innerText="";z.style.backgroundImage="url("+Editor.userImage+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";var B=mxResources.get("changeUser");if("none"!=z.style.display){z.style.display="inline-block";var J=this.getCurrentFile();if(null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()){var M=document.createElement("img");M.setAttribute("border","0");M.style.position="absolute";
-M.style.left="18px";M.style.top="2px";M.style.width="12px";M.style.height="12px";var v=J.getRealtimeError();J=J.getRealtimeState();B+=" ("+mxResources.get("realtimeCollaboration");1==J?(M.src=Editor.syncImage,B+=mxResources.get("online")):(M.src=Editor.syncProblemImage,B=null!=v&&null!=v.message?B+v.message:B+mxResources.get("disconnected"));z.style.marginRight="6px";z.appendChild(M);B+=")"}}z.setAttribute("title",B)}};var D=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){D.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var z=document.createElement("div");z.style.display="inline-block";z.style.position="relative";z.style.marginTop="6px";z.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var J="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,J);B.setAttribute("title",J);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));z.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),z.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()})),z.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),J="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,
-J),B.setAttribute("title",J),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),z.appendChild(B));this.buttonContainer.appendChild(z);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(z,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,
-z)){var J=mxUtils.getOffset(this.editorUi.picker);J.x+=this.editorUi.picker.offsetWidth+4;J.y+=z.offsetTop-B.height/2+16;return J}var M=d.apply(this,arguments);J=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=J.x-16;M.y+=J.y;return M};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(z,B,J){var M=this.editorUi.editor.graph;z.smartSeparators=!0;g.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(z.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(z,
-["-","lockUnlock"],null,J)):1==M.getSelectionCount()?(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(z,M.isCellCollapsed(B)?["expand"]:["collapse"],null,J),this.addMenuItems(z,["collapsible","-","lockUnlock","enterGroup"],null,J),z.addSeparator(),this.addSubmenu("layout",z)):M.isSelectionEmpty()&&M.isEnabled()?(z.addSeparator(),this.addMenuItems(z,["editData"],null,J),z.addSeparator(),this.addSubmenu("layout",z),this.addSubmenu("insert",z),this.addMenuItems(z,["-","exitGroup"],null,J)):
-M.isEnabled()&&this.addMenuItems(z,["-","lockUnlock"],null,J)};var k=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(z,B,J){k.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(z,["copyAsImage"],null,J)};EditorUi.prototype.toggleFormatPanel=function(z){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=z?z:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var n=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.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);n.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(z){q.apply(this,arguments);if(z){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&
-null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var z=this.editorUi,B=z.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(F){z.setPagesVisible(!Editor.pagesVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.pagesVisible});z.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){f(z)},null,null,Editor.ctrlKey+"+Shift+K"));B=z.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(z)}));B.shortcut=z.actions.get("formatPanel").shortcut;B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-z.formatWindow&&z.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!z.isOffline()&&z.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var F=new ParseDialog(z,mxResources.get("plantUml")+"...","plantUml");z.showDialog(F.container,620,420,!0,!1);F.init()}));z.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var F=new ParseDialog(z,mxResources.get("mermaid")+"...","mermaid");z.showDialog(F.container,620,420,!0,!1);F.init()}));var J=
-this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(F,L){var K=this.editorUi.editor.graph,H=K.getSelectionCell();J.call(this,F,H,null,L);this.addMenuItems(F,["editTooltip"],L);K.model.isVertex(H)&&this.addMenuItems(F,["editGeometry"],L);this.addMenuItems(F,["-","edit"],L)})));this.addPopupMenuCellEditItems=function(F,L,K,H){F.addSeparator();this.addSubmenu("editCell",F,H,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile();
-z.menus.addMenuItems(F,["new"],L);z.menus.addSubmenu("openFrom",F,L);isLocalStorage&&this.addSubmenu("openRecent",F,L);F.addSeparator(L);z.menus.addMenuItems(F,["-","save"],L);null!=K&&K.constructor==DriveFile||z.menus.addMenuItems(F,["saveAs"],L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||K.constructor==LocalFile&&null==K.fileHandle||z.menus.addMenuItems(F,["synchronize"],L);null!=K&&K.constructor==DriveFile?z.menus.addMenuItems(F,"- rename makeCopy - moveToFolder openFolder".split(" "),L):(z.menus.addMenuItems(F,
-["-","rename"],L),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(F,["upload"],L):z.menus.addMenuItems(F,["makeCopy"],L));null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["-","revisionHistory"],L);if(null!=K){if(null!=z.fileNode&&"1"!=urlParams.embedInline){var H=null!=K.getTitle()?K.getTitle():z.defaultFilename;(K.constructor==DriveFile&&null!=K.sync&&K.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&this.addMenuItems(F,
-["properties"],L)}K.constructor==DriveFile&&z.menus.addMenuItems(F,["share"],L)}z.menus.addMenuItems(F,["-","autosave"],L)})));this.put("diagram",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile();z.menus.addSubmenu("extras",F,L,mxResources.get("preferences"));F.addSeparator(L);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)z.menus.addMenuItems(F,"new open - synchronize - save saveAs -".split(" "),L);else if("1"==urlParams.embed||z.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&
-"1"!=urlParams.embedInline&&z.menus.addMenuItems(F,["-","save"],L);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||z.mode==App.MODE_ATLAS)z.menus.addMenuItems(F,["saveAndExit"],L),null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["revisionHistory"],L);F.addSeparator(L)}else z.mode==App.MODE_ATLAS?z.menus.addMenuItems(F,["save","synchronize","-"],L):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(z.menus.addMenuItems(F,["new"],L),z.menus.addSubmenu("openFrom",
-F,L),isLocalStorage&&this.addSubmenu("openRecent",F,L),F.addSeparator(L),null!=K&&(K.constructor==DriveFile&&z.menus.addMenuItems(F,["share"],L),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||K.constructor==LocalFile||z.menus.addMenuItems(F,["synchronize"],L)),F.addSeparator(L),z.menus.addSubmenu("save",F,L)):z.menus.addSubmenu("file",F,L));z.menus.addSubmenu("exportAs",F,L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?z.menus.addMenuItems(F,["import"],L):"1"!=urlParams.noFileMenu&&z.menus.addSubmenu("importFrom",
-F,L);z.menus.addMenuItems(F,["-","findReplace"],L);z.commentsSupported()&&z.menus.addMenuItems(F,["comments","-"],L);z.menus.addMenuItems(F,["toggleFormat","layers","tags","-","pageSetup"],L);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||z.menus.addMenuItems(F,["print"],L);"1"!=urlParams.sketch&&null!=K&&null!=z.fileNode&&"1"!=urlParams.embedInline&&(K=null!=K.getTitle()?K.getTitle():z.defaultFilename,/(\.html)$/i.test(K)||/(\.svg)$/i.test(K)||this.addMenuItems(F,["-","properties"]));
-F.addSeparator(L);z.menus.addSubmenu("help",F,L);"1"==urlParams.embed||z.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||z.mode==App.MODE_ATLAS)&&z.menus.addMenuItems(F,["-","exit"],L):"1"!=urlParams.noFileMenu&&z.menus.addMenuItems(F,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(F,L){var K=z.getCurrentFile();null!=K&&K.constructor==DriveFile?z.menus.addMenuItems(F,["save","makeCopy","-","rename","moveToFolder"],L):(z.menus.addMenuItems(F,["save","saveAs","-","rename"],L),
-z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(F,["upload"],L):z.menus.addMenuItems(F,["makeCopy"],L));z.menus.addMenuItems(F,["-","autosave"],L);null!=K&&K.isRevisionHistorySupported()&&z.menus.addMenuItems(F,["-","revisionHistory"],L)})));var M=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(F,L){M.funct(F,L);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||z.menus.addMenuItems(F,["publishLink"],L);z.mode!=App.MODE_ATLAS&&
-"1"!=urlParams.extAuth&&(F.addSeparator(L),z.menus.addSubmenu("embed",F,L))})));var v=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(F,L){z.menus.addInsertTableCellItem(F,L)})));var u=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(F,L){u.funct(F,L);this.addMenuItems(F,["-","ruler","-","pageScale"],L)})));this.put("extras",new Menu(mxUtils.bind(this,function(F,L){null==v||"1"==urlParams.embed&&null!=urlParams.lang||z.menus.addSubmenu("language",F,
-L);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&z.mode!=App.MODE_ATLAS&&z.menus.addSubmenu("theme",F,L);z.menus.addSubmenu("units",F,L);F.addSeparator(L);"1"!=urlParams.sketch&&z.menus.addMenuItems(F,["scrollbars","-","tooltips","copyConnect","collapseExpand"],L);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&z.mode!=App.MODE_ATLAS&&z.menus.addMenuItems(F,["-","showStartScreen","search","scratchpad"],L);F.addSeparator(L);"1"==urlParams.sketch&&
-z.menus.addMenuItems(F,["copyConnect","collapseExpand","tooltips","-"],L);EditorUi.isElectronApp&&z.menus.addMenuItems(F,["-","spellCheck","autoBkp","drafts","-"],L);var K=z.getCurrentFile();null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(F,["-","showRemoteCursors","shareCursor","-"],L);Graph.translateDiagram&&z.menus.addMenuItems(F,["diagramLanguage"],L);z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(F,"configuration",L);"1"!=urlParams.sketch&&!z.isOfflineApp()&&isLocalStorage&&
-z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(F,"plugins",L);F.addSeparator(L)})));mxUtils.bind(this,function(){var F=this.get("insert"),L=F.funct;F.funct=function(K,H){"1"==urlParams.sketch?(z.menus.addMenuItems(K,["toggleShapes"],H),z.menus.addSubmenu("table",K,H),K.addSeparator(H),z.insertTemplateEnabled&&!z.isOffline()&&z.menus.addMenuItems(K,["insertTemplate"],H),z.menus.addMenuItems(K,["insertImage","insertLink","-"],H),z.menus.addSubmenu("insertAdvanced",K,H,mxResources.get("advanced")),z.menus.addSubmenu("layout",
-K,H)):(L.apply(this,arguments),z.menus.addSubmenu("table",K,H))}})();var G="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(F,L,K,H){F.addItem(K,null,mxUtils.bind(this,function(){var Q=new CreateGraphDialog(z,K,H);z.showDialog(Q.container,620,420,!0,!1);Q.init()}),L)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(F,L){for(var K=0;K<G.length;K++)"-"==G[K]?F.addSeparator(L):I(F,L,mxResources.get(G[K])+"...",G[K])})))};EditorUi.prototype.installFormatToolbar=
-function(z){var B=this.editor.graph,J=document.createElement("div");J.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,v){0<B.getSelectionCount()?(z.appendChild(J),J.innerHTML="Selected: "+B.getSelectionCount()):null!=J.parentNode&&J.parentNode.removeChild(J)}))};var A=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!A&&null!=this.formatWindow){A=!0;var z=this.formatWindow.window.toggleMinimized,B=240;this.formatWindow.window.toggleMinimized=function(){z.apply(this,arguments);this.minimized?(B=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+B-140+"px"):(this.div.style.width=B+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-B+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function z(ca,fa,da){var ha=u.menus.get(ca),ja=L.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){ha.funct.apply(this,arguments)}),F);ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing=
-"border-box";ja.style.top="6px";ja.style.marginRight="6px";ja.style.height="30px";ja.style.paddingTop="6px";ja.style.paddingBottom="6px";ja.style.cursor="pointer";ja.setAttribute("title",mxResources.get(ca));u.menus.menuCreated(ha,ja,"geMenuItem");null!=da?(ja.style.backgroundImage="url("+da+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px",ja.innerText=""):fa||(ja.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",ja.style.backgroundPosition="right 6px center",ja.style.backgroundRepeat="no-repeat",ja.style.paddingRight="22px");return ja}function B(ca,fa,da,ha,ja,sa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow=
-"none",oa.style.padding="6px",oa.style.margin="0px");null!=u.statusContainer?I.insertBefore(oa,u.statusContainer):I.appendChild(oa);null!=sa?(oa.style.backgroundImage="url("+sa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ca){Ca.preventDefault()}));mxEvent.addListener(oa,"click",function(Ca){"disabled"!=
-oa.getAttribute("disabled")&&fa(Ca);mxEvent.consume(Ca)});null==da&&(oa.style.marginRight="4px");null!=ha&&oa.setAttribute("title",ha);null!=ja&&(ca=function(){ja.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ja.addListener("stateChanged",ca),G.addListener("enabledChanged",ca),ca());return oa}function J(ca,fa,da){da=document.createElement("div");da.className="geMenuItem";da.style.display="inline-block";da.style.verticalAlign=
-"top";da.style.marginRight="6px";da.style.padding="0 4px 0 4px";da.style.height="30px";da.style.position="relative";da.style.top="0px";"1"==urlParams.sketch&&(da.style.boxShadow="none");for(var ha=0;ha<ca.length;ha++)null!=ca[ha]&&("1"==urlParams.sketch&&(ca[ha].style.padding="10px 8px",ca[ha].style.width="30px"),ca[ha].style.margin="0px",ca[ha].style.boxShadow="none",da.appendChild(ca[ha]));null!=fa&&mxUtils.setOpacity(da,fa);null!=u.statusContainer&&"1"!=urlParams.sketch?I.insertBefore(da,u.statusContainer):
-I.appendChild(da);return da}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(C.style.left=58>t.offsetTop-t.offsetHeight/2?"70px":"10px");else{for(var ca=I.firstChild;null!=ca;){var fa=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=fa}F=I.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>c||"1"==urlParams.sketch;var da=null;ca||(da=z("diagram"));fa=ca?z("diagram",null,Editor.menuImage):
-null;null!=fa&&(da=fa);J([da,B(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),ca?Editor.shapesImage:null),B(mxResources.get("format"),u.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+u.actions.get("formatPanel").shortcut+")",u.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);var ha=z("insert",!0,ca?V:null);J([ha,B(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),
-u.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=c&&(J([xa,Ma],60),520<=c&&J([Ha,640<=c?B("",pa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",pa,Editor.zoomInImage):null,640<=c?B("",na.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",na,Editor.zoomOutImage):null],60))}null!=da&&(mxEvent.disableContextMenu(da),mxEvent.addGestureListeners(da,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)||
-mxEvent.isPopupTrigger(ja))&&u.appIconClicked(ja)}),null,null));fa=u.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Ia&&(ha=L.addMenu("",fa.funct),ha.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),ha.className="geToolbarButton",ha.style.backgroundImage="url("+Editor.globeImage+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat=
-"no-repeat",ha.style.backgroundSize="22px 22px",ha.style.position="absolute",ha.style.height="24px",ha.style.width="24px",ha.style.zIndex="1",ha.style.right="8px",ha.style.cursor="pointer",ha.style.top="12px",I.appendChild(ha),Ia=ha,"1"==urlParams["live-ui"]&&(fa=mxUtils.bind(this,function(){ha.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),u.addListener("darkModeChanged",fa),fa())),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight=
-"4px",null!=Ia&&(Ia.parentNode.removeChild(Ia),Ia=null))}E.apply(this,arguments);var v=document.createElement("div");v.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";v.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(v);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
-0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div);
-else{var ca=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),da=u.embedViewport.x+u.embedViewport.width,ha=parseInt(this.div.offsetTop),ja=parseInt(this.div.offsetHeight),sa=u.embedViewport.y+u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(ca,da-fa))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ha,sa-ja))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,
-parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),v=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>v)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var G=u.editor.graph;
-u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var I=document.createElement("div");I.className="geMenubarContainer";var F=null,L=new Menubar(u,I);u.statusContainer=u.createStatusContainer();u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.marginTop="7px";u.statusContainer.style.marginLeft="6px";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var K=u.hideCurrentMenu;
-u.hideCurrentMenu=function(){K.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=u.descriptorChanged;u.descriptorChanged=function(){H.apply(this,arguments);var ca=u.getCurrentFile();if(null!=ca&&null!=ca.getTitle()){var fa=ca.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);I.setAttribute("title",ca.getTitle()+(null!=fa?" ("+fa+")":""))}else I.removeAttribute("title")};u.setStatusText(u.editor.getStatus());
-I.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";I.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-v=u.diagramContainer.parentNode;var Q=document.createElement("div");Q.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){Q.style.top="20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var U=document.createElement("div");
-U.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(U);v.appendChild(u.titlebar)}U=u.menus.get("viewZoom");var T=U.funct;U.funct=function(ca,fa){T.apply(this,arguments);u.menus.addMenuItems(ca,["-","outline","fullscreen"],fa)};var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):null,t="1"==urlParams.sketch?
-document.createElement("div"):null,C="1"==urlParams.sketch?document.createElement("div"):null,N=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)C.style.left="10px",C.style.top="10px",t.style.left="10px",t.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+" "+u.diagramContainer.style.height),u.diagramContainer.style.top="0px",
-u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var ca=u.diagramContainer.getAttribute("data-bounds");if(null!=ca){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var fa=G.getGraphBounds();ca=ca.split(" ");u.diagramContainer.style.top=ca[0];u.diagramContainer.style.left=ca[1];u.diagramContainer.style.width=fa.width+
-50+"px";u.diagramContainer.style.height=fa.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}C.style.left=u.diagramContainer.offsetLeft+"px";C.style.top=u.diagramContainer.offsetTop-C.offsetHeight-4+"px";t.style.display="";t.style.left=u.diagramContainer.offsetLeft-t.offsetWidth-4+"px";t.style.top=u.diagramContainer.offsetTop+
-"px";W.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=C.style.top;W.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth-u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/
-2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility=u.bottomResizer.style.visibility;I.style.display="none";C.style.visibility="";W.style.visibility=""}),R=u.actions.get("fullscreen"),O=B("",R.funct,null,mxResources.get(""),R,Editor.fullscreenImage),P=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?
-Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";N()});R=mxUtils.bind(this,function(){b(u,!0);u.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y);P()});u.addListener("inlineFullscreenChanged",P);u.addListener("editInlineStart",R);"1"==urlParams.embedInline&&u.addListener("darkModeChanged",
-R);u.addListener("editInlineStop",mxUtils.bind(this,function(ca){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";C.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}));if(null!=u.hoverIcons){var S=u.hoverIcons.update;u.hoverIcons.update=function(){G.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=G.freehand){var X=G.freehand.createStyle;
-G.freehand.createStyle=function(ca){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){t.className="geToolbarContainer";W.className="geToolbarContainer";C.className="geToolbarContainer";I.className="geToolbarContainer";u.picker=t;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=u.getServiceName()&&(mxEvent.addListener(I,"mouseenter",function(){u.statusContainer.style.display="inline-block"}),mxEvent.addListener(I,"mouseleave",function(){aa||(u.statusContainer.style.display="none")}));
-var Y=mxUtils.bind(this,function(ca){null!=u.notificationBtn&&(null!=ca?u.notificationBtn.setAttribute("title",ca):u.notificationBtn.removeAttribute("title"))});if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var Z=z("theme",null,Editor.darkModeImage);null!=Z&&(Z.style.position="relative",Z.style.backgroundPosition="top center",Z.style.backgroundSize="22px 22px",Z.style.width="24px",Z.style.height="28px",Z.style.top="4px",I.appendChild(Z),R=mxUtils.bind(this,function(){Z.style.backgroundImage=
-"url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),u.addListener("darkModeChanged",R),R())}I.style.visibility=20>I.clientWidth?"hidden":"";u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=u.getServiceName())if(u.statusContainer.style.display="inline-block",aa=!0,1==u.statusContainer.children.length&&""==u.editor.getStatus())I.style.visibility="hidden";else{if(0==u.statusContainer.children.length||
-1==u.statusContainer.children.length&&"function"===typeof u.statusContainer.firstChild.getAttribute&&null==u.statusContainer.firstChild.getAttribute("class")){var ca=null!=u.statusContainer.firstChild&&"function"===typeof u.statusContainer.firstChild.getAttribute?u.statusContainer.firstChild.getAttribute("title"):u.editor.getStatus();Y(ca);var fa=u.getCurrentFile();fa=null!=fa?fa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(fa)+"..."?(u.statusContainer.innerHTML='<img title="'+
-mxUtils.htmlEntities(mxResources.get(fa))+'..."src="'+Editor.tailSpin+'">',u.statusContainer.style.display="inline-block",aa=!0):6<u.buttonContainer.clientWidth&&(u.statusContainer.style.display="none",aa=!1)}else u.statusContainer.style.display="inline-block",Y(null),aa=!0;I.style.visibility=20>I.clientWidth&&!aa?"hidden":""}}));la=z("diagram",null,Editor.menuImage);la.style.boxShadow="none";la.style.padding="6px";la.style.margin="0px";C.appendChild(la);mxEvent.disableContextMenu(la);mxEvent.addGestureListeners(la,
-mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);u.statusContainer.style.position="";u.statusContainer.style.display="none";u.statusContainer.style.margin="0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";u.statusContainer.style.display="inline-block";u.statusContainer.style.textOverflow="ellipsis";
-u.buttonContainer.style.display="inline-block";u.buttonContainer.style.position="relative";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.top="0px";var ba=document.createElement("a");ba.style.padding="0px";ba.style.boxShadow="none";ba.className="geMenuItem";ba.style.display="inline-block";ba.style.width="40px";ba.style.height="12px";ba.style.marginBottom="-2px";ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ba.style.backgroundPosition="top center";ba.style.backgroundRepeat=
-"no-repeat";ba.setAttribute("title","Minimize");var ea=!1,ma=mxUtils.bind(this,function(){t.innerText="";if(!ea){var ca=function(fa,da,ha,ja){null!=da&&fa.setAttribute("title",da);fa.style.cursor=null!=ha?ha:"default";fa.style.margin="2px 0px";t.appendChild(fa);mxUtils.br(t);null!=ja&&(fa.style.position="relative",fa.style.overflow="visible",da=document.createElement("div"),da.style.position="absolute",da.style.left="34px",da.style.top="28px",da.style.fontSize="8px",mxUtils.write(da,ja),fa.appendChild(da));
-return fa};ca(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ca(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ca(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ca(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var fa=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");fa.geometry.setTerminalPoint(new mxPoint(0,0),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,0),!1);fa.geometry.points=[];fa.geometry.relative=!0;fa.edge=!0;ca(u.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,fa.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");fa=fa.clone();fa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-fa.geometry.width=G.defaultEdgeLength+20;fa.geometry.setTerminalPoint(new mxPoint(0,20),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,20),!1);ca(u.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(fa,da,ha,ja){fa=B("",fa.funct,null,da,fa,ha);fa.style.width="40px";fa.style.height="34px";fa.style.opacity="0.7";return ca(fa,null,"pointer",ja)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");la=z("insert",null,Editor.plusImage);la.style.boxShadow="none";la.style.opacity="0.7";la.style.padding="6px";la.style.margin="0px";la.style.height="34px";la.style.width="37px";ca(la,null,"pointer")}"1"!=urlParams.embedInline&&t.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){ea?(mxUtils.setPrefixedStyle(t.style,"transform","translate(0, -50%)"),t.style.padding="8px 6px 4px",t.style.top="50%",t.style.bottom="",t.style.height="",ba.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),ea=!1,ma()):(t.innerText="",t.appendChild(ba),mxUtils.setPrefixedStyle(t.style,"transform","translate(0, 0)"),t.style.top="",t.style.bottom="12px",t.style.padding="0px",t.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",ea=!0)}));ma();u.addListener("darkModeChanged",
-ma);u.addListener("sketchModeChanged",ma)}else u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));if(null!=U){var ia=function(ca){if(mxEvent.isAltDown(ca))u.hideCurrentMenu(),u.actions.get("customZoom").funct(),mxEvent.consume(ca);else if("geItem"!=mxEvent.getSource(ca).className||mxEvent.isShiftDown(ca))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(ca)},pa=u.actions.get("zoomIn"),na=u.actions.get("zoomOut");R=u.actions.get("resetView");
-var Fa=u.actions.get("undo"),Ga=u.actions.get("redo"),xa=B("",Fa.funct,null,mxResources.get("undo")+" ("+Fa.shortcut+")",Fa,Editor.undoImage),Ma=B("",Ga.funct,null,mxResources.get("redo")+" ("+Ga.shortcut+")",Ga,Editor.redoImage);if(null!=W){R=function(){Da.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var va=function(){Da.innerText="";if(null!=u.currentPage){mxUtils.write(Da,u.currentPage.getName());var ca=null!=u.pages?u.pages.length:
-1,fa=u.getPageIndex(u.currentPage);fa=null!=fa?fa+1:1;var da=u.currentPage.getId();Da.setAttribute("title",u.currentPage.getName()+" ("+fa+"/"+ca+")"+(null!=da?" ["+da+"]":""))}},Ea=u.actions.get("delete"),Ba=B("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);Ba.style.opacity="0.1";C.appendChild(Ba);Ea.addListener("stateChanged",function(){Ba.style.opacity=Ea.enabled?"":"0.1"});var za=function(){xa.style.display=0<u.editor.undoManager.history.length||G.isEditing()?"inline-block":"none";
-Ma.style.display=xa.style.display;xa.style.opacity=Fa.enabled?"":"0.1";Ma.style.opacity=Ga.enabled?"":"0.1"};C.appendChild(xa);C.appendChild(Ma);Fa.addListener("stateChanged",za);Ga.addListener("stateChanged",za);za();var Da=this.createPageMenuTab(!1,!0);Da.style.display="none";Da.style.position="";Da.style.marginLeft="";Da.style.top="";Da.style.left="";Da.style.height="100%";Da.style.lineHeight="";Da.style.borderStyle="none";Da.style.padding="3px 0";Da.style.margin="0px";Da.style.background="";Da.style.border=
-"";Da.style.boxShadow="none";Da.style.verticalAlign="top";Da.style.width="auto";Da.style.maxWidth="160px";Da.style.position="relative";Da.style.padding="6px";Da.style.textOverflow="ellipsis";Da.style.opacity="0.8";W.appendChild(Da);u.editor.addListener("pagesPatched",va);u.editor.addListener("pageSelected",va);u.editor.addListener("pageRenamed",va);u.editor.addListener("fileLoaded",va);va();u.addListener("fileDescriptorChanged",R);u.addListener("pagesVisibleChanged",R);u.editor.addListener("pagesPatched",
-R);R();R=B("",na.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",na,Editor.zoomOutImage);W.appendChild(R);var la=L.addMenu("100%",U.funct);la.setAttribute("title",mxResources.get("zoom"));la.innerHTML="100%";la.style.display="inline-block";la.style.color="inherit";la.style.cursor="pointer";la.style.textAlign="center";la.style.whiteSpace="nowrap";la.style.paddingRight="10px";la.style.textDecoration="none";la.style.verticalAlign="top";la.style.padding="6px 0";la.style.fontSize=
-"14px";la.style.width="40px";la.style.opacity="0.4";W.appendChild(la);U=B("",pa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",pa,Editor.zoomInImage);W.appendChild(U);"1"==urlParams.embedInline?(W.appendChild(O),U=u.actions.get("exit"),W.appendChild(B("",U.funct,null,mxResources.get("exit"),U,Editor.closeImage))):O.parentNode.removeChild(O);u.tabContainer.style.visibility="hidden";I.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-C.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";W.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";Q.appendChild(C);Q.appendChild(W);t.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(t.style.touchAction="none");Q.appendChild(t);window.setTimeout(function(){mxUtils.setPrefixedStyle(t.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(Q)}else{var Ha=B("",ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",R,Editor.zoomFitImage);I.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";la=L.addMenu("100%",
-U.funct);la.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");la.style.whiteSpace="nowrap";la.style.paddingRight="10px";la.style.textDecoration="none";la.style.textDecoration="none";la.style.overflow="hidden";la.style.visibility="hidden";la.style.textAlign="center";la.style.cursor="pointer";la.style.height=parseInt(u.tabContainerHeight)-1+"px";la.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";la.style.position="absolute";la.style.display="block";la.style.fontSize="12px";la.style.width=
-"59px";la.style.right="0px";la.style.bottom="0px";la.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";la.style.backgroundPosition="right 6px center";la.style.backgroundRepeat="no-repeat";Q.appendChild(la)}(function(ca){mxEvent.addListener(ca,"click",ia);var fa=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);u.editor.addListener("resetGraphView",fa);u.editor.addListener("pageSelected",
-fa)})(la);var ya=u.setGraphEnabled;u.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(la.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}Q.appendChild(I);Q.appendChild(u.diagramContainer);v.appendChild(Q);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&Q.appendChild(u.tabContainer);
-var Ia=null;M();mxEvent.addListener(window,"resize",function(){M();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";t.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),u.sendEmbeddedSvgExport())});v=document.createElement("div");v.style.position="absolute";v.style.width="10px";v.style.height="10px";v.style.borderRadius="5px";v.style.border="1px solid gray";v.style.background="#ffffff";v.style.cursor=
-"row-resize";u.diagramContainer.parentNode.appendChild(v);u.bottomResizer=v;var ka=null,ta=null,ra=null,wa=null;mxEvent.addGestureListeners(v,function(ca){wa=parseInt(u.diagramContainer.style.height);ta=mxEvent.getClientY(ca);G.popupMenuHandler.hideMenu();mxEvent.consume(ca)});v=v.cloneNode(!1);v.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(v);u.rightResizer=v;mxEvent.addGestureListeners(v,function(ca){ra=parseInt(u.diagramContainer.style.width);ka=mxEvent.getClientX(ca);G.popupMenuHandler.hideMenu();
-mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var fa=!1;null!=ka&&(u.diagramContainer.style.width=Math.max(20,ra+mxEvent.getClientX(ca)-ka)+"px",fa=!0);null!=ta&&(u.diagramContainer.style.height=Math.max(20,wa+mxEvent.getClientY(ca)-ta)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),N(),u.refresh())},function(ca){null==ka&&null==
-ta||mxEvent.consume(ca);ta=ka=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";C.style.visibility="hidden";W.style.visibility="hidden";t.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,x){var y=l.y,D=l.x,d=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,q=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+D;n.y=c.y+y;n.width=c.width;n.height=c.height;for(var A=[],E=[],z=0;z<this.states.length;z++){var B=this.states[z];B instanceof mxCellState&&(x||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y>
-B.y+B.height+4||n.y+n.height+4<B.y)?A.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&E.push(B))}var J=0,M=0,v=B=0,u=0,G=0,I=0,F=0,L=5*q;if(1<A.length){A.push(n);A.sort(function(U,T){return U.y-T.y});var K=!1;z=n==A[0];q=n==A[A.length-1];if(!z&&!q)for(z=1;z<A.length-1;z++)if(n==A[z]){q=A[z-1];z=A[z+1];B=M=v=(z.y-q.y-q.height-n.height)/2;break}for(z=0;z<A.length-1;z++){q=A[z];var H=A[z+1],Q=n==q||n==H;H=H.y-q.y-q.height;K|=n==q;if(0==M&&0==
-J)M=H,J=1;else if(Math.abs(M-H)<=(Q||1==z&&K?p:0))J+=1;else if(1<J&&K){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!K)J=0,B=M=0!=v?v:0,A.splice(0,0==z?1:z),z=-1;else break;0!=B||Q||(M=B=H)}3==A.length&&A[1]==n&&(B=0)}if(1<E.length){E.push(n);E.sort(function(U,T){return U.x-T.x});K=!1;z=n==E[0];q=n==E[E.length-1];if(!z&&!q)for(z=1;z<E.length-1;z++)if(n==E[z]){q=E[z-1];z=E[z+1];I=G=F=(z.x-q.x-q.width-n.width)/2;break}for(z=0;z<E.length-1;z++){q=E[z];H=E[z+1];Q=n==q||n==H;H=H.x-q.x-q.width;K|=n==q;
-if(0==G&&0==u)G=H,u=1;else if(Math.abs(G-H)<=(Q||1==z&&K?p:0))u+=1;else if(1<u&&K){E=E.slice(0,z+1);break}else if(3<=E.length-z&&!K)u=0,I=G=0!=F?F:0,E.splice(0,0==z?1:z),z=-1;else break;0!=I||Q||(G=I=H)}3==E.length&&E[1]==n&&(I=0)}p=function(U,T,V,W){var t=[];if(W){W=L;var C=0}else W=0,C=L;t.push(new mxPoint(U.x-W,U.y-C));t.push(new mxPoint(U.x+W,U.y+C));t.push(U);t.push(T);t.push(new mxPoint(T.x-W,T.y-C));t.push(new mxPoint(T.x+W,T.y+C));if(null!=V)return V.points=t,V;U=new mxPolyline(t,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};G=function(U,T){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(T&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<u&&u==E.length-1){u=[];F=k.guidesArrHor;d=[];D=0;z=E[0]==n?1:0;K=E[z].y+E[z].height;if(0<I)for(z=0;z<E.length-1;z++)q=
-E[z],H=E[z+1],n==q?(D=H.x-q.width-I,d.push(new mxPoint(D+q.width+L,K)),d.push(new mxPoint(H.x-L,K))):n==H?(d.push(new mxPoint(q.x+q.width+L,K)),D=q.x+q.width+I,d.push(new mxPoint(D-L,K))):(d.push(new mxPoint(q.x+q.width+L,K)),d.push(new mxPoint(H.x-L,K)));else q=E[0],z=E[2],D=q.x+q.width+(z.x-q.x-q.width-n.width)/2,d.push(new mxPoint(q.x+q.width+L,K)),d.push(new mxPoint(D-L,K)),d.push(new mxPoint(D+n.width+L,K)),d.push(new mxPoint(z.x-L,K));for(z=0;z<d.length;z+=2)E=d[z],I=d[z+1],E=p(E,I,null!=F?
-F[z/2]:null),E.node.style.visibility="visible",E.redraw(),u.push(E);for(z=d.length/2;null!=F&&z<F.length;z++)F[z].destroy();k.guidesArrHor=u;D-=c.x;d=!0}else G(!0);if(1<J&&J==A.length-1){u=[];F=k.guidesArrVer;g=[];y=0;z=A[0]==n?1:0;J=A[z].x+A[z].width;if(0<B)for(z=0;z<A.length-1;z++)q=A[z],H=A[z+1],n==q?(y=H.y-q.height-B,g.push(new mxPoint(J,y+q.height+L)),g.push(new mxPoint(J,H.y-L))):n==H?(g.push(new mxPoint(J,q.y+q.height+L)),y=q.y+q.height+B,g.push(new mxPoint(J,y-L))):(g.push(new mxPoint(J,q.y+
-q.height+L)),g.push(new mxPoint(J,H.y-L)));else q=A[0],z=A[2],y=q.y+q.height+(z.y-q.y-q.height-n.height)/2,g.push(new mxPoint(J,q.y+q.height+L)),g.push(new mxPoint(J,y-L)),g.push(new mxPoint(J,y+n.height+L)),g.push(new mxPoint(J,z.y-L));for(z=0;z<g.length;z+=2)E=g[z],I=g[z+1],E=p(E,I,null!=F?F[z/2]:null,!0),E.node.style.visibility="visible",E.redraw(),u.push(E);for(z=g.length/2;null!=F&&z<F.length;z++)F[z].destroy();k.guidesArrVer=u;y-=c.y;g=!0}else G(!1,!0)}if(d||g)return n=new mxPoint(D,y),A=b.call(this,
-c,n,m,x),d&&!g?n.y=A.y:g&&!d&&(n.x=A.x),A.y!=n.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=n.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),n;G(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var x=0;x<l.length;x++)l[x].node.style.visibility=c?"visible":"hidden";if(null!=
-m)for(x=0;x<m.length;x++)m[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;k.style.top=J.offsetTop-D+"px";k.style.left=J.offsetLeft-D+"px";k.style.width=(f?0:J.offsetWidth)+D+"px";k.style.height=(f?J.offsetHeight:0)+D+"px"}function m(J,M,v){if(null!=x)return J;var u;return function(){var G=this,I=arguments,F=v&&!u;clearTimeout(u);u=setTimeout(function(){u=null;v||J.apply(G,I)},M);F&&J.apply(G,I)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,D=this.RULER_THICKNESS,d=this;this.unit=e;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()?
+this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,C){null!=C.shortcut&&900>c&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",C.shortcut):v.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var A=this.userElement;A.style.cssText="position:relative;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";
+A.innerText="";A.style.backgroundImage="url("+Editor.userImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";var C=mxResources.get("changeUser");if("none"!=A.style.display){A.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var I=document.createElement("img");I.setAttribute("border","0");I.style.position="absolute";
+I.style.left="18px";I.style.top="2px";I.style.width="12px";I.style.height="12px";var M=B.getRealtimeError();B=B.getRealtimeState();C+=" ("+mxResources.get("realtimeCollaboration")+": ";1==B?(I.src=Editor.syncImage,C+=mxResources.get("online")):(I.src=Editor.syncProblemImage,C=null!=M&&null!=M.message?C+M.message:C+mxResources.get("disconnected"));A.style.marginRight="6px";A.appendChild(I);C+=")"}}A.setAttribute("title",C)}};var E=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){E.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var C=document.createElement("a");C.className="geMenuItem gePrimaryBtn";C.style.marginLeft="8px";C.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var B="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(C,B);C.setAttribute("title",B);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));A.appendChild(C)}}else mxUtils.write(C,mxResources.get("save")),C.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),A.appendChild(C),
+"1"==urlParams.saveAndExit&&(C=document.createElement("a"),mxUtils.write(C,mxResources.get("saveAndExit")),C.setAttribute("title",mxResources.get("saveAndExit")),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),A.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),B="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,
+B),C.setAttribute("title",B),C.className="geMenuItem",C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),A.appendChild(C));this.buttonContainer.appendChild(A);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(A,C,B){var I=this.editorUi.editor.graph;A.smartSeparators=!0;d.apply(this,arguments);
+"1"==urlParams.sketch?I.isEnabled()&&(A.addSeparator(),1==I.getSelectionCount()&&this.addMenuItems(A,["-","lockUnlock"],null,B)):1==I.getSelectionCount()?(I.isCellFoldable(I.getSelectionCell())&&this.addMenuItems(A,I.isCellCollapsed(C)?["expand"]:["collapse"],null,B),this.addMenuItems(A,["collapsible","-","lockUnlock","enterGroup"],null,B),A.addSeparator(),this.addSubmenu("layout",A)):I.isSelectionEmpty()&&I.isEnabled()?(A.addSeparator(),this.addMenuItems(A,["editData"],null,B),A.addSeparator(),this.addSubmenu("layout",
+A),this.addSubmenu("insert",A),this.addMenuItems(A,["-","exitGroup"],null,B)):I.isEnabled()&&this.addMenuItems(A,["-","lockUnlock"],null,B)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(A,C,B){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(A,["copyAsImage"],null,B)};EditorUi.prototype.toggleFormatPanel=function(A){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=A?A:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var k=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();k.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(A){n.apply(this,arguments);if(A){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var A=this.editorUi,C=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(u){A.setPagesVisible(!Editor.pagesVisible)}));
+C.setToggleAction(!0);C.setSelectedCallback(function(){return Editor.pagesVisible});A.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){f(A)},null,null,Editor.ctrlKey+"+Shift+K"));C=A.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(A)}));C.shortcut=A.actions.get("formatPanel").shortcut;C.setToggleAction(!0);C.setSelectedCallback(mxUtils.bind(this,function(){return null!=A.formatWindow&&A.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
+!A.isOffline()&&A.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var u=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(u.container,620,420,!0,!1);u.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var u=new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(u.container,620,420,!0,!1);u.init()}));var B=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
+function(u,z){var F=this.editorUi.editor.graph,J=F.getSelectionCell();B.call(this,u,J,null,z);this.addMenuItems(u,["editTooltip"],z);F.model.isVertex(J)&&this.addMenuItems(u,["editGeometry"],z);this.addMenuItems(u,["-","edit"],z)})));this.addPopupMenuCellEditItems=function(u,z,F,J){u.addSeparator();this.addSubmenu("editCell",u,J,mxResources.get("edit"))};var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(u,z){I.funct(u,z);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+A.menus.addMenuItems(u,["publishLink"],z);A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(u.addSeparator(z),A.menus.addSubmenu("embed",u,z))})));var M=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(u,z){M.funct(u,z);this.addMenuItems(u,["-","ruler","-","pageScale"],z)})));var G="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),S=function(u,z,F,J){u.addItem(F,null,mxUtils.bind(this,function(){var K=new CreateGraphDialog(A,F,
+J);A.showDialog(K.container,620,420,!0,!1);K.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,z){for(var F=0;F<G.length;F++)"-"==G[F]?u.addSeparator(z):S(u,z,mxResources.get(G[F])+"...",G[F])})))};EditorUi.prototype.installFormatToolbar=function(A){var C=this.editor.graph,B=document.createElement("div");B.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+C.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,M){0<C.getSelectionCount()?(A.appendChild(B),B.innerHTML="Selected: "+C.getSelectionCount()):null!=B.parentNode&&B.parentNode.removeChild(B)}))};var p=!1;EditorUi.prototype.initFormatWindow=function(){if(!p&&null!=this.formatWindow){p=!0;var A=this.formatWindow.window.toggleMinimized,C=240;this.formatWindow.window.toggleMinimized=function(){A.apply(this,arguments);this.minimized?(C=parseInt(this.div.style.width),this.div.style.width=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+C-140+"px"):(this.div.style.width=C+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-C+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var y=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function A(da,ca,na){var la=G.menus.get(da),qa=F.addMenu(mxResources.get(da),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),z);qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(da));G.menus.menuCreated(la,
+qa,"geMenuItem");null!=na?(qa.style.backgroundImage="url("+na+")",qa.style.backgroundPosition="center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize="24px 24px",qa.style.width="34px",qa.innerText=""):ca||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function C(da,ca,na,la,qa,ha){var ia=document.createElement("a");ia.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position="relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=G.statusContainer?u.insertBefore(ia,G.statusContainer):u.appendChild(ia);null!=ha?(ia.style.backgroundImage="url("+ha+")",ia.style.backgroundPosition=
+"center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,da);mxEvent.addListener(ia,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(pa){pa.preventDefault()}));mxEvent.addListener(ia,"click",function(pa){"disabled"!=ia.getAttribute("disabled")&&ca(pa);mxEvent.consume(pa)});null==na&&(ia.style.marginRight="4px");null!=la&&ia.setAttribute("title",la);null!=qa&&(da=function(){qa.isEnabled()?(ia.removeAttribute("disabled"),
+ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},qa.addListener("stateChanged",da),S.addListener("enabledChanged",da),da());return ia}function B(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");
+for(var la=0;la<da.length;la++)null!=da[la]&&("1"==urlParams.sketch&&(da[la].style.padding="10px 8px",da[la].style.width="30px"),da[la].style.margin="0px",da[la].style.boxShadow="none",na.appendChild(da[la]));null!=ca&&mxUtils.setOpacity(na,ca);null!=G.statusContainer&&"1"!=urlParams.sketch?u.insertBefore(na,G.statusContainer):u.appendChild(na);return na}function I(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>V.offsetTop-V.offsetHeight/2?"70px":"10px");else{for(var da=u.firstChild;null!=
+da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}z=u.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>c||"1"==urlParams.sketch;var na=null;da||(na=A("diagram"));ca=da?A("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);B([na,C(mxResources.get("shapes"),G.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),G.actions.get("image"),da?Editor.shapesImage:null),C(mxResources.get("format"),
+G.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+G.actions.get("formatPanel").shortcut+")",G.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=A("insert",!0,da?U:null);B([ca,C(mxResources.get("delete"),G.actions.get("delete").funct,null,mxResources.get("delete"),G.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=c&&(B([ma,Ga],60),520<=c&&B([Aa,640<=c?C("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ba,Editor.zoomInImage):
+null,640<=c?C("",ea.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ea,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&G.appIconClicked(la)}),null,null));ca=G.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&
+"1"!=urlParams.sketch?(null==ta&&(ca=F.addMenu("",ca.funct),ca.setAttribute("title","language"),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="22px 22px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="12px",u.appendChild(ca),ta=ca),G.buttonContainer.style.paddingRight=
+"34px"):(G.buttonContainer.style.paddingRight="4px",null!=ta&&(ta.parentNode.removeChild(ta),ta=null))}y.apply(this,arguments);var M=document.createElement("div");M.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";M.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(M);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var G=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
+null==G.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=G.embedViewport.x+G.embedViewport.width,la=parseInt(this.div.offsetTop),qa=parseInt(this.div.offsetHeight),ha=G.embedViewport.y+G.embedViewport.height;this.div.style.left=Math.max(G.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(G.embedViewport.y,Math.min(la,ha-qa))+"px";this.div.style.height=Math.min(G.embedViewport.height,parseInt(this.div.style.height))+
+"px";this.div.style.width=Math.min(G.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),M=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>M)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));
+G=this;var S=G.editor.graph;G.toolbar=this.createToolbar(G.createDiv("geToolbar"));G.defaultLibraryName=mxResources.get("untitledLibrary");var u=document.createElement("div");u.className="geMenubarContainer";var z=null,F=new Menubar(G,u);G.statusContainer=G.createStatusContainer();G.statusContainer.style.position="relative";G.statusContainer.style.maxWidth="";G.statusContainer.style.marginTop="7px";G.statusContainer.style.marginLeft="6px";G.statusContainer.style.color="gray";G.statusContainer.style.cursor=
+"default";var J=G.hideCurrentMenu;G.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var K=G.descriptorChanged;G.descriptorChanged=function(){K.apply(this,arguments);var da=G.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);u.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else u.removeAttribute("title")};
+G.setStatusText(G.editor.getStatus());u.appendChild(G.statusContainer);G.buttonContainer=document.createElement("div");G.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";u.appendChild(G.buttonContainer);G.menubarContainer=G.buttonContainer;G.tabContainer=document.createElement("div");G.tabContainer.className="geTabContainer";G.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+M=G.diagramContainer.parentNode;var H=document.createElement("div");H.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";G.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){H.style.top="20px";G.titlebar=document.createElement("div");G.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var N=document.createElement("div");
+N.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";G.titlebar.appendChild(N);M.appendChild(G.titlebar)}var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Q="1"==urlParams.sketch?document.createElement("div"):null,V="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,t=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left=
+"10px",W.style.top="10px",V.style.left="10px",V.style.top="60px",Q.style.top="10px",Q.style.right="12px",Q.style.left="",G.diagramContainer.setAttribute("data-bounds",G.diagramContainer.style.top+" "+G.diagramContainer.style.left+" "+G.diagramContainer.style.width+" "+G.diagramContainer.style.height),G.diagramContainer.style.top="0px",G.diagramContainer.style.left="0px",G.diagramContainer.style.bottom="0px",G.diagramContainer.style.right="0px",G.diagramContainer.style.width="",G.diagramContainer.style.height=
+"";else{var da=G.diagramContainer.getAttribute("data-bounds");if(null!=da){G.diagramContainer.style.background="transparent";G.diagramContainer.removeAttribute("data-bounds");var ca=S.getGraphBounds();da=da.split(" ");G.diagramContainer.style.top=da[0];G.diagramContainer.style.left=da[1];G.diagramContainer.style.width=ca.width+50+"px";G.diagramContainer.style.height=ca.height+46+"px";G.diagramContainer.style.bottom="";G.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:G.diagramContainer.getBoundingClientRect()}),"*");G.refresh()}W.style.left=G.diagramContainer.offsetLeft+"px";W.style.top=G.diagramContainer.offsetTop-W.offsetHeight-4+"px";V.style.display="";V.style.left=G.diagramContainer.offsetLeft-V.offsetWidth-4+"px";V.style.top=G.diagramContainer.offsetTop+"px";Q.style.left=G.diagramContainer.offsetLeft+G.diagramContainer.offsetWidth-Q.offsetWidth+"px";Q.style.top=W.style.top;Q.style.right="";G.bottomResizer.style.left=G.diagramContainer.offsetLeft+(G.diagramContainer.offsetWidth-
+G.bottomResizer.offsetWidth)/2+"px";G.bottomResizer.style.top=G.diagramContainer.offsetTop+G.diagramContainer.offsetHeight-G.bottomResizer.offsetHeight/2-1+"px";G.rightResizer.style.left=G.diagramContainer.offsetLeft+G.diagramContainer.offsetWidth-G.rightResizer.offsetWidth/2-1+"px";G.rightResizer.style.top=G.diagramContainer.offsetTop+(G.diagramContainer.offsetHeight-G.bottomResizer.offsetHeight)/2+"px"}G.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";G.rightResizer.style.visibility=
+G.bottomResizer.style.visibility;u.style.display="none";W.style.visibility="";Q.style.visibility=""});N=G.actions.get("fullscreen");var D=C("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),L=mxUtils.bind(this,function(){D.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";t()});N=mxUtils.bind(this,function(){b(G,
+!0);G.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);L()});G.addListener("inlineFullscreenChanged",L);G.addListener("editInlineStart",N);"1"==urlParams.embedInline&&G.addListener("darkModeChanged",N);G.addListener("editInlineStop",mxUtils.bind(this,function(da){G.diagramContainer.style.width="10px";G.diagramContainer.style.height="10px";G.diagramContainer.style.border="";G.bottomResizer.style.visibility="hidden";G.rightResizer.style.visibility=
+"hidden";W.style.visibility="hidden";Q.style.visibility="hidden";V.style.display="none"}));if(null!=G.hoverIcons){var T=G.hoverIcons.update;G.hoverIcons.update=function(){S.freehand.isDrawing()||T.apply(this,arguments)}}if(null!=S.freehand){var O=S.freehand.createStyle;S.freehand.createStyle=function(da){return O.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){V.className="geToolbarContainer";Q.className="geToolbarContainer";W.className="geToolbarContainer";u.className="geToolbarContainer";
+G.picker=V;G.sketchPickerMenuElt=V;var P=!1;"1"!=urlParams.embed&&"atlassian"!=G.getServiceName()&&(mxEvent.addListener(u,"mouseenter",function(){G.statusContainer.style.display="inline-block"}),mxEvent.addListener(u,"mouseleave",function(){P||(G.statusContainer.style.display="none")}));var R=mxUtils.bind(this,function(da){null!=G.notificationBtn&&(null!=da?G.notificationBtn.setAttribute("title",da):G.notificationBtn.removeAttribute("title"))});u.style.visibility=20>u.clientWidth?"hidden":"";G.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){G.setStatusText(G.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=G.getServiceName())if(G.statusContainer.style.display="inline-block",P=!0,1==G.statusContainer.children.length&&""==G.editor.getStatus())u.style.visibility="hidden";else{if(0==G.statusContainer.children.length||1==G.statusContainer.children.length&&"function"===typeof G.statusContainer.firstChild.getAttribute&&null==G.statusContainer.firstChild.getAttribute("class")){var da=null!=G.statusContainer.firstChild&&
+"function"===typeof G.statusContainer.firstChild.getAttribute?G.statusContainer.firstChild.getAttribute("title"):G.editor.getStatus();R(da);var ca=G.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(G.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',G.statusContainer.style.display="inline-block",P=!0):6<G.buttonContainer.clientWidth&&(G.statusContainer.style.display=
+"none",P=!1)}else G.statusContainer.style.display="inline-block",R(null),P=!0;u.style.visibility=20>u.clientWidth&&!P?"hidden":""}}));oa=A("diagram",null,Editor.menuImage);oa.style.boxShadow="none";oa.style.padding="6px";oa.style.margin="0px";W.appendChild(oa);mxEvent.disableContextMenu(oa);mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),
+null,null);G.statusContainer.style.position="";G.statusContainer.style.display="none";G.statusContainer.style.margin="0px";G.statusContainer.style.padding="6px 0px";G.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";G.statusContainer.style.display="inline-block";G.statusContainer.style.textOverflow="ellipsis";G.buttonContainer.style.display="inline-block";G.buttonContainer.style.position="relative";G.buttonContainer.style.paddingRight="0px";G.buttonContainer.style.top="0px";var X=document.createElement("a");
+X.style.padding="0px";X.style.boxShadow="none";X.className="geMenuItem";X.style.display="inline-block";X.style.width="40px";X.style.height="12px";X.style.marginBottom="-2px";X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";X.style.backgroundPosition="top center";X.style.backgroundRepeat="no-repeat";X.setAttribute("title","Minimize");var Z=!1,Y=mxUtils.bind(this,function(){V.innerText="";if(!Z){var da=function(ca,na,la,qa){null!=na&&ca.setAttribute("title",na);ca.style.cursor=null!=
+la?la:"default";ca.style.margin="2px 0px";V.appendChild(ca);mxUtils.br(V);null!=qa&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,qa),ca.appendChild(na));return ca};da(G.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",
+!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(G.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(G.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,
+80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(G.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,S.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
+0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;da(G.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ca.geometry.width=S.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
+20),!1);da(G.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,la,qa){ca=C("",ca.funct,null,na,ca,la);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",qa)})(G.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");oa=A("insert",null,Editor.plusImage);oa.style.boxShadow="none";oa.style.opacity="0.7";oa.style.padding="6px";
+oa.style.margin="0px";oa.style.height="34px";oa.style.width="37px";da(oa,null,"pointer")}"1"!=urlParams.embedInline&&V.appendChild(X)});mxEvent.addListener(X,"click",mxUtils.bind(this,function(){Z?(mxUtils.setPrefixedStyle(V.style,"transform","translate(0, -50%)"),V.style.padding="8px 6px 4px",V.style.top="50%",V.style.bottom="",V.style.height="",X.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",X.style.width="40px",X.style.height="12px",X.setAttribute("title","Minimize"),Z=!1,
+Y()):(V.innerText="",V.appendChild(X),mxUtils.setPrefixedStyle(V.style,"transform","translate(0, 0)"),V.style.top="",V.style.bottom="12px",V.style.padding="0px",V.style.height="24px",X.style.height="24px",X.style.backgroundImage="url("+Editor.plusImage+")",X.setAttribute("title",mxResources.get("insert")),X.style.width="24px",Z=!0)}));Y();G.addListener("darkModeChanged",Y);G.addListener("sketchModeChanged",Y)}else G.editor.addListener("statusChanged",mxUtils.bind(this,function(){G.setStatusText(G.editor.getStatus())}));
+N=G.menus.get("viewZoom");if(null!=N){var aa=function(da){if(mxEvent.isAltDown(da))G.hideCurrentMenu(),G.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))G.hideCurrentMenu(),G.actions.get("smartFit").funct(),mxEvent.consume(da)},ba=G.actions.get("zoomIn"),ea=G.actions.get("zoomOut"),ja=G.actions.get("resetView"),fa=G.actions.get("undo"),ra=G.actions.get("redo"),ma=C("",fa.funct,null,mxResources.get("undo")+" ("+fa.shortcut+
+")",fa,Editor.undoImage),Ga=C("",ra.funct,null,mxResources.get("redo")+" ("+ra.shortcut+")",ra,Editor.redoImage);if(null!=Q){ja=function(){Ca.style.display=null!=G.pages&&("0"!=urlParams.pages||1<G.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Fa=function(){Ca.innerText="";if(null!=G.currentPage){mxUtils.write(Ca,G.currentPage.getName());var da=null!=G.pages?G.pages.length:1,ca=G.getPageIndex(G.currentPage);ca=null!=ca?ca+1:1;var na=G.currentPage.getId();Ca.setAttribute("title",G.currentPage.getName()+
+" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},ya=G.actions.get("delete"),Ma=C("",ya.funct,null,mxResources.get("delete"),ya,Editor.trashImage);Ma.style.opacity="0.3";W.appendChild(Ma);ya.addListener("stateChanged",function(){Ma.style.opacity=ya.enabled?"":"0.3"});var xa=function(){ma.style.display=0<G.editor.undoManager.history.length||S.isEditing()?"inline-block":"none";Ga.style.display=ma.style.display;ma.style.opacity=fa.enabled?"":"0.3";Ga.style.opacity=ra.enabled?"":"0.3"};W.appendChild(ma);
+W.appendChild(Ga);fa.addListener("stateChanged",xa);ra.addListener("stateChanged",xa);xa();var Ca=this.createPageMenuTab(!1,!0);Ca.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";Q.appendChild(Ca);G.editor.addListener("pagesPatched",Fa);G.editor.addListener("pageSelected",Fa);G.editor.addListener("pageRenamed",Fa);G.editor.addListener("fileLoaded",Fa);Fa();G.addListener("fileDescriptorChanged",ja);G.addListener("pagesVisibleChanged",
+ja);G.editor.addListener("pagesPatched",ja);ja();ja=C("",ea.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ea,Editor.zoomOutImage);Q.appendChild(ja);var oa=F.addMenu("100%",N.funct);oa.setAttribute("title",mxResources.get("zoom"));oa.innerHTML="100%";oa.style.display="inline-block";oa.style.color="inherit";oa.style.cursor="pointer";oa.style.textAlign="center";oa.style.whiteSpace="nowrap";oa.style.paddingRight="10px";oa.style.textDecoration="none";oa.style.verticalAlign=
+"top";oa.style.padding="6px 0";oa.style.fontSize="14px";oa.style.width="40px";Q.appendChild(oa);N=C("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ba,Editor.zoomInImage);Q.appendChild(N);"1"==urlParams.embedInline?(Q.appendChild(D),N=G.actions.get("exit"),Q.appendChild(C("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):D.parentNode.removeChild(D);G.tabContainer.style.visibility="hidden";u.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+W.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Q.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";H.appendChild(W);H.appendChild(Q);V.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(V.style.touchAction="none");H.appendChild(V);window.setTimeout(function(){mxUtils.setPrefixedStyle(V.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(H)}else{var Aa=C("",aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ja,Editor.zoomFitImage);u.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";oa=F.addMenu("100%",
+N.funct);oa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");oa.style.whiteSpace="nowrap";oa.style.paddingRight="10px";oa.style.textDecoration="none";oa.style.textDecoration="none";oa.style.overflow="hidden";oa.style.visibility="hidden";oa.style.textAlign="center";oa.style.cursor="pointer";oa.style.height=parseInt(G.tabContainerHeight)-1+"px";oa.style.lineHeight=parseInt(G.tabContainerHeight)+1+"px";oa.style.position="absolute";oa.style.display="block";oa.style.fontSize="12px";oa.style.width=
+"59px";oa.style.right="0px";oa.style.bottom="0px";oa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";oa.style.backgroundPosition="right 6px center";oa.style.backgroundRepeat="no-repeat";H.appendChild(oa)}(function(da){mxEvent.addListener(da,"click",aa);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*G.editor.graph.view.scale)+"%")});G.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);G.editor.addListener("resetGraphView",ca);G.editor.addListener("pageSelected",
+ca)})(oa);var La=G.setGraphEnabled;G.setGraphEnabled=function(){La.apply(this,arguments);null!=this.tabContainer&&(oa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Q?this.tabContainerHeight+"px":"0px")}}H.appendChild(u);H.appendChild(G.diagramContainer);M.appendChild(H);G.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==Q&&H.appendChild(G.tabContainer);
+var ta=null;I();mxEvent.addListener(window,"resize",function(){I();null!=G.sidebarWindow&&G.sidebarWindow.window.fit();null!=G.formatWindow&&G.formatWindow.window.fit();null!=G.actions.outlineWindow&&G.actions.outlineWindow.window.fit();null!=G.actions.layersWindow&&G.actions.layersWindow.window.fit();null!=G.menus.tagsWindow&&G.menus.tagsWindow.window.fit();null!=G.menus.findWindow&&G.menus.findWindow.window.fit();null!=G.menus.findReplaceWindow&&G.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";V.style.transform="";mxEvent.addGestureListeners(G.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==G.diagramContainer.parentNode&&(G.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),G.sendEmbeddedSvgExport())});M=document.createElement("div");M.style.position="absolute";M.style.width="10px";M.style.height="10px";M.style.borderRadius="5px";M.style.border="1px solid gray";M.style.background="#ffffff";M.style.cursor=
+"row-resize";G.diagramContainer.parentNode.appendChild(M);G.bottomResizer=M;var Da=null,wa=null,Ja=null,ka=null;mxEvent.addGestureListeners(M,function(da){ka=parseInt(G.diagramContainer.style.height);wa=mxEvent.getClientY(da);S.popupMenuHandler.hideMenu();mxEvent.consume(da)});M=M.cloneNode(!1);M.style.cursor="col-resize";G.diagramContainer.parentNode.appendChild(M);G.rightResizer=M;mxEvent.addGestureListeners(M,function(da){Ja=parseInt(G.diagramContainer.style.width);Da=mxEvent.getClientX(da);S.popupMenuHandler.hideMenu();
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Da&&(G.diagramContainer.style.width=Math.max(20,Ja+mxEvent.getClientX(da)-Da)+"px",ca=!0);null!=wa&&(G.diagramContainer.style.height=Math.max(20,ka+mxEvent.getClientY(da)-wa)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:G.diagramContainer.getBoundingClientRect()}),"*"),t(),G.refresh())},function(da){null==Da&&null==
+wa||mxEvent.consume(da);wa=Da=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";G.bottomResizer.style.visibility="hidden";G.rightResizer.style.visibility="hidden";W.style.visibility="hidden";Q.style.visibility="hidden";V.style.display="none"}"1"==urlParams.prefetchFonts&&G.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,v){var x=l.y,E=l.x,d=!1,g=!1;if(null!=this.states&&null!=c&&null!=l){var k=this,n=new mxCellState,q=this.graph.getView().scale,p=Math.max(2,this.getGuideTolerance()/2);n.x=c.x+E;n.y=c.y+x;n.width=c.width;n.height=c.height;for(var y=[],A=[],C=0;C<this.states.length;C++){var B=this.states[C];B instanceof mxCellState&&(v||!this.graph.isCellSelected(B.cell))&&((n.x>=B.x&&n.x<=B.x+B.width||B.x>=n.x&&B.x<=n.x+n.width)&&(n.y>
+B.y+B.height+4||n.y+n.height+4<B.y)?y.push(B):(n.y>=B.y&&n.y<=B.y+B.height||B.y>=n.y&&B.y<=n.y+n.height)&&(n.x>B.x+B.width+4||n.x+n.width+4<B.x)&&A.push(B))}var I=0,M=0,G=B=0,S=0,u=0,z=0,F=0,J=5*q;if(1<y.length){y.push(n);y.sort(function(U,Q){return U.y-Q.y});var K=!1;C=n==y[0];q=n==y[y.length-1];if(!C&&!q)for(C=1;C<y.length-1;C++)if(n==y[C]){q=y[C-1];C=y[C+1];B=M=G=(C.y-q.y-q.height-n.height)/2;break}for(C=0;C<y.length-1;C++){q=y[C];var H=y[C+1],N=n==q||n==H;H=H.y-q.y-q.height;K|=n==q;if(0==M&&0==
+I)M=H,I=1;else if(Math.abs(M-H)<=(N||1==C&&K?p:0))I+=1;else if(1<I&&K){y=y.slice(0,C+1);break}else if(3<=y.length-C&&!K)I=0,B=M=0!=G?G:0,y.splice(0,0==C?1:C),C=-1;else break;0!=B||N||(M=B=H)}3==y.length&&y[1]==n&&(B=0)}if(1<A.length){A.push(n);A.sort(function(U,Q){return U.x-Q.x});K=!1;C=n==A[0];q=n==A[A.length-1];if(!C&&!q)for(C=1;C<A.length-1;C++)if(n==A[C]){q=A[C-1];C=A[C+1];z=u=F=(C.x-q.x-q.width-n.width)/2;break}for(C=0;C<A.length-1;C++){q=A[C];H=A[C+1];N=n==q||n==H;H=H.x-q.x-q.width;K|=n==q;
+if(0==u&&0==S)u=H,S=1;else if(Math.abs(u-H)<=(N||1==C&&K?p:0))S+=1;else if(1<S&&K){A=A.slice(0,C+1);break}else if(3<=A.length-C&&!K)S=0,z=u=0!=F?F:0,A.splice(0,0==C?1:C),C=-1;else break;0!=z||N||(u=z=H)}3==A.length&&A[1]==n&&(z=0)}p=function(U,Q,V,W){var t=[];if(W){W=J;var D=0}else W=0,D=J;t.push(new mxPoint(U.x-W,U.y-D));t.push(new mxPoint(U.x+W,U.y+D));t.push(U);t.push(Q);t.push(new mxPoint(Q.x-W,Q.y-D));t.push(new mxPoint(Q.x+W,Q.y+D));if(null!=V)return V.points=t,V;U=new mxPolyline(t,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);U.dialect=mxConstants.DIALECT_SVG;U.pointerEvents=!1;U.init(k.graph.getView().getOverlayPane());return U};u=function(U,Q){if(U&&null!=k.guidesArrHor)for(U=0;U<k.guidesArrHor.length;U++)k.guidesArrHor[U].node.style.visibility="hidden";if(Q&&null!=k.guidesArrVer)for(U=0;U<k.guidesArrVer.length;U++)k.guidesArrVer[U].node.style.visibility="hidden"};if(1<S&&S==A.length-1){S=[];F=k.guidesArrHor;d=[];E=0;C=A[0]==n?1:0;K=A[C].y+A[C].height;if(0<z)for(C=0;C<A.length-1;C++)q=
+A[C],H=A[C+1],n==q?(E=H.x-q.width-z,d.push(new mxPoint(E+q.width+J,K)),d.push(new mxPoint(H.x-J,K))):n==H?(d.push(new mxPoint(q.x+q.width+J,K)),E=q.x+q.width+z,d.push(new mxPoint(E-J,K))):(d.push(new mxPoint(q.x+q.width+J,K)),d.push(new mxPoint(H.x-J,K)));else q=A[0],C=A[2],E=q.x+q.width+(C.x-q.x-q.width-n.width)/2,d.push(new mxPoint(q.x+q.width+J,K)),d.push(new mxPoint(E-J,K)),d.push(new mxPoint(E+n.width+J,K)),d.push(new mxPoint(C.x-J,K));for(C=0;C<d.length;C+=2)A=d[C],z=d[C+1],A=p(A,z,null!=F?
+F[C/2]:null),A.node.style.visibility="visible",A.redraw(),S.push(A);for(C=d.length/2;null!=F&&C<F.length;C++)F[C].destroy();k.guidesArrHor=S;E-=c.x;d=!0}else u(!0);if(1<I&&I==y.length-1){S=[];F=k.guidesArrVer;g=[];x=0;C=y[0]==n?1:0;I=y[C].x+y[C].width;if(0<B)for(C=0;C<y.length-1;C++)q=y[C],H=y[C+1],n==q?(x=H.y-q.height-B,g.push(new mxPoint(I,x+q.height+J)),g.push(new mxPoint(I,H.y-J))):n==H?(g.push(new mxPoint(I,q.y+q.height+J)),x=q.y+q.height+B,g.push(new mxPoint(I,x-J))):(g.push(new mxPoint(I,q.y+
+q.height+J)),g.push(new mxPoint(I,H.y-J)));else q=y[0],C=y[2],x=q.y+q.height+(C.y-q.y-q.height-n.height)/2,g.push(new mxPoint(I,q.y+q.height+J)),g.push(new mxPoint(I,x-J)),g.push(new mxPoint(I,x+n.height+J)),g.push(new mxPoint(I,C.y-J));for(C=0;C<g.length;C+=2)A=g[C],z=g[C+1],A=p(A,z,null!=F?F[C/2]:null,!0),A.node.style.visibility="visible",A.redraw(),S.push(A);for(C=g.length/2;null!=F&&C<F.length;C++)F[C].destroy();k.guidesArrVer=S;x-=c.y;g=!0}else u(!1,!0)}if(d||g)return n=new mxPoint(E,x),y=b.call(this,
+c,n,m,v),d&&!g?n.y=y.y:g&&!d&&(n.x=y.x),y.y!=n.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),y.x!=n.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),n;u(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var v=0;v<l.length;v++)l[v].node.style.visibility=c?"visible":"hidden";if(null!=
+m)for(v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var I=b.diagramContainer;k.style.top=I.offsetTop-E+"px";k.style.left=I.offsetLeft-E+"px";k.style.width=(f?0:I.offsetWidth)+E+"px";k.style.height=(f?I.offsetHeight:0)+E+"px"}function m(I,M,G){if(null!=v)return I;var S;return function(){var u=this,z=arguments,F=G&&!S;clearTimeout(S);S=setTimeout(function(){S=null;G||I.apply(u,z)},M);F&&I.apply(u,z)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+x=window.cancelAnimationFrame||window.mozCancelAnimationFrame,E=this.RULER_THICKNESS,d=this;this.unit=e;var g=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},k=document.createElement("div");k.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){g=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};k.style.background=g.bkgClr;k.style[f?"borderRight":"borderBottom"]="0.5px solid "+g.strokeClr;k.style.borderLeft="0.5px solid "+g.strokeClr});this.updateStyle();document.body.appendChild(k);mxEvent.disableContextMenu(k);this.editorUiRefresh=b.refresh;b.refresh=
-function(J){d.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var q=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var A=function(J,M,v,u,G){J=Math.round(J);M=Math.round(M);v=Math.round(v);u=Math.round(u);q.beginPath();q.moveTo(J+.5,M+.5);q.lineTo(v+.5,u+.5);q.stroke();G&&(f?(q.save(),q.translate(J,M),
-q.rotate(-Math.PI/2),q.fillText(G,0,0),q.restore()):q.fillText(G,J,M))},E=function(){q.clearRect(0,0,n.width,n.height);q.beginPath();q.lineWidth=.7;q.strokeStyle=g.strokeClr;q.setLineDash([]);q.font="9px Arial";q.textAlign="center";var J=p.view.scale,M=p.view.getBackgroundPageBounds(),v=p.view.translate,u=p.pageVisible;v=u?D+(f?M.y-p.container.scrollTop:M.x-p.container.scrollLeft):D+(f?v.y*J-p.container.scrollTop:v.x*J-p.container.scrollLeft);var G=0;u&&(G=p.getPageLayout(),G=f?G.y*p.pageFormat.height:
-G.x*p.pageFormat.width);var I;switch(d.unit){case mxConstants.POINTS:var F=I=10;var L=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:I=10;F=mxConstants.PIXELS_PER_MM;L=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:I=20;F=mxConstants.PIXELS_PER_MM;L=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:I=.5>=J||4<=J?8:16,F=mxConstants.PIXELS_PER_INCH/I,L=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=F;2<=J?K=F/(2*Math.floor(J/2)):.5>=J&&(K=F*Math.floor(1/J/2)*(d.unit==
-mxConstants.MILLIMETERS?2:1));F=null;M=u?Math.min(v+(f?M.height:M.width),f?n.height:n.width):f?n.height:n.width;if(u)if(q.fillStyle=g.outBkgClr,f){var H=v-D;0<H&&q.fillRect(0,D,D,H);M<n.height&&q.fillRect(0,M,D,n.height)}else H=v-D,0<H&&q.fillRect(D,0,H,D),M<n.width&&q.fillRect(M,0,n.width,D);q.fillStyle=g.fontClr;for(u=u?v:v%(K*J);u<=M;u+=K*J)if(H=Math.round((u-v)/J/K),!(u<D||H==F)){F=H;var Q=null;0==H%I&&(Q=d.formatText(G+H*K)+"");f?A(D-L[Math.abs(H)%I],u,D,u,Q):A(u,D-L[Math.abs(H)%I],u,D,Q)}q.lineWidth=
-1;A(f?0:D,f?D:0,D,D);q.fillStyle=g.cornerClr;q.fillRect(0,0,D,D)},z=-1,B=function(){null!=x?(null!=y&&y(z),z=x(E)):E()};this.drawRuler=B;this.sizeListener=e=m(function(){var J=p.container;f?(J=J.offsetHeight+D,n.height!=J&&(n.height=J,k.style.height=J+"px",B())):(J=J.offsetWidth+D,n.width!=J&&(n.width=J,k.style.width=J+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var J=f?p.container.scrollTop:p.container.scrollLeft;d.lastScroll!=J&&(d.lastScroll=J,B())},10);
-this.unitListener=function(J,M){d.setUnit(M.getProperty("unit"))};p.addListener(mxEvent.SIZE,e);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){g=J;k.style.background=g.bkgClr;E()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,M,v,u){if(f&&4<J.height||
-!f&&4<J.width){if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3)}catch(W){}var G=d.origGuideMove.apply(this,arguments);try{q.lineWidth=.5;q.strokeStyle=g.guideClr;q.setLineDash([2]);if(f){var I=J.y+G.y+D-this.graph.container.scrollTop;var F=0;var L=I+J.height/2;var K=D/2;var H=I+J.height;var Q=0;var U=q.getImageData(F,I-1,D,
-3);A(F,I,D,I);I--;var T=q.getImageData(K,L-1,D,3);A(K,L,D,L);L--;var V=q.getImageData(Q,H-1,D,3);A(Q,H,D,H);H--}else I=0,F=J.x+G.x+D-this.graph.container.scrollLeft,L=D/2,K=F+J.width/2,H=0,Q=F+J.width,U=q.getImageData(F-1,I,3,D),A(F,I,F,D),F--,T=q.getImageData(K-1,L,3,D),A(K,L,K,D),K--,V=q.getImageData(Q-1,H,3,D),A(Q,H,Q,D),Q--;if(null==d.guidePart||d.guidePart.x1!=F||d.guidePart.y1!=I)d.guidePart={imgData1:U,x1:F,y1:I,imgData2:T,x2:K,y2:L,imgData3:V,x3:Q,y3:H}}catch(W){}}else G=d.origGuideMove.apply(this,
-arguments);return G};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(M){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(I){d.editorUiRefresh.apply(b,arguments);l()};l();var n=document.createElement("canvas");n.width=k.offsetWidth;n.height=k.offsetHeight;k.style.overflow="hidden";n.style.position="relative";k.appendChild(n);var q=n.getContext("2d");this.ui=b;var p=b.editor.graph;this.graph=p;this.container=k;this.canvas=n;var y=function(I,M,G,S,u){I=Math.round(I);M=Math.round(M);G=Math.round(G);S=Math.round(S);q.beginPath();q.moveTo(I+.5,M+.5);q.lineTo(G+.5,S+.5);q.stroke();u&&(f?(q.save(),q.translate(I,M),
+q.rotate(-Math.PI/2),q.fillText(u,0,0),q.restore()):q.fillText(u,I,M))},A=function(){q.clearRect(0,0,n.width,n.height);q.beginPath();q.lineWidth=.7;q.strokeStyle=g.strokeClr;q.setLineDash([]);q.font="9px Arial";q.textAlign="center";var I=p.view.scale,M=p.view.getBackgroundPageBounds(),G=p.view.translate,S=p.pageVisible;G=S?E+(f?M.y-p.container.scrollTop:M.x-p.container.scrollLeft):E+(f?G.y*I-p.container.scrollTop:G.x*I-p.container.scrollLeft);var u=0;S&&(u=p.getPageLayout(),u=f?u.y*p.pageFormat.height:
+u.x*p.pageFormat.width);var z;switch(d.unit){case mxConstants.POINTS:var F=z=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:z=10;F=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:z=20;F=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:z=.5>=I||4<=I?8:16,F=mxConstants.PIXELS_PER_INCH/z,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=F;2<=I?K=F/(2*Math.floor(I/2)):.5>=I&&(K=F*Math.floor(1/I/2)*(d.unit==
+mxConstants.MILLIMETERS?2:1));F=null;M=S?Math.min(G+(f?M.height:M.width),f?n.height:n.width):f?n.height:n.width;if(S)if(q.fillStyle=g.outBkgClr,f){var H=G-E;0<H&&q.fillRect(0,E,E,H);M<n.height&&q.fillRect(0,M,E,n.height)}else H=G-E,0<H&&q.fillRect(E,0,H,E),M<n.width&&q.fillRect(M,0,n.width,E);q.fillStyle=g.fontClr;for(S=S?G:G%(K*I);S<=M;S+=K*I)if(H=Math.round((S-G)/I/K),!(S<E||H==F)){F=H;var N=null;0==H%z&&(N=d.formatText(u+H*K)+"");f?y(E-J[Math.abs(H)%z],S,E,S,N):y(S,E-J[Math.abs(H)%z],S,E,N)}q.lineWidth=
+1;y(f?0:E,f?E:0,E,E);q.fillStyle=g.cornerClr;q.fillRect(0,0,E,E)},C=-1,B=function(){null!=v?(null!=x&&x(C),C=v(A)):A()};this.drawRuler=B;this.sizeListener=e=m(function(){var I=p.container;f?(I=I.offsetHeight+E,n.height!=I&&(n.height=I,k.style.height=I+"px",B())):(I=I.offsetWidth+E,n.width!=I&&(n.width=I,k.style.width=I+"px",B()))},10);this.pageListener=function(){B()};this.scrollListener=c=m(function(){var I=f?p.container.scrollTop:p.container.scrollLeft;d.lastScroll!=I&&(d.lastScroll=I,B())},10);
+this.unitListener=function(I,M){d.setUnit(M.getProperty("unit"))};p.addListener(mxEvent.SIZE,e);p.container.addEventListener("scroll",c);p.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){g=I;k.style.background=g.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,M,G,S){if(f&&4<I.height||
+!f&&4<I.width){if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3)}catch(W){}var u=d.origGuideMove.apply(this,arguments);try{q.lineWidth=.5;q.strokeStyle=g.guideClr;q.setLineDash([2]);if(f){var z=I.y+u.y+E-this.graph.container.scrollTop;var F=0;var J=z+I.height/2;var K=E/2;var H=z+I.height;var N=0;var U=q.getImageData(F,z-1,E,
+3);y(F,z,E,z);z--;var Q=q.getImageData(K,J-1,E,3);y(K,J,E,J);J--;var V=q.getImageData(N,H-1,E,3);y(N,H,E,H);H--}else z=0,F=I.x+u.x+E-this.graph.container.scrollLeft,J=E/2,K=F+I.width/2,H=0,N=F+I.width,U=q.getImageData(F-1,z,3,E),y(F,z,F,E),F--,Q=q.getImageData(K-1,J,3,E),y(K,J,K,E),K--,V=q.getImageData(N-1,H,3,E),y(N,H,N,E),N--;if(null==d.guidePart||d.guidePart.x1!=F||d.guidePart.y1!=z)d.guidePart={imgData1:U,x1:F,y1:z,imgData2:Q,x2:K,y2:J,imgData3:V,x3:N,y3:H}}catch(W){}}else u=d.origGuideMove.apply(this,
+arguments);return u};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=d.origGuideDestroy.apply(this,arguments);if(null!=d.guidePart)try{q.putImageData(d.guidePart.imgData1,d.guidePart.x1,d.guidePart.y1),q.putImageData(d.guidePart.imgData2,d.guidePart.x2,d.guidePart.y2),q.putImageData(d.guidePart.imgData3,d.guidePart.x3,d.guidePart.y3),d.guidePart=null}catch(M){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
-function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var x=new mxPopupMenu(mxUtils.bind(this,function(d,g){b.menus.addMenuItems(d,["points","inches","millimeters","meters"],g)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=
-!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var y=mxEvent.getClientX(m),D=mxEvent.getClientY(m);x.popup(y,D,null,m);b.setCurrentMenu(x,c)}mxEvent.consume(m)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,x=[],y,D=!1,d=!0,g=!0,k=!0,n=!0,q=[],p=!1,A=!0,E=!1,z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(L){D=L};this.setAutoClose=function(L){d=L};this.setAutoInsert=
-function(L){g=L};this.setAutoScroll=function(L){k=L};this.setOpenFill=function(L){n=L};this.setStopClickEnabled=function(L){A=L};this.setSelectInserted=function(L){E=L};this.setSmoothing=function(L){f=L};this.setPerfectFreehandMode=function(L){B=L};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(L){z.size=L};this.getBrushSize=function(){return z.size};var J=function(L){p=L;b.getRubberband().setEnabled(!L);b.graphHandler.setSelectEnabled(!L);b.graphHandler.setMoveEnabled(!L);
-b.container.style.cursor=L?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){J(!0)};this.isDrawing=function(){return p};var M=mxUtils.bind(this,function(L){if(c){var K=y.length,H=A&&0<x.length&&null!=y&&2>y.length;H||x.push.apply(x,y);y=[];x.push(null);l.push(c);c=null;(H||g)&&this.stopDrawing();g&&2<=K&&this.startDrawing();mxEvent.consume(L)}}),v=new mxCell;v.edge=!0;var u=function(){var L=b.getCurrentCellStyle(v);L=mxUtils.getValue(b.currentVertexStyle,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==L&&(L=b.shapeForegroundColor);return L};this.createStyle=function(L){var K=";fillColor=none;";B&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+L+K};this.stopDrawing=function(){if(0<l.length){if(B){for(var L=[],K=0;K<x.length;K++)null!=x[K]&&L.push([x[K].x,x[K].y]);L=PerfectFreehand.getStroke(L,z);x=[];for(K=0;K<L.length;K++)x.push({x:L[K][0],y:L[K][1]});x.push(null)}L=x[0].x;var H=x[0].x,Q=
-x[0].y,U=x[0].y;for(K=1;K<x.length;K++)null!=x[K]&&(L=Math.max(L,x[K].x),H=Math.min(H,x[K].x),Q=Math.max(Q,x[K].y),U=Math.min(U,x[K].y));L-=H;Q-=U;if(0<L&&0<Q){var T=100/L,V=100/Q;x.map(function(R){if(null==R)return R;R.x=(R.x-H)*T;R.y=(R.y-U)*V;return R});var W='<shape strokewidth="inherit"><foreground>',t=0;for(K=0;K<x.length;K++){var C=x[K];if(null==C){C=!1;t=x[t];var N=x[K-1];!D&&d&&(C=t.x-N.x,N=t.y-N.y,C=Math.sqrt(C*C+N*N)<=b.tolerance);if(D||C)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+
-'"/>';W+="</path>"+(n||D||C?"<fillstroke/>":"<stroke/>");t=K+1}else W=K==t?W+('<path><move x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>'):W+('<line x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;K=new mxCell("",new mxGeometry(H/W-t.x,U/W-t.y,L/W,Q/W),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}E&&b.setSelectionCells([K])}}for(K=0;K<l.length;K++)l[K].parentNode.removeChild(l[K]);c=null;l=[];x=[]}J(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,K){L=K.getProperty("eventName");K=K.getProperty("event");L==mxEvent.MOUSE_MOVE&&p&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(L,K){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(L=K.getEvent(),p&&!mxEvent.isPopupTrigger(L)&&!mxEvent.isMultiTouchEvent(L))){var H=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var Q=u();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?Q:"none");c.setAttribute("stroke",Q);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(Q=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-Q=Q.split(" ").map(function(U){return parseFloat(U)*H}).join(" "),c.setAttribute("stroke-dasharray",Q));q=[];L=G(L);I(L);m="M"+L.x+" "+L.y;x.push(L);y=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[L.x,L.y]],z):m);e.appendChild(c);K.consume()}}),mouseMove:mxUtils.bind(this,function(L,K){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){L=K.getEvent();L=G(L);I(L);var H=F(0);if(H)if(x.push(H),B){var Q=[];for(H=0;H<x.length;H++)Q.push([x[H].x,x[H].y]);y=[];for(var U=2;U<q.length;U+=
-2)H=F(U),Q.push([H.x,H.y]),y.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(Q,z))}else{m+=" L"+H.x+" "+H.y;Q="";y=[];for(U=2;U<q.length;U+=2)H=F(U),Q+=" L"+H.x+" "+H.y,y.push(H);c.setAttribute("d",m+Q)}k&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(L.x-H.x,L.y-H.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(L,K){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var G=function(L){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(L),mxEvent.getClientY(L))},I=function(L){for(q.push(L);q.length>f;)q.shift()},F=function(L){var K=q.length;if(1===K%2||K>=f){var H=0,Q=0,U,T=0;for(U=L;U<K;U++)T++,L=q[U],H+=L.x,Q+=L.y;return{x:H/T,y:Q/T}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(T,V){try{if(!F){var W=e.file.getCurrentUser();if(I&&null!=W&&null!=W.displayName){var t={from:M,id:A,type:T,sessionId:e.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};t={bytes:e.objectToString(t),data:"aes"};t=JSON.stringify(t);L&&"cursor"!=T&&EditorUi.debug("P2PCollab: sending to socket server",[t]);A++;T=!L&&("cursor"==T||"selectionChange"==T);G&&!T&&U("message",t);if(T)for(p2pId in u)u[p2pId].send(t)}}}catch(C){null!=
-window.console&&console.log("Error:",C)}}function l(T){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,t=g.view.scale,C=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:C,x:Math.round((T.getX()-V.x+g.container.scrollLeft)/t-W.x),y:Math.round((T.getY()-V.y+g.container.scrollTop)/t-W.y)})}}function m(T,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=T&&null!=T.cursor&&null!=T.lastCursor)if(null!=T.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=T.lastCursor.pageId&&T.lastCursor.pageId!=W)T.cursor.style.display="none";else{W=function(){var P=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-T.cursor.clientWidth,N)),S=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-T.cursor.clientHeight,R));O.style.opacity=P!=N||S!=R?0:1;T.cursor.style.left=P+"px";T.cursor.style.top=S+"px";T.cursor.style.display=""};var t=g.view.translate,C=g.view.scale,N=(t.x+T.lastCursor.x)*
-C+8,R=(t.y+T.lastCursor.y)*C-12,O=T.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(T.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(T.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function x(T,V){try{var W=function(){if(null==p[C]){var Y=J[C];null==Y&&(Y=k%q.length,J[C]=Y,k++);var Z=q[Y];Y=11<Y?"black":"white";p[C]={cursor:document.createElement("div"),
-color:Z,selection:{}};z[V]=C;N=p[C].cursor;N.style.pointerEvents="none";N.style.position="absolute";N.style.display="none";N.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+Z+'" fill="'+Z+'"/>').src);ba.style.width="10px";N.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=Z;ba.style.color=
-Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,t);N.appendChild(ba);b.diagramContainer.appendChild(N)}else N=p[C].cursor;R=p[C].selection};if(!F){T=JSON.parse(T);null!=T.bytes&&(T=e.stringToObject(T.bytes));L&&"cursor"!=T.type&&EditorUi.debug("P2PCollab: msg received",[T]);if(null!=V){if(T.from==M||E[T.from]>=
-T.id){EditorUi.debug("P2PCollab: Dropped Message",T,M,E[T.from]);return}E[T.from]=T.id}var t=T.username?T.username:"Anonymous",C=T.sessionId,N,R;null!=p[C]&&(clearTimeout(p[C].inactiveTO),p[C].inactiveTO=setTimeout(function(){D(null,C)},12E4));var O=T.data;switch(T.type){case "cursor":W();p[C].lastCursor=O;m(p[C],!0);break;case "diff":try{T=null!=O.patch?e.stringToObject(decodeURIComponent(O.patch)):O.diff,e.receiveRemoteChanges(T.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=
-urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==P||null!=O.pageId&&O.pageId==P){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=R[S];delete R[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var aa=g.model.getCell(S);null!=aa&&(R[S]=g.highlightCell(aa,p[C].color,6E4,70,3))}}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",T))}}catch(Y){null!=window.console&&console.log("Error:",Y)}}
-function y(T,V){if(!L&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){U("sendSignal",{to:T,from:M,signal:t})});W.on("error",function(t){delete v[T];EditorUi.debug("P2PCollab: p2p socket error",t);!F&&V&&W.destroyed&&B[T]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",T),y(T,!0))});W.on("connect",function(){delete v[T];null==u[T]||u[T].destroyed?(u[T]=W,B[T]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
-T)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",T))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",T),d(z[T]),delete u[T])});W.on("data",x);return v[T]=W}}function D(T,V){d(V||z[T]);null!=T&&(delete z[T],B[T]=!1)}function d(T){var V=p[T];if(null!=V){var W=V.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[T]}}
-var g=b.editor.graph,k=0,n=null,q="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},A=1,E={},z={},B={},J={},M,v={},u={},G=!0,I=!1,F=!1,L="0"!=urlParams["no-p2p"],K=!1,H=0,Q=null,U=mxUtils.bind(this,function(T,V){if(!F)try{null!=n?(n.send(JSON.stringify({action:T,msg:V})),L||EditorUi.debug("P2PCollab: sending to socket server",[T],[V])):this.joinFile(!0)}catch(W){Q=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),
-EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(T){this.sendMessage("diff",{diff:T})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return Q};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(T,V){},mouseMove:function(T,V){var W,t=-1;return function(){clearTimeout(W);var C=this,N=arguments,R=function(){W=null;t=Date.now();T.apply(C,N)};Date.now()-t>V?R():W=setTimeout(R,V)}}(function(T,
-V){l(V)},300),mouseUp:function(T,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(T,V){T=function(C){return null!=C?C.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(T):[],added:V?
-V.map(T):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var T in p)m(p[T])});mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
-this.cursorHandler);this.joinFile=function(T){if(!F)try{K&&(EditorUi.debug("P2PCollab: joinInProgress on",K),Q="busy");K=++H;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(t){n=V;n.joinId=K;K=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId);
-T&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(t){L||EditorUi.debug("P2PCollab: msg received",[t]);var C=JSON.parse(t.data);L&&"message"!=C.action&&EditorUi.debug("P2PCollab: msg received",[t]);switch(C.action){case "message":x(C.msg,C.from);break;case "clientsList":t=C.msg;M=t.cId;I=!0;for(C=0;C<t.list.length;C++)y(t.list[C],!0);break;case "signal":t=C.msg;L||(v[t.from]?C=v[t.from]:(C=y(t.from,!1),G=!0),C.signal(t.signal));break;case "newClient":G=!0;break;case "clientLeft":D(C.msg);
-break;case "sendSignalFailed":t=C.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete v[t.to],B[t.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);F||1E3==t.code||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
+function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var v=new mxPopupMenu(mxUtils.bind(this,function(d,g){b.menus.addMenuItems(d,["points","inches","millimeters","meters"],g)}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=
+!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var x=mxEvent.getClientX(m),E=mxEvent.getClientY(m);v.popup(x,E,null,m);b.setCurrentMenu(v,c)}mxEvent.consume(m)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,v=[],x,E=!1,d=!0,g=!0,k=!0,n=!0,q=[],p=!1,y=!1,A=!1,C={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},B=!0;this.setClosedPath=function(J){E=J};this.setAutoClose=function(J){d=J};this.setAutoInsert=
+function(J){g=J};this.setAutoScroll=function(J){k=J};this.setOpenFill=function(J){n=J};this.setStopClickEnabled=function(J){y=J};this.setSelectInserted=function(J){A=J};this.setSmoothing=function(J){f=J};this.setPerfectFreehandMode=function(J){B=J};this.isPerfectFreehandMode=function(){return B};this.setBrushSize=function(J){C.size=J};this.getBrushSize=function(){return C.size};var I=function(J){p=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);
+b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return p};var M=mxUtils.bind(this,function(J){if(c){var K=x.length,H=y&&0<v.length&&null!=x&&2>x.length;H||v.push.apply(v,x);x=[];v.push(null);l.push(c);c=null;(H||g)&&this.stopDrawing();g&&(!H||2<=K)&&this.startDrawing();mxEvent.consume(J)}}),G=new mxCell;G.edge=!0;var S=function(){var J=b.getCurrentCellStyle(G);J=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var K=";fillColor=none;";B&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+K};this.stopDrawing=function(){if(0<l.length){if(B){for(var J=[],K=0;K<v.length;K++)null!=v[K]&&J.push([v[K].x,v[K].y]);J=PerfectFreehand.getStroke(J,C);v=[];for(K=0;K<J.length;K++)v.push({x:J[K][0],y:J[K][1]});v.push(null)}J=v[0].x;var H=v[0].x,N=
+v[0].y,U=v[0].y;for(K=1;K<v.length;K++)null!=v[K]&&(J=Math.max(J,v[K].x),H=Math.min(H,v[K].x),N=Math.max(N,v[K].y),U=Math.min(U,v[K].y));J-=H;N-=U;if(0<J&&0<N){var Q=100/J,V=100/N;v.map(function(T){if(null==T)return T;T.x=(T.x-H)*Q;T.y=(T.y-U)*V;return T});var W='<shape strokewidth="inherit"><foreground>',t=0;for(K=0;K<v.length;K++){var D=v[K];if(null==D){D=!1;t=v[t];var L=v[K-1];!E&&d&&(D=t.x-L.x,L=t.y-L.y,D=Math.sqrt(D*D+L*L)<=b.tolerance);if(E||D)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+
+'"/>';W+="</path>"+(n||E||D?"<fillstroke/>":"<stroke/>");t=K+1}else W=K==t?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;K=new mxCell("",new mxGeometry(H/W-t.x,U/W-t.y,J/W,N/W),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}A&&b.setSelectionCells([K])}}for(K=0;K<l.length;K++)l[K].parentNode.removeChild(l[K]);c=null;l=[];v=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,K){J=K.getProperty("eventName");K=K.getProperty("event");J==mxEvent.MOUSE_MOVE&&p&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,K){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(J=K.getEvent(),p&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var H=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var N=S();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",B?N:"none");c.setAttribute("stroke",N);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(N=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+N=N.split(" ").map(function(U){return parseFloat(U)*H}).join(" "),c.setAttribute("stroke-dasharray",N));q=[];J=u(J);z(J);m="M"+J.x+" "+J.y;v.push(J);x=[];c.setAttribute("d",B?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],C):m);e.appendChild(c);K.consume()}}),mouseMove:mxUtils.bind(this,function(J,K){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=K.getEvent();J=u(J);z(J);var H=F(0);if(H)if(v.push(H),B){var N=[];for(H=0;H<v.length;H++)N.push([v[H].x,v[H].y]);x=[];for(var U=2;U<q.length;U+=
+2)H=F(U),N.push([H.x,H.y]),x.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(N,C))}else{m+=" L"+H.x+" "+H.y;N="";x=[];for(U=2;U<q.length;U+=2)H=F(U),N+=" L"+H.x+" "+H.y,x.push(H);c.setAttribute("d",m+N)}k&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(J,K){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var u=function(J){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(J),mxEvent.getClientY(J))},z=function(J){for(q.push(J);q.length>f;)q.shift()},F=function(J){var K=q.length;if(1===K%2||K>=f){var H=0,N=0,U,Q=0;for(U=J;U<K;U++)Q++,J=q[U],H+=J.x,N+=J.y;return{x:H/Q,y:N/Q}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(Q,V){try{if(!F){var W=e.file.getCurrentUser();if(z&&null!=W&&null!=W.displayName){var t={from:M,id:y,type:Q,sessionId:e.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};t={bytes:e.objectToString(t),data:"aes"};t=JSON.stringify(t);J&&"cursor"!=Q&&EditorUi.debug("P2PCollab: sending to socket server",[t]);y++;Q=!J&&("cursor"==Q||"selectionChange"==Q);u&&!Q&&U("message",t);if(Q)for(p2pId in S)S[p2pId].send(t)}}}catch(D){null!=
+window.console&&console.log("Error:",D)}}function l(Q){if(b.shareCursorPosition&&!g.isMouseDown){var V=mxUtils.getOffset(g.container),W=g.view.translate,t=g.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((Q.getX()-V.x+g.container.scrollLeft)/t-W.x),y:Math.round((Q.getY()-V.y+g.container.scrollTop)/t-W.y)})}}function m(Q,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=Q&&null!=Q.cursor&&null!=Q.lastCursor)if(null!=Q.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=Q.lastCursor.pageId&&Q.lastCursor.pageId!=W)Q.cursor.style.display="none";else{W=function(){var P=Math.max(g.container.scrollLeft,Math.min(g.container.scrollLeft+g.container.clientWidth-Q.cursor.clientWidth,L)),R=Math.max(g.container.scrollTop-22,Math.min(g.container.scrollTop+g.container.clientHeight-Q.cursor.clientHeight,T));O.style.opacity=P!=L||R!=T?0:1;Q.cursor.style.left=P+"px";Q.cursor.style.top=R+"px";Q.cursor.style.display=""};var t=g.view.translate,D=g.view.scale,L=(t.x+Q.lastCursor.x)*
+D+8,T=(t.y+Q.lastCursor.y)*D-12,O=Q.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(Q.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(Q.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function v(Q,V){try{var W=function(){if(null==p[D]){var Y=I[D];null==Y&&(Y=k%q.length,I[D]=Y,k++);var aa=q[Y];Y=11<Y?"black":"white";p[D]={cursor:document.createElement("div"),
+color:aa,selection:{}};C[V]=D;L=p[D].cursor;L.style.pointerEvents="none";L.style.position="absolute";L.style.display="none";L.style.opacity="0.9";var ba=document.createElement("img");mxUtils.setPrefixedStyle(ba.style,"transform","rotate(-45deg)translateX(-14px)");ba.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+aa+'" fill="'+aa+'"/>').src);ba.style.width="10px";L.appendChild(ba);ba=document.createElement("div");ba.style.backgroundColor=aa;ba.style.color=
+Y;ba.style.fontSize="9pt";ba.style.padding="3px 7px";ba.style.marginTop="8px";ba.style.borderRadius="10px";ba.style.maxWidth="100px";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.whiteSpace="nowrap";mxUtils.write(ba,t);L.appendChild(ba);b.diagramContainer.appendChild(L)}else L=p[D].cursor;T=p[D].selection};if(!F){Q=JSON.parse(Q);null!=Q.bytes&&(Q=e.stringToObject(Q.bytes));J&&"cursor"!=Q.type&&EditorUi.debug("P2PCollab: msg received",[Q]);if(null!=V){if(Q.from==M||A[Q.from]>=
+Q.id){EditorUi.debug("P2PCollab: Dropped Message",Q,M,A[Q.from]);return}A[Q.from]=Q.id}var t=Q.username?Q.username:"Anonymous",D=Q.sessionId,L,T;null!=p[D]&&(clearTimeout(p[D].inactiveTO),p[D].inactiveTO=setTimeout(function(){E(null,D)},12E4));var O=Q.data;switch(Q.type){case "cursor":W();p[D].lastCursor=O;m(p[D],!0);break;case "diff":try{Q=null!=O.patch?e.stringToObject(decodeURIComponent(O.patch)):O.diff,e.receiveRemoteChanges(Q.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=
+urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==P||null!=O.pageId&&O.pageId==P){W();for(W=0;W<O.removed.length;W++){var R=O.removed[W];if(null!=R){var X=T[R];delete T[R];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(R=O.added[W],null!=R){var Z=g.model.getCell(R);null!=Z&&(T[R]=g.highlightCell(Z,p[D].color,6E4,70,3))}}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",Q))}}catch(Y){null!=window.console&&console.log("Error:",Y)}}function x(Q,
+V){if(!J&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){U("sendSignal",{to:Q,from:M,signal:t})});W.on("error",function(t){delete G[Q];EditorUi.debug("P2PCollab: p2p socket error",t);!F&&V&&W.destroyed&&B[Q]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",Q),x(Q,!0))});W.on("connect",function(){delete G[Q];null==S[Q]||S[Q].destroyed?(S[Q]=W,B[Q]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
+Q)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",Q))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",Q),d(C[Q]),delete S[Q])});W.on("data",v);return G[Q]=W}}function E(Q,V){d(V||C[Q]);null!=Q&&(delete C[Q],B[Q]=!1)}function d(Q){var V=p[Q];if(null!=V){var W=V.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete p[Q]}}
+var g=b.editor.graph,k=0,n=null,q="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),p={},y=1,A={},C={},B={},I={},M,G={},S={},u=!0,z=!1,F=!1,J="0"!=urlParams["no-p2p"],K=!1,H=0,N=null,U=mxUtils.bind(this,function(Q,V){if(!F)try{null!=n?(n.send(JSON.stringify({action:Q,msg:V})),J||EditorUi.debug("P2PCollab: sending to socket server",[Q],[V])):this.joinFile(!0)}catch(W){N=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),
+EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(Q){this.sendMessage("diff",{diff:Q})};this.getState=function(){return null!=n?n.readyState:3};this.getLastError=function(){return N};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Q,V){},mouseMove:function(Q,V){var W,t=-1;return function(){clearTimeout(W);var D=this,L=arguments,T=function(){W=null;t=Date.now();Q.apply(D,L)};Date.now()-t>V?T():W=setTimeout(T,V)}}(function(Q,
+V){l(V)},300),mouseUp:function(Q,V){l(V)}};g.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(Q,V){Q=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(Q):[],added:V?
+V.map(Q):[]})};g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var Q in p)m(p[Q])});mxEvent.addListener(g.container,"scroll",this.cursorHandler);g.getView().addListener(mxEvent.SCALE,this.cursorHandler);g.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);g.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
+this.cursorHandler);this.joinFile=function(Q){if(!F)try{K&&(EditorUi.debug("P2PCollab: joinInProgress on",K),N="busy");K=++H;try{null!=n&&(EditorUi.debug("P2PCollab: force closing socket on",n.joinId),n.close(1E3),n=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(t){n=V;n.joinId=K;K=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",n.joinId);
+Q&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(t){J||EditorUi.debug("P2PCollab: msg received",[t]);var D=JSON.parse(t.data);J&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[t]);switch(D.action){case "message":v(D.msg,D.from);break;case "clientsList":t=D.msg;M=t.cId;z=!0;for(D=0;D<t.list.length;D++)x(t.list[D],!0);break;case "signal":t=D.msg;J||(G[t.from]?D=G[t.from]:(D=x(t.from,!1),u=!0),D.signal(t.signal));break;case "newClient":u=!0;break;case "clientLeft":E(D.msg);
+break;case "sendSignalFailed":t=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete G[t.to],B[t.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);F||1E3==t.code||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",V.joinId);F||H!=V.joinId||(K==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),K=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
-e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){Q=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!F){EditorUi.debug("P2PCollab: destroyed");F=!0;for(sessionId in p)d(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
-null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var T in u)null!=u[T]&&u[T].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){N=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!F){EditorUi.debug("P2PCollab: destroyed");F=!0;for(sessionId in p)d(sessionId);null!=this.mouseListeners&&g.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&g.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
+null!=this.cursorHandler&&(mxEvent.removeListener(g.container,"scroll",this.cursorHandler),g.getView().removeListener(mxEvent.SCALE,this.cursorHandler),g.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),g.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=n&&(n.close(1E3),n=null);for(var Q in S)null!=S[Q]&&S[Q].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 837db3d4..13436ac4 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -7080,20 +7080,7 @@ App.prototype.updateUserElement = function()
{
if (this.userElement == null)
{
- this.userElement = document.createElement('a');
- this.userElement.className = 'geItem';
- this.userElement.style.position = 'absolute';
- this.userElement.style.fontSize = '8pt';
- this.userElement.style.top = (uiTheme == 'atlas') ? '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.userElement = this.createUserElement();
this.menubarContainer.appendChild(this.userElement);
// Prevents focus
@@ -7577,7 +7564,11 @@ App.prototype.updateUserElement = function()
if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
{
- div = div.cloneNode(false);
+ var div = document.createElement('div');
+ div.style.padding = '10px';
+ div.style.whiteSpace = 'nowrap';
+ div.style.borderTop = '1px solid rgb(224, 224, 224)';
+ div.style.marginTop = '4px';
div.style.textAlign = 'center';
div.style.padding = '10px';
div.style.fontSize = '9pt';
@@ -7635,12 +7626,13 @@ App.prototype.updateUserElement = function()
if (user != null)
{
+ EditorUi.removeChildNodes(this.userElement);
this.userElement.innerText = '';
-
- if (screen.width > 560)
+
+ if (Editor.currentTheme != 'sketch' && screen.width > 560)
{
mxUtils.write(this.userElement, user.displayName);
- this.userElement.style.display = 'block';
+ this.userElement.style.display = 'inline-block';
}
}
else
@@ -7648,9 +7640,128 @@ App.prototype.updateUserElement = function()
this.userElement.style.display = 'none';
}
}
+
+ this.updateUserElementStyle();
+ this.updateUserElementIcon();
+};
+
+//TODO Use this function to get the currently logged in user
+App.prototype.updateUserElementIcon = function()
+{
+ var elt = this.userElement;
+
+ if (elt != null)
+ {
+ var title = mxResources.get('changeUser');
+
+ if (elt.style.display != 'none')
+ {
+ var file = this.getCurrentFile();
+
+ if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ {
+ var icon = document.createElement('img');
+ icon.setAttribute('border', '0');
+ icon.style.position = 'absolute';
+ icon.style.left = '16px';
+ icon.style.top = '2px';
+ icon.style.width = '12px';
+ icon.style.height = '12px';
+
+ var err = file.getRealtimeError();
+ var state = file.getRealtimeState();
+ title += ' (' + mxResources.get('realtimeCollaboration') + ': ';
+
+ if (state == 1)
+ {
+ icon.src = Editor.syncImage;
+ title += mxResources.get('online');
+ }
+ else
+ {
+ icon.src = Editor.syncProblemImage;
+
+ if (err != null && err.message != null)
+ {
+ title += err.message;
+ }
+ else
+ {
+ title += mxResources.get('disconnected');
+ }
+ }
+
+ title += ')';
+
+ if (Editor.currentTheme == 'sketch')
+ {
+ elt.style.marginRight = '6px';
+ elt.appendChild(icon);
+ }
+ }
+
+ elt.setAttribute('title', title);
+ }
+ }
};
//TODO Use this function to get the currently logged in user
+App.prototype.updateUserElementStyle = function()
+{
+ var elt = this.userElement;
+
+ if (elt != null)
+ {
+ if (Editor.currentTheme == 'sketch')
+ {
+ elt.className = 'geToolbarButton';
+ elt.style.backgroundImage = 'url(' + Editor.userImage + ')';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '100% 100%';
+ elt.style.position = 'relative';
+ elt.style.margin = '0px';
+ elt.style.padding = '0px';
+ elt.style.height = '24px';
+ elt.style.width = '24px';
+ elt.style.top = '3px';
+ elt.style.right = '';
+ }
+ else
+ {
+ elt.className = 'geItem';
+ elt.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+ elt.style.backgroundPosition = '100% 60%';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '';
+ elt.style.position = 'absolute';
+ elt.style.margin = '4px';
+ elt.style.padding = '2px';
+ elt.style.paddingRight = '16px';
+ elt.style.width = '';
+ elt.style.height = '';
+ elt.style.right = (Editor.currentTheme == 'atlas' ||
+ urlParams['live-ui'] != '1') ? '8px' : '30px';
+ elt.style.top = (Editor.currentTheme == 'atlas') ? '8px' : '2px';
+ }
+ }
+};
+
+/**
+ * Adds the listener for automatically saving the diagram for local changes.
+ */
+App.prototype.createUserElement = function()
+{
+ var elt = document.createElement('a');
+ mxUtils.setPrefixedStyle(elt.style, 'transition', 'none');
+ elt.style.display = 'inline-block';
+ elt.style.cursor = 'pointer';
+ elt.style.fontSize = '8pt';
+
+ return elt;
+};
+
+//TODO Use this function to get the currently logged in user
App.prototype.getCurrentUser = function()
{
var user = null;
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index b0b37076..6a895b9d 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -32,8 +32,8 @@ if (!mxIsElectron && location.protocol !== 'http:')
'; ';
var styleHashes = '\'sha256-JjkxVHHCCVO0nllPD6hU8bBYSlsikA8TM/o3fhr0bas=\' ' + // index.html
- '\'sha256-4pUt7OuaoLNo5uDuX+AclpTryPwhRX6uqZWQH/jtOvE=\' ' + // Minimal.js/Light
- '\'sha256-C26P0UwTt9j3PuMuqZ6wTb7DL6A9c0DoJcT8e2atugc=\' ' + // Minimal.js/Dark
+ '\'sha256-8bAFhdIVH8/EjuHhNVZCG8isp9LZEPSQ23SJ7e54VWI=\' ' + // Minimal.js/Light
+ '\'sha256-fSmyKEwMytIGzQ+V1A8gi8iNvdN+rLOrqJvCL179k8Q=\' ' + // Minimal.js/Dark
'\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
'\'sha256-kuk5TvxZ/Kwuobo4g6uasb1xRQwr1+nfa1A3YGePO7U=\' ' + // MathJax
'\'sha256-ByOXYIXIkfNC3flUR/HoxR4Ak0pjOEF1q8XmtuIa6po=\' ' + // purify.min.js
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 5fd0d4ea..54afbb5c 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -7695,8 +7695,15 @@ var FreehandWindow = function(editorUi, x, y, w, h, withBrush)
{
startBtn.innerText = '';
mxUtils.write(startBtn, mxResources.get(graph.freehand.isDrawing() ? 'stopDrawing' : 'startDrawing'));
+
+ var shortcut = document.createElement('span');
+ shortcut.style.opacity = '0.7';
+ shortcut.style['float'] = 'right';
+ mxUtils.write(shortcut, 'X');
+ startBtn.appendChild(shortcut);
+
startBtn.setAttribute('title', mxResources.get(graph.freehand.isDrawing() ? 'stopDrawing' : 'startDrawing'));
- startBtn.className = 'geBtn' + (!graph.freehand.isDrawing() ? ' gePrimaryBtn' : '');
+ startBtn.className = 'geBtn' + (graph.freehand.isDrawing() ? ' gePrimaryBtn' : '');
}));
this.window.addListener('show', mxUtils.bind(this, function()
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index fcfb6297..9b318d5b 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -2388,7 +2388,7 @@
{
load: [(urlParams['math-output'] == 'html') ?
'output/chtml' : 'output/svg', 'input/tex',
- 'input/asciimath']
+ 'input/asciimath', 'ui/safe']
},
startup:
{
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index b4bf4193..dd14279c 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -9326,7 +9326,7 @@
EditorUi.prototype.init = function()
{
mxStencilRegistry.allowEval = mxStencilRegistry.allowEval && !this.isOfflineApp();
-
+
// Must be set before UI is created in superclass
if (this.isSettingsEnabled())
{
@@ -10283,6 +10283,12 @@
this.addListener('darkModeChanged', themeChangeListener);
this.addListener('sketchModeChanged', themeChangeListener);
+ this.addListener('currentThemeChanged', mxUtils.bind(this, function()
+ {
+ this.updateUserElement();
+ this.refresh();
+ }));
+
if (uiTheme == 'dark')
{
this.doSetDarkMode(true);
@@ -10441,12 +10447,18 @@
// Avoid autoscroll but allow handling of all pass-through ctrl shortcuts
textInput.style.left = (graph.container.scrollLeft + 10) + 'px';
textInput.style.top = (graph.container.scrollTop + 10) + 'px';
-
+ var x0 = graph.container.scrollLeft;
+ var y0 = graph.container.scrollTop;
+
graph.container.appendChild(textInput);
restoreFocus = true;
textInput.focus();
document.execCommand('selectAll', false, null);
+
+ // Workaround for Safari 16 scroll after CMD key press
+ graph.container.scrollLeft = x0;
+ graph.container.scrollTop = y0;
}
}
}
@@ -10541,8 +10553,15 @@
if (!mxEvent.isConsumed(evt))
{
+ var x0 = graph.container.scrollLeft;
+ var y0 = graph.container.scrollTop;
+
window.setTimeout(mxUtils.bind(this, function()
{
+ // Workaround for Safari 16 scroll after paste
+ graph.container.scrollLeft = x0;
+ graph.container.scrollTop = y0;
+
this.pasteCells(evt, textInput, false, true);
}), 0);
}
@@ -10568,9 +10587,8 @@
EditorUi.prototype.setCurrentTheme = function(value, noRestart)
{
mxSettings.setUi(value);
- noRestart = noRestart || this.doSetCurrentTheme(value);
- this.fireEvent(new mxEventObject('currentThemeChanged'));
-
+ noRestart = this.doSetCurrentTheme(value) || noRestart;
+
if (!noRestart)
{
this.alert(mxResources.get('restartForChangeRequired'));
@@ -10582,59 +10600,91 @@
*/
EditorUi.prototype.doSetCurrentTheme = function(value)
{
+ function isDefault(theme)
+ {
+ return theme == '' || theme == 'dark' ||
+ theme == 'kennedy' || theme == null;
+ };
+
var curr = Editor.currentTheme;
- var noRestart = false;
+ value = (isDefault(value)) ? 'default' : value;
+ curr = (isDefault(curr)) ? 'default' : curr;
- if (curr != value)
+ // From kennedy to sketch or vice versa
+ var transition = curr == 'sketch' && value == 'default' ||
+ curr == 'default' && value == 'sketch';
+
+ if (transition && urlParams['live-ui'] == '1' && !this.themeSwitching)
{
- if (urlParams['live-ui'] == '1')
+ Editor.currentTheme = value;
+ this.themeSwitching = true;
+
+ // Saves scroll position
+ var t = this.editor.graph.view.translate;
+ var tx = t.x;
+ var ty = t.y;
+ var off = mxUtils.getOffset(this.editor.graph.container);
+ var x = this.editor.graph.container.scrollLeft - off.x;
+ var y = this.editor.graph.container.scrollTop - off.y;
+
+ var delay = 100;
+ mxUtils.setPrefixedStyle(this.container.style, 'transition', 'all ' + delay + 'ms');
+
+ window.setTimeout(mxUtils.bind(this, function()
{
- console.log('doSetCurrentTheme', curr, value);
+ this.container.style.opacity = '0';
- function isDefault(theme)
+ window.setTimeout(mxUtils.bind(this, function()
{
- return theme == null || theme == '' || theme == 'dark' ||
- theme == 'kennedy';
- };
+ if (curr == 'sketch' && value == 'default')
+ {
+ this.sidebarFooterContainer.style.display = 'block';
+ this.menubarContainer.style.display = 'block';
+ this.toolbarContainer.style.display = 'block';
+ this.tabContainer.style.display = 'block';
+ this.hsplit.style.display = 'block';
+ this.hsplitPosition = EditorUi.prototype.hsplitPosition;
+ this.menubarHeight = App.prototype.menubarHeight;
+ this.formatWidth = EditorUi.prototype.formatWidth;
+ }
+ else if (curr == 'default' && value == 'sketch')
+ {
+ this.sidebarFooterContainer.style.display = 'none';
+ this.menubarContainer.style.display = 'none';
+ this.toolbarContainer.style.display = 'none';
+ this.tabContainer.style.display = 'none';
+ this.hsplit.style.display = 'none';
+ this.hsplitPosition = 0;
+ this.menubarHeight = 0;
+ this.formatWidth = 0;
+ }
- value = (isDefault(value)) ? 'default' : value;
- curr = (isDefault(curr)) ? 'default' : curr;
+ this.switchTheme(value);
- // TODO: Change theme at runtime
- if (curr == 'sketch' && value == 'default')
- {
- this.sidebarFooterContainer.style.display = 'block';
- this.menubarContainer.style.display = 'block';
- this.toolbarContainer.style.display = 'block';
- this.sidebarContainer.style.display = 'block';
- this.tabContainer.style.display = 'block';
- this.hsplit.style.display = 'block';
- this.hsplitPosition = EditorUi.prototype.hsplitPosition;
- this.menubarHeight = App.prototype.menubarHeight;
- this.formatWidth = EditorUi.prototype.formatWidth;
- noRestart = true;
- }
- else if (curr == 'default' && value == 'sketch')
- {
- this.sidebarFooterContainer.style.display = 'none';
- this.menubarContainer.style.display = 'none';
- this.toolbarContainer.style.display = 'none';
- this.sidebarContainer.style.display = 'none';
- this.tabContainer.style.display = 'none';
- this.hsplit.style.display = 'none';
- this.hsplitPosition = 0;
- this.menubarHeight = 0;
- this.formatWidth = 0;
- noRestart = true;
- }
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.fireEvent(new mxEventObject('currentThemeChanged'));
- this.switchTheme(value);
- }
+ // Restores scroll position
+ this.editor.graph.refresh();
+ var s = this.editor.graph.view.scale;
+ off = mxUtils.getOffset(this.editor.graph.container);
+ this.editor.graph.container.scrollLeft = x + off.x + (t.x - tx) * s;
+ this.editor.graph.container.scrollTop = y + off.y + (t.y - ty) * s;
- Editor.currentTheme = value;
+ this.container.style.opacity = '';
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(this.container.style, 'transition', null);
+ delete this.themeSwitching;
+ }), delay);
+ }), delay);
+ }), delay);
+ }), 0);
}
- return noRestart;
+ return transition;
};
/**
@@ -10642,25 +10692,35 @@
*/
EditorUi.prototype.switchTheme = function(value)
{
- this.createMenubarForTheme(value);
+ this.switchThemeConstants(value);
this.switchCssForTheme(value);
+ this.createWrapperForTheme(value);
+ this.createPickerMenuForTheme(value);
+ this.createMainMenuForTheme(value);
+ this.createMenubarForTheme(value);
+ this.createFooterMenuForTheme(value);
+
+ // TODO: Check what hides sidebarContainer
+ this.sidebarContainer.style.display = '';
if (value == 'sketch')
{
-
- this.refresh();
-
-
+ // Format window
this.createFormatWindow();
-
this.formatContainer.style.left = '0px';
this.formatContainer.style.top = '0px';
this.formatContainer.style.width = '';
-
+ // Shapes window
+ this.createShapesWindow();
+ this.sidebarContainer.style.left = '0px';
+ this.sidebarContainer.style.top = '0px';
+ this.sidebarContainer.style.bottom = '0px';
+ this.sidebarContainer.style.width = '100%';
}
else if (value == 'default')
{
+ // Format window
if (this.formatContainer != null)
{
this.formatContainer.style.left = '';
@@ -10669,20 +10729,117 @@
{
if (this.footerContainer.parentNode != this.formatContainer.parentNode)
{
- this.footerContainer.parentNode.insertBefore(this.formatContainer, this.footerContainer);
+ this.footerContainer.parentNode.insertBefore(
+ this.formatContainer, this.footerContainer);
}
}
- if (this.formatWindow != null)
+ // Shapes window
+ if (this.sidebarContainer != null)
{
- this.formatWindow.destroy();
- this.formatWindow = null;
+ if (this.formatContainer.parentNode != this.sidebarContainer.parentNode)
+ {
+ this.formatContainer.parentNode.insertBefore(
+ this.sidebarContainer, this.formatContainer);
+ }
}
}
+ }
- this.refresh();
+ // Format panel close button
+ if (this.format != null)
+ {
+ var closeButton = value == 'default' || value == 'atlas';
+ if (this.format.showCloseButton != closeButton)
+ {
+ this.format.showCloseButton = closeButton;
+ this.format.refresh();
+ }
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.destroyWindows = function()
+ {
+ if (this.sidebarWindow != null)
+ {
+ this.sidebarWindow.destroy();
+ this.sidebarWindow = null;
+ }
+
+ if (this.formatWindow != null)
+ {
+ this.formatWindow.destroy();
+ this.formatWindow = null;
+ }
+
+ if (this.freehandWindow != null)
+ {
+ this.freehandWindow.destroy();
+ this.freehandWindow = null;
+ }
+
+ if (this.actions.outlineWindow != null)
+ {
+ this.actions.outlineWindow.destroy();
+ this.actions.outlineWindow = null;
+ }
+ if (this.actions.layersWindow != null)
+ {
+ this.actions.layersWindow.destroy();
+ this.actions.layersWindow = null;
+ }
+
+ if (this.menus.tagsWindow != null)
+ {
+ this.menus.tagsWindow.destroy();
+ this.menus.tagsWindow = null;
+ }
+
+ if (this.menus.findWindow != null)
+ {
+ this.menus.findWindow.destroy();
+ this.menus.findWindow = null;
+ }
+
+ if (this.menus.findReplaceWindow != null)
+ {
+ this.menus.findReplaceWindow.destroy();
+ this.menus.findReplaceWindow = null;
+ }
+
+ if (this.menus.commentsWindow != null)
+ {
+ this.menus.commentsWindow.destroy();
+ this.menus.commentsWindow = null;
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.switchThemeConstants = function(value)
+ {
+ this.destroyWindows();
+
+ if (value == 'sketch')
+ {
+ mxWindow.prototype.closeImage = Graph.createSvgImage(18, 10,
+ '<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
+ mxWindow.prototype.minimizeImage = Graph.createSvgImage(14, 10,
+ '<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
+ mxWindow.prototype.normalizeImage = Graph.createSvgImage(14, 10,
+ '<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
+ }
+ else
+ {
+ mxWindow.prototype.closeImage = mxClient.imageBasePath + '/close.gif';
+ mxWindow.prototype.minimizeImage = mxClient.imageBasePath + '/minimize.gif';
+ mxWindow.prototype.normalizeImage = mxClient.imageBasePath + '/normalize.gif';
}
};
@@ -10714,6 +10871,354 @@
/**
* Overrides image dialog to add image search and Google+.
*/
+ EditorUi.prototype.createWrapperForTheme = function(value)
+ {
+ if (value == 'sketch')
+ {
+ if (this.sketchWrapperElt == null)
+ {
+ this.sketchWrapperElt = document.createElement('div');
+ this.sketchWrapperElt.style.cssText = 'position:absolute;' +
+ 'top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;';
+ }
+
+ this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt);
+ this.sketchWrapperElt.appendChild(this.diagramContainer);
+ }
+ else if (this.sketchWrapperElt != null && this.sketchWrapperElt.parentNode != null)
+ {
+ this.tabContainer.parentNode.insertBefore(this.diagramContainer, this.tabContainer);
+ this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt);
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.createMainMenuForTheme = function(value)
+ {
+ if (value == 'sketch')
+ {
+ if (this.sketchMainMenuElt == null)
+ {
+ this.sketchMainMenuElt = document.createElement('div');
+ this.sketchMainMenuElt.className = 'geToolbarContainer';
+ this.sketchMainMenuElt.style.cssText = 'position:absolute;left:10px;top:10px;height:44px;' +
+ 'border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;' +
+ 'text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;';
+
+ this.sketchMainMenuElt.appendChild(this.createMenu('diagram', Editor.menuImage));
+ this.sketchMainMenuElt.appendChild(this.createMenuItem('delete', Editor.trashImage));
+ var undoElt = this.sketchMainMenuElt.appendChild(this.createMenuItem('undo', Editor.undoImage));
+ var redoElt = this.sketchMainMenuElt.appendChild(this.createMenuItem('redo', Editor.redoImage));
+
+ var undoListener = mxUtils.bind(this, function()
+ {
+ undoElt.style.display = (this.editor.undoManager.history.length > 0 ||
+ this.editor.graph.isEditing()) ? 'inline-block' : 'none';
+ redoElt.style.display = undoElt.style.display;
+ });
+
+ this.actions.get('undo').addListener('stateChanged', undoListener);
+ this.actions.get('redo').addListener('stateChanged', undoListener);
+ undoListener();
+
+ this.sketchWrapperElt.appendChild(this.sketchMainMenuElt);
+ }
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.createFooterMenuForTheme = function(value)
+ {
+ if (value == 'sketch')
+ {
+ if (this.sketchFooterMenuElt == null)
+ {
+ this.sketchFooterMenuElt = document.createElement('div');
+ this.sketchFooterMenuElt.className = 'geToolbarContainer';
+ this.sketchFooterMenuElt.style.cssText = 'position:absolute;right:14px;bottom:14px;height:44px;' +
+ 'border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;' +
+ 'text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;';
+
+ var footer = this.sketchFooterMenuElt;
+
+ var pageMenu = this.createPageMenuTab(false, true);
+ pageMenu.className = 'geToolbarButton';
+ pageMenu.style.cssText = 'display:inline-block;cursor:pointer;overflow:hidden;padding:4px;' +
+ 'white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;';
+ footer.appendChild(pageMenu);
+
+ var updatePageName = mxUtils.bind(this, function()
+ {
+ pageMenu.innerText = '';
+
+ if (this.currentPage != null)
+ {
+ mxUtils.write(pageMenu, this.currentPage.getName());
+ var n = (this.pages != null) ? this.pages.length : 1;
+ var idx = this.getPageIndex(this.currentPage);
+ idx = (idx != null) ? idx + 1 : 1;
+ var id = this.currentPage.getId();
+ pageMenu.setAttribute('title', this.currentPage.getName() +
+ ' (' + idx + '/' + n + ')' + ((id != null) ?
+ ' [' + id + ']' : ''));
+ }
+ });
+
+ this.editor.addListener('pagesPatched', updatePageName);
+ this.editor.addListener('pageSelected', updatePageName);
+ this.editor.addListener('pageRenamed', updatePageName);
+ this.editor.addListener('fileLoaded', updatePageName);
+ updatePageName();
+
+ // Page menu only visible for multiple pages
+ var pagesVisibleChanged = mxUtils.bind(this, function()
+ {
+ pageMenu.style.display = this.pages != null &&
+ (urlParams['pages'] != '0' || this.pages.length > 1 ||
+ Editor.pagesVisible) ? 'inline-block' : 'none';
+ });
+
+ this.addListener('fileDescriptorChanged', pagesVisibleChanged);
+ this.addListener('pagesVisibleChanged', pagesVisibleChanged);
+ this.editor.addListener('pagesPatched', pagesVisibleChanged);
+ pagesVisibleChanged();
+
+ footer.appendChild(this.createMenuItem('zoomOut', Editor.zoomOutImage));
+
+ var elt = this.createMenu('viewZoom', Editor.plusImage);
+ elt.setAttribute('title', mxResources.get('zoom'));
+ elt.innerHTML = '100%';
+ elt.className = 'geToolbarButton';
+ elt.style.cssText = 'display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;' +
+ 'padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;';
+ footer.appendChild(elt);
+
+ // Updates the label if the scale changes
+ (mxUtils.bind(this, function(elt)
+ {
+ // Adds shift+/alt+click on zoom label
+ mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+ {
+ if (mxEvent.isAltDown(evt))
+ {
+ this.hideCurrentMenu();
+ this.actions.get('customZoom').funct();
+ mxEvent.consume(evt);
+ }
+ // geItem is a dropdown menu, geMenuItem is a button in the toolbar
+ else if (mxEvent.isShiftDown(evt))
+ {
+ this.hideCurrentMenu();
+ this.actions.get('smartFit').funct();
+ mxEvent.consume(evt);
+ }
+ }));
+
+ var updateZoom = mxUtils.bind(this, function()
+ {
+ elt.innerText = '';
+ mxUtils.write(elt, Math.round(this.editor.graph.view.scale * 100) + '%');
+ });
+
+ this.editor.graph.view.addListener(mxEvent.EVENT_SCALE, updateZoom);
+ this.editor.addListener('resetGraphView', updateZoom);
+ this.editor.addListener('pageSelected', updateZoom);
+ }))(elt);
+
+ footer.appendChild(this.createMenuItem('zoomIn', Editor.zoomInImage));
+
+ this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt);
+ }
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.createPickerMenuForTheme = function(value)
+ {
+ if (value == 'sketch')
+ {
+ if (this.sketchPickerMenuElt == null)
+ {
+ this.sketchPickerMenuElt = document.createElement('div');
+ this.sketchPickerMenuElt.className = 'geToolbarContainer';
+ this.sketchPickerMenuElt.style.cssText = 'position:absolute;left:10px;border-radius:4px;' +
+ 'padding:0px 4px 4px;white-space:nowrap;' +
+ 'z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;';
+
+ var picker = this.sketchPickerMenuElt;
+ mxUtils.setPrefixedStyle(picker.style, 'transition', 'transform .3s ease-out');
+
+ var foldImg = document.createElement('a');
+ foldImg.style.padding = '0px';
+ foldImg.style.boxShadow = 'none';
+ foldImg.className = 'geMenuItem';
+ foldImg.style.display = 'block';
+ foldImg.style.width = '100%';
+ foldImg.style.height = '14px';
+ foldImg.style.backgroundImage = 'url(' + mxWindow.prototype.normalizeImage + ')';
+ foldImg.style.backgroundPosition = 'top center';
+ foldImg.style.backgroundRepeat = 'no-repeat';
+ foldImg.setAttribute('title', 'Minimize'/*TODO:mxResources.get('minimize')*/);
+
+ var freehandElt = this.createMenuItem('insertFreehand',
+ Editor.freehandImage, true);
+ freehandElt.style.paddingLeft = '12px';
+ freehandElt.style.backgroundSize = '';
+ freehandElt.style.width = '26px';
+ freehandElt.style.height = '30px';
+ freehandElt.style.opacity = '0.7';
+
+ var insertElt = this.createMenu('insert', Editor.plusImage);
+ insertElt.style.backgroundSize = '';
+ insertElt.style.marginBottom = '4px';
+ insertElt.style.display = 'block';
+ insertElt.style.width = '30px';
+ insertElt.style.height = '30px';
+ insertElt.style.padding = '4px';
+ insertElt.style.opacity = '0.7';
+
+ var collapsed = false;
+
+ var initPicker = mxUtils.bind(this, function()
+ {
+ picker.innerText = '';
+
+ if (!collapsed)
+ {
+ function addKey(elt, key)
+ {
+ elt.style.position = 'relative';
+ elt.style.overflow = 'visible';
+
+ var div = document.createElement('div');
+ div.style.position = 'absolute';
+ div.style.fontSize = '8px';
+ div.style.left = '32px';
+ div.style.top = '28px';
+ mxUtils.write(div, key);
+ elt.appendChild(div);
+ };
+
+ function addElt(elt, title, cursor, key)
+ {
+ if (title != null)
+ {
+ elt.setAttribute('title', title);
+ }
+
+ elt.style.cursor = 'pointer';
+ elt.style.margin = '8px 0px';
+ elt.style.display = 'block';
+ picker.appendChild(elt);
+
+ if (key != null)
+ {
+ addKey(elt, key);
+ }
+
+ return elt;
+ };
+
+ // Append sidebar elements
+ addElt(this.sidebar.createVertexTemplate('text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;',
+ 60, 30, 'Text', mxResources.get('text') + ' (A)', true, false, null, true, true),
+ mxResources.get('text') + ' (A)', null, 'A');
+ addElt(this.sidebar.createVertexTemplate('shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;' +
+ 'fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;' +
+ 'direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;',
+ 140, 160, '', mxResources.get('note') + ' (S)', true, false, null, true),
+ mxResources.get('note') + ' (S)', null, 'S');
+ addElt(this.sidebar.createVertexTemplate('rounded=0;whiteSpace=wrap;html=1;', 160, 80, '',
+ mxResources.get('rectangle') + ' (D)', true, false, null, true),
+ mxResources.get('rectangle') + ' (D)', null, 'D');
+ addElt(this.sidebar.createVertexTemplate('ellipse;whiteSpace=wrap;html=1;', 160, 100, '',
+ mxResources.get('ellipse') + ' (F)', true, false, null, true),
+ mxResources.get('ellipse') + ' (F)', null, 'F');
+
+ var edgeStyle = 'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;';
+ var cell = new mxCell('', new mxGeometry(0, 0, this.editor.graph.defaultEdgeLength + 20, 0), edgeStyle);
+ cell.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+ cell.geometry.setTerminalPoint(new mxPoint(cell.geometry.width, 0), false);
+ cell.geometry.points = [];
+ cell.geometry.relative = true;
+ cell.edge = true;
+
+ addElt(this.sidebar.createEdgeTemplateFromCells([cell],
+ cell.geometry.width, cell.geometry.height,
+ mxResources.get('line') + ' (C)', true, null, true, false),
+ mxResources.get('line') + ' (C)', null, 'C');
+
+ cell = cell.clone();
+ cell.style = edgeStyle + 'shape=flexArrow;rounded=1;startSize=8;endSize=8;';
+ cell.geometry.width = this.editor.graph.defaultEdgeLength + 20;
+ cell.geometry.setTerminalPoint(new mxPoint(0, 20), true);
+ cell.geometry.setTerminalPoint(new mxPoint(cell.geometry.width, 20), false);
+
+ addElt(this.sidebar.createEdgeTemplateFromCells([cell],
+ cell.geometry.width, 40, mxResources.get('arrow'),
+ true, null, true, false), mxResources.get('arrow'));
+
+ addElt(freehandElt, mxResources.get('freehand') + ' (X)', null, 'X');
+ this.sketchPickerMenuElt.appendChild(insertElt);
+ }
+
+ if (urlParams['embedInline'] != '1')
+ {
+ picker.appendChild(foldImg);
+ }
+ });
+
+ mxEvent.addListener(foldImg, 'click', mxUtils.bind(this, function()
+ {
+ if (collapsed)
+ {
+ mxUtils.setPrefixedStyle(picker.style, 'transform', 'translate(0, -50%)');
+ picker.style.padding = '8px 6px 4px';
+ picker.style.width = '40px';
+ picker.style.top = '50%';
+ picker.style.bottom = '';
+ picker.style.height = '';
+ foldImg.style.backgroundImage = 'url(' + mxWindow.prototype.normalizeImage + ')';
+ foldImg.setAttribute('title', 'Minimize'/*TODO:mxResources.get('minimize')*/);
+ foldImg.style.height = '14px';
+ collapsed = false;
+ initPicker();
+ }
+ else
+ {
+ picker.innerText = '';
+ picker.appendChild(foldImg);
+ mxUtils.setPrefixedStyle(picker.style, 'transform', 'translate(0, 0)');
+ picker.style.bottom = '12px';
+ picker.style.padding = '0px';
+ picker.style.height = '24px';
+ picker.style.width = '24px';
+ picker.style.top = '';
+ foldImg.style.backgroundImage = 'url(' + Editor.plusImage + ')';
+ foldImg.setAttribute('title', mxResources.get('insert'));
+ foldImg.style.height = '24px';
+ collapsed = true;
+ }
+ }));
+
+ this.addListener('darkModeChanged', initPicker);
+ this.addListener('sketchModeChanged', initPicker);
+ initPicker();
+
+ this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt);
+ }
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
EditorUi.prototype.createMenubarForTheme = function(value)
{
if (value == 'sketch')
@@ -10722,41 +11227,48 @@
{
this.sketchMenubarElt = document.createElement('div');
this.sketchMenubarElt.className = 'geToolbarContainer';
- this.sketchMenubarElt.style.cssText = 'position:absolute;right:14px;top:10px;height:30px;z-index:1;' +
- 'border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;' +
- 'text-align:right;white-space:nowrap;user-select:none;';
+ this.sketchMenubarElt.style.cssText = 'position:absolute;right:14px;top:10px;height:44px;' +
+ 'border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;' +
+ 'text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;';
+ this.sketchWrapperElt.appendChild(this.sketchMenubarElt);
+ }
- if (this.switchThemeElt != null)
- {
- this.switchThemeElt.style.position = 'relative';
- this.switchThemeElt.style.width = '22px';
- this.switchThemeElt.style.height = '22px';
- this.switchThemeElt.style.top = '0px';
- this.switchThemeElt.style.right = '6px';
+ if (this.userElement != null)
+ {
+ this.sketchMenubarElt.appendChild(this.userElement);
+ }
- this.sketchMenubarElt.appendChild(this.switchThemeElt);
- }
+ var elt = this.menubar.langIcon;
- this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt);
+ if (elt != null)
+ {
+ elt.style.position = 'relative';
+ elt.style.height = '21px';
+ elt.style.width = '21px';
+ elt.style.right = '0px';
+ elt.style.top = '3px';
+
+ this.sketchMenubarElt.appendChild(elt);
}
}
else
{
- if (this.switchThemeElt != null)
+ if (this.userElement != null)
{
- this.switchThemeElt.style.position = 'absolute';
- this.switchThemeElt.style.width = '19px';
- this.switchThemeElt.style.height = '19px';
- this.switchThemeElt.style.top = '0px';
- this.switchThemeElt.style.right = '17px';
-
- document.body.appendChild(this.switchThemeElt);
+ this.menubarContainer.appendChild(this.userElement);
}
- if (this.sketchMenubarElt != null)
+ var elt = this.menubar.langIcon;
+
+ if (elt != null)
{
- this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt);
- this.sketchMenubarElt = null;
+ elt.style.position = 'absolute';
+ elt.style.height = '18px';
+ elt.style.width = '18px';
+ elt.style.right = '14px';
+ elt.style.top = '5px';
+
+ document.body.appendChild(elt);
}
}
};
@@ -10764,20 +11276,15 @@
/**
* Overrides image dialog to add image search and Google+.
*/
- EditorUi.prototype.addMenuToMenubar = function(menubar, key, classname, img)
+ EditorUi.prototype.createMenu = function(key, img)
{
var menu = this.menus.get(key);
- var elt = menubar.addMenu(mxResources.get(key), menu.funct);
+ var elt = this.menubar.addMenu(mxResources.get(key), menu.funct);
- elt.className = classname;
+ elt.className = 'geToolbarButton';
elt.style.display = 'inline-block';
- elt.style.boxSizing = 'border-box';
- elt.style.top = '6px';
- elt.style.marginRight = '6px';
- elt.style.height = '30px';
- elt.style.paddingTop = '6px';
- elt.style.paddingBottom = '6px';
elt.style.cursor = 'pointer';
+ elt.style.height = '24px';
elt.setAttribute('title', mxResources.get(key));
this.menus.menuCreated(menu, elt, 'geMenuItem');
@@ -10786,8 +11293,8 @@
elt.style.backgroundImage = 'url(' + img + ')';
elt.style.backgroundPosition = 'center center';
elt.style.backgroundRepeat = 'no-repeat';
- elt.style.backgroundSize = '24px 24px';
- elt.style.width = '34px';
+ elt.style.backgroundSize = '100% 100%';
+ elt.style.width = '24px';
elt.innerText = '';
}
@@ -10797,13 +11304,77 @@
/**
* Overrides image dialog to add image search and Google+.
*/
+ EditorUi.prototype.createMenuItem = function(key, img, ignoreState)
+ {
+ var btn = document.createElement('a');
+ btn.className = 'geToolbarButton';
+ btn.setAttribute('title', mxResources.get(key));
+ btn.style.backgroundImage = 'url(' + img + ')';
+ btn.style.backgroundPosition = 'center center';
+ btn.style.backgroundRepeat = 'no-repeat';
+ btn.style.backgroundSize = '100% 100%';
+ btn.style.display = 'inline-block';
+ btn.style.cursor = 'pointer';
+ btn.style.marginLeft = '6px';
+ btn.style.width = '24px';
+ btn.style.height = '24px';
+
+ var action = this.actions.get(key);
+
+ if (action != null)
+ {
+ // Prevents focus
+ mxEvent.addListener(btn, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
+ mxUtils.bind(this, function(evt)
+ {
+ evt.preventDefault();
+ }));
+
+ mxEvent.addListener(btn, 'click', function(evt)
+ {
+ if (btn.getAttribute('disabled') != 'disabled')
+ {
+ action.funct(evt);
+ }
+
+ mxEvent.consume(evt);
+ });
+
+ if (!ignoreState)
+ {
+ function updateState()
+ {
+ if (action.isEnabled())
+ {
+ btn.removeAttribute('disabled');
+ btn.style.cursor = 'pointer';
+ }
+ else
+ {
+ btn.setAttribute('disabled', 'disabled');
+ btn.style.cursor = 'default';
+ }
+
+ btn.style.opacity = (action.isEnabled()) ? '' : '0.2';
+ };
+
+ this.editor.graph.addListener('enabledChanged', updateState);
+ action.addListener('stateChanged', updateState);
+ updateState();
+ }
+ }
+
+ return btn;
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
EditorUi.prototype.createFormatWindow = function()
{
if (this.formatWindow == null)
{
- var x = (urlParams['sketch'] == '1') ?
- Math.max(10, this.diagramContainer.clientWidth - 241) :
- Math.max(10, this.diagramContainer.clientWidth - 248);
+ var x = Math.max(10, this.diagramContainer.parentNode.clientWidth - 256);
var y = urlParams['winCtrls'] == '1' && urlParams['sketch'] == '1'? 80 : 60;
var h = (urlParams['embedInline'] == '1') ? 580 :
((urlParams['sketch'] == '1') ? 580 : Math.min(566,
@@ -10821,6 +11392,37 @@
}));
this.formatWindow.window.minimumSize = new mxRectangle(0, 0, 240, 80);
+ this.formatWindow.window.setVisible(false);
+ }
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.createShapesWindow = function()
+ {
+ if (this.sidebarWindow == null)
+ {
+ var w = Math.min(this.diagramContainer.parentNode.clientWidth - 10, 218);
+ var h = (urlParams['embedInline'] == '1') ? 650 :
+ Math.min(this.diagramContainer.parentNode.clientHeight, 650);
+
+ this.sidebarWindow = new WrapperWindow(this, mxResources.get('shapes'),
+ (Editor.currentTheme == 'sketch' && urlParams['embedInline'] != '1') ? 66 : 10,
+ (Editor.currentTheme == 'sketch' && urlParams['embedInline'] != '1') ?
+ Math.max(30, (this.diagramContainer.parentNode.clientHeight - h) / 2) : 56,
+ w - 6, h - 6, mxUtils.bind(this, function(container)
+ {
+ container.appendChild(this.sidebarContainer);
+ }));
+
+ this.sidebarWindow.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function()
+ {
+ this.sidebarWindow.window.fit();
+ }));
+
+ this.sidebarWindow.window.minimumSize = new mxRectangle(0, 0, 90, 90);
+ this.sidebarWindow.window.setVisible(false);
}
};
@@ -10835,14 +11437,14 @@
{
this.spinner.stop();
this.doSetSketchMode(value);
-
+
// Persist setting
if (urlParams['rough'] == null)
{
mxSettings.settings.sketchMode = value;
mxSettings.save();
}
-
+
this.fireEvent(new mxEventObject('sketchModeChanged'));
}), 0);
}
@@ -10869,6 +11471,7 @@
'html body .mxCellEditor { color: #f0f0f0; }'
:
// Non-dark mode styles
+ 'html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }' +
'html body div.geToolbarContainer a.geInverted { filter: invert(1); }' +
'html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }'
) +
@@ -10887,7 +11490,7 @@
'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 { opacity: 0.3; }' +
'html body .geToolbarButton:active { opacity: 0.15; }' +
'html body .geStatus:active { opacity: 0.5; }' +
'.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }' +
@@ -10913,12 +11516,13 @@
'html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }' +
'.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }' +
'.mxWindow div button.geStyleButton { box-sizing: border-box; }' +
+ '.mxWindowPane > .geSidebarContainer { border: none !important; }' +
'table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }' +
'td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }' +
'html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); ' + (EditorUi.isElectronApp? 'app-region: no-drag; ' : '') + '}' +
// Styling for Minimal
'.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + ' !important; }' +
- '.geToolbarContainer { background: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + '; }' +
+ 'html body .geToolbarContainer { background: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + '; }' +
'div.geSidebarContainer { background-color: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fff') + '; }' +
'div.geSidebarContainer .geTitle { background-color: ' + (Editor.isDarkMode() ? Editor.darkColor : '#fdfdfd') + '; }' +
'div.mxWindow td.mxWindowPane button { background-image: none; float: none; }' +
@@ -11040,7 +11644,11 @@
Editor.darkCheckmarkImage : Editor.lightCheckmarkImage;
// Updates CSS
- if (Editor.styleElt != null)
+ if (this.sketchStyleElt != null)
+ {
+ this.sketchStyleElt.innerHTML = Editor.createMinimalCss();
+ }
+ else if (Editor.styleElt != null)
{
Editor.styleElt.innerHTML = Editor.createMinimalCss();
}
@@ -13655,7 +14263,8 @@
{
if (urlParams['saveAndExit'] != '0')
{
- var saveAndExitTitle = urlParams['publishClose'] == '1' ? mxResources.get('publish') : mxResources.get('saveAndExit');
+ var saveAndExitTitle = urlParams['publishClose'] == '1' ?
+ mxResources.get('publish') : mxResources.get('saveAndExit');
mxUtils.write(button, saveAndExitTitle);
button.setAttribute('title', saveAndExitTitle);
diff --git a/src/main/webapp/js/diagramly/Embed.js b/src/main/webapp/js/diagramly/Embed.js
index c23518c6..2d307e30 100644
--- a/src/main/webapp/js/diagramly/Embed.js
+++ b/src/main/webapp/js/diagramly/Embed.js
@@ -77,7 +77,7 @@
{
load: [(urlParams['math-output'] == 'html') ?
'output/chtml' : 'output/svg', 'input/tex',
- 'input/asciimath']
+ 'input/asciimath', 'ui/safe']
},
startup:
{
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 7479bea9..f7cc7908 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -327,10 +327,12 @@
{
if (graph.isEnabled())
{
- if (this.freehandWindow == null)
+ if (editorUi.freehandWindow == null)
{
var withBrush = !mxClient.IS_IE && !mxClient.IS_IE11;
- this.freehandWindow = new FreehandWindow(editorUi, document.body.offsetWidth - 420, 102, 176, withBrush? 120 : 84, withBrush);
+ editorUi.freehandWindow = new FreehandWindow(
+ editorUi, document.body.offsetWidth - 420, 102, 176,
+ withBrush? 120 : 84, withBrush);
}
if (graph.freehand.isDrawing())
@@ -342,7 +344,7 @@
graph.freehand.startDrawing();
}
- this.freehandWindow.window.setVisible(graph.freehand.isDrawing());
+ editorUi.freehandWindow.window.setVisible(graph.freehand.isDrawing());
}
}, null, null, 'X')).isEnabled = function()
{
@@ -1242,71 +1244,51 @@
var menubar = menusCreateMenuBar.apply(this, arguments);
if (menubar != null && urlParams['embed'] != '1' &&
- (uiTheme != 'atlas' || urlParams['live-ui'] == '1'))
+ (uiTheme != 'atlas' && urlParams['live-ui'] == '1'))
{
- var langMenu = this.get((urlParams['live-ui'] == '1') ? 'theme' : 'language');
+ var langMenu = this.get((urlParams['live-ui'] == '1') ?
+ 'appearance' : 'language');
if (langMenu != null)
{
var elt = menubar.addMenu('', langMenu.funct);
elt.setAttribute('title', mxResources.get(
(urlParams['live-ui'] == '1') ?
- 'preferences' : 'language'));
- elt.className = 'geAdaptiveAsset';
- elt.style.boxSizing = 'border-box';
- elt.style.width = '19px';
- elt.style.height = '19px';
- elt.style.paddingTop = '2px';
- elt.style.paddingLeft = '4px';
+ 'theme' : 'language'));
+ elt.className = 'geToolbarButton geAdaptiveAsset';
+ elt.style.backgroundImage = 'url(' + Editor.globeImage + ')';
+ elt.style.backgroundPosition = 'center center';
+ elt.style.backgroundRepeat = 'no-repeat';
+ elt.style.backgroundSize = '100% 100%';
+ elt.style.display = 'inline-block';
+ elt.style.verticalAlign = 'top';
+ elt.style.marginLeft = '2px';
+ elt.style.cursor = 'pointer';
elt.style.zIndex = '1';
+
+ // Depends on theme
elt.style.position = 'absolute';
- elt.style.display = 'block';
- elt.style.cursor = 'pointer';
- elt.style.right = '20px';
-
- if (uiTheme == 'min')
+ elt.style.height = '18px';
+ elt.style.width = '18px';
+
+ if (Editor.currentTheme == 'atlas')
{
- elt.style.top = '2px';
+ elt.style.filter = 'invert(100%)';
+ elt.style.right = '11px';
+ elt.style.top = '10px';
}
else
{
- elt.style.top = '0px';
- }
-
- var icon = document.createElement('div');
- icon.className = 'geToolbarButton';
- icon.style.backgroundImage = 'url(' + Editor.globeImage + ')';
- icon.style.backgroundPosition = 'center center';
- icon.style.backgroundRepeat = 'no-repeat';
- icon.style.backgroundSize = '100% 100%';
- icon.style.filter = 'none';
- icon.style.position = 'absolute';
- icon.style.height = '100%';
- icon.style.width = '100%';
- icon.style.marginTop = (uiTheme == 'atlas') ? '8px' : '2px';
- icon.style.marginLeft = '2px';
- icon.style.zIndex = '1';
- elt.appendChild(icon);
-
- if (urlParams['live-ui'] != '1')
- {
- mxUtils.setOpacity(elt, 70);
+ elt.style.right = '14px';
+ elt.style.top = '5px';
}
if (urlParams['winCtrls'] == '1')
{
elt.style.right = '95px';
- elt.style.width = '19px';
- elt.style.height = '19px';
elt.style.webkitAppRegion = 'no-drag';
icon.style.webkitAppRegion = 'no-drag';
}
-
- if (uiTheme == 'atlas')
- {
- elt.style.filter = 'invert(100%)';
- elt.style.opacity = '0.85';
- }
document.body.appendChild(elt);
menubar.langIcon = elt;
@@ -1315,13 +1297,17 @@
{
var updateThemeElement = mxUtils.bind(this, function()
{
- icon.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode() || uiTheme == 'atlas') ?
- Editor.lightModeImage : Editor.darkModeImage) + '\')';
+ elt.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode() || uiTheme == 'atlas') ?
+ Editor.darkModeImage : Editor.lightModeImage) + '\')';
});
this.editorUi.addListener('darkModeChanged', updateThemeElement);
updateThemeElement();
}
+ else
+ {
+ mxUtils.setOpacity(elt, 40);
+ }
this.editorUi.switchThemeElt = elt;
}
@@ -1398,6 +1384,22 @@
editorUi.showDialog(dlg.container, 620, 460, true, true);
dlg.init();
});
+
+ // Adds outline option to zoom menu
+ var viewZoomMenu = this.get('viewZoom');
+ var viewZoomMenuFunct = viewZoomMenu.funct;
+
+ viewZoomMenu.funct = mxUtils.bind(this, function(menu, parent)
+ {
+ viewZoomMenuFunct.apply(this, arguments);
+
+ var sketchTheme = Editor.currentTheme == 'sketch' || urlParams['sketch'] == '1';
+
+ if (sketchTheme || uiTheme == 'min')
+ {
+ this.addMenuItems(menu, ['-', 'outline', 'fullscreen'], parent);
+ }
+ });
var layoutMenu = this.get('layout');
var layoutMenuFunct = layoutMenu.funct;
@@ -2884,6 +2886,24 @@
}
}))).isEnabled = isGraphEnabled;
+ this.put('appearance', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ if (Editor.isDarkMode() || (!mxClient.IS_IE && !mxClient.IS_IE11))
+ {
+ this.addMenuItems(menu, ['toggleDarkMode'], parent);
+ }
+
+ var item = menu.addItem(mxResources.get('simple'), null, function()
+ {
+ editorUi.setCurrentTheme((Editor.currentTheme == 'sketch') ? '' : 'sketch');
+ }, parent);
+
+ if (Editor.currentTheme == 'sketch')
+ {
+ menu.addCheckmark(item, Editor.checkmarkImage);
+ }
+ })));
+
this.put('theme', new Menu(mxUtils.bind(this, function(menu, parent)
{
var theme = (urlParams['sketch'] == '1') ? 'sketch' : mxSettings.getUi();
@@ -2896,14 +2916,24 @@
menu.addSeparator(parent);
- var item = menu.addItem(mxResources.get('default'), null, function()
+ var item = menu.addItem(mxResources.get('automatic'), null, function()
{
editorUi.setCurrentTheme('');
}, parent);
+
+ if (theme != 'kennedy' && theme != 'atlas' &&
+ theme != 'dark' && theme != 'min' &&
+ theme != 'sketch')
+ {
+ menu.addCheckmark(item, Editor.checkmarkImage);
+ }
+
+ item = menu.addItem(mxResources.get('default'), null, function()
+ {
+ editorUi.setCurrentTheme('kennedy');
+ }, parent);
- if (theme == 'kennedy' || theme == 'dark' ||
- (theme != 'atlas' && theme != 'min' &&
- theme != 'sketch'))
+ if (theme == 'kennedy' || theme == 'dark')
{
menu.addCheckmark(item, Editor.checkmarkImage);
}
@@ -3320,7 +3350,39 @@
graph.getInsertPoint() : null);
}
}, null, null, 'C')).isEnabled = isGraphEnabled;
+
+ var toggleFormat = editorUi.actions.put('toggleFormat', new Action(mxResources.get('format'), function()
+ {
+ if (editorUi.formatWindow != null)
+ {
+ editorUi.formatWindow.window.setVisible(
+ !editorUi.formatWindow.window.isVisible());
+ }
+ }));
+
+ toggleFormat.shortcut = editorUi.actions.get('formatPanel').shortcut;
+ toggleFormat.setToggleAction(true);
+ toggleFormat.setSelectedCallback(mxUtils.bind(this, function()
+ {
+ return editorUi.formatWindow != null && editorUi.formatWindow.window.isVisible();
+ }));
+ var toggleShapes = editorUi.actions.put('toggleShapes', new Action(mxResources.get('shapes'), function()
+ {
+ if (editorUi.sidebarWindow != null)
+ {
+ editorUi.sidebarWindow.window.setVisible(
+ !editorUi.sidebarWindow.window.isVisible());
+ }
+ }));
+
+ toggleShapes.shortcut = editorUi.actions.get('formatPanel').shortcut;
+ toggleShapes.setToggleAction(true);
+ toggleShapes.setSelectedCallback(mxUtils.bind(this, function()
+ {
+ return editorUi.sidebarWindow != null && editorUi.sidebarWindow.window.isVisible();
+ }));
+
editorUi.addInsertMenuItems = mxUtils.bind(this, function(menu, parent, methods)
{
for (var i = 0; i < methods.length; i++)
@@ -3338,18 +3400,49 @@
this.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
{
- this.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus',
- '-', 'insertEdge', 'insertNote', '-', 'insertText', 'insertLink',
- '-', 'createShape', 'insertFreehand', '-', 'insertImage'], parent);
+ // Compatiblity code for live UI switch and static UI
+ var sketchTheme = Editor.currentTheme == 'sketch' || urlParams['sketch'] == '1';
+
+ if (sketchTheme)
+ {
+ editorUi.menus.addMenuItems(menu, ['toggleShapes'], parent);
+ editorUi.menus.addSubmenu('table', menu, parent);
+ menu.addSeparator(parent);
- if (editorUi.insertTemplateEnabled && !editorUi.isOffline())
+ if (editorUi.insertTemplateEnabled && !editorUi.isOffline())
+ {
+ editorUi.menus.addMenuItems(menu, ['insertTemplate'], parent);
+ }
+
+ editorUi.menus.addMenuItems(menu, ['insertImage', 'insertLink', '-'], parent);
+ editorUi.menus.addSubmenu('insertAdvanced', menu, parent, mxResources.get('advanced'));
+ editorUi.menus.addSubmenu('layout', menu, parent);
+ }
+ else
{
- this.addMenuItems(menu, ['insertTemplate'], parent);
+ this.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus',
+ '-', 'insertEdge', 'insertNote', '-', 'insertText', 'insertLink',
+ '-', 'createShape', 'insertFreehand', '-', 'insertImage'], parent);
+
+ if (editorUi.insertTemplateEnabled && !editorUi.isOffline())
+ {
+ this.addMenuItems(menu, ['insertTemplate'], parent);
+ }
+
+ menu.addSeparator(parent);
+ this.addSubmenu('insertLayout', menu, parent, mxResources.get('layout'));
+ this.addSubmenu('insertAdvanced', menu, parent, mxResources.get('advanced'));
+
+ if (uiTheme == 'min')
+ {
+ this.addSubmenu('table', menu, parent);
+ }
}
-
- menu.addSeparator(parent);
- this.addSubmenu('insertLayout', menu, parent, mxResources.get('layout'));
- this.addSubmenu('insertAdvanced', menu, parent, mxResources.get('advanced'));
+ })));
+
+ this.put('table', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ editorUi.menus.addInsertTableCellItem(menu, parent);
})));
this.put('insertLayout', new Menu(mxUtils.bind(this, function(menu, parent)
@@ -3966,136 +4059,386 @@
dlg.init();
});
}
+
+ var langMenu = this.get('language');
this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)
{
- if (urlParams['embed'] != '1' || urlParams['lang'] == null)
+ // Compatiblity code for live UI switch and static UI
+ var sketchTheme = Editor.currentTheme == 'sketch' || urlParams['sketch'] == '1';
+
+ if (sketchTheme || uiTheme == 'min')
{
- this.addSubmenu('language', menu, parent);
+ if (langMenu != null && (urlParams['embed'] != '1' || urlParams['lang'] == null))
+ {
+ editorUi.menus.addSubmenu('language', menu, parent);
+ }
+
+ if (urlParams['embed'] != '1' && urlParams['extAuth'] != '1' && editorUi.mode != App.MODE_ATLAS)
+ {
+ editorUi.menus.addSubmenu('theme', menu, parent);
+ }
+
+ editorUi.menus.addSubmenu('units', menu, parent);
+ menu.addSeparator(parent);
+
+ if (!sketchTheme)
+ {
+ editorUi.menus.addMenuItems(menu, ['scrollbars', '-', 'tooltips',
+ 'copyConnect', 'collapseExpand'], parent);
+ }
+
+ if (urlParams['embedInline'] != '1' && !sketchTheme && urlParams['embed'] != '1' &&
+ (isLocalStorage || mxClient.IS_CHROMEAPP) && editorUi.mode != App.MODE_ATLAS)
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'showStartScreen', 'search', 'scratchpad'], parent);
+ }
+
+ menu.addSeparator(parent);
+
+ if (sketchTheme)
+ {
+ editorUi.menus.addMenuItems(menu, ['copyConnect',
+ 'collapseExpand', 'tooltips', '-'], parent);
+ }
+
+ if (EditorUi.isElectronApp)
+ {
+ editorUi.menus.addMenuItems(menu, ['-',
+ 'spellCheck', 'autoBkp',
+ 'drafts', '-'], parent);
+ }
+
+ var file = editorUi.getCurrentFile();
+
+ if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ {
+ this.addMenuItems(menu, ['-', 'showRemoteCursors',
+ 'shareCursor', '-'], parent);
+ }
+
+ if (Graph.translateDiagram)
+ {
+ editorUi.menus.addMenuItems(menu, ['diagramLanguage'], parent);
+ }
+
+ if (editorUi.mode != App.MODE_ATLAS)
+ {
+ editorUi.menus.addMenuItem(menu, 'configuration', parent);
+ }
+
+ if (!sketchTheme)
+ {
+ if (!editorUi.isOfflineApp() && isLocalStorage && editorUi.mode != App.MODE_ATLAS)
+ {
+ editorUi.menus.addMenuItem(menu, 'plugins', parent);
+ }
+ }
+
+ // Adds trailing separator in case new plugin entries are added
+ menu.addSeparator(parent);
}
-
- if (urlParams['embed'] != '1')
+ else
{
- this.addSubmenu('theme', menu, parent);
+ if (urlParams['embed'] != '1' || urlParams['lang'] == null)
+ {
+ this.addSubmenu('language', menu, parent);
+ }
+
+ if (urlParams['embed'] != '1')
+ {
+ this.addSubmenu('theme', menu, parent);
+ }
+
+ menu.addSeparator(parent);
+
+ if (typeof(MathJax) !== 'undefined')
+ {
+ var item = this.addMenuItem(menu, 'mathematicalTypesetting', parent);
+
+ if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
+ {
+ this.addLinkToItem(item, 'https://www.diagrams.net/doc/faq/math-typesetting');
+ }
+ }
+
+ if (EditorUi.isElectronApp)
+ {
+ this.addMenuItems(menu, ['spellCheck', 'autoBkp', 'drafts'], parent);
+ }
+
+ this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-'], parent);
+
+ if (urlParams['embed'] != '1')
+ {
+ var file = editorUi.getCurrentFile();
+
+ if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ {
+ this.addMenuItems(menu, ['showRemoteCursors',
+ 'shareCursor'], parent);
+ }
+
+ this.addMenuItems(menu, ['autosave'], parent);
+ }
+
+ menu.addSeparator(parent);
+
+ if (!editorUi.isOfflineApp() && isLocalStorage)
+ {
+ this.addMenuItem(menu, 'plugins', parent);
+ }
+
+ this.addMenuItems(menu, ['-', 'editDiagram'], parent);
+
+ if (Graph.translateDiagram)
+ {
+ this.addMenuItems(menu, ['diagramLanguage']);
+ }
+
+ menu.addSeparator(parent);
+
+ if (urlParams['embed'] != '1' && (isLocalStorage || mxClient.IS_CHROMEAPP))
+ {
+ this.addMenuItems(menu, ['showStartScreen'], parent);
+ }
+
+ this.addMenuItems(menu, ['configuration'], parent);
+
+ // Adds trailing separator in case new plugin entries are added
+ menu.addSeparator(parent);
+
+ if (urlParams['newTempDlg'] == '1')
+ {
+ editorUi.actions.addAction('templates', function()
+ {
+ function driveObjToTempDlg(item)
+ {
+ return {id: item.id, isExt: true, url: item.downloadUrl, title: item.title, imgUrl: item.thumbnailLink,
+ changedBy: item.lastModifyingUserName, lastModifiedOn: item.modifiedDate}
+ };
+
+ var tempDlg = new TemplatesDialog(editorUi, function(xml){console.log(arguments)}, null,
+ null, null, 'user', function(callback, error, username)
+ {
+ var oneWeek = new Date();
+ oneWeek.setDate(oneWeek.getDate() - 7);
+
+ editorUi.drive.listFiles(null, oneWeek, username? true : false, function(resp)
+ {
+ var results = [];
+
+ for (var i = 0; i < resp.items.length; i++)
+ {
+ results.push(driveObjToTempDlg(resp.items[i]));
+ }
+
+ callback(results);
+ }, error)
+ }, function(str, callback, error, username)
+ {
+ editorUi.drive.listFiles(str, null, username? true : false, function(resp)
+ {
+ var results = [];
+
+ for (var i = 0; i < resp.items.length; i++)
+ {
+ results.push(driveObjToTempDlg(resp.items[i]));
+ }
+
+ callback(results);
+ }, error)
+ }, function(obj, callback, error)
+ {
+ editorUi.drive.getFile(obj.id, function(file)
+ {
+ callback(file.data);
+ }, error);
+ }, null, function(callback)
+ {
+ callback({'Test': []}, 1);
+ }, true, false);
+
+ editorUi.showDialog(tempDlg.container, window.innerWidth, window.innerHeight, true, false, null, false, true);
+ });
+ this.addMenuItem(menu, 'templates', parent);
+ }
}
+ })));
+ this.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ var file = editorUi.getCurrentFile();
+ editorUi.menus.addSubmenu('extras', menu, parent, mxResources.get('preferences'));
menu.addSeparator(parent);
- if (typeof(MathJax) !== 'undefined')
+ // Compatiblity code for live UI switch and static UI
+ var sketchTheme = Editor.currentTheme == 'sketch' || urlParams['sketch'] == '1';
+
+ if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
{
- var item = this.addMenuItem(menu, 'mathematicalTypesetting', parent);
+ editorUi.menus.addMenuItems(menu, ['new', 'open', '-', 'synchronize',
+ '-', 'save', 'saveAs', '-'], parent);
+ }
+ else if (urlParams['embed'] == '1' || editorUi.mode == App.MODE_ATLAS)
+ {
+ if (urlParams['noSaveBtn'] != '1' &&
+ urlParams['embedInline'] != '1')
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'save'], parent);
+ }
- if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
+ if (urlParams['saveAndExit'] == '1' ||
+ (urlParams['noSaveBtn'] == '1' &&
+ urlParams['saveAndExit'] != '0') || editorUi.mode == App.MODE_ATLAS)
{
- this.addLinkToItem(item, 'https://www.diagrams.net/doc/faq/math-typesetting');
+ editorUi.menus.addMenuItems(menu, ['saveAndExit'], parent);
+
+ if (file != null && file.isRevisionHistorySupported())
+ {
+ editorUi.menus.addMenuItems(menu, ['revisionHistory'], parent);
+ }
}
+
+ menu.addSeparator(parent);
}
-
- if (EditorUi.isElectronApp)
+ else if (editorUi.mode == App.MODE_ATLAS)
{
- this.addMenuItems(menu, ['spellCheck', 'autoBkp', 'drafts'], parent);
+ editorUi.menus.addMenuItems(menu, ['save', 'synchronize', '-'], parent);
}
-
- this.addMenuItems(menu, ['copyConnect', 'collapseExpand', '-'], parent);
-
- if (urlParams['embed'] != '1')
+ else if (urlParams['noFileMenu'] != '1')
{
- var file = editorUi.getCurrentFile();
-
- if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
+ if (!sketchTheme)
{
- this.addMenuItems(menu, ['showRemoteCursors',
- 'shareCursor'], parent);
+ editorUi.menus.addMenuItems(menu, ['new'], parent);
+ editorUi.menus.addSubmenu('openFrom', menu, parent);
+
+ if (isLocalStorage)
+ {
+ this.addSubmenu('openRecent', menu, parent);
+ }
+
+ menu.addSeparator(parent);
+
+ if (file != null)
+ {
+ if (file.constructor == DriveFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['share'], parent);
+ }
+
+ if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
+ file.constructor != LocalFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['synchronize'], parent);
+ }
+ }
+
+ menu.addSeparator(parent);
+ editorUi.menus.addSubmenu('save', menu, parent);
+ }
+ else
+ {
+ editorUi.menus.addSubmenu('file', menu, parent);
}
-
- this.addMenuItems(menu, ['autosave'], parent);
}
-
- menu.addSeparator(parent);
- if (!editorUi.isOfflineApp() && isLocalStorage)
+ editorUi.menus.addSubmenu('exportAs', menu, parent);
+
+ if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
{
- this.addMenuItem(menu, 'plugins', parent);
+ editorUi.menus.addMenuItems(menu, ['import'], parent);
}
-
- this.addMenuItems(menu, ['-', 'editDiagram'], parent);
+ else if (urlParams['noFileMenu'] != '1')
+ {
+ editorUi.menus.addSubmenu('importFrom', menu, parent);
+ }
+
+ editorUi.menus.addMenuItems(menu, ['-', 'findReplace'], parent);
- if (Graph.translateDiagram)
+ if (editorUi.commentsSupported())
{
- this.addMenuItems(menu, ['diagramLanguage']);
+ editorUi.menus.addMenuItems(menu, ['comments', '-'], parent);
}
-
+
+ editorUi.menus.addMenuItems(menu, ['toggleFormat', 'layers', 'tags', '-', 'pageSetup'], parent);
+
+ // Cannot use print in standalone mode on iOS as we cannot open new windows
+ if (urlParams['noFileMenu'] != '1' && (!mxClient.IS_IOS || !navigator.standalone))
+ {
+ editorUi.menus.addMenuItems(menu, ['print'], parent);
+ }
+
+ if (!sketchTheme)
+ {
+ if (file != null && editorUi.fileNode != null && urlParams['embedInline'] != '1')
+ {
+ var filename = (file.getTitle() != null) ?
+ file.getTitle() : editorUi.defaultFilename;
+
+ if (!/(\.html)$/i.test(filename) &&
+ !/(\.svg)$/i.test(filename))
+ {
+ this.addMenuItems(menu, ['-', 'properties']);
+ }
+ }
+ }
+
menu.addSeparator(parent);
-
- if (urlParams['embed'] != '1' && (isLocalStorage || mxClient.IS_CHROMEAPP))
+ editorUi.menus.addSubmenu('help', menu, parent);
+
+ if (urlParams['embed'] == '1' || editorUi.mode == App.MODE_ATLAS)
{
- this.addMenuItems(menu, ['showStartScreen'], parent);
+ if (urlParams['noExitBtn'] != '1' || editorUi.mode == App.MODE_ATLAS)
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'exit'], parent);
+ }
+ }
+ else if (urlParams['noFileMenu'] != '1')
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'close']);
}
+ })));
- this.addMenuItems(menu, ['configuration'], parent);
-
- // Adds trailing separator in case new plugin entries are added
- menu.addSeparator(parent);
+ this.put('save', new Menu(mxUtils.bind(this, function(menu, parent)
+ {
+ var file = editorUi.getCurrentFile();
- if (urlParams['newTempDlg'] == '1')
+ if (file != null && file.constructor == DriveFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['save', 'makeCopy', '-', 'rename', 'moveToFolder'], parent);
+ }
+ else
{
- editorUi.actions.addAction('templates', function()
+ editorUi.menus.addMenuItems(menu, ['save', 'saveAs', '-', 'rename'], parent);
+
+ if (editorUi.isOfflineApp())
{
- function driveObjToTempDlg(item)
- {
- return {id: item.id, isExt: true, url: item.downloadUrl, title: item.title, imgUrl: item.thumbnailLink,
- changedBy: item.lastModifyingUserName, lastModifiedOn: item.modifiedDate}
- };
-
- var tempDlg = new TemplatesDialog(editorUi, function(xml){console.log(arguments)}, null,
- null, null, 'user', function(callback, error, username)
- {
- var oneWeek = new Date();
- oneWeek.setDate(oneWeek.getDate() - 7);
-
- editorUi.drive.listFiles(null, oneWeek, username? true : false, function(resp)
- {
- var results = [];
-
- for (var i = 0; i < resp.items.length; i++)
- {
- results.push(driveObjToTempDlg(resp.items[i]));
- }
-
- callback(results);
- }, error)
- }, function(str, callback, error, username)
- {
- editorUi.drive.listFiles(str, null, username? true : false, function(resp)
- {
- var results = [];
-
- for (var i = 0; i < resp.items.length; i++)
- {
- results.push(driveObjToTempDlg(resp.items[i]));
- }
-
- callback(results);
- }, error)
- }, function(obj, callback, error)
- {
- editorUi.drive.getFile(obj.id, function(file)
- {
- callback(file.data);
- }, error);
- }, null, function(callback)
+ if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
{
- callback({'Test': []}, 1);
- }, true, false);
-
- editorUi.showDialog(tempDlg.container, window.innerWidth, window.innerHeight, true, false, null, false, true);
- });
- this.addMenuItem(menu, 'templates', parent);
+ this.addMenuItems(menu, ['upload'], parent);
+ }
+ }
+ else
+ {
+ editorUi.menus.addMenuItems(menu, ['makeCopy'], parent);
+ }
+ }
+
+ editorUi.menus.addMenuItems(menu, ['-', 'autosave'], parent);
+
+ if (file != null && file.isRevisionHistorySupported())
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
}
})));
this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
{
+ // Compatiblity code for live UI switch and static UI
+ var minTheme = Editor.currentTheme == 'sketch' || uiTheme == 'min' ||
+ Editor.currentTheme == 'min';
+
if (urlParams['embed'] == '1')
{
this.addSubmenu('importFrom', menu, parent);
@@ -4141,6 +4484,83 @@
this.addMenuItems(menu, ['exit'], parent);
}
}
+ else if (minTheme)
+ {
+ var file = editorUi.getCurrentFile();
+ editorUi.menus.addMenuItems(menu, ['new'], parent);
+ editorUi.menus.addSubmenu('openFrom', menu, parent);
+
+ if (isLocalStorage)
+ {
+ this.addSubmenu('openRecent', menu, parent);
+ }
+
+ menu.addSeparator(parent);
+
+ editorUi.menus.addMenuItems(menu, ['-', 'save'], parent);
+
+ if (file == null || file.constructor != DriveFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['saveAs'], parent);
+ }
+
+ if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
+ file != null && (file.constructor != LocalFile ||
+ file.fileHandle != null))
+ {
+ editorUi.menus.addMenuItems(menu, ['synchronize'], parent);
+ }
+
+ if (file != null && file.constructor == DriveFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'rename', 'makeCopy',
+ '-', 'moveToFolder', 'openFolder'], parent);
+ }
+ else
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'rename'], parent);
+
+ if (editorUi.isOfflineApp())
+ {
+ if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
+ {
+ this.addMenuItems(menu, ['upload'], parent);
+ }
+ }
+ else
+ {
+ editorUi.menus.addMenuItems(menu, ['makeCopy'], parent);
+ }
+ }
+
+ if (file != null && file.isRevisionHistorySupported())
+ {
+ editorUi.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
+ }
+
+ if (file != null)
+ {
+ if (editorUi.fileNode != null && urlParams['embedInline'] != '1')
+ {
+ var filename = (file.getTitle() != null) ?
+ file.getTitle() : editorUi.defaultFilename;
+
+ if ((file.constructor == DriveFile && file.sync != null &&
+ file.sync.isConnected()) || (!/(\.html)$/i.test(filename) &&
+ !/(\.svg)$/i.test(filename)))
+ {
+ this.addMenuItems(menu, ['properties'], parent);
+ }
+ }
+
+ if (file.constructor == DriveFile)
+ {
+ editorUi.menus.addMenuItems(menu, ['share'], parent);
+ }
+ }
+
+ editorUi.menus.addMenuItems(menu, ['-', 'autosave'], parent);
+ }
else
{
var file = this.editorUi.getCurrentFile();
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index fb740643..7817a090 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -403,7 +403,7 @@ EditorUi.initMinimalTheme = function()
var err = file.getRealtimeError();
var state = file.getRealtimeState();
- title += ' (' + mxResources.get('realtimeCollaboration');
+ title += ' (' + mxResources.get('realtimeCollaboration') + ': ';
if (state == 1)
{
@@ -531,34 +531,7 @@ EditorUi.initMinimalTheme = function()
this.editor.fireEvent(new mxEventObject('statusChanged'));
}
};
-
- // Fixes sidebar tooltips (previews)
- var sidebarGetTooltipOffset = Sidebar.prototype.getTooltipOffset;
-
- Sidebar.prototype.getTooltipOffset = function(elt, bounds)
- {
- if (this.editorUi.sidebarWindow == null ||
- mxUtils.isAncestorNode(this.editorUi.picker, elt))
- {
- var off = mxUtils.getOffset(this.editorUi.picker);
-
- off.x += this.editorUi.picker.offsetWidth + 4;
- off.y += elt.offsetTop - bounds.height / 2 + 16;
-
- return off;
- }
- else
- {
- var result = sidebarGetTooltipOffset.apply(this, arguments);
- var off = mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
-
- result.x += off.x - 16;
- result.y += off.y;
-
- return result;
- }
- };
-
+
// Adds context menu items
var menuCreatePopupMenu = Menus.prototype.createPopupMenu;
@@ -649,49 +622,7 @@ EditorUi.initMinimalTheme = function()
var editorUiDestroy = EditorUi.prototype.destroy;
EditorUi.prototype.destroy = function()
{
- if (this.sidebarWindow != null)
- {
- this.sidebarWindow.window.setVisible(false);
- this.sidebarWindow.window.destroy();
- this.sidebarWindow = null;
- }
-
- if (this.formatWindow != null)
- {
- this.formatWindow.destroy();
- this.formatWindow = null;
- }
-
- if (this.actions.outlineWindow != null)
- {
- this.actions.outlineWindow.destroy();
- this.actions.outlineWindow = null;
- }
-
- if (this.actions.layersWindow != null)
- {
- this.actions.layersWindow.destroy();
- this.actions.layersWindow = null;
- }
-
- if (this.menus.tagsWindow != null)
- {
- this.menus.tagsWindow.destroy();
- this.menus.tagsWindow = null;
- }
-
- if (this.menus.findWindow != null)
- {
- this.menus.findWindow.destroy();
- this.menus.findWindow = null;
- }
-
- if (this.menus.findReplaceWindow != null)
- {
- this.menus.findReplaceWindow.destroy();
- this.menus.findReplaceWindow = null;
- }
-
+ this.destroyWindows();
editorUiDestroy.apply(this, arguments);
};
@@ -809,247 +740,6 @@ EditorUi.initMinimalTheme = function()
this.addSubmenu('editCell', menu, parent, mxResources.get('edit'));
};
- this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- var file = ui.getCurrentFile();
- ui.menus.addMenuItems(menu, ['new'], parent);
- ui.menus.addSubmenu('openFrom', menu, parent);
-
- if (isLocalStorage)
- {
- this.addSubmenu('openRecent', menu, parent);
- }
-
- menu.addSeparator(parent);
-
- ui.menus.addMenuItems(menu, ['-', 'save'], parent);
-
- if (file == null || file.constructor != DriveFile)
- {
- ui.menus.addMenuItems(menu, ['saveAs'], parent);
- }
-
- if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
- (file.constructor != LocalFile || file.fileHandle != null))
- {
- ui.menus.addMenuItems(menu, ['synchronize'], parent);
- }
-
- if (file != null && file.constructor == DriveFile)
- {
- ui.menus.addMenuItems(menu, ['-', 'rename', 'makeCopy',
- '-', 'moveToFolder', 'openFolder'], parent);
- }
- else
- {
- ui.menus.addMenuItems(menu, ['-', 'rename'], parent);
-
- if (ui.isOfflineApp())
- {
- if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
- {
- this.addMenuItems(menu, ['upload'], parent);
- }
- }
- else
- {
- ui.menus.addMenuItems(menu, ['makeCopy'], parent);
- }
- }
-
- if (file != null && file.isRevisionHistorySupported())
- {
- ui.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
- }
-
- if (file != null)
- {
- if (ui.fileNode != null && urlParams['embedInline'] != '1')
- {
- var filename = (file.getTitle() != null) ?
- file.getTitle() : ui.defaultFilename;
-
- if ((file.constructor == DriveFile && file.sync != null &&
- file.sync.isConnected()) || (!/(\.html)$/i.test(filename) &&
- !/(\.svg)$/i.test(filename)))
- {
- this.addMenuItems(menu, ['properties'], parent);
- }
- }
-
- if (file.constructor == DriveFile)
- {
- ui.menus.addMenuItems(menu, ['share'], parent);
- }
- }
-
- ui.menus.addMenuItems(menu, ['-', 'autosave'], parent);
- })));
-
- this.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- var file = ui.getCurrentFile();
- ui.menus.addSubmenu('extras', menu, parent, mxResources.get('preferences'));
- menu.addSeparator(parent);
-
- if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
- {
- ui.menus.addMenuItems(menu, ['new', 'open', '-', 'synchronize',
- '-', 'save', 'saveAs', '-'], parent);
- }
- else if (urlParams['embed'] == '1' || ui.mode == App.MODE_ATLAS)
- {
- if (urlParams['noSaveBtn'] != '1' &&
- urlParams['embedInline'] != '1')
- {
- ui.menus.addMenuItems(menu, ['-', 'save'], parent);
- }
-
- if (urlParams['saveAndExit'] == '1' ||
- (urlParams['noSaveBtn'] == '1' &&
- urlParams['saveAndExit'] != '0') || ui.mode == App.MODE_ATLAS)
- {
- ui.menus.addMenuItems(menu, ['saveAndExit'], parent);
-
- if (file != null && file.isRevisionHistorySupported())
- {
- ui.menus.addMenuItems(menu, ['revisionHistory'], parent);
- }
- }
-
- menu.addSeparator(parent);
- }
- else if (ui.mode == App.MODE_ATLAS)
- {
- ui.menus.addMenuItems(menu, ['save', 'synchronize', '-'], parent);
- }
- else if (urlParams['noFileMenu'] != '1')
- {
- if (urlParams['sketch'] != '1')
- {
- ui.menus.addMenuItems(menu, ['new'], parent);
- ui.menus.addSubmenu('openFrom', menu, parent);
-
- if (isLocalStorage)
- {
- this.addSubmenu('openRecent', menu, parent);
- }
-
- menu.addSeparator(parent);
-
- if (file != null)
- {
- if (file.constructor == DriveFile)
- {
- ui.menus.addMenuItems(menu, ['share'], parent);
- }
-
- if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
- file.constructor != LocalFile)
- {
- ui.menus.addMenuItems(menu, ['synchronize'], parent);
- }
- }
-
- menu.addSeparator(parent);
- ui.menus.addSubmenu('save', menu, parent);
- }
- else
- {
- ui.menus.addSubmenu('file', menu, parent);
- }
- }
-
- ui.menus.addSubmenu('exportAs', menu, parent);
-
- if (mxClient.IS_CHROMEAPP || EditorUi.isElectronApp)
- {
- ui.menus.addMenuItems(menu, ['import'], parent);
- }
- else if (urlParams['noFileMenu'] != '1')
- {
- ui.menus.addSubmenu('importFrom', menu, parent);
- }
-
- ui.menus.addMenuItems(menu, ['-', 'findReplace'], parent);
-
- if (ui.commentsSupported())
- {
- ui.menus.addMenuItems(menu, ['comments', '-'], parent);
- }
-
- ui.menus.addMenuItems(menu, ['toggleFormat', 'layers', 'tags', '-', 'pageSetup'], parent);
-
- // Cannot use print in standalone mode on iOS as we cannot open new windows
- if (urlParams['noFileMenu'] != '1' && (!mxClient.IS_IOS || !navigator.standalone))
- {
- ui.menus.addMenuItems(menu, ['print'], parent);
- }
-
- if (urlParams['sketch'] != '1')
- {
- if (file != null && ui.fileNode != null && urlParams['embedInline'] != '1')
- {
- var filename = (file.getTitle() != null) ?
- file.getTitle() : ui.defaultFilename;
-
- if (!/(\.html)$/i.test(filename) &&
- !/(\.svg)$/i.test(filename))
- {
- this.addMenuItems(menu, ['-', 'properties']);
- }
- }
- }
-
- menu.addSeparator(parent);
- ui.menus.addSubmenu('help', menu, parent);
-
- if (urlParams['embed'] == '1' || ui.mode == App.MODE_ATLAS)
- {
- if (urlParams['noExitBtn'] != '1' || ui.mode == App.MODE_ATLAS)
- {
- ui.menus.addMenuItems(menu, ['-', 'exit'], parent);
- }
- }
- else if (urlParams['noFileMenu'] != '1')
- {
- ui.menus.addMenuItems(menu, ['-', 'close']);
- }
- })));
-
- this.put('save', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- var file = ui.getCurrentFile();
-
- if (file != null && file.constructor == DriveFile)
- {
- ui.menus.addMenuItems(menu, ['save', 'makeCopy', '-', 'rename', 'moveToFolder'], parent);
- }
- else
- {
- ui.menus.addMenuItems(menu, ['save', 'saveAs', '-', 'rename'], parent);
-
- if (ui.isOfflineApp())
- {
- if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
- {
- this.addMenuItems(menu, ['upload'], parent);
- }
- }
- else
- {
- ui.menus.addMenuItems(menu, ['makeCopy'], parent);
- }
- }
-
- ui.menus.addMenuItems(menu, ['-', 'autosave'], parent);
-
- if (file != null && file.isRevisionHistorySupported())
- {
- ui.menus.addMenuItems(menu, ['-', 'revisionHistory'], parent);
- }
- })));
-
// Augments the existing export menu
var exportAsMenu = this.get('exportAs');
@@ -1071,13 +761,6 @@ EditorUi.initMinimalTheme = function()
}
})));
- var langMenu = this.get('language');
-
- this.put('table', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- ui.menus.addInsertTableCellItem(menu, parent);
- })));
-
var unitsMenu = this.get('units');
this.put('units', new Menu(mxUtils.bind(this, function(menu, parent)
@@ -1086,109 +769,6 @@ EditorUi.initMinimalTheme = function()
this.addMenuItems(menu, ['-', 'ruler', '-', 'pageScale'], parent);
})));
- // Extras menu is labelled preferences but keeps ID for extensions
- this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)
- {
- if (langMenu != null && (urlParams['embed'] != '1' || urlParams['lang'] == null))
- {
- ui.menus.addSubmenu('language', menu, parent);
- }
-
- if (urlParams['embed'] != '1' && urlParams['extAuth'] != '1' && ui.mode != App.MODE_ATLAS)
- {
- ui.menus.addSubmenu('theme', menu, parent);
- }
-
- ui.menus.addSubmenu('units', menu, parent);
- menu.addSeparator(parent);
-
- if (urlParams['sketch'] != '1')
- {
- ui.menus.addMenuItems(menu, ['scrollbars', '-', 'tooltips',
- 'copyConnect', 'collapseExpand'], parent);
- }
-
- if (urlParams['embedInline'] != '1' && urlParams['sketch'] != '1' && urlParams['embed'] != '1' &&
- (isLocalStorage || mxClient.IS_CHROMEAPP) && ui.mode != App.MODE_ATLAS)
- {
- ui.menus.addMenuItems(menu, ['-', 'showStartScreen', 'search', 'scratchpad'], parent);
- }
-
- menu.addSeparator(parent);
-
- if (urlParams['sketch'] == '1')
- {
- ui.menus.addMenuItems(menu, ['copyConnect',
- 'collapseExpand', 'tooltips', '-'], parent);
- }
-
- if (EditorUi.isElectronApp)
- {
- ui.menus.addMenuItems(menu, ['-',
- 'spellCheck', 'autoBkp',
- 'drafts', '-'], parent);
- }
-
- var file = ui.getCurrentFile();
-
- if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
- {
- this.addMenuItems(menu, ['-', 'showRemoteCursors',
- 'shareCursor', '-'], parent);
- }
-
- if (Graph.translateDiagram)
- {
- ui.menus.addMenuItems(menu, ['diagramLanguage'], parent);
- }
-
- if (ui.mode != App.MODE_ATLAS)
- {
- ui.menus.addMenuItem(menu, 'configuration', parent);
- }
-
- if (urlParams['sketch'] != '1')
- {
- if (!ui.isOfflineApp() && isLocalStorage && ui.mode != App.MODE_ATLAS)
- {
- ui.menus.addMenuItem(menu, 'plugins', parent);
- }
- }
-
- // Adds trailing separator in case new plugin entries are added
- menu.addSeparator(parent);
- })));
-
- (mxUtils.bind(this, function()
- {
- var insertMenu = this.get('insert');
- var insertMenuFunct = insertMenu.funct;
-
- insertMenu.funct = function(menu, parent)
- {
- if (urlParams['sketch'] == '1')
- {
- ui.menus.addMenuItems(menu, ['toggleShapes'], parent);
- ui.menus.addSubmenu('table', menu, parent);
- menu.addSeparator(parent);
-
- if (ui.insertTemplateEnabled && !ui.isOffline())
- {
- ui.menus.addMenuItems(menu, ['insertTemplate'], parent);
- }
-
- ui.menus.addMenuItems(menu, ['insertImage', 'insertLink', '-'], parent);
- ui.menus.addSubmenu('insertAdvanced', menu, parent, mxResources.get('advanced'));
- ui.menus.addSubmenu('layout', menu, parent);
- }
- else
- {
- insertMenuFunct.apply(this, arguments);
- ui.menus.addSubmenu('table', menu, parent);
- }
- };
- }))();
-
var methods = ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree', 'verticalTree',
'radialTree', '-', 'organic', 'circle'];
@@ -1670,16 +1250,6 @@ EditorUi.initMinimalTheme = function()
previousParent.appendChild(ui.titlebar);
}
- // Adds outline option to zoom menu
- var viewZoomMenu = ui.menus.get('viewZoom');
- var viewZoomMenuFunct = viewZoomMenu.funct;
-
- viewZoomMenu.funct = function(menu, parent)
- {
- viewZoomMenuFunct.apply(this, arguments);
- ui.menus.addMenuItems(menu, ['-', 'outline', 'fullscreen'], parent);
- };
-
var insertImage = (urlParams['sketch'] != '1') ? Editor.plusImage : Editor.shapesImage;
var footer = (urlParams['sketch'] == '1') ? document.createElement('div') : null;
var picker = (urlParams['sketch'] == '1') ? document.createElement('div') : null;
@@ -1847,6 +1417,10 @@ EditorUi.initMinimalTheme = function()
menubar.className = 'geToolbarContainer';
ui.picker = picker;
+
+ // Passing to code in Sidebar for live UI
+ ui.sketchPickerMenuElt = picker;
+
var statusVisible = false;
if (urlParams['embed'] != '1' && ui.getServiceName() != 'atlassian')
@@ -1880,31 +1454,6 @@ EditorUi.initMinimalTheme = function()
}
});
- if (urlParams['embed'] != '1' && urlParams['live-ui'] == '1')
- {
- var themeElt = addMenu('theme', null, Editor.darkModeImage);
-
- if (themeElt != null)
- {
- themeElt.style.position = 'relative';
- themeElt.style.backgroundPosition = 'top center';
- themeElt.style.backgroundSize = '22px 22px';
- themeElt.style.width = '24px';
- themeElt.style.height = '28px';
- themeElt.style.top = '4px';
- menubar.appendChild(themeElt);
-
- var updateThemeElement = mxUtils.bind(this, function()
- {
- themeElt.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode()) ?
- Editor.lightModeImage : Editor.darkModeImage) + '\')';
- });
-
- ui.addListener('darkModeChanged', updateThemeElement);
- updateThemeElement();
- }
- }
-
// Connects the status bar to the editor status and moves
// status to bell icon title for frequent common messages
menubar.style.visibility = (menubar.clientWidth < 20) ? 'hidden' : '';
@@ -2169,6 +1718,8 @@ EditorUi.initMinimalTheme = function()
}));
}
+ var viewZoomMenu = ui.menus.get('viewZoom');
+
if (viewZoomMenu != null)
{
var fitFunction = function(evt)
@@ -2200,12 +1751,12 @@ EditorUi.initMinimalTheme = function()
{
var deleteAction = ui.actions.get('delete');
var deleteElt = addMenuItem('', deleteAction.funct, null, mxResources.get('delete'), deleteAction, Editor.trashImage);
- deleteElt.style.opacity = '0.1';
+ deleteElt.style.opacity = '0.3';
toolbar.appendChild(deleteElt);
deleteAction.addListener('stateChanged', function()
{
- deleteElt.style.opacity = (deleteAction.enabled) ? '' : '0.1';
+ deleteElt.style.opacity = (deleteAction.enabled) ? '' : '0.3';
});
var undoListener = function()
@@ -2214,8 +1765,8 @@ EditorUi.initMinimalTheme = function()
graph.isEditing()) ? 'inline-block' : 'none';
redoElt.style.display = undoElt.style.display;
- undoElt.style.opacity = (undoAction.enabled) ? '' : '0.1';
- redoElt.style.opacity = (redoAction.enabled) ? '' : '0.1';
+ undoElt.style.opacity = (undoAction.enabled) ? '' : '0.3';
+ redoElt.style.opacity = (redoAction.enabled) ? '' : '0.3';
};
toolbar.appendChild(undoElt);
@@ -2226,26 +1777,8 @@ EditorUi.initMinimalTheme = function()
undoListener();
var pageMenu = this.createPageMenuTab(false, true);
- pageMenu.style.display = 'none';
- pageMenu.style.position = '';
- pageMenu.style.marginLeft = '';
- pageMenu.style.top = '';
- pageMenu.style.left = '';
- pageMenu.style.height = '100%';
- pageMenu.style.lineHeight = '';
- pageMenu.style.borderStyle = 'none';
- pageMenu.style.padding = '3px 0';
- pageMenu.style.margin = '0px';
- pageMenu.style.background = '';
- pageMenu.style.border = '';
- pageMenu.style.boxShadow = 'none';
- pageMenu.style.verticalAlign = 'top';
- pageMenu.style.width = 'auto';
- pageMenu.style.maxWidth = '160px';
- pageMenu.style.position = 'relative';
- pageMenu.style.padding = '6px';
- pageMenu.style.textOverflow = 'ellipsis';
- pageMenu.style.opacity = '0.8';
+ pageMenu.style.cssText = 'display:inline-block;white-space:nowrap;overflow:hidden;' +
+ 'padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;';
footer.appendChild(pageMenu);
function updatePageName()
@@ -2302,7 +1835,6 @@ EditorUi.initMinimalTheme = function()
elt.style.padding = '6px 0';
elt.style.fontSize = '14px';
elt.style.width = '40px';
- elt.style.opacity = '0.4';
footer.appendChild(elt);
var zoomInElt = addMenuItem('', zoomInAction.funct, true, mxResources.get('zoomIn') +
@@ -2522,8 +2054,7 @@ EditorUi.initMinimalTheme = function()
}), null, null);
}
- var langMenu = ui.menus.get((urlParams['live-ui'] == '1') ?
- 'theme' : 'language');
+ var langMenu = ui.menus.get('language');
if (langMenu != null && !mxClient.IS_CHROMEAPP &&
!EditorUi.isElectronApp && iw >= 600 &&
@@ -2533,8 +2064,7 @@ EditorUi.initMinimalTheme = function()
if (langMenuElt == null)
{
var elt = menuObj.addMenu('', langMenu.funct);
- elt.setAttribute('title', mxResources.get((urlParams['live-ui'] == '1') ?
- 'preferences' : 'language'));
+ elt.setAttribute('title', 'language');
elt.className = 'geToolbarButton';
elt.style.backgroundImage = 'url(' + Editor.globeImage + ')';
elt.style.backgroundPosition = 'center center';
@@ -2549,18 +2079,6 @@ EditorUi.initMinimalTheme = function()
elt.style.top = '12px';
menubar.appendChild(elt);
langMenuElt = elt;
-
- if (urlParams['live-ui'] == '1')
- {
- var updateThemeElement = mxUtils.bind(this, function()
- {
- elt.style.backgroundImage = 'url(\'' + ((Editor.isDarkMode()) ?
- Editor.lightModeImage : Editor.darkModeImage) + '\')';
- });
-
- ui.addListener('darkModeChanged', updateThemeElement);
- updateThemeElement();
- }
}
ui.buttonContainer.style.paddingRight = '34px';
diff --git a/src/main/webapp/js/diagramly/mxFreehand.js b/src/main/webapp/js/diagramly/mxFreehand.js
index d8105b26..fd8eb0c1 100644
--- a/src/main/webapp/js/diagramly/mxFreehand.js
+++ b/src/main/webapp/js/diagramly/mxFreehand.js
@@ -28,7 +28,7 @@ function mxFreehand(graph)
var openFill = true;
var buffer = []; // Contains the last positions of the mouse cursor
var enabled = false;
- var stopClickEnabled = true;
+ var stopClickEnabled = false;
var selectInserted = false;
var perfectFreehandOptions = {
size: 5,
@@ -139,7 +139,7 @@ function mxFreehand(graph)
// Click stops drawing
var doStop = stopClickEnabled && drawPoints.length > 0 &&
lastPart != null && lastPart.length < 2;
-
+
if (!doStop)
{
drawPoints.push.apply(drawPoints, lastPart);
@@ -155,7 +155,7 @@ function mxFreehand(graph)
this.stopDrawing();
}
- if (autoInsert && lastLength >= 2)
+ if (autoInsert && (!doStop || lastLength >= 2))
{
this.startDrawing();
}
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar.js b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
index e5616189..278582cc 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar.js
@@ -1417,7 +1417,41 @@
sidebarSearchEntries.apply(this, arguments);
};
-
+
+ // Fixes sidebar tooltips (previews)
+ var sidebarGetTooltipOffset = Sidebar.prototype.getTooltipOffset;
+
+ Sidebar.prototype.getTooltipOffset = function(elt, bounds)
+ {
+ if (Editor.currentTheme == 'sketch' || uiTheme == 'min')
+ {
+ if (this.editorUi.sidebarWindow == null ||
+ mxUtils.isAncestorNode(this.editorUi.sketchPickerMenuElt, elt))
+ {
+ var off = mxUtils.getOffset(this.editorUi.sketchPickerMenuElt);
+
+ off.x += this.editorUi.sketchPickerMenuElt.offsetWidth + 4;
+ off.y += elt.offsetTop - bounds.height / 2 + 16;
+
+ return off;
+ }
+ else
+ {
+ var result = sidebarGetTooltipOffset.apply(this, arguments);
+ var off = mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);
+
+ result.x += off.x - 16;
+ result.y += off.y;
+
+ return result;
+ }
+ }
+ else
+ {
+ return sidebarGetTooltipOffset.apply(this, arguments);
+ }
+ };
+
/**
* Adds a click handler for inserting the cell as target for dangling edge.
*/
diff --git a/src/main/webapp/js/embed.dev.js b/src/main/webapp/js/embed.dev.js
index a5a74d43..0f229ba3 100644
--- a/src/main/webapp/js/embed.dev.js
+++ b/src/main/webapp/js/embed.dev.js
@@ -77,7 +77,7 @@
{
load: [(urlParams['math-output'] == 'html') ?
'output/chtml' : 'output/svg', 'input/tex',
- 'input/asciimath']
+ 'input/asciimath', 'ui/safe']
},
startup:
{
diff --git a/src/main/webapp/js/grapheditor/Actions.js b/src/main/webapp/js/grapheditor/Actions.js
index 1f713326..2a65da28 100644
--- a/src/main/webapp/js/grapheditor/Actions.js
+++ b/src/main/webapp/js/grapheditor/Actions.js
@@ -874,14 +874,17 @@ Actions.prototype.init = function()
for (var i = 0; i < cells.length; i++)
{
var cell = cells[i];
-
- if (graph.getModel().getChildCount(cell) > 0)
- {
- graph.updateGroupBounds([cell], 0, true);
- }
- else
+
+ if (graph.getModel().isVertex(cell))
{
- graph.updateCellSize(cell);
+ if (graph.getModel().getChildCount(cell) > 0)
+ {
+ graph.updateGroupBounds([cell], 0, true);
+ }
+ else
+ {
+ graph.updateCellSize(cell);
+ }
}
}
}
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 85c9219c..224ee00d 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -4234,7 +4234,7 @@ EditorUi.prototype.updateActionStates = function()
this.actions.get('sendBackward').setEnabled(ss.cells.length == 1);
this.actions.get('rotation').setEnabled(ss.vertices.length == 1);
this.actions.get('wordWrap').setEnabled(ss.vertices.length == 1);
- this.actions.get('autosize').setEnabled(ss.vertices.length == 1);
+ this.actions.get('autosize').setEnabled(ss.vertices.length > 0);
this.actions.get('copySize').setEnabled(ss.vertices.length == 1);
this.actions.get('clearWaypoints').setEnabled(ss.connections);
this.actions.get('curved').setEnabled(ss.edges.length > 0);
@@ -4296,6 +4296,17 @@ EditorUi.prototype.getDiagramContainerOffset = function()
*/
EditorUi.prototype.refresh = function(sizeDidChange)
{
+ if (this.formatContainer != null && this.formatContainer.parentNode != null &&
+ this.formatContainer.parentNode.className != 'geEditor')
+ {
+ this.diagramContainer.style.left = '0';
+ this.diagramContainer.style.top = '0';
+ this.diagramContainer.style.right = '0';
+ this.diagramContainer.style.bottom = '0';
+
+ return;
+ }
+
sizeDidChange = (sizeDidChange != null) ? sizeDidChange : true;
var w = this.container.clientWidth;
diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js
index 1289b895..f04856d4 100644
--- a/src/main/webapp/js/grapheditor/Menus.js
+++ b/src/main/webapp/js/grapheditor/Menus.js
@@ -49,7 +49,7 @@ Menus.prototype.init = function()
this.customFonts = [];
this.customFontSizes = [];
-
+
this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
{
var addItem = mxUtils.bind(this, function(fontFamily)
@@ -604,7 +604,7 @@ Menus.prototype.addMenu = function(name, popupMenu, parent)
if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
{
- this.get(name).execute(popupMenu, parent);
+ menu.execute(popupMenu, parent);
}
};
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 2289e91c..bfa9d95c 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -145,7 +145,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2242,16 +2242,17 @@ EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=t
this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
-b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
+b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(0<b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
-this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);
+var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
+this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=
+f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
+e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");
+a&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -3502,20 +3503,20 @@ null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("imag
D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
-x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
-Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.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 m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.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 m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.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;e.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());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.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());e.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());
+try{for(var r=0;r<m.length;r++){var x=m[r];d.getModel().isVertex(x)&&(0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=
+d.getEditableCells(d.getSelectionCells()),x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==
+B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&
+(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);
+e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,
+x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();
+var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.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 m=d.pageFormat,
+r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.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 m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&
+0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.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;e.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());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});
+n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;
+e.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());e.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());
e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[F],
@@ -3568,7 +3569,7 @@ this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0=
new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,f)};
Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
@@ -3754,16 +3755,16 @@ Sidebar.prototype.electrical="LogicGates Resistors Capacitors Inductors Switches
{id:"pid2",prefix:"pid2",libs:"Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";")},{id:"signs",prefix:"signs",libs:Sidebar.prototype.signs},{id:"gcp",prefix:"gcp",libs:Sidebar.prototype.gcp},{id:"gcp2",prefix:"gcp2",libs:Sidebar.prototype.gcp2},{id:"gcpicons",prefix:"gcpicons",libs:Sidebar.prototype.gcpicons},
{id:"rack",prefix:"rack",libs:Sidebar.prototype.rack},{id:"electrical",prefix:"electrical",libs:Sidebar.prototype.electrical},{id:"aws2",prefix:"aws2",libs:Sidebar.prototype.aws2},{id:"aws3",prefix:"aws3",libs:Sidebar.prototype.aws3},{id:"aws4b",prefix:"aws4b",libs:Sidebar.prototype.aws4b},{id:"aws4",prefix:"aws4",libs:Sidebar.prototype.aws4},{id:"pid",prefix:"pid",libs:Sidebar.prototype.pids},{id:"cisco",prefix:"cisco",libs:Sidebar.prototype.cisco},{id:"cisco_safe",prefix:"cisco_safe",libs:Sidebar.prototype.cisco_safe},
{id:"office",prefix:"office",libs:Sidebar.prototype.office},{id:"veeam",prefix:"veeam",libs:Sidebar.prototype.veeam},{id:"veeam2",prefix:"veeam2",libs:Sidebar.prototype.veeam2},{id:"cabinets",libs:["cabinets"]},{id:"floorplan",libs:["floorplan"]},{id:"bootstrap",libs:["bootstrap"]},{id:"atlassian",libs:["atlassian"]},{id:"fluid_power",libs:["fluid_power"]},{id:"gmdl",prefix:"gmdl",libs:Sidebar.prototype.gmdl},{id:"archimate3",prefix:"archimate3",libs:Sidebar.prototype.archimate3},{id:"archimate",
-libs:["archimate"]},{id:"webicons",libs:["webicons","weblogos"]},{id:"sysml",prefix:"sysml",libs:Sidebar.prototype.sysml}];var a=Sidebar.prototype.addEntry;Sidebar.prototype.addEntry=function(h,k){return null!=this.currentSearchEntryLibrary&&null!=this.enabledLibraries&&0>mxUtils.indexOf(this.enabledLibraries,this.currentSearchEntryLibrary.id)?k:a.apply(this,arguments)};var c=Sidebar.prototype.refresh;Sidebar.prototype.refresh=function(){var h=this.editorUi;c.apply(this,arguments);null!=h.scratchpad&&
-h.loadLibrary(new StorageLibrary(h,h.scratchpad.getData(),".scratchpad"))};var d=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(h,k,l,m,n,p,q,t){if(null!=t&&1==m){var u=null;if(0<=mxUtils.indexOf(t,"text"))u="Double click anywhere in the diagram to insert text.";else for(var v="line lines arrow arrows connect connection connections connector connectors curve curves link links directed directional bidirectional".split(" "),w=0;w<v.length;w++)if(0<=mxUtils.indexOf(t,
-v[w])){u="Need help with connections?";break}if(null!=u&&!this.hideSearchHint){var r=document.createElement("a");r.setAttribute("href","https://youtu.be/Z0D96ZikMkc");r.setAttribute("target","_blank");r.className="geTitle";r.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;font-size:12px;";mxUtils.write(r,u);u=document.createElement("img");u.setAttribute("src",
-Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("hide"));u.className="geDialogClose";u.style.position="relative";u.style.cursor="default";u.style.top="1px";u.style.right="0px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(y){r.parentNode.removeChild(r);this.hideSearchHint=!0;mxEvent.consume(y)}));r.appendChild(u);h.appendChild(r);this.hideSearchHint=!0}}d.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(h,k){this.showPalettes(h,k)};Sidebar.prototype.togglePalette=
-function(h){this.showPalette(h)};Sidebar.prototype.showPalettes=function(h,k,l){for(var m=0;m<k.length;m++)this.showPalette(h+k[m],l)};Sidebar.prototype.showPalette=function(h,k){h=this.palettes[h];if(null!=h){k=null!=k?k?"block":"none":"none"==h[0].style.display?"block":"none";for(var l=0;l<h.length;l++)h[l].style.display=k}return h};Sidebar.prototype.getConfigurationById=function(h){for(var k=0;k<this.configuration.length;k++)if(this.configuration[k].id==h)return this.configuration[k];if(null!=
-this.customEntries)for(k=0;k<this.customEntries.length;k++)for(var l=this.customEntries[k],m=0;m<l.entries.length;m++){var n=l.entries[m];if(n.id==h)return{id:n.id,libs:n.libs}}return null};Sidebar.prototype.isEntryVisible=function(h){if(".scratchpad"==h)return null!=this.editorUi.scratchpad;var k=this.getConfigurationById(h);if(null!=k){var l=this.palettes[null!=k.libs?(k.prefix||"")+k.libs[0]:h];if(null!=l)return"none"!=l[0].style.display}if(null!=this.customEntries)for(k=0;k<this.customEntries.length;k++){l=
-this.customEntries[k];for(var m=0;m<l.entries.length;m++){var n=l.entries[m];if(n.id==h){if(null!=n.libs&&0<n.libs.length&&(l=this.palettes[n.id+".0"],null!=l))return"none"!=l[0].style.display;break}}}return!1};Sidebar.prototype.showEntries=function(h,k,l){var m=[];k&&(mxSettings.setLibraries(h),mxSettings.save());null!=h&&(l||0<h.length)?m.push(h):(h=!1,null!=urlParams.libs&&0<urlParams.libs.length&&(m.push(decodeURIComponent(urlParams.libs)),h="draw.io"==this.editorUi.getServiceName()),h||(null!=
-mxSettings&&null!=mxSettings.settings?m.push(mxSettings.getLibraries()):m.push(this.defaultEntries)));k=m.join(";").split(";");m={};for(h=0;h<k.length;h++)m[this.libAliases[k[h]]||k[h]]=!0;for(h=0;h<this.configuration.length;h++)"search"!=this.configuration[h].id&&this.showPalettes(this.configuration[h].prefix||"",this.configuration[h].libs||[this.configuration[h].id],1==m[this.configuration[h].id]);if(null!=this.customEntries)for(h=0;h<this.customEntries.length;h++)for(k=this.customEntries[h],l=
-0;l<k.entries.length;l++){var n=k.entries[l];if(null!=n.libs&&0<n.libs.length){for(var p=[],q=0;q<n.libs.length;q++)p.push(n.id+"."+q);this.showPalettes("",p,m[n.id])}}};Sidebar.prototype.init=function(){var h=[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),
-id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}];"1"==urlParams.sketch&&(h=[{title:mxResources.get("searchShapes"),id:"search"},{title:mxResources.get("scratchpad"),id:".scratchpad"}].concat(h));this.entries=[{title:mxResources.get("standard"),entries:h},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),
+libs:["archimate"]},{id:"webicons",libs:["webicons","weblogos"]},{id:"sysml",prefix:"sysml",libs:Sidebar.prototype.sysml}];var a=Sidebar.prototype.addEntry;Sidebar.prototype.addEntry=function(k,l){return null!=this.currentSearchEntryLibrary&&null!=this.enabledLibraries&&0>mxUtils.indexOf(this.enabledLibraries,this.currentSearchEntryLibrary.id)?l:a.apply(this,arguments)};var c=Sidebar.prototype.refresh;Sidebar.prototype.refresh=function(){var k=this.editorUi;c.apply(this,arguments);null!=k.scratchpad&&
+k.loadLibrary(new StorageLibrary(k,k.scratchpad.getData(),".scratchpad"))};var d=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(k,l,m,n,p,r,t,v){if(null!=v&&1==n){var u=null;if(0<=mxUtils.indexOf(v,"text"))u="Double click anywhere in the diagram to insert text.";else for(var w="line lines arrow arrows connect connection connections connector connectors curve curves link links directed directional bidirectional".split(" "),q=0;q<w.length;q++)if(0<=mxUtils.indexOf(v,
+w[q])){u="Need help with connections?";break}if(null!=u&&!this.hideSearchHint){var x=document.createElement("a");x.setAttribute("href","https://youtu.be/Z0D96ZikMkc");x.setAttribute("target","_blank");x.className="geTitle";x.style.cssText="background-color:#ffd350;border-radius:6px;color:black;border:1px solid black !important;text-align:center;white-space:normal;padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;font-size:12px;";mxUtils.write(x,u);u=document.createElement("img");u.setAttribute("src",
+Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("hide"));u.className="geDialogClose";u.style.position="relative";u.style.cursor="default";u.style.top="1px";u.style.right="0px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(y){x.parentNode.removeChild(x);this.hideSearchHint=!0;mxEvent.consume(y)}));x.appendChild(u);k.appendChild(x);this.hideSearchHint=!0}}d.apply(this,arguments)};Sidebar.prototype.togglePalettes=function(k,l){this.showPalettes(k,l)};Sidebar.prototype.togglePalette=
+function(k){this.showPalette(k)};Sidebar.prototype.showPalettes=function(k,l,m){for(var n=0;n<l.length;n++)this.showPalette(k+l[n],m)};Sidebar.prototype.showPalette=function(k,l){k=this.palettes[k];if(null!=k){l=null!=l?l?"block":"none":"none"==k[0].style.display?"block":"none";for(var m=0;m<k.length;m++)k[m].style.display=l}return k};Sidebar.prototype.getConfigurationById=function(k){for(var l=0;l<this.configuration.length;l++)if(this.configuration[l].id==k)return this.configuration[l];if(null!=
+this.customEntries)for(l=0;l<this.customEntries.length;l++)for(var m=this.customEntries[l],n=0;n<m.entries.length;n++){var p=m.entries[n];if(p.id==k)return{id:p.id,libs:p.libs}}return null};Sidebar.prototype.isEntryVisible=function(k){if(".scratchpad"==k)return null!=this.editorUi.scratchpad;var l=this.getConfigurationById(k);if(null!=l){var m=this.palettes[null!=l.libs?(l.prefix||"")+l.libs[0]:k];if(null!=m)return"none"!=m[0].style.display}if(null!=this.customEntries)for(l=0;l<this.customEntries.length;l++){m=
+this.customEntries[l];for(var n=0;n<m.entries.length;n++){var p=m.entries[n];if(p.id==k){if(null!=p.libs&&0<p.libs.length&&(m=this.palettes[p.id+".0"],null!=m))return"none"!=m[0].style.display;break}}}return!1};Sidebar.prototype.showEntries=function(k,l,m){var n=[];l&&(mxSettings.setLibraries(k),mxSettings.save());null!=k&&(m||0<k.length)?n.push(k):(k=!1,null!=urlParams.libs&&0<urlParams.libs.length&&(n.push(decodeURIComponent(urlParams.libs)),k="draw.io"==this.editorUi.getServiceName()),k||(null!=
+mxSettings&&null!=mxSettings.settings?n.push(mxSettings.getLibraries()):n.push(this.defaultEntries)));l=n.join(";").split(";");n={};for(k=0;k<l.length;k++)n[this.libAliases[l[k]]||l[k]]=!0;for(k=0;k<this.configuration.length;k++)"search"!=this.configuration[k].id&&this.showPalettes(this.configuration[k].prefix||"",this.configuration[k].libs||[this.configuration[k].id],1==n[this.configuration[k].id]);if(null!=this.customEntries)for(k=0;k<this.customEntries.length;k++)for(l=this.customEntries[k],m=
+0;m<l.entries.length;m++){var p=l.entries[m];if(null!=p.libs&&0<p.libs.length){for(var r=[],t=0;t<p.libs.length;t++)r.push(p.id+"."+t);this.showPalettes("",r,n[p.id])}}};Sidebar.prototype.init=function(){var k=[{title:mxResources.get("general"),id:"general",image:IMAGE_PATH+"/sidebar-general.png"},{title:mxResources.get("basic"),id:"basic",image:IMAGE_PATH+"/sidebar-basic.png"},{title:mxResources.get("arrows"),id:"arrows2",image:IMAGE_PATH+"/sidebar-arrows2.png"},{title:mxResources.get("clipart"),
+id:"clipart",image:IMAGE_PATH+"/sidebar-clipart.png"},{title:mxResources.get("flowchart"),id:"flowchart",image:IMAGE_PATH+"/sidebar-flowchart.png"}];"1"==urlParams.sketch&&(k=[{title:mxResources.get("searchShapes"),id:"search"},{title:mxResources.get("scratchpad"),id:".scratchpad"}].concat(k));this.entries=[{title:mxResources.get("standard"),entries:k},{title:mxResources.get("software"),entries:[{title:"Active Directory",id:"active_directory",image:IMAGE_PATH+"/sidebar-active_directory.png"},{title:mxResources.get("android"),
id:"android",image:IMAGE_PATH+"/sidebar-android.png"},{title:"Atlassian",id:"atlassian",image:IMAGE_PATH+"/sidebar-atlassian.png"},{title:mxResources.get("bootstrap"),id:"bootstrap",image:IMAGE_PATH+"/sidebar-bootstrap.png"},{title:"C4",id:"c4",image:IMAGE_PATH+"/sidebar-c4.png"},{title:"Data Flow Diagram",id:"dfd",image:IMAGE_PATH+"/sidebar-dfd.png"},{title:mxResources.get("entityRelation"),id:"er",image:IMAGE_PATH+"/sidebar-er.png"},{title:mxResources.get("ios"),id:"ios",image:IMAGE_PATH+"/sidebar-ios.png"},
{title:mxResources.get("mockups"),id:"mockups",image:IMAGE_PATH+"/sidebar-mockups.png"},{title:"Sitemap",id:"sitemap",image:IMAGE_PATH+"/sidebar-sitemap.png"},{title:mxResources.get("uml")+" 2.5",id:"uml25",image:IMAGE_PATH+"/sidebar-uml25.png"},{title:mxResources.get("uml"),id:"uml",image:IMAGE_PATH+"/sidebar-uml.png"}]},{title:mxResources.get("networking"),entries:[{title:"Allied Telesis",id:"allied_telesis",image:IMAGE_PATH+"/sidebar-allied_telesis.png"},{title:"AWS17",id:"aws3",image:IMAGE_PATH+
"/sidebar-aws3.png"},{title:"AWS18",id:"aws4b",image:IMAGE_PATH+"/sidebar-aws4b.png"},{title:"AWS19",id:"aws4",image:IMAGE_PATH+"/sidebar-aws4.png"},{title:mxResources.get("aws3d"),id:"aws3d",image:IMAGE_PATH+"/sidebar-aws3d.png"},{title:mxResources.get("azure"),id:"azure2",image:IMAGE_PATH+"/sidebar-azure.png"},{title:"Cloud & Enterprise",id:"mscae",image:IMAGE_PATH+"/sidebar-mscae.png"},{title:mxResources.get("cisco"),id:"cisco",image:IMAGE_PATH+"/sidebar-cisco.png"},{title:"Cisco19",id:"cisco19",
@@ -3772,36 +3773,37 @@ image:IMAGE_PATH+"/sidebar-kubernetes.png"},{title:"Network",id:"network",image:
{title:mxResources.get("archiMate21"),id:"archimate",image:IMAGE_PATH+"/sidebar-archimate.png"},{title:mxResources.get("bpmn")+" 2.0",id:"bpmn2",image:IMAGE_PATH+"/sidebar-bpmn.png"},{title:mxResources.get("sysml"),id:"sysml",image:IMAGE_PATH+"/sidebar-sysml.png"},{title:"Value Stream Mapping",id:"lean_mapping",image:IMAGE_PATH+"/sidebar-leanmapping.png"}]},{title:mxResources.get("other"),entries:[{title:mxResources.get("cabinets"),id:"cabinets",image:IMAGE_PATH+"/sidebar-cabinets.png"},{title:"Infographic",
id:"infographic",image:IMAGE_PATH+"/sidebar-infographic.png"},{title:mxResources.get("eip"),id:"eip",image:IMAGE_PATH+"/sidebar-eip.png"},{title:mxResources.get("electrical"),id:"electrical",image:IMAGE_PATH+"/sidebar-electrical.png"},{title:mxResources.get("floorplans"),id:"floorplan",image:IMAGE_PATH+"/sidebar-floorplans.png"},{title:"Fluid Power (ISO 1219)",id:"fluid_power",image:IMAGE_PATH+"/sidebar-fluid_power.png"},{title:mxResources.get("gmdl"),id:"gmdl",image:IMAGE_PATH+"/sidebar-gmdl.png"},
{title:mxResources.get("procEng"),id:"pid",image:IMAGE_PATH+"/sidebar-pid.png"},{title:"Threat Modeling",id:"threatModeling",image:IMAGE_PATH+"/sidebar-threatmodeling.png"},{title:"Web Icons",id:"webicons",image:IMAGE_PATH+"/sidebar-webIcons.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=!1;this.shapetags={};null!=this.tagIndex&&(this.addTagIndex(Graph.decompress(this.tagIndex)),this.tagIndex=null);this.initPalettes()};"1"==urlParams.savesidebar&&
-(Sidebar.prototype.addFoldingHandler=function(h,k,l){var m=!1;if(!mxClient.IS_IE||8<=document.documentMode)h.style.backgroundImage="none"==k.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="0% 50%";var n=document.createElement("button");n.style.marginLeft="4px";mxUtils.write(n,"Save");mxEvent.addListener(h,"click",mxUtils.bind(this,function(p){if("BUTTON"==mxEvent.getSource(p).nodeName){p=k.getElementsByTagName("svg");
-var q=(Math.ceil(p.length/6)+1)*this.thumbHeight,t=Graph.createSvgNode(0,0,456,q,"#ffffff"),u=new mxSvgCanvas2D(t);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var v=h.childNodes,w=0;w<v.length;w++)if(v[w].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(v[w]));break}for(w=0;w<p.length;w++)u=p[w].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
-u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(w,6)),u.setAttribute("y",24+68*Math.floor(w/6)),t.appendChild(u);this.editorUi.editor.convertImages(t,mxUtils.bind(this,function(y){var x=document.createElement("canvas");x.width=456;x.height=q;var z=document.createElement("img");z.onload=mxUtils.bind(this,function(){x.getContext("2d").drawImage(z,0,0);this.editorUi.saveCanvas(x,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(t);z.src=Editor.createSvgDataUri(y)}))}else{if("none"==
-k.style.display){if(m)h.appendChild(n);else if(m=!0,null!=l){null!=n.parentNode&&n.parentNode.removeChild(n);h.style.cursor="wait";var r=h.innerHTML;h.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){l(k);h.style.cursor="";h.innerHTML=r;h.appendChild(n)},0)}else h.appendChild(n);h.style.backgroundImage="url('"+this.expandedImage+"')";k.style.display="block"}else h.style.backgroundImage="url('"+this.collapsedImage+"')",k.style.display="none",null!=n.parentNode&&n.parentNode.removeChild(n);
-mxEvent.consume(p)}}))});Sidebar.prototype.extractShapeStyle=function(h){if(null!=h&&"shape="==h.substring(0,6)){var k=h.indexOf(";");0>k&&(k=h.length);return h.substring(6,k)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(h,k,l){var m=b.apply(this,arguments);null!=this.shapetags&&(h=h.toLowerCase(),k=k.toLowerCase(),null!=this.shapetags[h]&&m.push(this.shapetags[h]),k=h+"."+k,null!=this.shapetags[k]&&m.push(this.shapetags[k]));return m};Sidebar.prototype.addTagIndex=
-function(h){h=h.split("\n");for(var k=0;k<h.length;k++)if(null!=h[k]){var l=h[k].split("\t");if(1<l.length){var m=l[0].toLowerCase().replace(" ","_");l=mxUtils.trim(l.slice(1,l.length).join(" ").toLowerCase());0<l.length&&(this.shapetags[m]=l)}}};Sidebar.prototype.showPopupMenuForEntry=function(h,k,l){if(null!=k&&0<k.length){var m=mxUtils.getOffset(h);this.editorUi.showPopupMenu(mxUtils.bind(this,function(n,p){n.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var q=0;q<
-k.length;q++)mxUtils.bind(this,function(t){t=this.getConfigurationById(t.id);if(null!=t){this.showPalettes(t.prefix||"",t.libs||[t.id],!0);var u=this.showPalette(k[q].lib||k[q].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(l)}})(k[q])}))}),m.x,m.y+h.offsetHeight,l)}};Sidebar.prototype.addSearchIndex=function(h){if(null!=h)for(var k=0;k<
-h.length;k++)if(null!=h[k].style){var l=h[k].style,m=this.extractShapeStyle(l);if(null!=m){var n=m.lastIndexOf(".");if(0<n){var p=m.substring(0,n);m=m.substring(n+1,m.length);n=this.getTagsForStencil(p,m,h[k].tags);if(null!=n){var q=l.indexOf(";");l="shape="+p+"."+m.toLowerCase()+";"+(0>q?"":l.substring(q+1));this.setCurrentSearchEntryLibrary(h[k].id,h[k].lib);this.createVertexTemplateEntry(l,parseInt(h[k].w),parseInt(h[k].h),"",m.replace(/_/g," "),null,null,this.filterTags(n.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
-Sidebar.prototype.initPalettes=function(){var h=GRAPH_IMAGE_PATH,k=STENCIL_PATH,l=this.signs,m=this.rack,n=this.pids,p=this.cisco,q=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var t=0,u=0;u<this.customEntries.length;u++)for(var v=this.customEntries[u],w=0;w<v.entries.length;w++)for(var r=v.entries[w],y=0;y<r.libs.length;y++)mxUtils.bind(this,function(x){var z=null,B=null,D=null,F=null,K=mxUtils.bind(this,function(A,
-C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,A);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),G=mxUtils.bind(this,function(){null!=D&&null!=F&&(null!=B?(D.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(x.title)),K(B,D)):null!=z?(this.editorUi.addLibraryEntries(z,D),D.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(x.title))):
-(D.style.display="none",F.innerText="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==x.data&&null!=x.url&&!x.preload&&t>=this.maxPreloadCount)this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){var E=mxUtils.bind(this,function(H){this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y);this.addEntries(H);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(H,A)});A.style.display="none";C.innerText="";mxUtils.write(C,mxResources.get("loading")+
-"...");var I=x.url;this.editorUi.editor.isCorsEnabledForUrl(I)||(I=PROXY_URL+"?url="+encodeURIComponent(I));this.editorUi.editor.loadUrl(I,mxUtils.bind(this,function(H){A.style.display="block";C.innerText="";mxUtils.write(C,this.editorUi.getResource(x.title));try{var L=mxUtils.parseXml(H);if("mxlibrary"==L.documentElement.nodeName){var M=JSON.parse(mxUtils.getTextContent(L.documentElement));E(M)}else K(mxResources.get("notALibraryFile"),A)}catch(N){K(mxResources.get("error")+": "+N.message,A)}}))}));
-else if(this.addPalette(r.id+"."+y,this.editorUi.getResource(x.title),!1,mxUtils.bind(this,function(A,C){D=A;F=C;G()})),null!=x.data)this.setCurrentSearchEntryLibrary(r.id,r.id+"."+y),this.addEntries(x.data),this.setCurrentSearchEntryLibrary(),z=x.data,G();else if(null!=x.url){t++;var J=x.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(A){try{var C=mxUtils.parseXml(A);"mxlibrary"==C.documentElement.nodeName?
-(z=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(z)):B=mxResources.get("notALibraryFile");G()}catch(E){B=mxResources.get("error")+": "+E.message,G()}}),mxUtils.bind(this,function(A){B=null!=A&&null!=A.message?A.message:A;G()}))}else B=mxResources.get("invalidInput"),G()})(r.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),k+"/arrows.xml",
-";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",h+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
+(Sidebar.prototype.addFoldingHandler=function(k,l,m){var n=!1;if(!mxClient.IS_IE||8<=document.documentMode)k.style.backgroundImage="none"==l.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="0% 50%";var p=document.createElement("button");p.style.marginLeft="4px";mxUtils.write(p,"Save");mxEvent.addListener(k,"click",mxUtils.bind(this,function(r){if("BUTTON"==mxEvent.getSource(r).nodeName){r=l.getElementsByTagName("svg");
+var t=(Math.ceil(r.length/6)+1)*this.thumbHeight,v=Graph.createSvgNode(0,0,456,t,"#ffffff"),u=new mxSvgCanvas2D(v);u.setFontFamily(mxConstants.DEFAULT_FONTFAMILY);u.setFontStyle(mxConstants.FONT_BOLD);u.setFontColor("rgb(80, 80, 80)");u.setFontSize(14);for(var w=k.childNodes,q=0;q<w.length;q++)if(w[q].nodeType==mxConstants.NODETYPE_TEXT){u.plainText(6,0,0,0,mxUtils.getTextContent(w[q]));break}for(q=0;q<r.length;q++)u=r[q].cloneNode(!0),u.removeAttribute("style"),u.setAttribute("width",this.thumbWidth),
+u.setAttribute("height",this.thumbHeight),u.setAttribute("x",12+68*mxUtils.mod(q,6)),u.setAttribute("y",24+68*Math.floor(q/6)),v.appendChild(u);this.editorUi.editor.convertImages(v,mxUtils.bind(this,function(y){var z=document.createElement("canvas");z.width=456;z.height=t;var A=document.createElement("img");A.onload=mxUtils.bind(this,function(){z.getContext("2d").drawImage(A,0,0);this.editorUi.saveCanvas(z,null,"png")});y=Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(v);A.src=Editor.createSvgDataUri(y)}))}else{if("none"==
+l.style.display){if(n)k.appendChild(p);else if(n=!0,null!=m){null!=p.parentNode&&p.parentNode.removeChild(p);k.style.cursor="wait";var x=k.innerHTML;k.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){m(l);k.style.cursor="";k.innerHTML=x;k.appendChild(p)},0)}else k.appendChild(p);k.style.backgroundImage="url('"+this.expandedImage+"')";l.style.display="block"}else k.style.backgroundImage="url('"+this.collapsedImage+"')",l.style.display="none",null!=p.parentNode&&p.parentNode.removeChild(p);
+mxEvent.consume(r)}}))});Sidebar.prototype.extractShapeStyle=function(k){if(null!=k&&"shape="==k.substring(0,6)){var l=k.indexOf(";");0>l&&(l=k.length);return k.substring(6,l)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(k,l,m){var n=b.apply(this,arguments);null!=this.shapetags&&(k=k.toLowerCase(),l=l.toLowerCase(),null!=this.shapetags[k]&&n.push(this.shapetags[k]),l=k+"."+l,null!=this.shapetags[l]&&n.push(this.shapetags[l]));return n};Sidebar.prototype.addTagIndex=
+function(k){k=k.split("\n");for(var l=0;l<k.length;l++)if(null!=k[l]){var m=k[l].split("\t");if(1<m.length){var n=m[0].toLowerCase().replace(" ","_");m=mxUtils.trim(m.slice(1,m.length).join(" ").toLowerCase());0<m.length&&(this.shapetags[n]=m)}}};Sidebar.prototype.showPopupMenuForEntry=function(k,l,m){if(null!=l&&0<l.length){var n=mxUtils.getOffset(k);this.editorUi.showPopupMenu(mxUtils.bind(this,function(p,r){p.addItem(mxResources.get("openLibrary"),null,mxUtils.bind(this,function(){for(var t=0;t<
+l.length;t++)mxUtils.bind(this,function(v){v=this.getConfigurationById(v.id);if(null!=v){this.showPalettes(v.prefix||"",v.libs||[v.id],!0);var u=this.showPalette(l[t].lib||l[t].id,!0);null!=u&&1<u.length&&null!=u[1].firstChild&&(null==u[1].firstChild.firstChild||"none"==u[1].firstChild.style.display)&&u[0].click();window.setTimeout(function(){u[1].scrollIntoView(!0)},0);mxEvent.consume(m)}})(l[t])}))}),n.x,n.y+k.offsetHeight,m)}};Sidebar.prototype.addSearchIndex=function(k){if(null!=k)for(var l=0;l<
+k.length;l++)if(null!=k[l].style){var m=k[l].style,n=this.extractShapeStyle(m);if(null!=n){var p=n.lastIndexOf(".");if(0<p){var r=n.substring(0,p);n=n.substring(p+1,n.length);p=this.getTagsForStencil(r,n,k[l].tags);if(null!=p){var t=m.indexOf(";");m="shape="+r+"."+n.toLowerCase()+";"+(0>t?"":m.substring(t+1));this.setCurrentSearchEntryLibrary(k[l].id,k[l].lib);this.createVertexTemplateEntry(m,parseInt(k[l].w),parseInt(k[l].h),"",n.replace(/_/g," "),null,null,this.filterTags(p.join(" ")));this.setCurrentSearchEntryLibrary()}}}}};
+Sidebar.prototype.initPalettes=function(){var k=GRAPH_IMAGE_PATH,l=STENCIL_PATH,m=this.signs,n=this.rack,p=this.pids,r=this.cisco,t=this.sysml;"1"==urlParams.createindex&&(this.createdSearchIndex=[]);this.addSearchPalette(!0);if(null!=this.customEntries)for(var v=0,u=0;u<this.customEntries.length;u++)for(var w=this.customEntries[u],q=0;q<w.entries.length;q++)for(var x=w.entries[q],y=0;y<x.libs.length;y++)mxUtils.bind(this,function(z){var A=null,D=null,G=null,F=null,L=mxUtils.bind(this,function(B,
+C){var E=document.createElement("span");E.style.paddingBottom="6px";E.style.paddingTop="6px";E.style.fontSize="11px";mxUtils.write(E,B);C.innerHTML='<img align="top" src="'+mxGraph.prototype.warningImage.src+'"/> ';C.appendChild(E)}),H=mxUtils.bind(this,function(){null!=G&&null!=F&&(null!=D?(G.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(z.title)),L(D,G)):null!=A?(this.editorUi.addLibraryEntries(A,G),G.style.display="block",F.innerText="",mxUtils.write(F,this.editorUi.getResource(z.title))):
+(G.style.display="none",F.innerText="",mxUtils.write(F,mxResources.get("loading")+"...")))});if(null==z.data&&null!=z.url&&!z.preload&&v>=this.maxPreloadCount)this.addPalette(x.id+"."+y,this.editorUi.getResource(z.title),!1,mxUtils.bind(this,function(B,C){var E=mxUtils.bind(this,function(I){this.setCurrentSearchEntryLibrary(x.id,x.id+"."+y);this.addEntries(I);this.setCurrentSearchEntryLibrary();this.editorUi.addLibraryEntries(I,B)});B.style.display="none";C.innerText="";mxUtils.write(C,mxResources.get("loading")+
+"...");var J=z.url;this.editorUi.editor.isCorsEnabledForUrl(J)||(J=PROXY_URL+"?url="+encodeURIComponent(J));this.editorUi.editor.loadUrl(J,mxUtils.bind(this,function(I){B.style.display="block";C.innerText="";mxUtils.write(C,this.editorUi.getResource(z.title));try{var M=mxUtils.parseXml(I);if("mxlibrary"==M.documentElement.nodeName){var N=JSON.parse(mxUtils.getTextContent(M.documentElement));E(N)}else L(mxResources.get("notALibraryFile"),B)}catch(O){L(mxResources.get("error")+": "+O.message,B)}}))}));
+else if(this.addPalette(x.id+"."+y,this.editorUi.getResource(z.title),!1,mxUtils.bind(this,function(B,C){G=B;F=C;H()})),null!=z.data)this.setCurrentSearchEntryLibrary(x.id,x.id+"."+y),this.addEntries(z.data),this.setCurrentSearchEntryLibrary(),A=z.data,H();else if(null!=z.url){v++;var K=z.url;this.editorUi.editor.isCorsEnabledForUrl(K)||(K=PROXY_URL+"?url="+encodeURIComponent(K));this.editorUi.editor.loadUrl(K,mxUtils.bind(this,function(B){try{var C=mxUtils.parseXml(B);"mxlibrary"==C.documentElement.nodeName?
+(A=JSON.parse(mxUtils.getTextContent(C.documentElement)),this.addEntries(A)):D=mxResources.get("notALibraryFile");H()}catch(E){D=mxResources.get("error")+": "+E.message,H()}}),mxUtils.bind(this,function(B){D=null!=B&&null!=B.message?B.message:B;H()}))}else D=mxResources.get("invalidInput"),H()})(x.libs[y]);this.addGeneralPalette(null==this.customEntries);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette();this.addStencilPalette("arrows",mxResources.get("arrows"),l+"/arrows.xml",
+";html=1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_STROKEWIDTH+"=2;strokeColor=#000000;",null,null,null,null,null,"arrows");this.addArrows2Palette();this.setCurrentSearchEntryLibrary("clipart","computer");this.addImagePalette("computer","Clipart / Computer",k+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "),
"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.setCurrentSearchEntryLibrary("clipart","finance");
-this.addImagePalette("finance","Clipart / Finance",h+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",h+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
-"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",h+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
+this.addImagePalette("finance","Clipart / Finance",k+"/lib/clip_art/finance/","_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.setCurrentSearchEntryLibrary("clipart","clipart");this.addImagePalette("clipart","Clipart / Various",k+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "),
+"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.setCurrentSearchEntryLibrary("clipart","networking");this.addImagePalette("networking","Clipart / Networking",k+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "),
"Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan",
-Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",h+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
-this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",h+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
-this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(p,k);this.addCisco19Palette();this.addCiscoSafePalette();
-this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(m,k);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(q,k);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
-this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(n,k);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(l,k);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(h,k,l,m,n,p,q,t,u,v){e.apply(this,arguments);q=null!=q?q:1;mxStencilRegistry.loadStencilSet(l,
-mxUtils.bind(this,function(w,r,y,x,z){if(null!=this.createdSearchIndex&&null==n||0>mxUtils.indexOf(n,r))w={style:"shape="+w+r+m,w:Math.round(x*q),h:Math.round(z*q)},r=null!=t?t[r]:null,null!=r&&(w.tags=r),null!=v&&(w.id=v,w.lib=h),this.createdSearchIndex.push(w)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(h,k){for(var l=0;l<h.icons.length;l++){for(var m=h.icons[l].raster_sizes,n=m.length-1;0<n&&128<m[n].size;)n--;var p=m[n].size;m=m[n].formats[0].preview_url;null!=p&&null!=m&&mxUtils.bind(this,
-function(q,t){k.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+t,q,q,"")}))})(p,m)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(h,k,l,m,n){var p=m;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(m=mxUtils.bind(this,
-function(q,t,u,v){!this.editorUi.isOffline()&&q.length<=k/4?(u=l-Math.ceil((t-k/4)/k),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(h)+"&p="+u+"&c="+k,mxUtils.bind(this,function(w){try{if(200<=w.getStatus()&&299>=w.getStatus()&&null!=w.getText()&&0<w.getText().length)try{var r=JSON.parse(w.getText());null==r||null==r.icons?(p(q,t,!1,v),this.editorUi.handleError(r)):(this.extractIconsFromResponse(r,q),p(q,(l-1)*k+q.length,r.icons.length==k,v))}catch(y){p(q,t,!1,v),this.editorUi.handleError(y)}else p(q,
-t,!1,v)}catch(y){p(q,t,!1,v),this.editorUi.handleError(y)}},function(){p(q,t,!1,v)}))):p(q,t,u||!this.editorUi.isOffline(),v)}));f.apply(this,arguments)};var g=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(h,k,l){var m=this.editorUi.editor.graph,n=!1;if(null!=h&&1==m.getSelectionCount()&&m.getModel().isVertex(h[0])){var p=m.cloneCell(h[0]);if(m.getModel().isEdge(m.getSelectionCell())&&null==m.getModel().getTerminal(m.getSelectionCell(),!1)&&m.getModel().isVertex(p)){m.getModel().beginUpdate();
-try{var q=m.view.getState(m.getSelectionCell());if(null!=q){var t=m.view.translate,u=m.view.scale,v=q.absolutePoints[q.absolutePoints.length-1];p.geometry.x=v.x/u-t.x-p.geometry.width/2;p.geometry.y=v.y/u-t.y-p.geometry.height/2}m.addCell(p);m.getModel().setTerminal(m.getSelectionCell(),p,!1);null!=l&&mxEvent.isShiftDown(l)||m.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}catch(w){this.editorUi.handleError(w)}finally{m.getModel().endUpdate()}m.scrollCellToVisible(p);m.setSelectionCell(p);
-n=!0}}n||g.apply(this,arguments)}})();(function(){Sidebar.prototype.addActiveDirectoryPalette=function(){this.setCurrentSearchEntryLibrary("active_directory");var a=[this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/active_directory.svg;",50,42.5,"","Active Directory",!1,null,this.getTagsForStencil("ms active directory ","active directory","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cd_dvd.svg;",
+Router:"router switch",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary("clipart","people");this.addImagePalette("people","Clipart / People",k+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Woman Nurse_Woman_Black Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" "));
+this.setCurrentSearchEntryLibrary("clipart","telco");this.addImagePalette("telco","Clipart / Telecommunication",k+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));this.setCurrentSearchEntryLibrary();this.addFlowchartPalette();this.addActiveDirectoryPalette();this.addAndroidPalette();this.addAtlassianPalette();
+this.addBootstrapPalette();this.addDFDPalette();this.addErPalette();this.addIos7Palette();this.addIosPalette();this.addKubernetesPalette();this.addMockupPalette();this.addSitemapPalette();this.addUml25Palette();this.addUmlPalette(!1);this.addAlliedTelesisPalette();this.addAWS3Palette();this.addAWS4bPalette();this.addAWS4Palette();this.addAWS3DPalette();this.addAzurePalette();this.addAzure2Palette();this.addMSCAEPalette();this.addC4Palette();this.addCiscoPalette(r,l);this.addCisco19Palette();this.addCiscoSafePalette();
+this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addGCPIconsPalette();this.addIBMPalette();this.addNetworkPalette();this.addOfficePalette();this.addRackPalette(n,l);this.addVeeamPalette();this.addVeeam2Palette();this.addVVDPalette();this.addArchimate3Palette();this.addArchiMatePalette();this.addBpmn2Palette();this.addSysMLPalette(t,l);this.addLeanMappingPalette();this.addCabinetsPalette();this.addInfographicPalette();this.addEipPalette();this.addElectricalPalette();this.addFloorplanPalette();
+this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(p,l);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(m,l);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(k,l,m,n,p,r,t,v,u,w){e.apply(this,arguments);t=null!=t?t:1;mxStencilRegistry.loadStencilSet(m,
+mxUtils.bind(this,function(q,x,y,z,A){if(null!=this.createdSearchIndex&&null==p||0>mxUtils.indexOf(p,x))q={style:"shape="+q+x+n,w:Math.round(z*t),h:Math.round(A*t)},x=null!=v?v[x]:null,null!=x&&(q.tags=x),null!=w&&(q.id=w,q.lib=k),this.createdSearchIndex.push(q)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(k,l){for(var m=0;m<k.icons.length;m++){for(var n=k.icons[m].raster_sizes,p=n.length-1;0<p&&128<n[p].size;)p--;var r=n[p].size;n=n[p].formats[0].preview_url;null!=r&&null!=n&&mxUtils.bind(this,
+function(t,v){l.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+v,t,t,"")}))})(r,n)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(k,l,m,n,p){var r=n;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(n=mxUtils.bind(this,
+function(t,v,u,w){!this.editorUi.isOffline()&&t.length<=l/4?(u=m-Math.ceil((v-l/4)/l),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(k)+"&p="+u+"&c="+l,mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()&&null!=q.getText()&&0<q.getText().length)try{var x=JSON.parse(q.getText());null==x||null==x.icons?(r(t,v,!1,w),this.editorUi.handleError(x)):(this.extractIconsFromResponse(x,t),r(t,(m-1)*l+t.length,x.icons.length==l,w))}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}else r(t,
+v,!1,w)}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}},function(){r(t,v,!1,w)}))):r(t,v,u||!this.editorUi.isOffline(),w)}));f.apply(this,arguments)};var g=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(k,l){if("sketch"==Editor.currentTheme||"min"==uiTheme){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.sketchPickerMenuElt,k)){var m=mxUtils.getOffset(this.editorUi.sketchPickerMenuElt);m.x+=this.editorUi.sketchPickerMenuElt.offsetWidth+
+4;m.y+=k.offsetTop-l.height/2+16;return m}var n=g.apply(this,arguments);m=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);n.x+=m.x-16;n.y+=m.y;return n}return g.apply(this,arguments)};var h=Sidebar.prototype.itemClicked;Sidebar.prototype.itemClicked=function(k,l,m){var n=this.editorUi.editor.graph,p=!1;if(null!=k&&1==n.getSelectionCount()&&n.getModel().isVertex(k[0])){var r=n.cloneCell(k[0]);if(n.getModel().isEdge(n.getSelectionCell())&&null==n.getModel().getTerminal(n.getSelectionCell(),
+!1)&&n.getModel().isVertex(r)){n.getModel().beginUpdate();try{var t=n.view.getState(n.getSelectionCell());if(null!=t){var v=n.view.translate,u=n.view.scale,w=t.absolutePoints[t.absolutePoints.length-1];r.geometry.x=w.x/u-v.x-r.geometry.width/2;r.geometry.y=w.y/u-v.y-r.geometry.height/2}n.addCell(r);n.getModel().setTerminal(n.getSelectionCell(),r,!1);null!=m&&mxEvent.isShiftDown(m)||n.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}catch(q){this.editorUi.handleError(q)}finally{n.getModel().endUpdate()}n.scrollCellToVisible(r);
+n.setSelectionCell(r);p=!0}}p||h.apply(this,arguments)}})();(function(){Sidebar.prototype.addActiveDirectoryPalette=function(){this.setCurrentSearchEntryLibrary("active_directory");var a=[this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/active_directory.svg;",50,42.5,"","Active Directory",!1,null,this.getTagsForStencil("ms active directory ","active directory","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cd_dvd.svg;",
50,50,"","CD / DVD",!1,null,this.getTagsForStencil("ms active directory ","cd dvd compact digital video disc","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cell_phone.svg;",21,50,"","Cell Phone",!1,null,this.getTagsForStencil("ms active directory ","cell phone","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/cluster_server.svg;",
50,50,"","Cluster Server",!1,null,this.getTagsForStencil("ms active directory ","active","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/community_discussion.svg;",50,45,"","Community Discussion",!1,null,this.getTagsForStencil("ms active directory ","community discussion","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/data_jack.svg;",
50*.55,50,"","Data Jack",!1,null,this.getTagsForStencil("ms active directory ","data jack","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/database.svg;",50,37,"","Database",!1,null,this.getTagsForStencil("ms active directory ","database","ibm").join(" ")),this.createVertexTemplateEntry("aspect=fixed;perimeter=ellipsePerimeter;html=1;align=center;shadow=0;dashed=0;spacingTop=3;image;image=img/lib/active_directory/database_cube.svg;",
@@ -5487,9 +5489,9 @@ b.vertex=!0;return a.createVertexTemplateFromCells([d,b],800,30,"Form grid")}),t
new mxGeometry(400,0,400,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");e.vertex=!0;var f=new mxCell("",new mxGeometry(405,30,395,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");f.vertex=!0;var g=new mxCell("Address",new mxGeometry(0,70,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");g.vertex=!0;var h=new mxCell("1234 Main St",
new mxGeometry(0,100,800,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");h.vertex=!0;var k=new mxCell("Address 2",new mxGeometry(0,140,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");k.vertex=!0;var l=new mxCell("Apartment, studio or floor",new mxGeometry(0,170,800,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
l.vertex=!0;var m=new mxCell("City",new mxGeometry(0,210,390,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");m.vertex=!0;var n=new mxCell("",new mxGeometry(0,240,390,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");n.vertex=!0;var p=new mxCell("State",new mxGeometry(410,210,220,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
-p.vertex=!0;var q=new mxCell("Choose...",new mxGeometry(410,240,270,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");q.vertex=!0;var t=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#212529;strokeColor=none;perimeter=none;");t.geometry.relative=!0;t.geometry.offset=new mxPoint(-17,-2.5);t.vertex=!0;q.insert(t);t=new mxCell("Zip",new mxGeometry(700,210,100,
-30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");t.vertex=!0;var u=new mxCell("",new mxGeometry(700,240,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");u.vertex=!0;var v=new mxCell("Check me out",new mxGeometry(0,290,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;checked=0;spacing=5;strokeColor=#999999;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;");
-v.vertex=!0;var w=new mxCell("Sign in",new mxGeometry(0,320,70,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;fontSize=14;fontColor=#FFFFFF;");w.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v,w],800,360,"Grid layout")}),this.addEntry("bootstrap horizontal form",function(){var d=new mxCell("Email",new mxGeometry(0,0,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
+p.vertex=!0;var r=new mxCell("Choose...",new mxGeometry(410,240,270,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");r.vertex=!0;var t=new mxCell("",new mxGeometry(1,.5,10,5),"shape=triangle;direction=south;fillColor=#212529;strokeColor=none;perimeter=none;");t.geometry.relative=!0;t.geometry.offset=new mxPoint(-17,-2.5);t.vertex=!0;r.insert(t);t=new mxCell("Zip",new mxGeometry(700,210,100,
+30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");t.vertex=!0;var v=new mxCell("",new mxGeometry(700,240,100,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");v.vertex=!0;var u=new mxCell("Check me out",new mxGeometry(0,290,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;checked=0;spacing=5;strokeColor=#999999;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;");
+u.vertex=!0;var w=new mxCell("Sign in",new mxGeometry(0,320,70,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;fontSize=14;fontColor=#FFFFFF;");w.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u,w],800,360,"Grid layout")}),this.addEntry("bootstrap horizontal form",function(){var d=new mxCell("Email",new mxGeometry(0,0,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(200,0,600,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");b.vertex=!0;var e=new mxCell("Password",new mxGeometry(0,40,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");e.vertex=!0;var f=new mxCell("",new mxGeometry(200,40,600,30),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
f.vertex=!0;var g=new mxCell("Radios",new mxGeometry(0,80,200,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;fontColor=#212529;");g.vertex=!0;var h=new mxCell("First radio",new mxGeometry(200,90,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#666666;checked=1;spacing=5;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");
h.vertex=!0;var k=new mxCell("Second radio",new mxGeometry(200,110,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#666666;checked=0;spacing=5;fontColor=#212529;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");k.vertex=!0;var l=new mxCell("Third disabled radio",new mxGeometry(200,130,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.radioButton2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#D2D2D2;checked=0;spacing=5;fontColor=#7D868C;checkedFill=#0085FC;checkedStroke=#ffffff;sketch=0;");
@@ -5512,8 +5514,8 @@ new mxGeometry(270,0,100,30),"fillColor=none;strokeColor=none;align=left;fontSiz
"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacingLeft=50;fontSize=14;fontColor=#6C767D;");h.vertex=!0;var k=new mxCell("@",new mxGeometry(0,0,40,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.leftButton;rSize=5;strokeColor=#CED4DA;fillColor=#f0f0f0;whiteSpace=wrap;resizeHeight=1;fontColor=#495057;");k.geometry.relative=!0;k.vertex=!0;h.insert(k);k=new mxCell("City",new mxGeometry(0,80,100,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(0,110,390,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");l.vertex=!0;var m=new mxCell("State",new mxGeometry(400,80,100,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");m.vertex=!0;var n=new mxCell("Choose...",new mxGeometry(400,110,200,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
n.vertex=!0;var p=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=south;fillColor=#343A40;strokeColor=none;perimeter=none;");p.geometry.relative=!0;p.geometry.offset=new mxPoint(-17,1);p.vertex=!0;n.insert(p);p=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=north;fillColor=#343A40;strokeColor=none;perimeter=none;");p.geometry.relative=!0;p.geometry.offset=new mxPoint(-17,-4);p.vertex=!0;n.insert(p);p=new mxCell("Zip",new mxGeometry(610,80,190,30),"fillColor=none;strokeColor=none;align=left;fontSize=14;");
-p.vertex=!0;var q=new mxCell("",new mxGeometry(610,110,190,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");q.vertex=!0;var t=new mxCell("Agree to term and conditions",new mxGeometry(0,170,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#A6A6A6;checked=0;spacing=5;checkedFill=#0085FC;checkedStroke=#ffffff;");
-t.vertex=!0;var u=new mxCell("Submit form",new mxGeometry(0,200,120,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;spacing=15;fontSize=14;fontColor=#ffffff;");u.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u],800,240,"Help text")}),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#ffffff;fontColor=#212529;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",
+p.vertex=!0;var r=new mxCell("",new mxGeometry(610,110,190,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");r.vertex=!0;var t=new mxCell("Agree to term and conditions",new mxGeometry(0,170,10,10),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.checkbox2;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;gradientColor=#DEDEDE;fillColor=#EDEDED;strokeColor=#A6A6A6;checked=0;spacing=5;checkedFill=#0085FC;checkedStroke=#ffffff;");
+t.vertex=!0;var v=new mxCell("Submit form",new mxGeometry(0,200,120,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#0085FC;strokeColor=none;align=center;spacing=15;fontSize=14;fontColor=#ffffff;");v.vertex=!0;return a.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v],800,240,"Help text")}),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#ffffff;fontColor=#212529;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",
20,10,"Toggle this switch element","Switch",null,null,this.getTagsForStencil("mxgraph.bootstrap","switch","bootstrap switch").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.switch;strokeColor=#ADB6BD;strokeWidth=1;fillColor=#E9ECEF;fontColor=#7D868C;onStrokeColor=#ffffff;onFillColor=#0085FC;align=left;verticalAlign=middle;spacingLeft=10;labelPosition=right;verticalLabelPosition=middle;buttonState=0;sketch=0;",20,10,"Disabled switch element","Switch",null,
null,this.getTagsForStencil("mxgraph.bootstrap","switch","bootstrap switch").join(" ")),this.addEntry("bootstrap select menu",function(){var d=new mxCell("Open this select menu",new mxGeometry(0,0,800,40),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=#ffffff;strokeColor=#CED4DA;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");d.vertex=!0;var b=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=south;fillColor=#343A40;strokeColor=none;perimeter=none;");
b.geometry.relative=!0;b.geometry.offset=new mxPoint(-17,1);b.vertex=!0;d.insert(b);b=new mxCell("",new mxGeometry(1,.5,7,3),"shape=triangle;direction=north;fillColor=#343A40;strokeColor=none;perimeter=none;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(-17,-4);b.vertex=!0;d.insert(b);return a.createVertexTemplateFromCells([d],800,40,"Select menu")}),this.addEntry("bootstrap form controls",function(){var d=new mxCell("",new mxGeometry(0,0,800,100),"html=1;shadow=0;dashed=0;shape=mxgraph.bootstrap.rrect;rSize=5;fillColor=none;strokeColor=#999999;align=left;spacing=15;fontSize=14;fontColor=#6C767D;");
@@ -6028,9 +6030,9 @@ this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=w
this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",20,350,"40x40","Panel Wiring System 40x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",30,350,"60x40","Panel Wiring System 60x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),
this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",40,350,"80x40","Panel Wiring System 80x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",50,350,"100x40","Panel Wiring System 100x40mm (Vertical)",null,null,this.getTagsForStencil("mxgraph.cabinets","","cabinet panel wiring system").join(" ")),
this.createVertexTemplateEntry(a+"cb_1p;",9,50,"","Circuit Breaker (1P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_1p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,9,50),a+"cb_1p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(9,0,9,50),a+"cb_1p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(18,0,9,50),a+"cb_1p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(27,0,9,50),a+"cb_1p;");h.vertex=!0;var k=new mxCell("",
-new mxGeometry(36,0,9,50),a+"cb_1p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(45,0,9,50),a+"cb_1p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(54,0,9,50),a+"cb_1p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(63,0,9,50),a+"cb_1p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(72,0,9,50),a+"cb_1p;");p.vertex=!0;var q=new mxCell("",new mxGeometry(81,0,9,50),a+"cb_1p;");q.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,q],90,50,"Circuit Breaker (1P x 10)")}),this.createVertexTemplateEntry(a+
+new mxGeometry(36,0,9,50),a+"cb_1p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(45,0,9,50),a+"cb_1p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(54,0,9,50),a+"cb_1p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(63,0,9,50),a+"cb_1p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(72,0,9,50),a+"cb_1p;");p.vertex=!0;var r=new mxCell("",new mxGeometry(81,0,9,50),a+"cb_1p;");r.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,r],90,50,"Circuit Breaker (1P x 10)")}),this.createVertexTemplateEntry(a+
"cb_2p;",18,50,"","Circuit Breaker (2P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_2p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,18,50),a+"cb_2p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(18,0,18,50),a+"cb_2p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(36,0,18,50),a+"cb_2p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(54,0,18,50),a+"cb_2p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(72,0,
-18,50),a+"cb_2p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(90,0,18,50),a+"cb_2p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(108,0,18,50),a+"cb_2p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(126,0,18,50),a+"cb_2p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(144,0,18,50),a+"cb_2p;");p.vertex=!0;var q=new mxCell("",new mxGeometry(162,0,18,50),a+"cb_2p;");q.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,q],180,50,"Circuit Breaker (2P x 10)")}),this.createVertexTemplateEntry(a+
+18,50),a+"cb_2p;");k.vertex=!0;var l=new mxCell("",new mxGeometry(90,0,18,50),a+"cb_2p;");l.vertex=!0;var m=new mxCell("",new mxGeometry(108,0,18,50),a+"cb_2p;");m.vertex=!0;var n=new mxCell("",new mxGeometry(126,0,18,50),a+"cb_2p;");n.vertex=!0;var p=new mxCell("",new mxGeometry(144,0,18,50),a+"cb_2p;");p.vertex=!0;var r=new mxCell("",new mxGeometry(162,0,18,50),a+"cb_2p;");r.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k,l,m,n,p,r],180,50,"Circuit Breaker (2P x 10)")}),this.createVertexTemplateEntry(a+
"cb_3p;",27,50,"","Circuit Breaker (3P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_3p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,27,50),a+"cb_3p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(27,0,27,50),a+"cb_3p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(54,0,27,50),a+"cb_3p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(81,0,27,50),a+"cb_3p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(108,
0,27,50),a+"cb_3p;");k.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k],135,50,"Circuit Breaker (3P x 5)")}),this.createVertexTemplateEntry(a+"cb_4p;",36,50,"","Circuit Breaker (4P)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_4p","cabinet ").join(" ")),this.addEntry("cabinet circuit breaker row",function(){var e=new mxCell("",new mxGeometry(0,0,36,50),a+"cb_4p;");e.vertex=!0;var f=new mxCell("",new mxGeometry(36,0,36,50),a+"cb_4p;");f.vertex=!0;var g=new mxCell("",new mxGeometry(72,
0,36,50),a+"cb_4p;");g.vertex=!0;var h=new mxCell("",new mxGeometry(108,0,36,50),a+"cb_4p;");h.vertex=!0;var k=new mxCell("",new mxGeometry(144,0,36,50),a+"cb_4p;");k.vertex=!0;return d.createVertexTemplateFromCells([e,f,g,h,k],180,50,"Circuit Breaker (4P x 5)")}),this.createVertexTemplateEntry(a+"cb_auxiliary_contact;",4.5,50,"","Auxiliary Contact (Circuit Breaker)",null,null,this.getTagsForStencil("mxgraph.cabinets","cb_auxiliary_contact","cabinet ").join(" ")),this.createVertexTemplateEntry(a+
@@ -6500,8 +6502,8 @@ this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=ce
150,90,"","Message Store",null,null,this.getTagsForStencil("mxgraph.eip","message_store","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.smart_proxy;fillColor=#c0f5a9",70,90,"","Smart Proxy",null,null,this.getTagsForStencil("mxgraph.eip","smart_proxy","eip enterprise integration pattern system management ").join(" ")),
this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.test_message;fillColor=#c0f5a9",150,90,"","Test Message",null,null,this.getTagsForStencil("mxgraph.eip","test_message","eip enterprise integration pattern system management ").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;outlineConnect=0;dashed=0;align=center;fontSize=8;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.eip.wire_tap;fillColor=#c0f5a9",
150,90,"","Wire Tap",null,null,this.getTagsForStencil("mxgraph.eip","wire_tap","eip enterprise integration pattern system management ").join(" "))])}})();(function(){Sidebar.prototype.addElectricalPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;shadow=0;dashed=0;align=center;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;"+mxConstants.STYLE_SHAPE,c=a+"=mxgraph.electrical.abstract.",d="pointerEvents=1;"+a+"=mxgraph.electrical.capacitors.",b="pointerEvents=1;fillColor=strokeColor;"+a+"=mxgraph.electrical.diodes.",e="pointerEvents=1;"+a+"=mxgraph.electrical.inductors.",f="pointerEvents=1;"+a+"=mxgraph.electrical.miscellaneous.",
-g="pointerEvents=1;"+a+"=mxgraph.electrical.electro-mechanical.",h=a+"=mxgraph.electrical.logic_gates.",k=a+"=mxgraph.electrical.mosfets1.",l=a+"=mxgraph.electrical.transistors.",m=a+"=mxgraph.electrical.opto_electronics.",n="pointerEvents=1;"+a+"=mxgraph.electrical.plc_ladder.",p=a+"=mxgraph.electrical.radio.",q="pointerEvents=1;"+a+"=mxgraph.electrical.resistors.",t="pointerEvents=1;"+a+"=mxgraph.electrical.signal_sources.",u=a+"=mxgraph.electrical.thermionic_devices.",v="pointerEvents=1;"+a+"=mxgraph.electrical.waveforms.",
-w="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",r=a+"=mxgraph.electrical.iec_logic_gates.",y=a+"=mxgraph.electrical.rot_mech.",x=a+"=mxgraph.electrical.transmission.";this.setCurrentSearchEntryLibrary("electrical","electricalLogicGates");this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(h+"logic_gate;operation=and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),
+g="pointerEvents=1;"+a+"=mxgraph.electrical.electro-mechanical.",h=a+"=mxgraph.electrical.logic_gates.",k=a+"=mxgraph.electrical.mosfets1.",l=a+"=mxgraph.electrical.transistors.",m=a+"=mxgraph.electrical.opto_electronics.",n="pointerEvents=1;"+a+"=mxgraph.electrical.plc_ladder.",p=a+"=mxgraph.electrical.radio.",r="pointerEvents=1;"+a+"=mxgraph.electrical.resistors.",t="pointerEvents=1;"+a+"=mxgraph.electrical.signal_sources.",v=a+"=mxgraph.electrical.thermionic_devices.",u="pointerEvents=1;"+a+"=mxgraph.electrical.waveforms.",
+w="perimeter=ellipsePerimeter;"+a+"=mxgraph.electrical.instruments.",q=a+"=mxgraph.electrical.iec_logic_gates.",x=a+"=mxgraph.electrical.rot_mech.",y=a+"=mxgraph.electrical.transmission.";this.setCurrentSearchEntryLibrary("electrical","electricalLogicGates");this.addPaletteFunctions("electricalLogicGates","Electrical / Logic Gates",!1,[this.createVertexTemplateEntry(h+"logic_gate;operation=and;",100,60,"","AND",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","and","electrical logic gate ").join(" ")),
this.createVertexTemplateEntry(h+"buffer2;",100,60,"","Buffer",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","buffer","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_flip-flop;",100,80,"","D Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_flip-flop_with_clear_2;",100,90,"","D Type Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
"d_type_flip-flop_with_clear","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"d_type_rs_flip-flop;",100,100,"","D Type RS Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","d_type_rs_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"inverter_2",100,60,"","Inverter",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverter","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"inverting_contact;",
10,10,"","Inverting Contact",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","inverting_contact","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"jk_flip-flop;",100,80,"","JK Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","jk_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"jk_flip-flop_with_clear_2;",100,90,"","JK Flip-Flop With Clear",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
@@ -6509,18 +6511,18 @@ this.createVertexTemplateEntry(h+"buffer2;",100,60,"","Buffer",null,null,this.ge
"logic_gate;operation=or;",100,60,"","OR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","or","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=or;negating=1;negSize=0.15;",100,60,"","NOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","nor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"rs_latch;",100,80,"","RS Latch",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","rs_latch",
"electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"synchronous_rs_latch;",100,80,"","RS Latch (Synchronous)",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","synchronous_rs_latch","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"schmitt_trigger;",100,60,"","Schmitt Trigger",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","schmitt_trigger","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"t_type_flip-flop;",
100,80,"","T Type Flip-Flop",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","t_type_flip-flop","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=xor;",100,60,"","XOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","xor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(h+"logic_gate;operation=xor;negating=1;negSize=0.15;",100,60,"","XNOR",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates",
-"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(r+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"nand_2;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
-"or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"nor_2;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"not_2;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(r+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"xnor","electrical logic gate ").join(" ")),this.createVertexTemplateEntry(q+"and;",60,80,"","AND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","and","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"nand_2;",66,80,"","NAND (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nand","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"or;",60,80,"","OR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
+"or","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"nor_2;",66,80,"","NOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","nor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"not_2;",66,80,"","NOT (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates","xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry(q+"xor;",60,80,"","XOR (IEC)",null,null,this.getTagsForStencil("mxgraph.electrical.iec_logic_gates",
"xor","electrical iec logic gate ").join(" ")),this.createVertexTemplateEntry("shadow=0;dashed=0;align=center;html=1;strokeWidth=1;shape=mxgraph.electrical.logic_gates.dual_inline_ic;labelNames=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;",100,200,"IC","Dual In-Line IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","dual inline in line ic integrated circuit","electrical logic gate ").join(" ")),this.createVertexTemplateEntry("shadow=0;dashed=0;align=center;html=1;strokeWidth=1;shape=mxgraph.electrical.logic_gates.qfp_ic;labelNames=a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1;",
-200,200,"IC","Quad Flat Package IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","quad flat package qfp ic integrated circuit","electrical logic gate ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalResistors");this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(q+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"potentiometer_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_resistor_1;",
-100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"variable_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"variable_resistor_2;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","variable_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor_with_instrument_or_relay_shunt;",100,20,"","Resistor (Instrument/Relay Shunt)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_with_instrument_or_relay_shunt","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"attenuator;",100,60,"","Attenuator",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","attenuator","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor,_adjustable_contact;",100,40,"","Resistor (Adjustable Contact)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_adjustable_contact","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"resistor,_shunt;",100,45,"","Resistor (Shunt)",null,
-null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_shunt","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"symmetrical_varistor;",100,60,"","Varistor (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_varistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"tapped_resistor;",100,40,"","Resistor (Tapped)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","tapped_resistor","electrical resistor ").join(" ")),
-this.createVertexTemplateEntry(q+"nonlinear_resistor;",100,60,"","Resistor (Nonlinear)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","nonlinear_resistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"memristor_1;",100,20,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","memristor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"memristor_2;",100,24,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
-"memristor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"magnetoresistor;",100,60,"","Magnetoresistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","magnetoresistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(q+"symmetrical_photoconductive_transducer;",100,40,"","Photoconductive Transducer (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_photoconductive_transducer","electrical resistor ").join(" "))]);
+200,200,"IC","Quad Flat Package IC",null,null,this.getTagsForStencil("mxgraph.electrical.logic_gates","quad flat package qfp ic integrated circuit","electrical logic gate ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalResistors");this.addPaletteFunctions("electricalResistors","Electrical / Resistors",!1,[this.createVertexTemplateEntry(r+"resistor_1;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_1","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"resistor_2;",100,20,"","Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"potentiometer_1;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","potentiometer_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"potentiometer_2;",100,40,"","Potentiometer",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"potentiometer_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_pot_1;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_pot_2;",100,40,"","Potentiometer (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_pot_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_resistor_1;",
+100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"trimmer_resistor_2;",100,65.5,"","Resistor (Trimmer)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","trimmer_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"variable_resistor_1;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"variable_resistor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"variable_resistor_2;",100,60,"","Resistor (Variable)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","variable_resistor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor_with_instrument_or_relay_shunt;",100,20,"","Resistor (Instrument/Relay Shunt)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor_with_instrument_or_relay_shunt","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"attenuator;",100,60,"","Attenuator",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","attenuator","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor,_adjustable_contact;",100,40,"","Resistor (Adjustable Contact)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_adjustable_contact","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"resistor,_shunt;",100,45,"","Resistor (Shunt)",null,
+null,this.getTagsForStencil("mxgraph.electrical.resistors","resistor,_shunt","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"symmetrical_varistor;",100,60,"","Varistor (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_varistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"tapped_resistor;",100,40,"","Resistor (Tapped)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","tapped_resistor","electrical resistor ").join(" ")),
+this.createVertexTemplateEntry(r+"nonlinear_resistor;",100,60,"","Resistor (Nonlinear)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","nonlinear_resistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"memristor_1;",100,20,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","memristor_1","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"memristor_2;",100,24,"","Memristor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors",
+"memristor_2","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"magnetoresistor;",100,60,"","Magnetoresistor",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","magnetoresistor","electrical resistor ").join(" ")),this.createVertexTemplateEntry(r+"symmetrical_photoconductive_transducer;",100,40,"","Photoconductive Transducer (Symmetrical)",null,null,this.getTagsForStencil("mxgraph.electrical.resistors","symmetrical_photoconductive_transducer","electrical resistor ").join(" "))]);
this.setCurrentSearchEntryLibrary("electrical","electricalCapacitors");this.addPaletteFunctions("electricalCapacitors","Electrical / Capacitors",!1,[this.createVertexTemplateEntry(d+"capacitor_1;",100,60,"","Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_1","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_2;",100,60,"","Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_2","electrical capacitor ").join(" ")),
this.createVertexTemplateEntry(d+"capacitor_3;",100,60,"","Electrolytic Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_3","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_4;",100,60,"","Capacitor (UK)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_4","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_5;",100,60,"","Electrolytic Capacitor (US)",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors",
"capacitor_5","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"capacitor_6;",100,60,"","Capacitor",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","capacitor_6","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"differential_capacitor;",100,80,"","Differential Capacitor",null,null,this.getTagsForStencil("mxgraph.electrical.capacitors","differential_capacitor","electrical capacitor ").join(" ")),this.createVertexTemplateEntry(d+"trimmer_capacitor_1;",
@@ -6661,33 +6663,33 @@ this.createVertexTemplateEntry(m+"9_segment_display;pointerEvents=1;",74.7,96.1,
"light-activated_scr","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-coupler;",99,60,"","Opto-coupler",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-coupler","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"opto-transistor;",100,110,"","Opto-transistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","opto-transistor","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photodiode;pointerEvents=1;",
100,70,"","Photodiode",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photodiode","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_1;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_1","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_2;pointerEvents=1;",100,50,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics",
"photo_resistor_2","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"photo_resistor_3;",100,90,"","Photo Resistor",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","photo_resistor_3","electrical optical ").join(" ")),this.createVertexTemplateEntry(m+"solar_cell;pointerEvents=1;",100,70,"","Solar Cell",null,null,this.getTagsForStencil("mxgraph.electrical.opto_electronics","solar_cell","electrical optical ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical",
-"electricalVacuumTubes");this.addPaletteFunctions("electricalVacuumTubes","Electrical / Vacuum Tubes",!1,[this.createVertexTemplateEntry(u+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),
-this.createVertexTemplateEntry(u+"triode;",70,77,"","Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"tetrode;",70,77,"","Tetrode",null,
-null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(u+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell",
-"electrical thermionic thermo device vacuum tube ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalWaveforms");this.addPaletteFunctions("electricalWaveforms","Electrical / Waveforms",!1,[this.createVertexTemplateEntry(v+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
-"pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"slow_square_wave;",90,80,"","Chopped Square Wave",
-null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"square_wave;",90,80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(v+
+"electricalVacuumTubes");this.addPaletteFunctions("electricalVacuumTubes","Electrical / Vacuum Tubes",!1,[this.createVertexTemplateEntry(v+"diode;",70,77,"","Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","diode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"double_diode;",70,77,"","Double Diode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_diode","electrical thermionic thermo device vacuum tube ").join(" ")),
+this.createVertexTemplateEntry(v+"triode;",70,77,"","Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"double_triode;",70,77,"","Double Triode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","double_triode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"tetrode;",70,77,"","Tetrode",null,
+null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","tetrode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"pentode;",70,77,"","Pentode",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","pentode","electrical thermionic thermo device vacuum tube ").join(" ")),this.createVertexTemplateEntry(v+"photocell;",70,87,"","Photocell",null,null,this.getTagsForStencil("mxgraph.electrical.thermionic_devices","photocell",
+"electrical thermionic thermo device vacuum tube ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalWaveforms");this.addPaletteFunctions("electricalWaveforms","Electrical / Waveforms",!1,[this.createVertexTemplateEntry(u+"pulse_1;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","pulse_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"pulse_2;",90,90,"","Pulse",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms",
+"pulse_2","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sawtooth;",90,40,"","Sawtooth",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sawtooth","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"sine_wave;",90,66.18,"","Sine Wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","sine_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"slow_square_wave;",90,80,"","Chopped Square Wave",
+null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","slow_square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"square_wave;",90,80,"","square_wave",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","square_wave","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+"step_1;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_1","electrical waveform signal ").join(" ")),this.createVertexTemplateEntry(u+
"step_2;",90,90,"","Step",null,null,this.getTagsForStencil("mxgraph.electrical.waveforms","step_2","electrical waveform signal ").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalRotMech");this.addPaletteFunctions("electricalRotMech","Electrical / Rotating Equipment & Mechanical Functions",!1,[this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=32;perimeter=ellipsePerimeter;",
-100,100,"M","Rotating Machine",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotating machine","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"armature;pointerEvents=1;",100,100,"","Armature",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","armature","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"field;pointerEvents=1;",90,15,"","Field",null,null,
-this.getTagsForStencil("mxgraph.electrical.rot_mech","field","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(f+"permanent_magnet;pointerEvents=1;",20,70,"","Permanent Magnet",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","permanent magnet","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"winding_connection;",100,100,"","Winding Connection",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"winding connection","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"synchro;",80,100,"","Synchro",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","synchro","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=trapezoid;perimeter=none;",75,25,"","Brake",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"brake","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"gearing;pointerEvents=1;",100,64,"","Gearing",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","gearing","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=strokeColor;html=1;verticalAlign=top;strokeWidth=1;shape=mxgraph.electrical.rot_mech.rotation;",
-69,54,"","Rotation",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotation","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"clutch;pointerEvents=1;",100,20,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"clutch_2;pointerEvents=1;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"delayed_action;pointerEvents=1;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"manual_control;pointerEvents=1;",50,50,"","Manual Control",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"blocking_device;pointerEvents=1;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"latching_device;pointerEvents=1;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","latching device",
-"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"mechanical_interlock;pointerEvents=1;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"automatic_return;pointerEvents=1;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
-"automatic_return","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(y+"detent;pointerEvents=1;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalTransmission");var z=[this.createVertexTemplateEntry(x+"bus_width;pointerEvents=1;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"cable_group;pointerEvents=1;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
-10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"terminal_3_phase;pointerEvents=1;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
-130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"anticreepage_device;pointerEvents=1;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeWidth=1;endSize=20;",
-100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(x+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1",
+100,100,"M","Rotating Machine",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotating machine","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"armature;pointerEvents=1;",100,100,"","Armature",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","armature","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"field;pointerEvents=1;",90,15,"","Field",null,null,
+this.getTagsForStencil("mxgraph.electrical.rot_mech","field","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(f+"permanent_magnet;pointerEvents=1;",20,70,"","Permanent Magnet",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","permanent magnet","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"winding_connection;",100,100,"","Winding Connection",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"winding connection","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"synchro;",80,100,"","Synchro",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","synchro","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=trapezoid;perimeter=none;",75,25,"","Brake",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"brake","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"gearing;pointerEvents=1;",100,64,"","Gearing",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","gearing","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;fillColor=strokeColor;html=1;verticalAlign=top;strokeWidth=1;shape=mxgraph.electrical.rot_mech.rotation;",
+69,54,"","Rotation",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","rotation","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"clutch;pointerEvents=1;",100,20,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"clutch_2;pointerEvents=1;",90,60,"","Clutch",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"clutch","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"delayed_action;pointerEvents=1;",72,50,"","Delayed Action",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","delayed action","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"manual_control;pointerEvents=1;",50,50,"","Manual Control",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","manual control",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"blocking_device;pointerEvents=1;",100,15,"","Blocking Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","blocking device","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"latching_device;pointerEvents=1;",100,22,"","Latching Device",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","latching device",
+"electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"mechanical_interlock;pointerEvents=1;",100,30,"","Mechanical Interlock",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","mechanical interlock","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"automatic_return;pointerEvents=1;",100,12,"","Automatic Return",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech",
+"automatic_return","electrical rotating equipment mechanical function functions").join(" ")),this.createVertexTemplateEntry(x+"detent;pointerEvents=1;",100,8,"","Detent",null,null,this.getTagsForStencil("mxgraph.electrical.rot_mech","detent","electrical rotating equipment mechanical function functions").join(" "))]);this.setCurrentSearchEntryLibrary("electrical","electricalTransmission");var z=[this.createVertexTemplateEntry(y+"bus_width;pointerEvents=1;",130,156,"","Bus Width",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"bus width","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"line_concentrator;",130,130,"","Line Concentrator",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line concentrator","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"cable_group;pointerEvents=1;",130,130,"","Cable Group",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","cable group","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(y+"overground_enclosure;",130,136,"","Overground Enclosure",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","overground enclosure","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"optical_fiber;",130,80,"","Optical Fiber",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","optical fiber","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;",
+10,10,"","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"terminal_3_phase;pointerEvents=1;",43,10,"","Terminal 3 Phase",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","Terminal 3 Phase","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("verticalLabelPosition=middle;shadow=0;dashed=0;align=center;html=1;verticalAlign=middle;strokeWidth=1;shape=ellipse;fontSize=50;fontStyle=1;perimeter=ellipsePerimeter;",
+130,130,"T","Terminal",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","terminal","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"line_cable;",130,60,"","Line/Cable",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","line cable","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"anticreepage_device;pointerEvents=1;",130,88,"","Anticreepage Device",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"anticreepage device","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"testPoint;",60,130,"","Test Point",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","test point","electrical transmission paths bus buses").join(" ")),this.createEdgeTemplateEntry("endArrow=none;html=1;strokeWidth=1;",100,0,"","Transmission Path",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","transmission path").join(" ")),this.createEdgeTemplateEntry("endArrow=classicThin;html=1;strokeWidth=1;endSize=20;",
+100,0,"","Direction of Flow",null,this.getTagsForStencil("mxgraph.electrical.signal_sources","","direction flow").join(" ")),this.createVertexTemplateEntry(y+"straightBus;",90,130,"","Straight Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","straight bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1",
130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry("html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;strokeWidth=1;flipH=1;",130,130,"","Elbow Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","elbow bus","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
-"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
-this.createVertexTemplateEntry(x+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(x+
-"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(B){for(var D=0;D<z.length;D++)B.appendChild(z[D](B))}));this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addErPalette=function(){function a(e,f,g){e=new mxCell("",new mxGeometry(0,0,0,0),e);e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;null!=f&&(f=new mxCell(f,new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=bottom;"),f.geometry.relative=!0,f.setConnectable(!1),f.vertex=!0,e.insert(f));null!=g&&(g=new mxCell(g,new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=bottom;"),
+this.createVertexTemplateEntry(y+"2_line_bus;",130,25,"","2-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"3_line_bus;",130,30,"","3-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"4_line_bus;",130,75,"","4-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission",
+"3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"8_line_bus;",130,180,"","8-Line Bus",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 three line bus","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"twoLineBusElbow;notch=25;",120,120,"","2-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","2 two line bus elbow","electrical transmission paths bus buses").join(" ")),
+this.createVertexTemplateEntry(y+"threeLineBusElbow;notch=30;",120,120,"","3-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","3 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+"fourLineBusElbow;notch=75;",120,120,"","4-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","4 two line bus elbow","electrical transmission paths bus buses").join(" ")),this.createVertexTemplateEntry(y+
+"eightLineBusElbow;notch=180;",200,200,"","8-Line Bus Elbow",null,null,this.getTagsForStencil("mxgraph.electrical.transmission","8 two line bus elbow","electrical transmission paths bus buses").join(" "))];this.addPalette("electricalTransmission","Electrical / Transmission Paths",!1,mxUtils.bind(this,function(A){for(var D=0;D<z.length;D++)A.appendChild(z[D](A))}));this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addErPalette=function(){function a(e,f,g){e=new mxCell("",new mxGeometry(0,0,0,0),e);e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;null!=f&&(f=new mxCell(f,new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=bottom;"),f.geometry.relative=!0,f.setConnectable(!1),f.vertex=!0,e.insert(f));null!=g&&(g=new mxCell(g,new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=bottom;"),
g.geometry.relative=!0,g.setConnectable(!1),g.vertex=!0,e.insert(g));return e}var c=this,d=new mxCell("Item",new mxGeometry(0,0,40,30),"text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;");d.vertex=!0;this.setCurrentSearchEntryLibrary("er");var b=[this.addDataEntry("db database schema er entity relation table ",180,160,"Table 1","7Zhhb5swEIZ/DV8nwCNrvkK2blomTW33A9z4ApYcmxlnSfrrd8am2UJYUy1AW0Uiku98vuDnxa8EAclW22tNy+KbYiAC8jEgmVbKuNFqm4EQQRxyFpBZEMch/oL4U8dsVM+GJdUgzSkLYrfgFxVrcJk7ei/AZSuzEz5bFbS0Q1PPkrQyVJtb/mBzJMTEQklDuQSNiaiOhaBlxetylym4YHO6U2vTNGqidMm3wG7UpvK1Wm3m2MyGtvkSm9/6m7HTVPBc4niBu7T/mGqo8F7mtDK+wm8LtIFtJ5o65blcg1qB0Tss2XBmCl9x5fCFBfC8aJZNfJJWLpE/rt2TxoGHfRw8aYH/N3OEg9sqlOYPlrTwZP7UoY43fCWohM9A2UEqVWzX8ORCZEooK5ZUElp62SKmVXlHdQ7GJ0rFpam3nKR4IYQsfJcECd5rhnG0j/Gy5dpkSlZG43NhewDKswErUWpU6ZsKWDb9tUdsx/fKGLV6jpjxcTF3HreX7CltyRmkfd+S9vvXTnFxC4ZTcQMLQ2UunBRS2nAvxRG9jhJ8pHaI8/AAKYS5FPaRmhWcMZCnUiZPHhnSE9WkRfWH5D/X8GU2MtvGjFxtWpV0wWU+dysnB/CTHuBvux/xpCcxJhf3Osm9wvO412RA9/pwurTDnC9gvOn3X9Y1Gc26rlpI7XmIw+ilO9e5WY/gVNOLUw3pVNMBnSoK36pVTUezqijq8Kqx0fbnVR2wR/CqqP02fjGrHs0qiod0q2e88b8ut4o6KA9hV+13bWdX5M3aVRft/v0Kw/2HyXrur++WvwE="),
this.addDataEntry("db database schema er entity relation table ",180,160,"Table 2","7ZjbbqMwEIafhtsVhybb3EK3rdSstGr7Am48AUuOjYy7gT79jrFpDoSW1RbYVpGI5BmPJ/j74U/Ai5JNeaNInv2UFLgX/fCiREmp7WhTJsC5F/qMetGVF4Y+frzwumM2qGf9nCgQus+C0C74Tfgz2MwjeeJgs4WuuMsWGcnNUNezUVxoovQDezG5yMfESgpNmACFiaCOOSd5wepym8kYp0tSyWfdNGqieM1KoPdyW7haJbdLbGZC03yNzR/cyZhpwlkqcLzCXZpvjBUUeC5LUmhX4bYFSkPZiaZOOS43IDegVYUlW0Z15iouLT4/A5ZmzbK5S5LCJtLXtTvSOHCwT4OPWuDfZo5wcFuZVOzFkOaOzL4OdbxlG04E3AKhR6lY0qrhyThPJJdGLCEFtPQyRVTJ/JGoFLRL5JIJXW95FuOBEBL/28yb4bkmGAe7GA9TrnQiRaEVXhemB6A8WzASxVrmrimHddNfOcRm/CS1lhsX9BIzPC1m5XA7yd7TNvoAaS9a0v66QzbXd0GnxLgRzQi/h5UmIuVWECFMuBPkhGonOR6w24d6fBtJRLrm5sK6yhilIPqyjt69ceYDsZ212JobI/SnRts4kq2Ni5ysmEiXduX8iP1sAPblIff96zwcSIv52cJ6WVjv36O3LeyUtENZ2PcuC+uW+JNZ2HwyC7vssLCp0Y5nYR3sJ7CwxdnCxvwXthjRwgK/v7bj3GBAWdPvn6xrMZl1BUGHd0X/u3d9NOwJvCpoP6ufzWpAs3oVchS3+ov3AZ/LrYIOymPYVftJ3NrVxZe1qy7aw/sVhrvXlvXcwVvNPw=="),
this.addDataEntry("db database schema er entity relation table ",180,30,"Table Row 1","xZXBbqMwEIafhuuKQKn2DN22h/TS7gtM4wlYNR5kTwvp0+8Ym02TTbWp1KoSSJ7f42H8/QaysumnGwdDd0cKTVb+ysrGEXEc9VODxmRFrlVWXmVFkcudFdfvzK7m2XwAh5bPWVDEBS9gnjEqUfC8M0nwHQxhyPAYpNozOH7Qr0HLJd6QZdAWncSrOTYGBq/n7Kh02qg17OiZlzpLVG/1hOqeRp9yHY1rKeZT8a0Uf0i9hBiMbq2MN7K/8MTaoZdW1uA5FfDs6AkbMhQasmRxfooxR9Jhm6F2QoGOcXoX5ywlljdIPbLbScqoFXcp42dEnneo2y4tK5MGPsbt36V7c2SQ/DntVflBr4Sq7Kojp1+DRSZt89g/P+regMVbBHUk1aR2ixHnEFSOht/gWuQkDKQtz1uuarkEQpP/qLJKem0kXu1juUK644asWCgHKtRA8XXE4G3NNKSiBrdLfZcIh/EjMVP/ES+L7/Py4nwvpWPWYO5xw2BbE8lbG8I9+RP2nAR2AOktPVR6qRfeIhJ0WxMO0FWnlUJ7LtPyv0zLL0Ja/YM0vADfS3X5XMXc2g+w0bZdx5WXX8B5OuT59ihXn8Ndwv3vaZ47+Hv9AQ=="),
@@ -6752,9 +6754,9 @@ new mxGeometry(50,0,40,43),a+"office_chair;shadow=0;");b.vertex=!0;var e=new mxC
new mxGeometry(0,50,43,40),a+"office_chair;shadow=0;direction=north;");f.vertex=!0;var g=new mxCell("",new mxGeometry(277,50,43,40),a+"office_chair;shadow=0;direction=south");g.vertex=!0;var h=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;shadow=0;");h.vertex=!0;var k=new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,
97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,d],320,140,"Large office table")}),this.addEntry("floorplan office table conference large huge",function(){var d=new mxCell("",new mxGeometry(20,20,520,100),"shape=ellipse;shadow=0;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(50,0,40,43),a+"office_chair;shadow=0;");b.vertex=!0;var e=new mxCell("",new mxGeometry(50,97,40,43),a+"office_chair;shadow=0;direction=west;");e.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,43,40),a+"office_chair;shadow=0;direction=north;");f.vertex=!0;var g=new mxCell("",new mxGeometry(517,50,43,40),a+"office_chair;shadow=0;direction=south");g.vertex=!0;var h=new mxCell("",new mxGeometry(110,0,40,43),a+"office_chair;shadow=0;");h.vertex=!0;var k=
-new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;var q=new mxCell("",
-new mxGeometry(290,0,40,43),a+"office_chair;shadow=0;");q.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;shadow=0;direction=west;");t.vertex=!0;var u=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;shadow=0;");u.vertex=!0;var v=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;shadow=0;direction=west;");v.vertex=!0;var w=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;shadow=0;");w.vertex=!0;var r=new mxCell("",new mxGeometry(410,97,40,43),
-a+"office_chair;shadow=0;direction=west;");r.vertex=!0;var y=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;shadow=0;");y.vertex=!0;var x=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;shadow=0;direction=west;");x.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,q,t,u,v,w,r,y,x,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(d){for(var b=0;b<c.length;b++)d.appendChild(c[b](d))}));
+new mxCell("",new mxGeometry(110,97,40,43),a+"office_chair;shadow=0;direction=west;");k.vertex=!0;var l=new mxCell("",new mxGeometry(170,0,40,43),a+"office_chair;shadow=0;");l.vertex=!0;var m=new mxCell("",new mxGeometry(170,97,40,43),a+"office_chair;shadow=0;direction=west;");m.vertex=!0;var n=new mxCell("",new mxGeometry(230,0,40,43),a+"office_chair;shadow=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(230,97,40,43),a+"office_chair;shadow=0;direction=west;");p.vertex=!0;var r=new mxCell("",
+new mxGeometry(290,0,40,43),a+"office_chair;shadow=0;");r.vertex=!0;var t=new mxCell("",new mxGeometry(290,97,40,43),a+"office_chair;shadow=0;direction=west;");t.vertex=!0;var v=new mxCell("",new mxGeometry(350,0,40,43),a+"office_chair;shadow=0;");v.vertex=!0;var u=new mxCell("",new mxGeometry(350,97,40,43),a+"office_chair;shadow=0;direction=west;");u.vertex=!0;var w=new mxCell("",new mxGeometry(410,0,40,43),a+"office_chair;shadow=0;");w.vertex=!0;var q=new mxCell("",new mxGeometry(410,97,40,43),
+a+"office_chair;shadow=0;direction=west;");q.vertex=!0;var x=new mxCell("",new mxGeometry(470,0,40,43),a+"office_chair;shadow=0;");x.vertex=!0;var y=new mxCell("",new mxGeometry(470,97,40,43),a+"office_chair;shadow=0;direction=west;");y.vertex=!0;return sb.createVertexTemplateFromCells([b,e,f,g,h,k,l,m,n,p,r,t,v,u,w,q,x,y,d],560,140,"Conference table")})];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,function(d){for(var b=0;b<c.length;b++)d.appendChild(c[b](d))}));
this.setCurrentSearchEntryLibrary()}})();(function(){Sidebar.prototype.addFlowchartPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;shape=mxgraph.flowchart.",c=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;html=1;shape=";this.setCurrentSearchEntryLibrary("flowchart");this.addPaletteFunctions("flowchart",mxResources.get("flowchart"),!1,[this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_1;align=left;pointerEvents=1;",
50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_1","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;",50,100,"","Annotation",null,null,this.getTagsForStencil("mxgraph.flowchart","annotation_2","").join(" ")),this.createVertexTemplateEntry(c+"card;whiteSpace=wrap;size=20;arcSize=12;",100,60,"","Card",null,null,this.getTagsForStencil("mxgraph.flowchart","card",
"").join(" ")),this.createVertexTemplateEntry(a+"collate;",100,100,"","Collate",null,null,this.getTagsForStencil("mxgraph.flowchart","collate","").join(" ")),this.createVertexTemplateEntry("shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0.23;",100,60,"","Data",null,null,this.getTagsForStencil("mxgraph.flowchart","data","").join(" ")),this.createVertexTemplateEntry("strokeWidth=2;html=1;shape=mxgraph.flowchart.database;whiteSpace=wrap;",
@@ -7716,14 +7718,14 @@ mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",k=a.replace("\n"," ");k=k.replace("- ",
l.insert(m);return g.createVertexTemplateFromCells([l],d,b,k)}))};Sidebar.prototype.addGCP2ExpandedProductCardSet=function(a,c,d,b,e){var f=this,g="sketch=0;dashed=0;connectable=0;html=1;fillColor=#5184F3;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",h=a.replace("\n"," ");h=h.replace("- ","-");e.push(this.addEntry(b,function(){var k=new mxCell("",new mxGeometry(0,0,d,70),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");k.vertex=!0;var l=new mxCell('<font color="#000000">Name</font><br>'+
h+'<hr><font style="font-size: 11px">Attribute Name</font>',new mxGeometry(0,0,44,39),g+c+";part=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=top;spacingLeft=5;fontColor=#999999;fontSize=12;spacingTop=-8;");l.geometry.relative=!0;l.geometry.offset=new mxPoint(5,7);l.vertex=!0;k.insert(l);return f.createVertexTemplateFromCells([k],k.geometry.width,k.geometry.height,h)}));e.push(this.addEntry(b,function(){var k=new mxCell("",new mxGeometry(0,0,d+8,78),"shape=mxgraph.gcp2.doubleRect;strokeColor=#dddddd;shadow=1;strokeWidth=1;");
k.vertex=!0;var l=new mxCell('<font color="#000000">Name</font><br>'+h+'<hr><font style="font-size: 11px">Attribute Name</font>',new mxGeometry(0,0,44,39),g+c+";part=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=top;spacingLeft=5;fontColor=#999999;fontSize=12;spacingTop=-8;");l.geometry.relative=!0;l.geometry.offset=new mxPoint(5,7);l.vertex=!0;k.insert(l);return f.createVertexTemplateFromCells([k],k.geometry.width,k.geometry.height,h)}))};Sidebar.prototype.addGCP2ExpandedMachineCard=
-function(a,c,d,b,e,f,g,h,k,l,m,n,p,q){var t=this,u="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",v=a.replace("\n"," ");v=v.replace("- ","-");q.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var r=new mxCell('<font color="#000000">'+v+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");
-r.geometry.relative=!0;r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,25*d,25*b),u+c+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+g+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(35,55);r.vertex=!0;w.insert(r);r=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
-r.geometry.relative=!0;r.geometry.offset=new mxPoint(24,69);r.vertex=!0;w.insert(r);r=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(50,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,18),u+k+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(75,56);r.vertex=!0;w.insert(r);r=new mxCell(l,new mxGeometry(0,0,18,
-18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(88,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+m+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(115,55);r.vertex=!0;w.insert(r);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,v)}));q.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,
-0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var r=new mxCell('<font color="#000000">'+v+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;connectable=0;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");r.geometry.relative=!0;r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,25*d,25*b),u+c+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));
-r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,20),u+g+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(35,55);r.vertex=!0;w.insert(r);r=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(24,69);r.vertex=!0;w.insert(r);r=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
-r.geometry.relative=!0;r.geometry.offset=new mxPoint(50,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,0,20,18),u+k+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(75,56);r.vertex=!0;w.insert(r);r=new mxCell("123",new mxGeometry(0,0,25,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(81,69);r.vertex=!0;w.insert(r);r=new mxCell("",new mxGeometry(0,
-0,20,20),u+m+";part=1;");r.geometry.relative=!0;r.geometry.offset=new mxPoint(115,55);r.vertex=!0;w.insert(r);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,v)}))};Sidebar.prototype.addGCP2UserDeviceCard=function(a,c,d,b,e,f,g){var h=this,k="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",l=a.replace("\n"," ");l=l.replace("- ","-");g.push(this.addEntry(f,function(){var m=new mxCell(a,new mxGeometry(0,
+function(a,c,d,b,e,f,g,h,k,l,m,n,p,r){var t=this,v="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",u=a.replace("\n"," ");u=u.replace("- ","-");r.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var q=new mxCell('<font color="#000000">'+u+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");
+q.geometry.relative=!0;q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,25*d,25*b),v+c+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+g+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(35,55);q.vertex=!0;w.insert(q);q=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
+q.geometry.relative=!0;q.geometry.offset=new mxPoint(24,69);q.vertex=!0;w.insert(q);q=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(50,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,18),v+k+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(75,56);q.vertex=!0;w.insert(q);q=new mxCell(l,new mxGeometry(0,0,18,
+18),"sketch=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(88,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+m+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(115,55);q.vertex=!0;w.insert(q);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,u)}));r.push(this.addEntry(p,function(){var w=new mxCell("",new mxGeometry(0,
+0,n,95),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;");w.vertex=!0;var q=new mxCell('<font color="#000000">'+u+"</font><hr>"+e,new mxGeometry(0,0,n,50),"text;connectable=0;part=1;html=1;align=left;verticalAlign=top;spacingLeft=35;fontColor=#999999;fontSize=11;resizeWidth=1;");q.geometry.relative=!0;q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,25*d,25*b),v+c+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(4+12.5*(1-d),6+12.5*(1-b));
+q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,20),v+g+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(35,55);q.vertex=!0;w.insert(q);q=new mxCell(f,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(24,69);q.vertex=!0;w.insert(q);q=new mxCell(h,new mxGeometry(0,0,18,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");
+q.geometry.relative=!0;q.geometry.offset=new mxPoint(50,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,0,20,18),v+k+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(75,56);q.vertex=!0;w.insert(q);q=new mxCell("123",new mxGeometry(0,0,25,18),"sketch=0;connectable=0;rounded=1;arcSize=50;part=1;fillColor=#3B8CF0;strokeColor=none;html=1;fontColor=#ffffff;spacingTop=-2;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(81,69);q.vertex=!0;w.insert(q);q=new mxCell("",new mxGeometry(0,
+0,20,20),v+m+";part=1;");q.geometry.relative=!0;q.geometry.offset=new mxPoint(115,55);q.vertex=!0;w.insert(q);return t.createVertexTemplateFromCells([w],w.geometry.width,w.geometry.height,u)}))};Sidebar.prototype.addGCP2UserDeviceCard=function(a,c,d,b,e,f,g){var h=this,k="sketch=0;dashed=0;connectable=0;html=1;fillColor=#757575;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.",l=a.replace("\n"," ");l=l.replace("- ","-");g.push(this.addEntry(f,function(){var m=new mxCell(a,new mxGeometry(0,
0,70,85+e),"strokeColor=#dddddd;shadow=1;strokeWidth=1;rounded=1;absoluteArcSize=1;arcSize=2;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=bottom;spacingLeft=0;fontColor=#999999;fontSize=12;whiteSpace=wrap;spacingBottom=2;");m.vertex=!0;var n=new mxCell("",new mxGeometry(.5,0,50*d,50*b),k+c+";part=1;");n.geometry.relative=!0;n.geometry.offset=new mxPoint(25*-d,10+25*(1-b));n.vertex=!0;m.insert(n);return h.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,
l)}))}})();(function(){Sidebar.prototype.addGCPIconsPalette=function(){this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsAI and Machine Learning");this.addGCPIconsAIandMachineLearningPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsAPI Management");this.addGCPIconsAPIManagementPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsCompute");this.addGCPIconsComputePalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsData Analytics");this.addGCPIconsDataAnalyticsPalette();
this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsDatabases");this.addGCPIconsDatabasesPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsDeveloper Tools");this.addGCPIconsDeveloperToolsPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsExpanded Product Card Icons");this.addGCPIconsExpandedProductCardIconsPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsGeneric");this.addGCPIconsGenericPalette();this.setCurrentSearchEntryLibrary("gcpicons","gcpiconsHybrid and Multi Cloud");
@@ -8244,13 +8246,13 @@ e.vertex=!0;var f=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- cons
g.vertex=!0;var h=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(200,40,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");h.vertex=!0;var k=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
new mxGeometry(200,170,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");k.vertex=!0;var l=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(200,300,190,120),"shape=rect;fillColor=#FCE7CD;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
l.vertex=!0;var m=new mxCell("LABEL",new mxGeometry(400,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#AE4132;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");m.vertex=!0;var n=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,40,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-n.vertex=!0;var p=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,170,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");p.vertex=!0;var q=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(400,300,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");q.vertex=!0;var t=new mxCell("LABEL",new mxGeometry(600,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");t.vertex=!0;var u=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(600,40,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");u.vertex=!0;var v=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,170,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-v.vertex=!0;var w=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,300,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");w.vertex=!0;var r=new mxCell("LABEL",new mxGeometry(800,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#12AAB5;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");
-r.vertex=!0;var y=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,40,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");y.vertex=!0;var x=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
-new mxGeometry(800,170,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");x.vertex=!0;var z=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,300,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
-z.vertex=!0;return sb.createVertexTemplateFromCells([d,g,m,t,r,b,e,f,h,k,l,n,p,q,u,v,w,y,x,z],1E3,420,"Chevron list")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(0,0,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#10739E;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+n.vertex=!0;var p=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(400,170,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");p.vertex=!0;var r=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(400,300,190,120),"shape=rect;fillColor=#FAD9D5;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");r.vertex=!0;var t=new mxCell("LABEL",new mxGeometry(600,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");t.vertex=!0;var v=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(600,40,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");v.vertex=!0;var u=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,170,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
+u.vertex=!0;var w=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(600,300,190,120),"shape=rect;fillColor=#BAC8D3;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");w.vertex=!0;var q=new mxCell("LABEL",new mxGeometry(800,0,200,30),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#12AAB5;strokeColor=none;fontSize=17;fontColor=#FFFFFF;fontStyle=1;align=center;rounded=0;");
+q.vertex=!0;var x=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,40,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");x.vertex=!0;var y=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",
+new mxGeometry(800,170,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");y.vertex=!0;var z=new mxCell("&nbsp;- Lorem ipsum dolor sit amet<br>&nbsp;- consectetur adipisicing elit<br>&nbsp;- sed do eiusmod tempor<br>&nbsp;- incididunt ut labore et dolore<br>&nbsp;- magna aliqua.",new mxGeometry(800,300,190,120),"shape=rect;fillColor=#B0E3E6;strokeColor=none;fontSize=12;html=1;whiteSpace=wrap;align=left;verticalAlign=top;spacing=5;rounded=0;");
+z.vertex=!0;return sb.createVertexTemplateFromCells([d,g,m,t,q,b,e,f,h,k,l,n,p,r,v,u,w,x,y,z],1E3,420,"Chevron list")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(0,0,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#10739E;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,0,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");b.vertex=!0;var e=new mxCell("",new mxGeometry(0,80,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#F2931E;strokeColor=none;rounded=0;");e.vertex=!0;var f=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,80,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,160,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#AE4132;strokeColor=none;rounded=0;");g.vertex=!0;var h=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
new mxGeometry(100,160,200,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,240,70,80),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;direction=south;fillColor=#23445D;strokeColor=none;rounded=0;");k.vertex=!0;var l=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
@@ -8265,17 +8267,17 @@ this.addEntry("list",function(){var d=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
90,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.25;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;");b.vertex=!0;var e=new mxCell("",new mxGeometry(210,90,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0.75;arcWidth=0.25;fillColor=#AE4132;strokeColor=none;");e.vertex=!0;var f=new mxCell("",new mxGeometry(315,90,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.25;arcWidth=0.25;fillColor=#23445D;strokeColor=none;");f.vertex=!0;var g=new mxCell("",new mxGeometry(420,90,120,120),
c+"partConcEllipse;startAngle=0.25;endAngle=0.75;arcWidth=0.25;fillColor=#15AA96;strokeColor=none;");g.vertex=!0;var h=new mxCell("1",new mxGeometry(35,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#10739E;fontSize=15;html=0;fontStyle=1;fontColor=#10739E;");h.vertex=!0;var k=new mxCell("2",new mxGeometry(140,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#F2931E;fontSize=15;html=0;fontStyle=1;fontColor=#F2931E;");k.vertex=!0;var l=new mxCell("3",new mxGeometry(245,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#AE4132;fontSize=15;html=0;fontStyle=1;fontColor=#AE4132;");
l.vertex=!0;var m=new mxCell("4",new mxGeometry(350,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#23445D;fontSize=15;html=0;fontStyle=1;fontColor=#23445D;");m.vertex=!0;var n=new mxCell("5",new mxGeometry(455,125,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#12AAB5;fontSize=15;html=0;fontStyle=1;fontColor=#12AAB5;");n.vertex=!0;var p=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(0,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");p.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(105,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-q.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(210,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");t.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(315,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");u.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(420,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],540,300,"Roadmap (horizontal)")}),this.addEntry("roadmap diagonal",function(){var d=new mxCell("",new mxGeometry(190,0,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#10739E;strokeColor=none;shadow=0;");d.vertex=!0;var b=new mxCell("",new mxGeometry(190,105,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;shadow=0;");b.vertex=
+new mxGeometry(0,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");p.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(105,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+r.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(210,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");t.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(315,0,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");v.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(420,220,120,80),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],540,300,"Roadmap (horizontal)")}),this.addEntry("roadmap diagonal",function(){var d=new mxCell("",new mxGeometry(190,0,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#10739E;strokeColor=none;shadow=0;");d.vertex=!0;var b=new mxCell("",new mxGeometry(190,105,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#F2931E;strokeColor=none;shadow=0;");b.vertex=
!0;var e=new mxCell("",new mxGeometry(295,105,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#AE4132;strokeColor=none;shadow=0;");e.vertex=!0;var f=new mxCell("",new mxGeometry(295,210,120,120),c+"partConcEllipse;startAngle=0.25;endAngle=0;arcWidth=0.25;fillColor=#23445D;strokeColor=none;shadow=0;");f.vertex=!0;var g=new mxCell("",new mxGeometry(400,210,120,120),c+"partConcEllipse;startAngle=0.75;endAngle=0.5;arcWidth=0.25;fillColor=#12AAB5;strokeColor=none;shadow=0;");
g.vertex=!0;var h=new mxCell("1",new mxGeometry(225,35,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#10739E;fontSize=15;html=1;fontStyle=1;fontColor=#10739E;shadow=1;");h.vertex=!0;var k=new mxCell("2",new mxGeometry(225,140,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#F2931E;fontSize=15;html=1;fontStyle=1;fontColor=#F2931E;shadow=1;");k.vertex=!0;var l=new mxCell("3",new mxGeometry(330,140,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#AE4132;fontSize=15;html=1;fontStyle=1;fontColor=#AE4132;shadow=1;");
l.vertex=!0;var m=new mxCell("4",new mxGeometry(330,245,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#23445D;fontSize=15;html=1;fontStyle=1;fontColor=#23445D;shadow=1;");m.vertex=!0;var n=new mxCell("5",new mxGeometry(435,245,50,50),"shape=ellipse;strokeWidth=6;strokeColor=#12AAB5;fontSize=15;html=1;fontStyle=1;fontColor=#12AAB5;shadow=1;");n.vertex=!0;var p=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(320,20,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");p.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
-q.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(425,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");t.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(105,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");u.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(530,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],710,330,"Roadmap (diagonal)")}),this.addEntry("arrow list",function(){var d=new mxCell("1",new mxGeometry(0,0,40,40),"html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(45,0,95,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#64BBE2;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
+new mxGeometry(320,20,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");p.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
+r.vertex=!0;var t=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(425,130,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");t.vertex=!0;var v=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(105,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");v.vertex=!0;var u=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(530,235,180,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=3;shadow=0;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],710,330,"Roadmap (diagonal)")}),this.addEntry("arrow list",function(){var d=new mxCell("1",new mxGeometry(0,0,40,40),"html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(45,0,95,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#64BBE2;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
b.vertex=!0;var e=new mxCell("2",new mxGeometry(0,45,40,40),"html=1;fillColor=#F2931E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");e.vertex=!0;var f=new mxCell("Label",new mxGeometry(45,45,115,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F8C382;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");f.vertex=!0;var g=new mxCell("3",new mxGeometry(0,90,40,40),"html=1;fillColor=#AE4132;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(45,90,135,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F08E81;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");h.vertex=!0;var k=new mxCell("4",new mxGeometry(0,135,40,40),"html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(45,135,155,40),
"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#5D7F99;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");l.vertex=!0;var m=new mxCell("5",new mxGeometry(0,180,40,40),"html=1;fillColor=#12AAB5;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(45,180,175,40),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#61C6CE;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
@@ -8300,9 +8302,9 @@ d.vertex=!0;var b=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicin
e.vertex=!0;var f=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(35,140,100,100),"html=1;fillColor=#444444;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");f.vertex=!0;var g=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(140,140,100,100),"html=1;fillColor=#777777;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
g.vertex=!0;var h=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(245,140,100,100),"html=1;fillColor=#909090;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");h.vertex=!0;var k=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(35,245,100,100),"html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
k.vertex=!0;var l=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(140,245,100,100),"html=1;fillColor=#2F5B7C;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");l.vertex=!0;var m=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit",new mxGeometry(245,245,100,100),"html=1;fillColor=#5D7F99;strokeColor=none;shadow=0;fontSize=12;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;rounded=0;");
-m.vertex=!0;var n=new mxCell("Label",new mxGeometry(0,35,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(0,140,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(0,245,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");
-q.vertex=!0;var t=new mxCell("Label",new mxGeometry(35,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");t.vertex=!0;var u=new mxCell("Label",new mxGeometry(140,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(245,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],345,345,"Matrix (3x3)")}),this.addEntry("hex loop",function(){var d=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(0,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#F5AB50;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");d.vertex=!0;var b=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",
+m.vertex=!0;var n=new mxCell("Label",new mxGeometry(0,35,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(0,140,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(0,245,30,100),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;horizontal=0;rounded=0;");
+r.vertex=!0;var t=new mxCell("Label",new mxGeometry(35,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");t.vertex=!0;var v=new mxCell("Label",new mxGeometry(140,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(245,0,100,30),"html=1;fillColor=#CCCCCC;strokeColor=none;shadow=0;fontSize=14;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;rounded=0;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],345,345,"Matrix (3x3)")}),this.addEntry("hex loop",function(){var d=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(0,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#F5AB50;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");d.vertex=!0;var b=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",
new mxGeometry(0,153,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#E85642;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");b.vertex=!0;var e=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,102,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#12AAB5;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
e.vertex=!0;var f=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,0,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#1699D3;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");f.vertex=!0;var g=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(168,51,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#736CA8;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
g.vertex=!0;var h=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(168,153,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#2F5B7C;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");h.vertex=!0;var k=new mxCell("Lorem ipsum<br> dolor sit amet, consectetur adipisicing elit",new mxGeometry(84,204,112,102),"shape=hexagon;strokeWidth=4;html=1;fillColor=#777777;strokeColor=#ffffff;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;rounded=0;");
@@ -8325,13 +8327,13 @@ new mxGeometry(150,0,50,50),"triangle;direction=north;strokeWidth=4;html=1;fillC
d.vertex=!0;var b=new mxCell("",new mxGeometry(70,10,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#B1DDF0;strokeColor=none;");b.vertex=!0;var e=new mxCell("",new mxGeometry(70,10,90,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#10739E;strokeColor=none;shadow=0;");e.vertex=!0;var f=new mxCell("75%",new mxGeometry(0,50,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
f.vertex=!0;var g=new mxCell("",new mxGeometry(70,60,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#FCE7CD;strokeColor=none;");g.vertex=!0;var h=new mxCell("",new mxGeometry(70,60,225,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#F2931E;strokeColor=none;shadow=0;");h.vertex=!0;var k=new mxCell("90%",new mxGeometry(0,100,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(70,110,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#FAD9D5;strokeColor=none;");l.vertex=!0;var m=new mxCell("",new mxGeometry(70,110,270,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#AE4132;strokeColor=none;shadow=0;");m.vertex=!0;var n=new mxCell("25%",new mxGeometry(0,150,60,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#4A5768;strokeColor=none;fontSize=16;fontColor=#ffffff;fontStyle=1;rounded=0;");
-n.vertex=!0;var p=new mxCell("",new mxGeometry(70,160,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#BAC8D3;strokeColor=none;");p.vertex=!0;var q=new mxCell("",new mxGeometry(70,160,75,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;shadow=0;");q.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q],370,190,"Percentage list")}),this.addEntry("percent percentage list",function(){var d=new mxCell("",new mxGeometry(0,0,400,40),
+n.vertex=!0;var p=new mxCell("",new mxGeometry(70,160,300,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#BAC8D3;strokeColor=none;");p.vertex=!0;var r=new mxCell("",new mxGeometry(70,160,75,20),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#23445D;strokeColor=none;shadow=0;");r.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r],370,190,"Percentage list")}),this.addEntry("percent percentage list",function(){var d=new mxCell("",new mxGeometry(0,0,400,40),
"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");d.vertex=!0;var b=new mxCell("65%",new mxGeometry(0,0,260,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#10739E;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");b.vertex=!0;var e=new mxCell("Label",new mxGeometry(320,0,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(0,50,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");f.vertex=!0;var g=new mxCell("45%",new mxGeometry(0,50,180,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F2931E;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");g.vertex=!0;var h=new mxCell("Label",new mxGeometry(320,50,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
h.vertex=!0;var k=new mxCell("",new mxGeometry(0,100,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");k.vertex=!0;var l=new mxCell("30%",new mxGeometry(0,100,120,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#AE4132;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(320,100,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-m.vertex=!0;var n=new mxCell("",new mxGeometry(0,150,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");n.vertex=!0;var p=new mxCell("60%",new mxGeometry(0,150,240,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(320,150,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-q.vertex=!0;var t=new mxCell("",new mxGeometry(0,200,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");t.vertex=!0;var u=new mxCell("85%",new mxGeometry(0,200,340,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#12AAB5;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(320,200,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
-v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,f,g,k,l,n,p,t,u,e,h,m,q,v],400,250,"Percentage list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,260,260),c+"partConcEllipse;fillColor=#10739E;strokeColor=#ffffff;startAngle=0.75;endAngle=0.08;arcWidth=0.16;strokeWidth=3;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,20,220,220),c+"partConcEllipse;fillColor=#F2931E;strokeColor=#ffffff;startAngle=0.91;endAngle=0.17;arcWidth=0.18;strokeWidth=3;");b.vertex=
+m.vertex=!0;var n=new mxCell("",new mxGeometry(0,150,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");n.vertex=!0;var p=new mxCell("60%",new mxGeometry(0,150,240,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(320,150,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
+r.vertex=!0;var t=new mxCell("",new mxGeometry(0,200,400,40),"whiteSpace=wrap;html=1;fixedSize=1;size=10;fillColor=#dddddd;strokeColor=none;rounded=0;");t.vertex=!0;var v=new mxCell("85%",new mxGeometry(0,200,340,40),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#12AAB5;strokeColor=none;align=left;verticalAlign=middle;fontColor=#ffffff;fontSize=18;spacingLeft=10;fontStyle=1;shadow=0;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(320,200,80,40),"text;html=1;strokeColor=none;fillColor=none;align=right;verticalAlign=middle;whiteSpace=wrap;rounded=0;shadow=0;fontSize=18;spacingRight=10;");
+u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,f,g,k,l,n,p,t,v,e,h,m,r,u],400,250,"Percentage list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,260,260),c+"partConcEllipse;fillColor=#10739E;strokeColor=#ffffff;startAngle=0.75;endAngle=0.08;arcWidth=0.16;strokeWidth=3;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,20,220,220),c+"partConcEllipse;fillColor=#F2931E;strokeColor=#ffffff;startAngle=0.91;endAngle=0.17;arcWidth=0.18;strokeWidth=3;");b.vertex=
!0;var e=new mxCell("",new mxGeometry(40,40,180,180),c+"partConcEllipse;fillColor=#AE4132;strokeColor=#ffffff;startAngle=0.75;endAngle=0.11;arcWidth=0.22;strokeWidth=3;");e.vertex=!0;var f=new mxCell("",new mxGeometry(60,60,140,140),c+"partConcEllipse;fillColor=#12AAB5;strokeColor=#ffffff;startAngle=0.02;endAngle=0.25;arcWidth=0.29;strokeWidth=3;");f.vertex=!0;var g=new mxCell("",new mxGeometry(80,80,100,100),c+"partConcEllipse;fillColor=#CCCCCC;strokeColor=#ffffff;startAngle=0.75;endAngle=0.25;arcWidth=0.4;strokeWidth=3;");
g.vertex=!0;var h=new mxCell("2018",new mxGeometry(100,100,60,60),"html=1;shape=mxgraph.basic.pie;fillColor=#23445D;strokeColor=#ffffff;startAngle=0.75;endAngle=0.25;fontSize=16;fontColor=#FFFFFF;verticalAlign=top;fontStyle=1;strokeWidth=3;");h.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h],200,200,"Arc list")}),this.addEntry("arc list",function(){var d=new mxCell("",new mxGeometry(0,0,250,250),"ellipse;fillColor=none;strokeColor=#444444;");d.vertex=!0;var b=new mxCell("",new mxGeometry(20,
20,210,210),"ellipse;fillColor=none;strokeColor=#444444;");b.vertex=!0;var e=new mxCell("",new mxGeometry(40,40,170,170),"ellipse;fillColor=none;strokeColor=#444444;");e.vertex=!0;var f=new mxCell("",new mxGeometry(60,60,130,130),"ellipse;fillColor=none;strokeColor=#444444;");f.vertex=!0;var g=new mxCell("",new mxGeometry(80,80,90,90),"ellipse;fillColor=none;strokeColor=#444444;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,250,250),c+"arc;fillColor=none;strokeColor=#10739E;startAngle=0.75;endAngle=0.08;strokeWidth=16;");
@@ -8365,9 +8367,9 @@ b.vertex=!0;var e=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicin
f.vertex=!0;var g=new mxCell("40%",new mxGeometry(110,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.4;arcWidth=0.4;strokeColor=none;fillColor=#F2931E;fontSize=22;fontColor=#F2931E;align=center;fontStyle=1;");g.vertex=!0;var h=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(110,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
h.vertex=!0;var k=new mxCell("Label",new mxGeometry(220,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#AE4132;align=center;fontStyle=1;");k.vertex=!0;var l=new mxCell("25%",new mxGeometry(220,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.25;arcWidth=0.4;strokeColor=none;fillColor=#AE4132;fontSize=22;fontColor=#AE4132;align=center;fontStyle=1;");
l.vertex=!0;var m=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(220,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(330,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#23445D;align=center;fontStyle=1;");
-n.vertex=!0;var p=new mxCell("60%",new mxGeometry(330,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.6;arcWidth=0.4;strokeColor=none;fillColor=#23445D;fontSize=22;fontColor=#23445D;align=center;fontStyle=1;");p.vertex=!0;var q=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(330,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
-q.vertex=!0;var t=new mxCell("Label",new mxGeometry(440,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#12AAB5;align=center;fontStyle=1;");t.vertex=!0;var u=new mxCell("80%",new mxGeometry(440,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.8;arcWidth=0.4;strokeColor=none;fillColor=#12AAB5;fontSize=22;fontColor=#12AAB5;align=center;fontStyle=1;");
-u.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(440,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");v.vertex=!0;return sb.createVertexTemplateFromCells([b,g,l,p,u,d,f,k,n,t,e,h,m,q,v],540,260,"Circular Dial List (horizontal)")}),
+n.vertex=!0;var p=new mxCell("60%",new mxGeometry(330,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.6;arcWidth=0.4;strokeColor=none;fillColor=#23445D;fontSize=22;fontColor=#23445D;align=center;fontStyle=1;");p.vertex=!0;var r=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(330,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");
+r.vertex=!0;var t=new mxCell("Label",new mxGeometry(440,0,100,30),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=none;strokeColor=none;fontSize=15;fontColor=#12AAB5;align=center;fontStyle=1;");t.vertex=!0;var v=new mxCell("80%",new mxGeometry(440,30,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.8;arcWidth=0.4;strokeColor=none;fillColor=#12AAB5;fontSize=22;fontColor=#12AAB5;align=center;fontStyle=1;");
+v.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(440,140,100,120),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;fillColor=#EEEEEE;strokeColor=none;fontSize=10;align=left;fontStyle=0;rounded=1;whiteSpace=wrap;arcSize=8;spacing=5;");u.vertex=!0;return sb.createVertexTemplateFromCells([b,g,l,p,v,d,f,k,n,t,e,h,m,r,u],540,260,"Circular Dial List (horizontal)")}),
this.addEntry("circular dial list vertical",function(){var d=new mxCell("65%",new mxGeometry(0,0,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.65;arcWidth=0.4;strokeColor=none;fillColor=#10739E;fontSize=22;fontColor=#10739E;align=center;fontStyle=1;");d.vertex=!0;var b=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
new mxGeometry(110,0,210,100),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=left;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=8;");b.vertex=!0;var e=new mxCell("40%",new mxGeometry(0,110,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.4;arcWidth=0.4;strokeColor=none;fillColor=#F2931E;fontSize=22;fontColor=#F2931E;align=center;fontStyle=1;");e.vertex=!0;var f=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
new mxGeometry(110,110,210,100),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=left;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;spacing=8;");f.vertex=!0;var g=new mxCell("25%",new mxGeometry(0,220,100,100),"verticalLabelPosition=middle;verticalAlign=middle;html=1;html=1;shape=mxgraph.infographic.partConcEllipse;startAngle=0;endAngle=0.25;arcWidth=0.4;strokeColor=none;fillColor=#AE4132;fontSize=22;fontColor=#AE4132;align=center;fontStyle=1;");g.vertex=!0;var h=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font></font>',
@@ -8401,12 +8403,12 @@ new mxPoint(150,-20);f.insert(h);h=new mxCell('<b>Heading</b><br><font style="fo
h=new mxCell("",new mxGeometry(50,152,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");h.vertex=!0;var k=new mxCell("",new mxGeometry(0,240,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#AE4132;strokeColor=none;shadow=1;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(410,290,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");m.vertex=!0;m.geometry.relative=!0;m.geometry.offset=new mxPoint(150,-20);k.insert(m);m=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");m.vertex=!0;m.geometry.relative=!0;m.geometry.offset=new mxPoint(200,0);k.insert(m);m=new mxCell("",new mxGeometry(50,272,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");m.vertex=!0;var n=new mxCell("",new mxGeometry(0,360,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#23445D;strokeColor=none;shadow=1;");
-n.vertex=!0;var p=new mxCell("Label",new mxGeometry(410,410,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");p.vertex=!0;var q=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");q.vertex=!0;q.geometry.relative=!0;q.geometry.offset=
-new mxPoint(150,-20);n.insert(q);q=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");q.vertex=!0;q.geometry.relative=!0;q.geometry.offset=new mxPoint(200,0);n.insert(q);
-q=new mxCell("",new mxGeometry(50,392,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");q.vertex=!0;var t=new mxCell("",new mxGeometry(0,480,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#12AAB5;strokeColor=none;shadow=1;");t.vertex=!0;var u=new mxCell("Label",new mxGeometry(410,530,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
-u.vertex=!0;var v=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");v.vertex=!0;v.geometry.relative=!0;v.geometry.offset=new mxPoint(150,-20);t.insert(v);v=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
-100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");v.vertex=!0;v.geometry.relative=!0;v.geometry.offset=new mxPoint(200,0);t.insert(v);v=new mxCell("",new mxGeometry(50,512,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,
-u,v],550,590,"Ribbon List")}),this.addEntry("bar graph",function(){var d=new mxCell("Label",new mxGeometry(0,0,120,70),"html=1;shape=mxgraph.infographic.barCallout;dx=60;dy=30;fillColor=#10739E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");d.vertex=!0;var b=new mxCell("12",new mxGeometry(40,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#10739E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");b.vertex=
+n.vertex=!0;var p=new mxCell("Label",new mxGeometry(410,410,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");p.vertex=!0;var r=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");r.vertex=!0;r.geometry.relative=!0;r.geometry.offset=
+new mxPoint(150,-20);n.insert(r);r=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");r.vertex=!0;r.geometry.relative=!0;r.geometry.offset=new mxPoint(200,0);n.insert(r);
+r=new mxCell("",new mxGeometry(50,392,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");r.vertex=!0;var t=new mxCell("",new mxGeometry(0,480,500,100),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=20;notch2=0;fillColor=#12AAB5;strokeColor=none;shadow=1;");t.vertex=!0;var v=new mxCell("Label",new mxGeometry(410,530,100,60),"shape=manualInput;whiteSpace=wrap;html=1;shadow=1;strokeColor=none;fillColor=#dddddd;fontSize=15;fontColor=#444444;align=right;direction=south;flipH=1;shadow=1;spacing=10;fontStyle=1;");
+v.vertex=!0;var u=new mxCell("",new mxGeometry(0,.5,30,40),"shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;shadow=0;strokeColor=none;strokeWidth=6;fillColor=#CCCCCC;size=20;");u.vertex=!0;u.geometry.relative=!0;u.geometry.offset=new mxPoint(150,-20);t.insert(u);u=new mxCell('<b>Heading</b><br><font style="font-size: 11px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</font>',new mxGeometry(0,0,230,
+100),"text;strokeColor=none;fillColor=none;spacing=5;spacingTop=0;whiteSpace=wrap;overflow=hidden;rounded=0;shadow=0;fontSize=15;fontColor=#FFFFFF;align=left;html=1;");u.vertex=!0;u.geometry.relative=!0;u.geometry.offset=new mxPoint(200,0);t.insert(u);u=new mxCell("",new mxGeometry(50,512,50,37),"shadow=0;dashed=0;html=1;strokeColor=none;shape=mxgraph.mscae.intune.user_group;fontSize=15;fontColor=#FFFFFF;align=left;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,
+v,u],550,590,"Ribbon List")}),this.addEntry("bar graph",function(){var d=new mxCell("Label",new mxGeometry(0,0,120,70),"html=1;shape=mxgraph.infographic.barCallout;dx=60;dy=30;fillColor=#10739E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");d.vertex=!0;var b=new mxCell("12",new mxGeometry(40,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#10739E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");b.vertex=
!0;var e=new mxCell("Label",new mxGeometry(120,0,160,70),"html=1;shape=mxgraph.infographic.barCallout;dx=80;dy=30;fillColor=#F2931E;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");e.vertex=!0;var f=new mxCell("16",new mxGeometry(180,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#F2931E;strokeWidth=6;fontSize=16;align=center;fontStyle=1");f.vertex=!0;var g=new mxCell("Label",new mxGeometry(280,0,80,70),
"html=1;shape=mxgraph.infographic.barCallout;dx=40;dy=30;fillColor=#AE4132;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");g.vertex=!0;var h=new mxCell("8",new mxGeometry(300,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#AE4132;strokeWidth=6;fontSize=16;align=center;fontStyle=1");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(360,0,200,70),"html=1;shape=mxgraph.infographic.barCallout;dx=100;dy=30;fillColor=#23445D;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");
k.vertex=!0;var l=new mxCell("20",new mxGeometry(440,75,40,40),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=#23445D;strokeWidth=6;fontSize=16;align=center;fontStyle=1");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(560,0,140,70),"html=1;shape=mxgraph.infographic.barCallout;dx=70;dy=30;fillColor=#12AAB5;strokeColor=none;align=center;verticalAlign=top;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingTop=5;");m.vertex=!0;var n=new mxCell("14",new mxGeometry(610,75,
@@ -8420,16 +8422,16 @@ b,e,f],480,360,"Triangular Diagram")}),this.addEntry("roll",function(){var d=new
g.vertex=!0;var h=new mxCell("",new mxGeometry(125,125,150,150),"ellipse;html=1;strokeWidth=4;fillColor=#F8C382;strokeColor=none;shadow=0;fontSize=10;fontColor=#FFFFFF;align=center;fontStyle=0;whiteSpace=wrap;spacing=10;");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(150,150,100,100),"ellipse;html=1;strokeWidth=4;fillColor=#F5AB50;strokeColor=none;shadow=0;fontSize=20;fontColor=#FFFFFF;align=center;fontStyle=1;whiteSpace=wrap;spacing=10;");k.vertex=!0;var l=new mxCell("Label",new mxGeometry(200,
225,300,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F5AB50;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(200,250,340,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#F8C382;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");m.vertex=!0;var n=
new mxCell("Label",new mxGeometry(200,275,380,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#FCE7CD;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");n.vertex=!0;var p=new mxCell("Label",new mxGeometry(200,300,420,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#BAC8D3;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
-p.vertex=!0;var q=new mxCell("Label",new mxGeometry(200,325,460,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#5D7F99;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");q.vertex=!0;var t=new mxCell("Label",new mxGeometry(200,350,500,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#2F5B7C;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
-t.vertex=!0;var u=new mxCell("Label",new mxGeometry(200,375,540,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u],740,400,"Roll")}),this.addEntry("cylinder graph",function(){var d=new mxCell("",new mxGeometry(315,160,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#10739E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#10739E;");
+p.vertex=!0;var r=new mxCell("Label",new mxGeometry(200,325,460,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#5D7F99;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");r.vertex=!0;var t=new mxCell("Label",new mxGeometry(200,350,500,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#2F5B7C;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");
+t.vertex=!0;var v=new mxCell("Label",new mxGeometry(200,375,540,25),"html=1;shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=20;fillColor=#23445D;strokeColor=none;align=right;verticalAlign=middle;fontColor=#ffffff;fontSize=14;fontStyle=1;shadow=0;spacingRight=25;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v],740,400,"Roll")}),this.addEntry("cylinder graph",function(){var d=new mxCell("",new mxGeometry(315,160,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#10739E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#10739E;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(315,180,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#F2931E;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#F2931E;");b.vertex=!0;var e=new mxCell("",new mxGeometry(315,200,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#AE4132;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#AE4132;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(315,220,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#23445D;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#23445D;");f.vertex=!0;var g=new mxCell("",new mxGeometry(315,240,100,25),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.cylinder;fillColor=#12AAB5;strokeColor=none;shadow=0;align=left;labelPosition=right;spacingLeft=10;fontStyle=1;fontColor=#12AAB5;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(175,0,130,160),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#10739E;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");h.vertex=!0;var k=new mxCell("Label",new mxGeometry(175,80,130,110),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#F2931E;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");
k.vertex=!0;var l=new mxCell("Label",new mxGeometry(175,160,130,50),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=NW;callStyle=line;fontSize=17;fontColor=#AE4132;align=left;verticalAlign=top;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");l.vertex=!0;var m=new mxCell("Label",new mxGeometry(175,230,130,50),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=SW;callStyle=line;fontSize=17;fontColor=#23445D;align=left;verticalAlign=bottom;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");
m.vertex=!0;var n=new mxCell("Label",new mxGeometry(175,250,130,120),"strokeWidth=1;shadow=0;dashed=0;align=center;html=1;shape=mxgraph.mockup.text.callout;linkText=;textSize=17;textColor=#666666;callDir=SW;callStyle=line;fontSize=17;fontColor=#12AAB5;align=left;verticalAlign=bottom;strokeColor=#666666;fillColor=#4D9900;flipV=0;fontStyle=1;");n.vertex=!0;var p=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,30,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");p.vertex=!0;var q=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,110,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");q.vertex=!0;var t=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,190,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");t.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,290,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");u.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
-new mxGeometry(0,380,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");v.vertex=!0;return sb.createVertexTemplateFromCells([g,f,e,b,d,h,k,l,m,n,p,q,t,u,v],415,430,"Cylinder Graph")}),this.addEntry("swirl",function(){var d=new mxCell("",new mxGeometry(0,0,300,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#10739E;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
+new mxGeometry(0,30,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");p.vertex=!0;var r=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,110,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");r.vertex=!0;var t=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
+new mxGeometry(0,190,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");t.vertex=!0;var v=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",new mxGeometry(0,290,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");v.vertex=!0;var u=new mxCell("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
+new mxGeometry(0,380,240,50),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=12;align=right;html=1;");u.vertex=!0;return sb.createVertexTemplateFromCells([g,f,e,b,d,h,k,l,m,n,p,r,t,v,u],415,430,"Cylinder Graph")}),this.addEntry("swirl",function(){var d=new mxCell("",new mxGeometry(0,0,300,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#10739E;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
d.vertex=!0;var b=new mxCell("",new mxGeometry(0,79,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#F2931E;fontSize=12;fontColor=#3333FF;flipV=1;strokeWidth=4;");b.vertex=!0;var e=new mxCell("",new mxGeometry(70,158,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#AE4132;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
e.vertex=!0;var f=new mxCell("",new mxGeometry(0,237,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#23445D;fontSize=12;fontColor=#3333FF;flipV=1;strokeWidth=4;");f.vertex=!0;var g=new mxCell("",new mxGeometry(70,316,230,140),"html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.uTurnArrow;dy=22;arrowHead=70;dx2=35;strokeColor=#ffffff;fillColor=#12AAB5;fontSize=12;fontColor=#3333FF;flipH=1;flipV=1;strokeWidth=4;");
g.vertex=!0;var h=new mxCell('<b style="font-size: 7px">LABEL</b><br style="font-size: 7px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',new mxGeometry(50,0,150,40),"rounded=0;whiteSpace=wrap;shadow=0;strokeColor=none;strokeWidth=6;fillColor=none;fontSize=7;fontColor=#FFFFFF;align=left;html=1;spacingLeft=5;");h.vertex=!0;var k=new mxCell('<b style="font-size: 7px">LABEL</b><br style="font-size: 7px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
@@ -8440,20 +8442,20 @@ d.vertex=!0;var b=new mxCell("Label",new mxGeometry(30,15,150,15),"shape=manualI
0,130,130),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#10739E;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.23;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");f.vertex=!0;var g=new mxCell("",new mxGeometry(129,15,100,100),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#F2931E;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.3;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
g.vertex=!0;var h=new mxCell("",new mxGeometry(144,30,70,70),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#AE4132;strokeColor=none;startAngle=0;endAngle=0.5;arcWidth=0.43;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");h.vertex=!0;var k=new mxCell("",new mxGeometry(115,85,130,130),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#AE4132;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.23;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
k.vertex=!0;var l=new mxCell("",new mxGeometry(130,100,100,100),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#F2931E;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.3;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");l.vertex=!0;var m=new mxCell("",new mxGeometry(145,115,70,70),"verticalLabelPosition=bottom;verticalAlign=top;html=1;shape=mxgraph.basic.partConcEllipse;fillColor=#10739E;strokeColor=none;startAngle=0.5;endAngle=0.00001;arcWidth=0.43;shadow=0;fontSize=7;fontColor=#FFFFFF;align=left;");
-m.vertex=!0;var n=new mxCell("",new mxGeometry(179,170,181,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#10739E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(179,185,151,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#F2931E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");p.vertex=!0;var q=new mxCell("",new mxGeometry(179,
-200,121,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#AE4132;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");q.vertex=!0;var t=new mxCell("1",new mxGeometry(0,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#10739E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");t.vertex=!0;var u=new mxCell("2",new mxGeometry(40,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#F2931E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
-u.vertex=!0;var v=new mxCell("3",new mxGeometry(80,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#AE4132;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");v.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,q,t,u,v],360,215,"Swirl")}),this.addEntry("callout",function(){var d=new mxCell("Label",new mxGeometry(0,0,0,0),"endArrow=oval;html=1;fontSize=16;fontColor=#10739E;endFill=0;endSize=24;strokeWidth=5;labelBackgroundColor=none;verticalAlign=top;fontStyle=1;strokeColor=#10739E;");
+m.vertex=!0;var n=new mxCell("",new mxGeometry(179,170,181,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#10739E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");n.vertex=!0;var p=new mxCell("",new mxGeometry(179,185,151,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#F2931E;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");p.vertex=!0;var r=new mxCell("",new mxGeometry(179,
+200,121,15),"shape=manualInput;whiteSpace=wrap;html=1;shadow=0;fillColor=#AE4132;strokeColor=none;fontSize=12;fontColor=#FFFFFF;align=center;direction=north;flipH=1;rounded=0;");r.vertex=!0;var t=new mxCell("1",new mxGeometry(0,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#10739E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");t.vertex=!0;var v=new mxCell("2",new mxGeometry(40,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#F2931E;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");
+v.vertex=!0;var u=new mxCell("3",new mxGeometry(80,60,30,30),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;strokeColor=none;fillColor=#AE4132;fontSize=17;fontColor=#FFFFFF;align=center;fontStyle=1;rounded=0;");u.vertex=!0;return sb.createVertexTemplateFromCells([d,b,e,f,g,h,k,l,m,n,p,r,t,v,u],360,215,"Swirl")}),this.addEntry("callout",function(){var d=new mxCell("Label",new mxGeometry(0,0,0,0),"endArrow=oval;html=1;fontSize=16;fontColor=#10739E;endFill=0;endSize=24;strokeWidth=5;labelBackgroundColor=none;verticalAlign=top;fontStyle=1;strokeColor=#10739E;");
d.geometry.setTerminalPoint(new mxPoint(0,100),!0);d.geometry.setTerminalPoint(new mxPoint(100,0),!1);d.geometry.x=-1;d.geometry.relative=!0;d.edge=!0;return sb.createVertexTemplateFromCells([d],100,100,"Callout")}),this.addEntry("roadmap vertical",function(){var d=new mxCell("",new mxGeometry(234,0,12,12),"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;fillColor=none;strokeColor=#333333;fontSize=16;align=center;strokeWidth=2;");d.vertex=!0;var b=new mxCell("",new mxGeometry(234,498,12,12),
"ellipse;whiteSpace=wrap;html=1;aspect=fixed;shadow=0;fillColor=none;strokeColor=#333333;fontSize=16;align=center;strokeWidth=2;");b.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;strokeWidth=3;strokeColor=#CCCCCC;labelBackgroundColor=none;fontSize=16");e.geometry.relative=!0;e.edge=!0;d.insertEdge(e,!0);b.insertEdge(e,!1);var f=new mxCell("",new mxGeometry(0,30,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#10739E;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
f.vertex=!0;var g=new mxCell("",new mxGeometry(234,100,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#F2931E;labelPosition=center;align=center;fontColor=#F2931E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,170,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#AE4132;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
h.vertex=!0;var k=new mxCell("",new mxGeometry(234,240,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#23445D;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,310,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#12AAB5;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;");
l.vertex=!0;var m=new mxCell("",new mxGeometry(234,380,246,60),"verticalLabelPosition=middle;verticalAlign=middle;html=1;shape=mxgraph.infographic.circularCallout2;dy=15;strokeColor=#56517E;labelPosition=center;align=center;fontColor=#10739E;fontStyle=1;fontSize=24;shadow=0;direction=north;flipH=1;");m.vertex=!0;var n=new mxCell("Label",new mxGeometry(70,20,160,30),"fillColor=#10739E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");n.vertex=!0;var p=new mxCell("Label",
-new mxGeometry(250,85,160,30),"fillColor=#F2931E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");p.vertex=!0;var q=new mxCell("Label",new mxGeometry(70,160,160,30),"fillColor=#AE4132;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");q.vertex=!0;var t=new mxCell("Label",new mxGeometry(250,225,160,30),"fillColor=#23445D;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");t.vertex=!0;
-var u=new mxCell("Label",new mxGeometry(70,300,160,30),"fillColor=#12AAB5;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");u.vertex=!0;var v=new mxCell("Label",new mxGeometry(250,365,160,30),"fillColor=#56517E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");v.vertex=!0;var w=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(70,70,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");w.vertex=!0;var r=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,140,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-r.vertex=!0;var y=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,210,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");y.vertex=!0;var x=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
-new mxGeometry(250,280,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");x.vertex=!0;var z=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,350,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
-z.vertex=!0;var B=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#56517E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,420,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");B.vertex=!0;return sb.createVertexTemplateFromCells([e,d,b,f,g,h,k,l,m,n,p,q,t,u,v,w,r,y,x,z,B],480,510,"Roadmap (vertical)")}),
+new mxGeometry(250,85,160,30),"fillColor=#F2931E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");p.vertex=!0;var r=new mxCell("Label",new mxGeometry(70,160,160,30),"fillColor=#AE4132;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");r.vertex=!0;var t=new mxCell("Label",new mxGeometry(250,225,160,30),"fillColor=#23445D;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");t.vertex=!0;
+var v=new mxCell("Label",new mxGeometry(70,300,160,30),"fillColor=#12AAB5;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");v.vertex=!0;var u=new mxCell("Label",new mxGeometry(250,365,160,30),"fillColor=#56517E;strokecolor=none;rounded=1;fontColor=#FFFFFF;strokeColor=none;fontStyle=1;fontSize=14;");u.vertex=!0;var w=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(70,70,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");w.vertex=!0;var q=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#F2931E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,140,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+q.vertex=!0;var x=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#AE4132"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,210,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");x.vertex=!0;var y=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#23445D"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',
+new mxGeometry(250,280,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");y.vertex=!0;var z=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#12AAB5"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(70,350,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");
+z.vertex=!0;var A=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#56517E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(250,420,160,70),"rounded=1;strokeColor=none;fillColor=#EEEEEE;align=center;arcSize=12;verticalAlign=top;whiteSpace=wrap;html=1;fontSize=12;");A.vertex=!0;return sb.createVertexTemplateFromCells([e,d,b,f,g,h,k,l,m,n,p,r,t,v,u,w,q,x,y,z,A],480,510,"Roadmap (vertical)")}),
this.addEntry("roadmap horizontal",function(){var d=new mxCell("",new mxGeometry(0,90,840,30),"fillColor=#dddddd;rounded=0;strokeColor=none;");d.vertex=!0;var b=new mxCell("Label",new mxGeometry(40,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#10739E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");b.vertex=!0;var e=new mxCell("Label",new mxGeometry(200,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#F2931E;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
e.vertex=!0;var f=new mxCell("Label",new mxGeometry(360,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#AE4132;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");f.vertex=!0;var g=new mxCell("Label",new mxGeometry(520,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#23445D;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");
g.vertex=!0;var h=new mxCell("Label",new mxGeometry(680,80,120,50),"shape=mxgraph.infographic.ribbonSimple;notch1=0;notch2=10;notch=0;html=1;fillColor=#12AAB5;strokeColor=none;shadow=0;fontSize=17;fontColor=#FFFFFF;align=left;spacingLeft=10;fontStyle=1;");h.vertex=!0;var k=new mxCell('<font style="font-size: 10px"><font style="font-size: 12px" color="#10739E"><b>Label</b></font><br><br><font size="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit</font></font>',new mxGeometry(0,0,200,70),
@@ -10675,35 +10677,35 @@ DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,f,k)}),f):this.updateFile(b,f)};
-DrawioFile.prototype.updateFile=function(b,f,k,e){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(u){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[u]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=u?this.mergeFile(u,b,f,e):this.reloadFile(b,
-f))}catch(v){null!=f&&f(v)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,k,e){var u=!0;try{this.stats.fileMerged++;var v=this.getShadowPages(),B=b.getShadowPages();if(null!=B&&0<B.length){var E=[this.ui.diffPages(null!=e?e:v,B)],L=this.ignorePatches(E);this.setShadowPages(B);if(L)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",L);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(v,this.ui.pages):null;e={};L={};var c=this.ui.patchPages(v,E[0]),d=this.ui.getHashValueForPages(c,
-e),g=this.ui.getHashValueForPages(B,L);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",v,"pages",this.ui.pages,"patches",E,"backup",this.backupPatch,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=d&&d!=g){var q=this.compressReportData(this.getAnonymizedXmlForPages(B)),m=this.compressReportData(this.getAnonymizedXmlForPages(c)),n=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,E,"Shadow Details: "+JSON.stringify(e)+"\nChecksum: "+d+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(L)+"\nFrom: "+n+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+m,null,"mergeFile",d,g,b.getCurrentRevisionId());return}if(null!=this.sync){var C=this.sync.patchRealtime(E,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==C||mxUtils.isEmptyObject(C)||E.push(C)}this.patch(E,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw u=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(u)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var x=this.getCurrentUser(),y=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,I)}}catch(N){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var e=0;e<b.length;e++){var u=f.encode(new mxGraphModel(b[e].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[e].getId());b[e].viewState&&this.ui.editor.graph.saveViewState(b[e].viewState,u,!0);k.appendChild(u)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(t){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[t]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=t?this.mergeFile(t,b,f,d):this.reloadFile(b,
+f))}catch(u){null!=f&&f(u)}}),f))};
+DrawioFile.prototype.mergeFile=function(b,f,k,d){var t=!0;try{this.stats.fileMerged++;var u=this.getShadowPages(),C=b.getShadowPages();if(null!=C&&0<C.length){var F=[this.ui.diffPages(null!=d?d:u,C)],J=this.ignorePatches(F);this.setShadowPages(C);if(J)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",J);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(u,this.ui.pages):null;d={};J={};var c=this.ui.patchPages(u,F[0]),e=this.ui.getHashValueForPages(c,
+d),g=this.ui.getHashValueForPages(C,J);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",F,"backup",this.backupPatch,"checksum",e,"current",g,"valid",e==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=e&&e!=g){var m=this.compressReportData(this.getAnonymizedXmlForPages(C)),p=this.compressReportData(this.getAnonymizedXmlForPages(c)),q=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,F,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+e+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(J)+"\nFrom: "+q+"\nTo: "+z+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile",e,g,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(F,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||F.push(y)}this.patch(F,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(I);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var A=this.getCurrentUser(),x=null!=A?A.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,I)}}catch(M){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);k.appendChild(t)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,k,e,u,v,B,E){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var L=0;L<f.length;L++)this.ui.anonymizePatch(f[L]);var c=mxUtils.bind(this,function(z){var C=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
-25E3);this.sendErrorReport("Checksum Error in "+u+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+C+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==e?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==e?c(z):c(null)}),function(){})}else{var d=this.getCurrentUser(),g=null!=d?d.id:"unknown",q=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",m=JSON.stringify(f).length,n=null;if(null!=f&&this.constructor==DriveFile&&400>m){for(L=0;L<f.length;L++)this.ui.anonymizePatch(f[L]);
-n=JSON.stringify(f);n=null!=n&&250>n.length?Graph.compress(n):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var C=null!=n?"Report":"Error",x=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+C+" in "+u+" "+q,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+(null!=n?"-json_"+n:"")+"-size_"+this.getSize()+(null!=v?"-expected_"+v:"")+(null!=B?"-current_"+B:"")+(null!=E?
-"-rev_"+this.ui.hashValue(E):"")+(null!=x?"-latest_"+x:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+q,action:u,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+m+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(z){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,k,e){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),v=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),E=null!=B?this.ui.hashValue(B.id):"unknown",L=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),d=c.lastIndexOf(".");B="xml";0<d&&(B=c.substring(d));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+E+L+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+u+"\n\nData:\n"+v,e)}catch(q){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var e=this.ui.editor.graph,u=e.getSelectionCells(),v=e.getViewState(),B=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(B,v,u);null!=this.backupPatch&&this.patch([this.backupPatch]);var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(e){null!=f&&f(e)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(e){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(e.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(e.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)};
+DrawioFile.prototype.checksumError=function(b,f,k,d,t,u,C,F){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var J=0;J<f.length;J++)this.ui.anonymizePatch(f[J]);var c=mxUtils.bind(this,function(z){var y=this.compressReportData(JSON.stringify(f,null,2));z=null==z?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(z.data)),
+25E3);this.sendErrorReport("Checksum Error in "+t+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=z?"\n\nRemote:\n"+z:""),null,7E4)});null==d?c(null):this.getLatestVersion(mxUtils.bind(this,function(z){null!=z&&z.getCurrentEtag()==d?c(z):c(null)}),function(){})}else{var e=this.getCurrentUser(),g=null!=e?e.id:"unknown",m=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",p=JSON.stringify(f).length,q=null;if(null!=f&&this.constructor==DriveFile&&400>p){for(J=0;J<f.length;J++)this.ui.anonymizePatch(f[J]);
+q=JSON.stringify(f);q=null!=q&&250>q.length?Graph.compress(q):null}this.getLatestVersion(mxUtils.bind(this,function(z){try{var y=null!=q?"Report":"Error",A=this.ui.getHashValueForPages(z.getShadowPages());EditorUi.logError("Checksum "+y+" in "+t+" "+m,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+p+"-patches_"+f.length+(null!=q?"-json_"+q:"")+"-size_"+this.getSize()+(null!=u?"-expected_"+u:"")+(null!=C?"-current_"+C:"")+(null!=F?
+"-rev_"+this.ui.hashValue(F):"")+(null!=A?"-latest_"+A:"")+(null!=z?"-latestRev_"+this.ui.hashValue(z.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+m,action:t,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+p+"-patches_"+f.length+"-size_"+this.getSize()})}catch(x){}}),b)}}catch(z){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),u=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),F=null!=C?this.ui.hashValue(C.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",c=this.getTitle(),e=c.lastIndexOf(".");C="xml";0<e&&(C=c.substring(e));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+F+J+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+t+"\n\nData:\n"+u,d)}catch(m){}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,t=d.getSelectionCells(),u=d.getViewState(),C=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(C,u,t);null!=this.backupPatch&&this.patch([this.backupPatch]);var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f};
-DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var e=this.ui.editor.undoManager,u=e.history.slice(),v=e.indexOfNextAdd,B=this.ui.editor.graph;B.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=k;var L=B.foldingEnabled,c=B.mathEnabled,d=B.cellRenderer.redraw;B.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());d.apply(this,arguments)};B.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{B.container.style.visibility="";B.model.endUpdate();B.cellRenderer.redraw=d;this.changeListenerEnabled=E;k||(e.history=u,e.indexOfNextAdd=v,e.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=B.mathEnabled?
-(this.ui.editor.updateGraphComponents(),B.refresh()):(L!=B.foldingEnabled?B.view.revalidate():B.view.validate(),B.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,f,k,e,u,v){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",e,"overwrite",u,"manual",v,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=k)k(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var d=this.ui.editor.undoManager,t=d.history.slice(),u=d.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var F=this.changeListenerEnabled;this.changeListenerEnabled=k;var J=C.foldingEnabled,c=C.mathEnabled,e=C.cellRenderer.redraw;C.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());e.apply(this,arguments)};C.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=e;this.changeListenerEnabled=F;k||(d.history=t,d.indexOfNextAdd=u,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)c!=C.mathEnabled?
+(this.ui.editor.updateGraphComponents(),C.refresh()):(J!=C.foldingEnabled?C.view.revalidate():C.view.validate(),C.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,f,k,d,t,u){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",t,"manual",u,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=k)k(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,f,k){};
-DrawioFile.prototype.saveFile=function(b,f,k,e){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.saveFile=function(b,f,k,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var e=0;null!=k&&e<k.length;e++){var u=k[e];null!=u.id&&0==u.id.indexOf("extFont_")&&u.parentNode.removeChild(u)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var d=0;null!=k&&d<k.length;d++){var t=k[d];null!=t.id&&0==t.id.indexOf("extFont_")&&t.parentNode.removeChild(t)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
@@ -10728,438 +10730,438 @@ DrawioFile.prototype.showRefreshDialog=function(b,f,k){null==k&&(k=mxResources.g
f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,f)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
DrawioFile.prototype.showCopyDialog=function(b,f,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),e=mxResources.get("redirectToNewApp");null!=f&&(e+=" ("+f+")");f=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});null!=b?this.isModified()?this.ui.confirm(e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(e,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var t=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
f)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),e=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,e,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,e,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),e)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,e,u):this.invalidChecksum?this.showRefreshDialog(k,e,this.getErrorMessage(b)):f?this.showConflictDialog(u,v):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,e)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,t):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):f?this.showConflictDialog(t,u):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(k){b(f,k)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,k,e,u){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var v=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(v),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(v,f,k,e,u)}catch(L){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=e&&e(L);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,L);else{var B=this.getCurrentUser(),E=null!=B?B.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),E,L)}}catch(c){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,f,k,e){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var u=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==u&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var v=this.isAutosaveRevision();
-v&&(this.lastAutosaveRevision=(new Date).getTime());this.save(v,mxUtils.bind(this,function(B){this.autosaveCompleted();null!=k&&k(B)}),mxUtils.bind(this,function(B){null!=e&&e(B)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"delay",b,"saving",this.savingFile);this.autosaveThread=u};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.fileSaved=function(b,f,k,d,t){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var u=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(u),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(u,f,k,d,t)}catch(J){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=d&&d(J);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,J);else{var C=this.getCurrentUser(),F=null!=C?C.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),F,J)}}catch(c){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,f,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var t=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==t&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
+u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=k&&k(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"delay",b,"saving",this.savingFile);this.autosaveThread=t};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=f.lastIndexOf(".");return b===(0<k?f.substring(k):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,e,u,v){DrawioFile.call(this,b,f);this.title=k;this.mode=e?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=v};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,d,t,u){DrawioFile.call(this,b,f);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,k){this.saveAs(this.title,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,k,e,u){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var v=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var B=this.getData(),E=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var d=mxUtils.bind(this,
-function(q){this.savingFile=!1;null!=e&&e({error:q})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(q){this.fileHandle.getFile().then(mxUtils.bind(this,function(m){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[m],"conflict",this.desc.lastModified!=m.lastModified);this.desc.lastModified==m.lastModified?q.write(v?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){q.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var z=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(B,z,E,d);this.removeDraft()}catch(C){d(C)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(m){this.invalidFileHandle=!0;d(m)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,v?"image/png":"text/xml",v);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(v?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));E()}});v?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),e,this.ui.getCurrentFile()!=this?B:null,f.scale,f.border)):L(B)};
+LocalFile.prototype.saveFile=function(b,f,k,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var C=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),J=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(m){this.savingFile=!1;null!=d&&d({error:m})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);this.desc.lastModified==p.lastModified?m.write(u?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){try{var z=this.desc;this.savingFile=!1;this.desc=q;this.fileSaved(C,z,F,e);this.removeDraft()}catch(y){e(y)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;e(p)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,u?"image/png":"text/xml",u);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});u?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){J(c)}),d,this.ui.getCurrentFile()!=this?C:null,f.scale,f.border)):J(C)};
LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,k)};
-StorageFile.insertFile=function(b,f,k,e,u){var v=mxUtils.bind(this,function(B){var E=function(){var L=new StorageFile(b,k,f);L.saveFile(f,!1,function(){e(L)},u)};B?b.confirm(mxResources.get("replaceIt",[f]),E,u):E()});StorageFile.getFileContent(b,f,function(B){v(null!=B)},function(){v(!1)})};StorageFile.getFileContent=function(b,f,k,e){b.getDatabaseItem(f,function(u){k(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=e&&e()}),"files")};
-StorageFile.getFileInfo=function(b,f,k,e){b.getDatabaseItem(f,function(u){k(u)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(u){k(null!=u?{title:f}:null)}):null!=e&&e()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,k,e){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var v=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var B=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:B.length,lastModified:Date.now(),type:this.type},{title:this.title,data:B}],v,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-B,v):null!=e&&e()}),["filesInfo","files"])}catch(E){null!=e&&e(E)}});this.isRenamable()&&"."==b.charAt(0)&&null!=e?e({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(v){this.isRenamable()&&this.getTitle()!=b&&null!=v?this.ui.confirm(mxResources.get("replaceIt",[b]),u,e):u()}),e)}else null!=k&&k()};
-StorageFile.prototype.rename=function(b,f,k){var e=this.getTitle();e!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){var v=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(e,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(e,f)}),k)});null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),v,k):v()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.insertFile=function(b,f,k,d,t){var u=mxUtils.bind(this,function(C){var F=function(){var J=new StorageFile(b,k,f);J.saveFile(f,!1,function(){d(J)},t)};C?b.confirm(mxResources.get("replaceIt",[f]),F,t):F()});StorageFile.getFileContent(b,f,function(C){u(null!=C)},function(){u(!1)})};StorageFile.getFileContent=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=d&&d()}),"files")};
+StorageFile.getFileInfo=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(t)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(t){k(null!=t?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,f,k,d){if(this.isEditable()){var t=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var C=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:C.length,lastModified:Date.now(),type:this.type},{title:this.title,data:C}],u,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+C,u):null!=d&&d()}),["filesInfo","files"])}catch(F){null!=d&&d(F)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),t,d):t()}),d)}else null!=k&&k()};
+StorageFile.prototype.rename=function(b,f,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){var u=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),k)});null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),u,k):u()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var e=localStorage.key(k),u=localStorage.getItem(e);if(0<e.length&&"."!=e.charAt(0)&&0<u.length){var v=(null==b||"F"==b)&&("<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12)),B=(null==b||"L"==b)&&"<mxlibrary>"===u.substring(0,11);(v||B)&&f.push({title:e,type:v?"F":"L",size:u.length,lastModified:Date.now()})}}return f};
-StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var e=0;e<f.length;e++){var u=f[e],v=localStorage.getItem(u.title);b.add({title:u.title,data:v});k.add(u)}};
-StorageFile.listFiles=function(b,f,k,e){b.getDatabaseItems(function(u){var v=[];if(null!=u)for(var B=0;B<u.length;B++)"."==u[B].title.charAt(0)||null!=f&&u[B].type!=f||v.push(u[B]);k(v)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=e&&e()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,e){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=e&&e()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var u=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(u||C)&&f.push({title:d,type:u?"F":"L",size:t.length,lastModified:Date.now()})}}return f};
+StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<f.length;d++){var t=f[d],u=localStorage.getItem(t.title);b.add({title:t.title,data:u});k.add(t)}};
+StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(t){var u=[];if(null!=t)for(var C=0;C<t.length;C++)"."==t[C].title.charAt(0)||null!=f&&t[C].type!=f||u.push(t[C]);k(u)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,d){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,k){};
RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,k){function e(g,q,m,n,z,C){function x(){mxEvent.addListener(y,"click",null!=C?C:function(){m!=App.MODE_GOOGLE||b.isDriveDomain()?m==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()})):m==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,!0);f()}),
-function(F){b.spinner.stop();b.handleError(F)}):(b.setMode(m,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}E++;++B>k&&(mxUtils.br(L),B=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height=
-"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",q);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,q);y.appendChild(I);if(null!=g){var N=document.createElement("img");N.setAttribute("src",g);N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="60px";N.style.height="60px";N.style.paddingBottom="6px";y.appendChild(N)}else I.style.paddingTop=
-"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=n&&null==b[n]){N.style.visibility="hidden";mxUtils.setOpacity(I,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(y);
-var p=window.setTimeout(function(){null==b[n]&&(t.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(F,K){null!=b[n]&&K.getProperty("client")==b[n]&&(window.clearTimeout(p),mxUtils.setOpacity(I,100),N.style.visibility="",t.stop(),x(),"drive"==n&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else x();L.appendChild(y)}k=null!=k?k:2;var u=document.createElement("div");u.style.textAlign="center";u.style.whiteSpace="nowrap";u.style.paddingTop="0px";u.style.paddingBottom=
-"20px";var v=document.createElement("div");v.style.border="1px solid #d3d3d3";v.style.borderWidth="1px 0px 1px 0px";v.style.padding="10px 0px 20px 0px";var B=0,E=0,L=document.createElement("div");L.style.paddingTop="2px";v.appendChild(L);var c=document.createElement("p"),d=document.createElement("p");d.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(d,mxResources.get("saveDiagramsTo")+":");u.appendChild(d);u.appendChild(v);B=0;"function"===typeof window.DriveClient&&
-e(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&e(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&e(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||e(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
-e(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&e(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&e(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");v=document.createElement("span");v.style.position="absolute";v.style.cursor="pointer";v.style.bottom="27px";v.style.color="gray";v.style.userSelect="none";v.style.textAlign="center";v.style.left="50%";mxUtils.setPrefixedStyle(v.style,
-"transform","translate(-50%,0)");mxUtils.write(v,mxResources.get("decideLater"));u.appendChild(v);mxEvent.addListener(v,"click",function(){b.hideDialog();var g=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=g});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(c.style.padding="7px",c.style.fontSize="9pt",c.style.marginTop="-14px",
-c.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",u.appendChild(c))},5E3);this.container=u},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
-b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.style.width="32px";e.style.height="32px";e.style.marginRight="8px";e.style.marginTop="-4px";var u=document.createElement("div");u.style.margin="8px 0px 0px 0px";u.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(e.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(e.src=
-IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(e.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(e.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(e.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(e.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(e.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):
-(e.src=IMAGE_PATH+"/osa_drive-harddisk.png",u.style.paddingBottom="10px",u.style.paddingTop="30px",k=mxResources.get("device"));var v=document.createElement("button");v.className="geBigButton";v.style.marginBottom="8px";v.style.fontSize="18px";v.style.padding="10px";v.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)u.style.padding="42px 0px 10px 0px",v.style.marginBottom="12px";else{u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";var B=document.createElement("table"),
-E=document.createElement("tbody"),L=document.createElement("tr"),c=document.createElement("td"),d=document.createElement("td");B.setAttribute("align","center");c.appendChild(e);e=document.createElement("div");e.style.fontSize="22px";e.style.paddingBottom="6px";e.style.color="gray";mxUtils.write(e,k);d.style.textAlign="left";d.appendChild(e);L.appendChild(c);L.appendChild(d);E.appendChild(L);B.appendChild(E);f.appendChild(B);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(v,mxResources.get("createNewDiagram"));mxEvent.addListener(v,"click",function(){b.hideDialog();b.actions.get("new").funct()});u.appendChild(v);mxUtils.br(u);v=document.createElement("button");v.className="geBigButton";v.style.marginBottom="22px";v.style.fontSize=
-"18px";v.style.padding="10px";v.style.width="340px";mxUtils.write(v,mxResources.get("openExistingDiagram"));mxEvent.addListener(v,"click",function(){b.actions.get("open").funct()});u.appendChild(v);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(m){v.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));v.style.marginBottom="16px";u.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){m()})});u.appendChild(n)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+":");v.style.marginBottom="16px";u.style.paddingBottom="18px";u.appendChild(e);var q=document.createElement("select");q.style.marginLeft="4px";q.style.width="140px";for(k=0;k<g.length;k++)B=document.createElement("option"),mxUtils.write(B,g[k].displayName),B.value=k,q.appendChild(B),
-B=document.createElement("option"),B.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(B,"<"+g[k].email+">"),B.setAttribute("disabled","disabled"),q.appendChild(B);B=document.createElement("option");mxUtils.write(B,mxResources.get("addAccount"));B.value=g.length;q.appendChild(B);mxEvent.addListener(q,"change",function(){var m=q.value,n=g.length!=m;n&&b.drive.setUser(g[m]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
-b.showSplash()})},!0)});u.appendChild(q)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(u);this.container=f},EmbedDialog=function(b,f,k,e,u,v,B,E,L){B=null!=B?B:"Check out the diagram I made using @drawio";e=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=v?mxUtils.write(e,v):mxUtils.write(e,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(e);v=document.createElement("div");
-v.style.position="absolute";v.style.top="30px";v.style.right="30px";v.style.color="gray";mxUtils.write(v,b.formatFileSize(f.length));e.appendChild(v);var d=document.createElement("textarea");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.marginTop="10px";d.style.resize="none";d.style.height="150px";d.style.width="440px";d.style.border=
-"1px solid gray";d.value=mxResources.get("updatingDocument");e.appendChild(d);mxUtils.br(e);this.init=function(){window.setTimeout(function(){5E5>f.length?(d.value=f,d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)):(d.setAttribute("readonly","true"),d.value=mxResources.get("tooLargeUseDownload"))},0)};v=document.createElement("div");v.style.position="absolute";v.style.bottom="36px";v.style.right="32px";var g=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=E?E:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var m=5E5>f.length?d.value:f;if(null!=u)u(m);else if(c)try{var n=b.openLink(m);null!=n&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=n&&null!=n.location.href&&n.location.href.substring(0,8)!=m.substring(0,8)&&(n.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(C){}}),
-k||500)}catch(C){b.handleError({message:C.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",v.appendChild(g));if(!c||7500<f.length)E=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=L?L:"embed.txt","txt",f,"text/plain")}),E.className="geBtn",v.appendChild(E);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var q=mxUtils.button("",function(){try{var m="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}});E=document.createElement("img");E.setAttribute("src",Editor.facebookImage);E.setAttribute("width","18");E.setAttribute("height",
-"18");E.setAttribute("border","0");q.appendChild(E);q.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");q.style.verticalAlign="bottom";q.style.paddingTop="4px";q.style.minWidth="46px";q.className="geBtn";v.appendChild(q)}7168>f.length&&(q=mxUtils.button("",function(){try{var m="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),
-E=document.createElement("img"),E.setAttribute("src",Editor.tweetImage),E.setAttribute("width","18"),E.setAttribute("height","18"),E.setAttribute("border","0"),E.style.marginBottom="5px",q.appendChild(E),q.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",v.appendChild(q))}!b.isOffline()&&5E5>f.length&&(q=mxUtils.button("",function(){try{var m="mailto:?subject="+encodeURIComponent(L||
-b.defaultFilename)+"&body="+encodeURIComponent(d.value);b.openLink(m)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),E=document.createElement("img"),E.className="geAdaptiveAsset",E.setAttribute("src",Editor.mailImage),E.setAttribute("width","18"),E.setAttribute("height","18"),E.setAttribute("border","0"),E.style.marginBottom="5px",q.appendChild(E),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className="geBtn",v.appendChild(q));
-E=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.appendChild(E);q=mxUtils.button(mxResources.get("copy"),function(){d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?E.className="geBtn gePrimaryBtn":(v.appendChild(q),q.className="geBtn gePrimaryBtn",E.className="geBtn"):(v.appendChild(g),
-E.className="geBtn",g.className="geBtn gePrimaryBtn");e.appendChild(v);this.container=e};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function k(){var F=null!=p&&null!=p.getTitle()?p.getTitle():this.defaultFilename;if(N.checked&&""!=q.value){var K="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(K+="&title="+encodeURIComponent(F));0<t.length&&(K+="&s="+t);""!=m.value&&"0"!=m.value&&(K+="&border="+m.value);""!=g.value&&(K+="&height="+g.value);K+="&pan="+(n.checked?"1":"0");K+="&zoom="+(z.checked?"1":"0");K+="&fit="+(I.checked?"1":"0");
-K+="&resize="+(y.checked?"1":"0");K+="&x0="+Number(d.value);K+="&y0="+L;u.mathEnabled&&(K+="&math=1");x.checked?K+="&edit=_blank":C.checked&&(K+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=K}else p.constructor==DriveFile||p.constructor==DropboxFile?(K="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?K+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(K+=p.getHash().substring(1),K=p.constructor==DropboxFile?K+"&type=2":K+"&type=1"),null!=
-F&&(K+="&title="+encodeURIComponent(F)),""!=g.value&&(F=parseInt(g.value)+parseInt(d.value),K+="&height="+F),c.value=K):c.value=""}var e=document.createElement("div"),u=b.editor.graph,v=u.getGraphBounds(),B=u.view.scale,E=Math.floor(v.x/B-u.view.translate.x),L=Math.floor(v.y/B-u.view.translate.y);mxUtils.write(e,mxResources.get("googleGadget")+":");mxUtils.br(e);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";
-e.appendChild(c);mxUtils.br(e);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(e,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","4");d.style.marginRight="16px";d.style.marginLeft="4px";d.value=E;e.appendChild(d);mxUtils.write(e,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text");
-g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(v.height/B);e.appendChild(g);mxUtils.br(e);v=document.createElement("hr");v.setAttribute("size","1");v.style.marginBottom="16px";v.style.marginTop="16px";e.appendChild(v);mxUtils.write(e,mxResources.get("publicDiagramUrl")+":");mxUtils.br(e);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=f||"";e.appendChild(q);
-mxUtils.br(e);mxUtils.write(e,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","3");m.style.marginBottom="8px";m.style.marginLeft="4px";m.value="0";e.appendChild(m);mxUtils.br(e);var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="16px";e.appendChild(n);mxUtils.write(e,mxResources.get("pan")+" ");var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";e.appendChild(z);mxUtils.write(e,mxResources.get("zoom")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";C.setAttribute("title",window.location.href);e.appendChild(C);mxUtils.write(e,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";e.appendChild(x);mxUtils.write(e,
-mxResources.get("asNew")+" ");mxUtils.br(e);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";e.appendChild(y);mxUtils.write(e,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";e.appendChild(I);mxUtils.write(e,mxResources.get("fit")+" ");var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.marginLeft=
-"8px";e.appendChild(N);mxUtils.write(e,mxResources.get("embed")+" ");var t=b.getBasenames().join(";"),p=b.getCurrentFile();mxEvent.addListener(n,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(C,"change",k);mxEvent.addListener(x,"change",k);mxEvent.addListener(N,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(d,"change",k);mxEvent.addListener(m,"change",k);mxEvent.addListener(q,"change",k);k();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";v=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});v.className="geBtn gePrimaryBtn";f.appendChild(v);e.appendChild(f);this.container=e},CreateGraphDialog=function(b,f,k){var e=document.createElement("div");e.style.textAlign="right";this.init=
-function(){var u=document.createElement("div");u.style.position="relative";u.style.border="1px solid gray";u.style.width="100%";u.style.height="360px";u.style.overflow="hidden";u.style.marginBottom="16px";mxEvent.disableContextMenu(u);e.appendChild(u);var v=new Graph(u);v.setCellsCloneable(!0);v.setPanning(!0);v.setAllowDanglingEdges(!1);v.connectionHandler.select=!1;v.view.setTranslate(20,20);v.border=20;v.panningHandler.useLeftButtonForPanning=!0;var B="curved=1;";v.cellRenderer.installCellOverlayListeners=
-function(z,C,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(y){C.fireEvent(new mxEventObject("pointerdown","event",y,"state",z))})};v.getAllConnectionConstraints=function(){return null};v.connectionHandler.marker.highlight.keepOnTop=
-!1;v.connectionHandler.createEdgeState=function(z){z=v.createEdge(null,null,null,null,null,B);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var E=v.getDefaultParent(),L=mxUtils.bind(this,function(z){var C=new mxCellOverlay(this.connectImage,"Add outgoing");C.cursor="hand";C.addListener(mxEvent.CLICK,function(x,y){v.connectionHandler.reset();v.clearSelection();var I=v.getCellGeometry(z),N;g(function(){N=v.insertVertex(E,null,"Entry",I.x,I.y,80,30,"rounded=1;");L(N);v.view.refresh(N);
-v.insertEdge(E,null,"",z,N,B)},function(){v.scrollCellToVisible(N)})});C.addListener("pointerdown",function(x,y){x=y.getProperty("event");y=y.getProperty("state");v.popupMenuHandler.hideMenu();v.stopEditing(!1);var I=mxUtils.convertPoint(v.container,mxEvent.getClientX(x),mxEvent.getClientY(x));v.connectionHandler.start(y,I.x,I.y);v.isMouseDown=!0;v.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});v.addCellOverlay(z,C)});v.getModel().beginUpdate();try{var c=v.insertVertex(E,null,"Start",
-0,0,80,30,"ellipse");L(c)}finally{v.getModel().endUpdate()}if("horizontalTree"==k){var d=new mxCompactTreeLayout(v);d.edgeRouting=!1;d.levelDistance=30;B="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(d=new mxCompactTreeLayout(v,!1),d.edgeRouting=!1,d.levelDistance=30,B="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(d=new mxRadialTreeLayout(v,!1),d.edgeRouting=!1,d.levelDistance=80):"verticalFlow"==k?d=new mxHierarchicalLayout(v,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-k?d=new mxHierarchicalLayout(v,mxConstants.DIRECTION_WEST):"circle"==k?d=new mxCircleLayout(v):(d=new mxFastOrganicLayout(v,!1),d.forceConstant=80);if(null!=d){var g=function(z,C){v.getModel().beginUpdate();try{null!=z&&z(),d.execute(v.getDefaultParent(),c)}catch(x){throw x;}finally{z=new mxMorphing(v),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){v.getModel().endUpdate();null!=C&&C()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(z,C,
-x,y,I){q.apply(this,arguments);g()};v.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};v.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var m=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(v.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});m.className="geBtn";b.editor.cancelFirst&&e.appendChild(m);var n=mxUtils.button(mxResources.get("insert"),function(z){v.clearCellOverlays();
-var C=v.getModel().getChildren(v.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(v.getBoundingBoxFromGeometry(C,!0));C=b.editor.graph.importCells(C,z.x,z.y);z=b.editor.graph.view;var x=z.getBounds(C);x.x-=z.translate.x;x.y-=z.translate.y;b.editor.graph.scrollRectToVisible(x);b.editor.graph.setSelectionCells(C);null!=u.parentNode&&(v.destroy(),u.parentNode.removeChild(u));b.hideDialog()});e.appendChild(n);n.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||e.appendChild(m)};this.container=e};
+var StorageDialog=function(b,f,k){function d(g,m,p,q,z,y){function A(){mxEvent.addListener(x,"click",null!=y?y:function(){p!=App.MODE_GOOGLE||b.isDriveDomain()?p==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(p,!0);f()})):p==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(p,!0);f()}),
+function(n){b.spinner.stop();b.handleError(n)}):(b.setMode(p,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}F++;++C>k&&(mxUtils.br(J),C=1);var x=document.createElement("a");x.style.overflow="hidden";x.style.display="inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.marginTop="8px";x.style.marginBottom="0px";x.style.padding="8px 10px 8px 10px";x.style.width="88px";x.style.height=
+"100px";x.style.whiteSpace="nowrap";x.setAttribute("title",m);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,m);x.appendChild(I);if(null!=g){var M=document.createElement("img");M.setAttribute("src",g);M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="60px";M.style.height="60px";M.style.paddingBottom="6px";x.appendChild(M)}else I.style.paddingTop=
+"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=z)for(g=0;g<z.length;g++)mxUtils.br(I),mxUtils.write(I,z[g]);if(null!=q&&null==b[q]){M.style.visibility="hidden";mxUtils.setOpacity(I,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(x);
+var Q=window.setTimeout(function(){null==b[q]&&(E.stop(),x.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(n,v){null!=b[q]&&v.getProperty("client")==b[q]&&(window.clearTimeout(Q),mxUtils.setOpacity(I,100),M.style.visibility="",E.stop(),A(),"drive"==q&&null!=c.parentNode&&c.parentNode.removeChild(c))}))}else A();J.appendChild(x)}k=null!=k?k:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
+"20px";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";u.style.padding="10px 0px 20px 0px";var C=0,F=0,J=document.createElement("div");J.style.paddingTop="2px";u.appendChild(J);var c=document.createElement("p"),e=document.createElement("p");e.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(e,mxResources.get("saveDiagramsTo")+":");t.appendChild(e);t.appendChild(u);C=0;"function"===typeof window.DriveClient&&
+d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
+d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");u=document.createElement("span");u.style.position="absolute";u.style.cursor="pointer";u.style.bottom="27px";u.style.color="gray";u.style.userSelect="none";u.style.textAlign="center";u.style.left="50%";mxUtils.setPrefixedStyle(u.style,
+"transform","translate(-50%,0)");mxUtils.write(u,mxResources.get("decideLater"));t.appendChild(u);mxEvent.addListener(u,"click",function(){b.hideDialog();var g=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=g});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(c.style.padding="7px",c.style.fontSize="9pt",c.style.marginTop="-14px",
+c.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",t.appendChild(c))},5E3);this.container=t},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
+b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var t=document.createElement("div");t.style.margin="8px 0px 0px 0px";t.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=
+IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):
+(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",k=mxResources.get("device"));var u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="8px";u.style.fontSize="18px";u.style.padding="10px";u.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",u.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),
+F=document.createElement("tbody"),J=document.createElement("tr"),c=document.createElement("td"),e=document.createElement("td");C.setAttribute("align","center");c.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);e.style.textAlign="left";e.appendChild(d);J.appendChild(c);J.appendChild(e);F.appendChild(J);C.appendChild(F);f.appendChild(C);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(u,mxResources.get("createNewDiagram"));mxEvent.addListener(u,"click",function(){b.hideDialog();b.actions.get("new").funct()});t.appendChild(u);mxUtils.br(t);u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="22px";u.style.fontSize=
+"18px";u.style.padding="10px";u.style.width="340px";mxUtils.write(u,mxResources.get("openExistingDiagram"));mxEvent.addListener(u,"click",function(){b.actions.get("open").funct()});t.appendChild(u);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(p){u.style.marginBottom="24px";var q=document.createElement("a");q.style.display="inline-block";q.style.color="gray";q.style.cursor="pointer";q.style.marginTop="6px";mxUtils.write(q,mxResources.get("signOut"));u.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(q,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){p()})});t.appendChild(q)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var g=b.drive.getUsersList();if(0<g.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");u.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var m=document.createElement("select");m.style.marginLeft="4px";m.style.width="140px";for(k=0;k<g.length;k++)C=document.createElement("option"),mxUtils.write(C,g[k].displayName),C.value=k,m.appendChild(C),
+C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(C,"<"+g[k].email+">"),C.setAttribute("disabled","disabled"),m.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=g.length;m.appendChild(C);mxEvent.addListener(m,"change",function(){var p=m.value,q=g.length!=p;q&&b.drive.setUser(g[p]);b.drive.authorize(q,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
+b.showSplash()})},!0)});t.appendChild(m)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,k,d,t,u,C,F,J){C=null!=C?C:"Check out the diagram I made using @drawio";d=document.createElement("div");var c=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=u?mxUtils.write(d,u):mxUtils.write(d,mxResources.get(5E5>f.length?c?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);u=document.createElement("div");
+u.style.position="absolute";u.style.top="30px";u.style.right="30px";u.style.color="gray";mxUtils.write(u,b.formatFileSize(f.length));d.appendChild(u);var e=document.createElement("textarea");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.marginTop="10px";e.style.resize="none";e.style.height="150px";e.style.width="440px";e.style.border=
+"1px solid gray";e.value=mxResources.get("updatingDocument");d.appendChild(e);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(e.value=f,e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)):(e.setAttribute("readonly","true"),e.value=mxResources.get("tooLargeUseDownload"))},0)};u=document.createElement("div");u.style.position="absolute";u.style.bottom="36px";u.style.right="32px";var g=null;!EmbedDialog.showPreviewOption||
+mxClient.IS_CHROMEAPP&&!c||navigator.standalone||!(c||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(g=mxUtils.button(null!=F?F:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var p=5E5>f.length?e.value:f;if(null!=t)t(p);else if(c)try{var q=b.openLink(p);null!=q&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=q&&null!=q.location.href&&q.location.href.substring(0,8)!=p.substring(0,8)&&(q.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(y){}}),
+k||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),g.className="geBtn",u.appendChild(g));if(!c||7500<f.length)F=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=J?J:"embed.txt","txt",f,"text/plain")}),F.className="geBtn",u.appendChild(F);if(c&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var m=mxUtils.button("",function(){try{var p="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}});F=document.createElement("img");F.setAttribute("src",Editor.facebookImage);F.setAttribute("width","18");F.setAttribute("height",
+"18");F.setAttribute("border","0");m.appendChild(F);m.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");m.style.verticalAlign="bottom";m.style.paddingTop="4px";m.style.minWidth="46px";m.className="geBtn";u.appendChild(m)}7168>f.length&&(m=mxUtils.button("",function(){try{var p="https://twitter.com/intent/tweet?text="+encodeURIComponent(C)+"&url="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),
+F=document.createElement("img"),F.setAttribute("src",Editor.tweetImage),F.setAttribute("width","18"),F.setAttribute("height","18"),F.setAttribute("border","0"),F.style.marginBottom="5px",m.appendChild(F),m.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),m.style.verticalAlign="bottom",m.style.paddingTop="4px",m.style.minWidth="46px",m.className="geBtn",u.appendChild(m))}!b.isOffline()&&5E5>f.length&&(m=mxUtils.button("",function(){try{var p="mailto:?subject="+encodeURIComponent(J||
+b.defaultFilename)+"&body="+encodeURIComponent(e.value);b.openLink(p)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),F=document.createElement("img"),F.className="geAdaptiveAsset",F.setAttribute("src",Editor.mailImage),F.setAttribute("width","18"),F.setAttribute("height","18"),F.setAttribute("border","0"),F.style.marginBottom="5px",m.appendChild(F),m.style.verticalAlign="bottom",m.style.paddingTop="4px",m.style.minWidth="46px",m.className="geBtn",u.appendChild(m));
+F=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.appendChild(F);m=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?F.className="geBtn gePrimaryBtn":(u.appendChild(m),m.className="geBtn gePrimaryBtn",F.className="geBtn"):(u.appendChild(g),
+F.className="geBtn",g.className="geBtn gePrimaryBtn");d.appendChild(u);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,f){function k(){var n=null!=Q&&null!=Q.getTitle()?Q.getTitle():this.defaultFilename;if(M.checked&&""!=m.value){var v="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(m.value));null!=n&&(v+="&title="+encodeURIComponent(n));0<E.length&&(v+="&s="+E);""!=p.value&&"0"!=p.value&&(v+="&border="+p.value);""!=g.value&&(v+="&height="+g.value);v+="&pan="+(q.checked?"1":"0");v+="&zoom="+(z.checked?"1":"0");v+="&fit="+(I.checked?"1":"0");
+v+="&resize="+(x.checked?"1":"0");v+="&x0="+Number(e.value);v+="&y0="+J;t.mathEnabled&&(v+="&math=1");A.checked?v+="&edit=_blank":y.checked&&(v+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=v}else Q.constructor==DriveFile||Q.constructor==DropboxFile?(v="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=m.value?v+=encodeURIComponent(mxUtils.htmlEntities(m.value))+"&type=3":(v+=Q.getHash().substring(1),v=Q.constructor==DropboxFile?v+"&type=2":v+"&type=1"),null!=
+n&&(v+="&title="+encodeURIComponent(n)),""!=g.value&&(n=parseInt(g.value)+parseInt(e.value),v+="&height="+n),c.value=v):c.value=""}var d=document.createElement("div"),t=b.editor.graph,u=t.getGraphBounds(),C=t.view.scale,F=Math.floor(u.x/C-t.view.translate.x),J=Math.floor(u.y/C-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";
+d.appendChild(c);mxUtils.br(d);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=F;d.appendChild(e);mxUtils.write(d,mxResources.get("height")+":");var g=document.createElement("input");g.setAttribute("type","text");
+g.setAttribute("size","4");g.style.marginLeft="4px";g.value=Math.ceil(u.height/C);d.appendChild(g);mxUtils.br(d);u=document.createElement("hr");u.setAttribute("size","1");u.style.marginBottom="16px";u.style.marginTop="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","28");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";m.value=f||"";d.appendChild(m);
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","3");p.style.marginBottom="8px";p.style.marginLeft="4px";p.value="0";d.appendChild(p);mxUtils.br(d);var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="16px";d.appendChild(q);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";d.appendChild(I);mxUtils.write(d,mxResources.get("fit")+" ");var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft=
+"8px";d.appendChild(M);mxUtils.write(d,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),Q=b.getCurrentFile();mxEvent.addListener(q,"change",k);mxEvent.addListener(z,"change",k);mxEvent.addListener(x,"change",k);mxEvent.addListener(I,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(A,"change",k);mxEvent.addListener(M,"change",k);mxEvent.addListener(g,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(p,"change",k);mxEvent.addListener(m,"change",k);k();
+mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn gePrimaryBtn";f.appendChild(u);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
+function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var u=new Graph(t);u.setCellsCloneable(!0);u.setPanning(!0);u.setAllowDanglingEdges(!1);u.connectionHandler.select=!1;u.view.setTranslate(20,20);u.border=20;u.panningHandler.useLeftButtonForPanning=!0;var C="curved=1;";u.cellRenderer.installCellOverlayListeners=
+function(z,y,A){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(A.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){y.fireEvent(new mxEventObject("pointerdown","event",x,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(A.node,"touchstart",function(x){y.fireEvent(new mxEventObject("pointerdown","event",x,"state",z))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
+!1;u.connectionHandler.createEdgeState=function(z){z=u.createEdge(null,null,null,null,null,C);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var F=u.getDefaultParent(),J=mxUtils.bind(this,function(z){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(A,x){u.connectionHandler.reset();u.clearSelection();var I=u.getCellGeometry(z),M;g(function(){M=u.insertVertex(F,null,"Entry",I.x,I.y,80,30,"rounded=1;");J(M);u.view.refresh(M);
+u.insertEdge(F,null,"",z,M,C)},function(){u.scrollCellToVisible(M)})});y.addListener("pointerdown",function(A,x){A=x.getProperty("event");x=x.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var I=mxUtils.convertPoint(u.container,mxEvent.getClientX(A),mxEvent.getClientY(A));u.connectionHandler.start(x,I.x,I.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(A);mxEvent.consume(A)});u.addCellOverlay(z,y)});u.getModel().beginUpdate();try{var c=u.insertVertex(F,null,"Start",
+0,0,80,30,"ellipse");J(c)}finally{u.getModel().endUpdate()}if("horizontalTree"==k){var e=new mxCompactTreeLayout(u);e.edgeRouting=!1;e.levelDistance=30;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(e=new mxCompactTreeLayout(u,!1),e.edgeRouting=!1,e.levelDistance=30,C="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(e=new mxRadialTreeLayout(u,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==k?e=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+k?e=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"circle"==k?e=new mxCircleLayout(u):(e=new mxFastOrganicLayout(u,!1),e.forceConstant=80);if(null!=e){var g=function(z,y){u.getModel().beginUpdate();try{null!=z&&z(),e.execute(u.getDefaultParent(),c)}catch(A){throw A;}finally{z=new mxMorphing(u),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),z.startAnimation()}},m=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(z,y,
+A,x,I){m.apply(this,arguments);g()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);g()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){g()})}var p=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});p.className="geBtn";b.editor.cancelFirst&&d.appendChild(p);var q=mxUtils.button(mxResources.get("insert"),function(z){u.clearCellOverlays();
+var y=u.getModel().getChildren(u.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,z.x,z.y);z=b.editor.graph.view;var A=z.getBounds(y);A.x-=z.translate.x;A.y-=z.translate.y;b.editor.graph.scrollRectToVisible(A);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(q);q.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||d.appendChild(p)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,f,k){var e=document.createElement("div");e.style.whiteSpace="nowrap";var u=document.createElement("h2");mxUtils.write(u,mxResources.get("backgroundImage"));u.style.marginTop="0px";e.appendChild(u);var v=null!=k&&null!=k.originalSrc;u=!1;var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","url");B.setAttribute("type","radio");B.setAttribute("name","geBackgroundImageDialogOption");var E=document.createElement("input");
-E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginBottom="8px";L.style.width="360px";L.value=v||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var d=0;d<b.pages.length;d++){var g=document.createElement("option");mxUtils.write(g,b.pages[d].getName()||
-mxResources.get("pageWithNumber",[d+1]));g.setAttribute("value","data:page/id,"+b.pages[d].getId());b.pages[d]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0);c.appendChild(g)}v||null!=b.pages&&1!=b.pages.length||(B.style.display="none",E.style.display="none",c.style.display="none");var q=document.createElement("option"),m=!1,n=!1,z=function(N,t){m||null!=N&&n||(E.checked?null!=t&&t(q.selected?null:
-c.value):""==L.value||b.isOffline()?(x.value="",y.value="",null!=t&&t("")):(L.value=mxUtils.trim(L.value),b.loadImage(L.value,function(p){x.value=p.width;y.value=p.height;null!=t&&t(L.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";y.value="";null!=t&&t(null)})))},C=mxUtils.bind(this,function(N){b.importFiles(N,0,0,b.maxBackgroundSize,function(t,p,F,K,D,H){L.value=t;z();L.focus()},function(){},function(t){return"image/"==t.type.substring(0,
-6)},function(t){for(var p=0;p<t.length;p++)t[p]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){v?c.focus():L.focus();mxEvent.addListener(c,"focus",function(){B.removeAttribute("checked");E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(L,"focus",function(){E.removeAttribute("checked");B.setAttribute("checked","checked");B.checked=!0});if(Graph.fileSupport){L.setAttribute("placeholder",mxResources.get("dragImagesHere"));var N=e.parentNode,t=null;mxEvent.addListener(N,
-"dragleave",function(p){null!=t&&(t.parentNode.removeChild(t),t=null);p.stopPropagation();p.preventDefault()});mxEvent.addListener(N,"dragover",mxUtils.bind(this,function(p){null==t&&(!mxClient.IS_IE||10<document.documentMode)&&(t=b.highlightElement(N));p.stopPropagation();p.preventDefault()}));mxEvent.addListener(N,"drop",mxUtils.bind(this,function(p){null!=t&&(t.parentNode.removeChild(t),t=null);if(0<p.dataTransfer.files.length)C(p.dataTransfer.files);else if(0<=mxUtils.indexOf(p.dataTransfer.types,
-"text/uri-list")){var F=p.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)&&(L.value=decodeURIComponent(F),z())}p.stopPropagation();p.preventDefault()}),!1)}};e.appendChild(B);e.appendChild(L);mxUtils.br(e);d=document.createElement("span");d.style.marginLeft="30px";mxUtils.write(d,mxResources.get("width")+":");e.appendChild(d);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";
-x.value=null==k||v?"":k.width;e.appendChild(x);mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||v?"":k.height;e.appendChild(y);mxUtils.br(e);mxUtils.br(e);mxEvent.addListener(L,"change",z);ImageDialog.filePicked=function(N){N.action==google.picker.Action.PICKED&&null!=N.docs[0].thumbnails&&(N=N.docs[0].thumbnails[N.docs[0].thumbnails.length-1],
-null!=N&&(L.value=N.url,z()));L.focus()};e.appendChild(E);e.appendChild(c);mxUtils.br(e);v?(E.setAttribute("checked","checked"),E.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!u&&E.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),c.appendChild(q),mxEvent.addListener(c,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));k=document.createElement("div");
-k.style.marginTop="30px";k.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){m=!0;b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&k.appendChild(u);d=mxUtils.button(mxResources.get("reset"),function(){L.value="";x.value="";y.value="";B.checked=!0;m=!1});mxEvent.addGestureListeners(d,function(){m=!0});d.className="geBtn";d.width="100";k.appendChild(d);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
-"file");mxEvent.addListener(I,"change",function(N){null!=I.files&&(C(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";e.appendChild(I);d=mxUtils.button(mxResources.get("open"),function(){I.click()});d.className="geBtn";k.appendChild(d)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(N){f(""!=N&&null!=N?new mxImage(N,x.value,y.value):null,null==N)})});mxEvent.addGestureListeners(applyBtn,function(){n=!0});applyBtn.className="geBtn gePrimaryBtn";
-k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(u);e.appendChild(k);this.container=e},ParseDialog=function(b,f,k){function e(m,n,z){var C=m.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,W,U,V,l){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(new mxRectangle(0,0,V,l));var A=null;y.getModel().beginUpdate();try{A="txt"==W?b.insertAsPreText(U,v.x,v.y):y.insertVertex(null,null,null,v.x,v.y,
-V,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),y.setAttributeForCell(A,"plantUmlData",JSON.stringify({data:T,format:W},null,2))}finally{y.getModel().endUpdate()}null!=A&&(y.setSelectionCell(A),y.scrollCellToVisible(A))},y=b.editor.graph,I="plantUmlTxt"==n?"txt":"plantUmlPng"==n?"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"==
-m&&"svg"==I?window.setTimeout(function(){b.spinner.stop();x(m,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(m,I,function(T,W,U){b.spinner.stop();x(m,I,T,W,U)},function(T){b.handleError(T)})}}else if("mermaid"==n)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(m,I,function(T,W,U){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(new mxRectangle(0,0,W,U));b.spinner.stop();var V=null;y.getModel().beginUpdate();try{V=y.insertVertex(null,null,null,v.x,v.y,W,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-T+";"),y.setAttributeForCell(V,"mermaidData",JSON.stringify({data:m,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=V&&(y.setSelectionCell(V),y.scrollCellToVisible(V))},function(T){b.handleError(T)}));else if("table"==n){n=null;for(var N=[],t=0,p={},F=0;F<C.length;F++){var K=mxUtils.trim(C[F]);if("primary key"==K.substring(0,11).toLowerCase()){var D=K.match(/\((.+)\)/);D&&D[1]&&(p[D[1]]=!0);C.splice(F,1)}else 0<K.toLowerCase().indexOf("primary key")&&(p[K.split(" ")[0]]=
-!0,C[F]=mxUtils.trim(K.replace(/primary key/i,"")))}for(F=0;F<C.length;F++)if(K=mxUtils.trim(C[F]),"create table"==K.substring(0,12).toLowerCase())K=mxUtils.trim(K.substring(12)),"("==K.charAt(K.length-1)&&(K=mxUtils.trim(K.substring(0,K.length-1))),n=new mxCell(K,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;"),n.vertex=!0,N.push(n),K=b.editor.graph.getPreferredSizeForCell(H),null!=
-K&&(n.geometry.width=K.width+10);else if(null!=n&&")"==K.charAt(0))t+=n.geometry.width+40,n=null;else if("("!=K&&null!=n){K=K.substring(0,","==K.charAt(K.length-1)?K.length-1:K.length);D=p[K.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(D?"1":"0")+";");H.vertex=!0;var J=new mxCell(D?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(D?"fontStyle=1;":""));J.vertex=!0;H.insert(J);K=new mxCell(K,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(D?"fontStyle=5;":""));K.vertex=!0;H.insert(K);K=b.editor.graph.getPreferredSizeForCell(K);null!=K&&n.geometry.width<K.width+30&&(n.geometry.width=Math.min(320,
-Math.max(n.geometry.width,K.width+30)));n.insert(H,D?0:null);n.geometry.height+=30}0<N.length&&(y=b.editor.graph,v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),y.setSelectionCells(y.importCells(N,v.x,v.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==n){if(0<C.length){y=b.editor.graph;H=null;N=[];for(F=n=0;F<C.length;F++)";"!=C[F].charAt(0)&&(0==C[F].length?H=null:null==H?(H=new mxCell(C[F],new mxGeometry(n,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-H.vertex=!0,N.push(H),K=y.getPreferredSizeForCell(H),null!=K&&H.geometry.width<K.width+10&&(H.geometry.width=K.width+10),n+=H.geometry.width+40):"--"==C[F]?(K=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;"),K.vertex=!0,H.geometry.height+=K.geometry.height,H.insert(K)):0<C[F].length&&(t=new mxCell(C[F],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-t.vertex=!0,K=y.getPreferredSizeForCell(t),null!=K&&t.geometry.width<K.width&&(t.geometry.width=K.width),H.geometry.width=Math.max(H.geometry.width,t.geometry.width),H.geometry.height+=t.geometry.height,H.insert(t)));if(0<N.length){v=mxEvent.isAltDown(z)?v:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0));y.getModel().beginUpdate();try{N=y.importCells(N,v.x,v.y);K=[];for(F=0;F<N.length;F++)K.push(N[F]),K=K.concat(N[F].children);y.fireEvent(new mxEventObject("cellsInserted","cells",K))}finally{y.getModel().endUpdate()}y.setSelectionCells(N);
-y.scrollCellToVisible(y.getSelectionCell())}}}else{H=function(T){var W=G[T];null==W&&(W=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),W.vertex=!0,G[T]=W,N.push(W));return W};var G={};N=[];for(F=0;F<C.length;F++)if(";"!=C[F].charAt(0)){var P=C[F].split("->");2<=P.length&&(D=H(P[0]),J=H(P[P.length-1]),P=new mxCell(2<P.length?P[1]:"",new mxGeometry),P.edge=!0,D.insertEdge(P,!0),J.insertEdge(P,!1),N.push(P))}if(0<N.length){C=document.createElement("div");C.style.visibility="hidden";
-document.body.appendChild(C);y=new Graph(C);y.getModel().beginUpdate();try{N=y.importCells(N);for(F=0;F<N.length;F++)y.getModel().isVertex(N[F])&&(K=y.getPreferredSizeForCell(N[F]),N[F].geometry.width=Math.max(N[F].geometry.width,K.width),N[F].geometry.height=Math.max(N[F].geometry.height,K.height));F=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(y,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),N),F=!1):"circle"==n?
-(new mxCircleLayout(y)).execute(y.getDefaultParent()):(t=new mxFastOrganicLayout(y),t.disableEdgeStyle=!1,t.forceConstant=180,t.execute(y.getDefaultParent()));F&&(p=new mxParallelEdgeLayout(y),p.spacing=30,p.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();K=[];b.editor.graph.getModel().beginUpdate();try{N=y.getModel().getChildren(y.getDefaultParent()),v=mxEvent.isAltDown(z)?v:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(N,!0)),K=b.editor.graph.importCells(N,
-v.x,v.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",K))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(K);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();C.parentNode.removeChild(C)}}}function u(){return"list"==E.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"==E.value?
-"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==E.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"==E.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"==E.value||"plantUmlTxt"==E.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 v=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var B=document.createElement("textarea");B.style.boxSizing="border-box";B.style.resize=
-"none";B.style.width="100%";B.style.height="354px";B.style.marginBottom="16px";var E=document.createElement("select");if("formatSql"==k||"mermaid"==k)E.style.display="none";var L=document.createElement("option");L.setAttribute("value","list");mxUtils.write(L,mxResources.get("list"));"plantUml"!=k&&E.appendChild(L);null!=k&&"fromText"!=k||L.setAttribute("selected","selected");L=document.createElement("option");L.setAttribute("value","table");mxUtils.write(L,mxResources.get("formatSql"));"formatSql"==
-k&&(E.appendChild(L),L.setAttribute("selected","selected"));L=document.createElement("option");L.setAttribute("value","mermaid");mxUtils.write(L,mxResources.get("formatSql"));"mermaid"==k&&(E.appendChild(L),L.setAttribute("selected","selected"));L=document.createElement("option");L.setAttribute("value","diagram");mxUtils.write(L,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var d=document.createElement("option");
-d.setAttribute("value","horizontalFlow");mxUtils.write(d,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(E.appendChild(L),E.appendChild(c),E.appendChild(d),E.appendChild(g));L=document.createElement("option");L.setAttribute("value","plantUmlSvg");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&L.setAttribute("selected",
-"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");d=document.createElement("option");d.setAttribute("value","plantUmlTxt");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(E.appendChild(L),E.appendChild(c),E.appendChild(d));var q=u();B.value=q;f.appendChild(B);this.init=function(){B.focus()};
-Graph.fileSupport&&(B.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),B.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var n=new FileReader;n.onload=function(z){B.value=z.target.result};n.readAsText(m)}},!1));f.appendChild(E);mxEvent.addListener(E,"change",function(){var m=u();if(0==B.value.length||B.value==q)q=m,B.value=q});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(L=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),L.className="geBtn",f.appendChild(L));L=mxUtils.button(mxResources.get("close"),function(){B.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});L.className="geBtn";b.editor.cancelFirst&&f.appendChild(L);c=mxUtils.button(mxResources.get("insert"),function(m){b.hideDialog();e(B.value,E.value,m)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(L);this.container=f},NewDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n,z,C,x){function y(ka){null!=ka&&(Ca=Da=ka?135:140);ka=!0;if(null!=na)for(;G<na.length&&(ka||0!=mxUtils.mod(G,30));){var ua=na[G++];ua=t(ua.url,ua.libs,ua.title,ua.tooltip?ua.tooltip:ua.title,ua.select,ua.imgUrl,ua.info,ua.onClick,ua.preview,ua.noImg,ua.clibs);ka&&ua.click();ka=!1}}function I(){if(aa&&null!=m)k||b.hideDialog(),m(aa,Z,J.value);else if(e)k||b.hideDialog(),e(S,J.value,Y,O);else{var ka=J.value;null!=ka&&
-0<ka.length&&b.pickFolder(b.mode,function(ua){b.createFile(ka,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ua,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function N(ka,ua,sa,va,ca,ea,da){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");T.removeAttribute("disabled");S=ua;O=sa;R=ea;X=ka;aa=va;Y=da;Z=ca;X.style.backgroundColor=E;X.style.border=L}function t(ka,ua,sa,va,ca,ea,da,fa,
-ja,ra,oa){function Aa(Ka,Ta){null==Ha?(Ma=Ka,Ma=/^https?:\/\//.test(Ma)&&!b.editor.isCorsEnabledForUrl(Ma)?PROXY_URL+"?url="+encodeURIComponent(Ma):TEMPLATE_PATH+"/"+Ma,mxUtils.get(Ma,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,Ma)}))):Ta(Ha,Ma)}function xa(Ka,Ta,Va){if(null!=Ka&&mxUtils.isAncestorNode(document.body,pa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Wa=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
-Wa.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(pa,Ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;N(pa,null,null,ka,da,oa)},!0,!1)}}function ta(Ka,Ta){null==ka||Ra||
-b.sidebar.currentElt==pa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ja?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ja.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ja.naturalWidth+'" height="'+Ja.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",xa(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt=
-pa,Ra=!0,Aa(ka,function(Va){Ra&&b.sidebar.currentElt==pa&&xa(Va,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Ra=!1})))}var pa=document.createElement("div");pa.className="geTemplate geAdaptiveAsset";pa.style.position="relative";pa.style.height=Ca+"px";pa.style.width=Da+"px";var Ha=null,Ma=ka;null!=sa?pa.setAttribute("title",mxResources.get(sa,null,sa)):null!=va&&0<va.length&&pa.setAttribute("title",va);var Ra=!1,Ja=null;if(null!=ea){pa.style.display="inline-flex";pa.style.justifyContent="center";
-pa.style.alignItems="center";ca=document.createElement("img");ca.setAttribute("src",ea);ca.setAttribute("alt",va);ca.style.maxWidth=Ca+"px";ca.style.maxHeight=Da+"px";Ja=ca;var Oa=ea.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");pa.appendChild(ca);ca.onerror=function(){this.src!=Oa?this.src=Oa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ka,da,oa)}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){I();
-mxEvent.consume(Ka)})}else if(!ra&&null!=ka&&0<ka.length){var Qa=function(Ka){T.setAttribute("disabled","disabled");pa.style.backgroundColor="transparent";pa.style.border="1px solid transparent";P.spin(ba);Aa(ka,function(Ta,Va){P.stop();null!=Ta&&(N(pa,Ta,ua,null,null,oa,Va),Ka&&I())})};ca=ja||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";pa.style.backgroundImage="url("+ca+")";pa.style.backgroundPosition="center center";pa.style.backgroundRepeat="no-repeat";if(null!=sa){va=document.createElement("table");
-va.setAttribute("width","100%");va.setAttribute("height","100%");va.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";va.style.lineHeight="1.3em";va.style.border="inherit";ea=document.createElement("tbody");ja=document.createElement("tr");ra=document.createElement("td");ra.setAttribute("align","center");ra.setAttribute("valign","middle");var Na=document.createElement("span");Na.style.display="inline-block";Na.style.padding="4px 8px 4px 8px";Na.style.userSelect="none";Na.style.borderRadius=
-"3px";Na.style.background="rgba(255,255,255,0.85)";Na.style.overflow="hidden";Na.style.textOverflow="ellipsis";Na.style.maxWidth=Ca-34+"px";mxUtils.write(Na,mxResources.get(sa,null,sa));ra.appendChild(Na);ja.appendChild(ra);ea.appendChild(ja);va.appendChild(ea);pa.appendChild(va)}mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(pa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else va=document.createElement("table"),va.setAttribute("width",
-"100%"),va.setAttribute("height","100%"),va.style.lineHeight="1.3em",ea=document.createElement("tbody"),ja=document.createElement("tr"),ra=document.createElement("td"),ra.setAttribute("align","center"),ra.setAttribute("valign","middle"),Na=document.createElement("span"),Na.style.display="inline-block",Na.style.padding="4px 8px 4px 8px",Na.style.userSelect="none",Na.style.borderRadius="3px",Na.style.background="#ffffff",Na.style.overflow="hidden",Na.style.textOverflow="ellipsis",Na.style.maxWidth=
-Ca-34+"px",mxUtils.write(Na,mxResources.get(sa,null,sa)),ra.appendChild(Na),ja.appendChild(ra),ea.appendChild(ja),va.appendChild(ea),pa.appendChild(va),ca&&N(pa),mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(Ka){N(pa,null,null,ka,da)}),null,null),null!=fa?mxEvent.addListener(pa,"click",fa):(mxEvent.addListener(pa,"click",function(Ka){N(pa,null,null,ka,da)}),mxEvent.addListener(pa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ka){var Sa=document.createElement("img");Sa.setAttribute("src",
-Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";pa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ka){Ua=b.sidebar.currentElt==pa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ka){Ua||ta(Ka,Sa);mxEvent.consume(Ka)}))}ba.appendChild(pa);return pa}function p(){function ka(ta,
-pa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+pa.length+")"}function ua(ta,pa,Ha){mxEvent.addListener(pa,"click",function(){Ba!=pa&&(Ba.style.backgroundColor="",Ba=pa,Ba.style.backgroundColor=B,ba.scrollTop=0,ba.innerText="",G=0,na=Ha?Pa[ta][Ha]:ya[ta],U=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(ba,"scroll",function(ta){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(y(),mxEvent.consume(ta))}));
-if(0<Fa){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));la.appendChild(sa);for(var va in za){var ca=document.createElement("div"),ea=va;sa=za[va];18<ea.length&&(ea=ea.substring(0,18)+"&hellip;");ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ca.setAttribute("title",
-ea+" ("+sa.length+")");mxUtils.write(ca,ca.getAttribute("title"));null!=c&&(ca.style.padding=c);la.appendChild(ca);(function(ta,pa){mxEvent.addListener(ca,"click",function(){Ba!=pa&&(Ba.style.backgroundColor="",Ba=pa,Ba.style.backgroundColor=B,ba.scrollTop=0,ba.innerText="",G=0,na=za[ta],U=null,y(!1))})})(va,ca)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");la.appendChild(sa)}for(va in ya){ea=
-Pa[va];var da=ca=document.createElement(ea?"ul":"div");sa=ya[va];var fa=ka(va,sa);if(null!=ea){var ja=document.createElement("li"),ra=document.createElement("div");ra.className="geTempTreeCaret";ra.setAttribute("title",fa);mxUtils.write(ra,fa);da=ra;ja.appendChild(ra);fa=document.createElement("ul");fa.className="geTempTreeNested";fa.style.visibility="hidden";for(var oa in ea){var Aa=document.createElement("li"),xa=ka(oa,ea[oa]);Aa.setAttribute("title",xa);mxUtils.write(Aa,xa);ua(va,Aa,oa);fa.appendChild(Aa)}ja.appendChild(fa);
-ca.className="geTempTree";ca.appendChild(ja);(function(ta,pa){mxEvent.addListener(pa,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);pa.classList.toggle("geTempTreeCaret-down")})})(fa,ra)}else ca.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-ca.setAttribute("title",fa),mxUtils.write(ca,fa);null!=c&&(ca.style.padding=c);la.appendChild(ca);null==Ba&&0<sa.length&&(Ba=ca,Ba.style.backgroundColor=B,na=sa);ua(va,da)}y(!1)}var F=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;u=null!=u?u:!1;B=null!=B?B:"#ebf2f9";E=null!=E?E:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";L=null!=L?L:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";d=null!=d?d:EditorUi.templateFile;var K=document.createElement("div");
-K.style.userSelect="none";K.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";k&&K.appendChild(D);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||F||!k||D.appendChild(H);k&&mxUtils.write(D,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var J=document.createElement("input");J.setAttribute("value",b.defaultFilename+H);J.style.marginLeft="10px";J.style.width=f||
-F?"144px":"244px";this.init=function(){k&&(J.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};k&&(D.appendChild(J),x?J.style.width=f||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),x.style.marginLeft=
-"6px",x.style.width=f||F?"80px":"180px",D.appendChild(x)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,J,b.editor.fileExtensions),F.style.marginTop="12px",D.appendChild(F))));D=!1;var G=0,P=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn";
-if(g||q){var W=[],U=null,V=null,l=null,A=function(ka){T.setAttribute("disabled","disabled");for(var ua=0;ua<W.length;ua++)W[ua].className=ua==ka?"geBtn gePrimaryBtn":"geBtn"};D=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";K.appendChild(z);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){la.style.display="";ha.style.display="";ba.style.left="160px";A(0);ba.scrollTop=0;ba.innerText="";G=0;U!=na&&(na=U,ya=V,Fa=l,la.innerText="",p(),U=null)});
-W.push(F);z.appendChild(F);var M=function(ka){la.style.display="none";ha.style.display="none";ba.style.left="30px";A(ka?-1:1);null==U&&(U=na);ba.scrollTop=0;ba.innerText="";P.spin(ba);var ua=function(sa,va,ca){G=0;P.stop();na=sa;ca=ca||{};var ea=0,da;for(da in ca)ea+=ca[da].length;if(va)ba.innerText=va;else if(0==sa.length&&0==ea)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<ea){la.style.display="";ba.style.left="160px";la.innerText="";Fa=0;ya={"draw.io":sa};
-for(da in ca)ya[da]=ca[da];p()}else y(!0)};ka?q(Q.value,ua):g(ua)};g&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(F),W.push(F));if(q){F=document.createElement("span");F.style.marginLeft="10px";F.innerText=mxResources.get("search")+":";z.appendChild(F);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ka){13==ka.keyCode&&M(!0)});z.appendChild(Q);F=mxUtils.button(mxResources.get("search"),
-function(){M(!0)});F.className="geBtn";z.appendChild(F)}A(0)}var O=null,R=null,S=null,X=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";z=(k?72:40)+(D?30:0);ba.style.top=z+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var ha=document.createElement("div");ha.style.cssText="position:absolute;left:30px;width:128px;top:"+
-z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");ha.appendChild(ma);var ia=document.createElement("img"),qa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ia.setAttribute("src",qa);ia.setAttribute("title",mxResources.get("search"));
-ia.style.position="relative";ia.style.left="-18px";ia.style.top="1px";ia.style.background="url('"+b.editor.transparentImage+"')";ha.appendChild(ia);mxEvent.addListener(ia,"click",function(){ia.getAttribute("src")==Dialog.prototype.closeImage&&(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search")),ma.value="",null!=Ga&&(Ga.click(),Ga=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var ua=ma.value;if(""==ua)null!=Ga&&(Ga.click(),
-Ga=null);else{if(null==NewDialog.tagsList[d]){var sa={};for(oa in ya)for(var va=ya[oa],ca=0;ca<va.length;ca++){var ea=va[ca];if(null!=ea.tags)for(var da=ea.tags.toLowerCase().split(";"),fa=0;fa<da.length;fa++)null==sa[da[fa]]&&(sa[da[fa]]=[]),sa[da[fa]].push(ea)}NewDialog.tagsList[d]=sa}var ja=ua.toLowerCase().split(" ");sa=NewDialog.tagsList[d];if(0<Fa&&null==sa.__tagsList__){for(oa in za)for(va=za[oa],ca=0;ca<va.length;ca++)for(ea=va[ca],da=ea.title.split(" "),da.push(oa),fa=0;fa<da.length;fa++){var ra=
-da[fa].toLowerCase();null==sa[ra]&&(sa[ra]=[]);sa[ra].push(ea)}sa.__tagsList__=!0}var oa=[];va={};for(ca=da=0;ca<ja.length;ca++)if(0<ja[ca].length){ra=sa[ja[ca]];var Aa={};oa=[];if(null!=ra)for(fa=0;fa<ra.length;fa++)ea=ra[fa],0==da==(null==va[ea.url])&&(Aa[ea.url]=!0,oa.push(ea));va=Aa;da++}ba.scrollTop=0;ba.innerText="";G=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==oa.length?"noResultsFor":
-"resultsFor",[ua]));ba.appendChild(sa);null!=Ba&&null==Ga&&(Ba.style.backgroundColor="",Ga=Ba,Ba=sa);na=oa;U=null;y(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(ia.setAttribute("src",qa),ia.setAttribute("title",mxResources.get("search"))):(ia.setAttribute("src",Dialog.prototype.closeImage),ia.setAttribute("title",mxResources.get("reset")))}));z+=23;var la=document.createElement("div");la.style.cssText="position:absolute;left:30px;width:128px;top:"+
-z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ca=140,Da=140,ya={},Pa={},za={},Fa=0,Ia=!0,Ba=null,Ga=null;ya.basic=[{title:"blankDiagram",select:!0}];var na=ya.basic;if(!f){var Ea=function(){mxUtils.get(La,function(ka){if(!wa){wa=!0;ka=ka.getXml().documentElement.firstChild;for(var ua={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var sa=ka.getAttribute("name"),va=
-ka.getElementsByTagName("add"),ca=[],ea=0;ea<va.length;ea++)ca.push(encodeURIComponent(mxUtils.getTextContent(va[ea])));null!=sa&&0<ca.length&&(ua[sa]=ca.join(";"))}else if(ca=ka.getAttribute("url"),null!=ca){va=ka.getAttribute("section");sa=ka.getAttribute("subsection");if(null==va&&(ea=ca.indexOf("/"),va=ca.substring(0,ea),null==sa)){var da=ca.indexOf("/",ea+1);-1<da&&(sa=ca.substring(ea+1,da))}ea=ya[va];null==ea&&(ea=[],ya[va]=ea);ca=ka.getAttribute("clibs");null!=ua[ca]&&(ca=ua[ca]);ca={url:ka.getAttribute("url"),
-libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:ca,tags:ka.getAttribute("tags")};ea.push(ca);null!=sa&&(ea=Pa[va],null==ea&&(ea={},Pa[va]=ea),va=ea[sa],null==va&&(va=[],ea[sa]=va),va.push(ca))}ka=ka.nextSibling}P.stop();p()}})};K.appendChild(ha);K.appendChild(la);K.appendChild(ba);var wa=!1,La=d;/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)&&(La=PROXY_URL+"?url="+encodeURIComponent(La));
-P.spin(ba);null!=C?C(function(ka,ua){za=ka;l=Fa=ua;Ea()},Ea):Ea();V=ya}mxEvent.addListener(J,"keypress",function(ka){b.dialog.container.firstChild==K&&13==ka.keyCode&&I()});C=document.createElement("div");C.style.marginTop=f?"4px":"16px";C.style.textAlign="right";C.style.position="absolute";C.style.left="40px";C.style.bottom="24px";C.style.right="40px";f||b.isOffline()||!k||null!=e||u||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-z.className="geBtn",C.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=v&&v();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||u&&null==v||C.appendChild(z);f||"1"==urlParams.embed||u||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ua){null!=ua&&0<ua.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ua),function(sa){S=
-sa;O=null;templateRealURl=ua;b.hideDialog();I()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),f.className="geBtn",C.appendChild(f));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ua){b.openFiles(ka.files,!0);
-ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),n.className="geBtn",C.appendChild(n));C.appendChild(T);b.editor.cancelFirst||null!=e||u&&null==v||C.appendChild(z);K.appendChild(C);this.container=K};NewDialog.tagsList={};
-var CreateDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n,z,C){function x(D,H,J,G){function P(){mxEvent.addListener(T,"click",function(){var A=J;if(B){var M=N.value,Q=M.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){A=null!=A?A:K.value;var O="";A==App.MODE_GOOGLE?O=b.drive.extension:A==App.MODE_GITHUB?O=b.gitHub.extension:A==App.MODE_GITLAB?O=b.gitLab.extension:A==App.MODE_TRELLO?O=b.trello.extension:A==App.MODE_DROPBOX?O=b.dropbox.extension:A==App.MODE_ONEDRIVE?O=b.oneDrive.extension:A==App.MODE_DEVICE&&
-(O=".drawio");0<=Q&&(M=M.substring(0,Q));N.value=M+O}}y(J)})}var T=document.createElement("a");T.style.overflow="hidden";var W=document.createElement("img");W.src=D;W.setAttribute("border","0");W.setAttribute("align","absmiddle");W.style.width="60px";W.style.height="60px";W.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(W);T.style.color=
-"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=G&&null==b[G]){W.style.visibility="hidden";mxUtils.setOpacity(U,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(T);var l=window.setTimeout(function(){null==b[G]&&(V.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(l),
-mxUtils.setOpacity(U,100),W.style.visibility="",V.stop(),P())}))}else P();p.appendChild(T);++F==g&&(mxUtils.br(p),F=0)}function y(D){var H=N.value;if(null==D||null!=H&&0<H.length)C&&b.hideDialog(),k(H,D,N)}d="1"==urlParams.noDevice?!1:d;B=null!=B?B:!0;E=null!=E?E:!0;g=null!=g?g:4;C=null!=C?C:!0;v=document.createElement("div");v.style.whiteSpace="nowrap";null==e&&b.addLanguageMenu(v);var I=document.createElement("h2");mxUtils.write(I,u||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
-"24px";v.appendChild(I);mxUtils.write(v,mxResources.get("filename")+":");var N=document.createElement("input");N.setAttribute("value",f);N.style.width="200px";N.style.marginLeft="10px";N.style.marginBottom="20px";N.style.maxWidth="70%";this.init=function(){N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};v.appendChild(N);null!=z&&(null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),
-u.style.marginLeft="6px",u.style.width="90px",v.appendChild(u)),v.appendChild(FilenameDialog.createTypeHint(b,N,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=m&&"image/"==m.substring(0,6)&&("image/svg"!=m.substring(0,9)||mxClient.IS_SVG)){N.style.width="160px";u=document.createElement("img");var t=n?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+m+";base64,"+t);u.style.position="absolute";u.style.top="70px";u.style.right="100px";u.style.maxWidth="120px";u.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(u.style,"transform","translate(50%,-50%)");v.appendChild(u);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=m||(z=mxUtils.button(mxResources.get("copy"),function(D){D=b.base64ToBlob(t,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+m+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
-z.style.marginTop="6px",z.className="geBtn");L&&Editor.popupsAllowed&&(u.style.cursor="pointer",mxEvent.addGestureListeners(u,null,null,function(D){mxEvent.isPopupTrigger(D)||y("_blank")}))}mxUtils.br(v);var p=document.createElement("div");p.style.textAlign="center";var F=0;p.style.marginTop="6px";v.appendChild(p);var K=document.createElement("select");K.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),K.appendChild(q),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),K.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),K.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),K.appendChild(q),x(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),K.appendChild(q),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),K.appendChild(q),x(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),K.appendChild(q),b.mode!=App.MODE_DEVICE&&E||q.setAttribute("selected","selected"),d&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);E&&isLocalStorage&&"0"!=urlParams.browser&&(E=document.createElement("option"),
-E.setAttribute("value",App.MODE_BROWSER),mxUtils.write(E,mxResources.get("browser")),K.appendChild(E),b.mode==App.MODE_BROWSER&&E.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));E=document.createElement("div");E.style.marginTop="26px";E.style.textAlign="center";null!=c&&(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(c)}),d.className="geBtn",E.appendChild(d));d=mxUtils.button(mxResources.get(null!=e?"close":"cancel"),
-function(){null!=e?e():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});d.className="geBtn";b.editor.cancelFirst&&null==e&&E.appendChild(d);null==e&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",E.appendChild(q));L&&Editor.popupsAllowed&&(L=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),L.className="geBtn",E.appendChild(L));CreateDialog.showDownloadButton&&(L=mxUtils.button(mxResources.get("download"),
-function(){y("download")}),L.className="geBtn",E.appendChild(L),null!=z&&(L.style.marginTop="6px",E.style.marginTop="6px"));null!=z&&(mxUtils.br(E),E.appendChild(z));b.editor.cancelFirst&&null==e||E.appendChild(d);mxEvent.addListener(N,"keypress",function(D){13==D.keyCode?y(App.MODE_DEVICE):27==D.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});v.appendChild(E);this.container=v};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,k,e,u){u=null!=u?u:!0;var v=document.createElement("div");v.style.textAlign="left";v.style.height="100%";mxUtils.write(v,mxResources.get("fileOpenLocation"));mxUtils.br(v);mxUtils.br(v);var B=mxUtils.button(mxResources.get("openInThisWindow"),function(){u&&b.hideDialog();null!=e&&e()});B.className="geBtn";B.style.marginBottom="8px";B.style.width="280px";v.appendChild(B);mxUtils.br(v);var E=mxUtils.button(mxResources.get("openInNewWindow"),function(){u&&b.hideDialog();
-null!=k&&k();b.openLink(f,null,!0)});E.className="geBtn gePrimaryBtn";E.style.width=B.style.width;v.appendChild(E);mxUtils.br(v);mxUtils.br(v);mxUtils.write(v,mxResources.get("allowPopups"));this.container=v},ImageDialog=function(b,f,k,e,u,v,B,E){function L(){0<g.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}v=null!=v?v:!0;var c=b.editor.graph,d=document.createElement("div");mxUtils.write(d,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
+var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var u=null!=k&&null!=k.originalSrc;t=!1;var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","geBackgroundImageDialogOption");var F=document.createElement("input");
+F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginBottom="8px";J.style.width="360px";J.value=u||null==k?"":k.src;var c=document.createElement("select");c.style.width="360px";if(null!=b.pages)for(var e=0;e<b.pages.length;e++){var g=document.createElement("option");mxUtils.write(g,b.pages[e].getName()||
+mxResources.get("pageWithNumber",[e+1]));g.setAttribute("value","data:page/id,"+b.pages[e].getId());b.pages[e]==b.currentPage&&g.setAttribute("disabled","disabled");null!=k&&k.originalSrc==g.getAttribute("value")&&(g.setAttribute("selected","selected"),t=!0);c.appendChild(g)}u||null!=b.pages&&1!=b.pages.length||(C.style.display="none",F.style.display="none",c.style.display="none");var m=document.createElement("option"),p=!1,q=!1,z=function(M,E){p||null!=M&&q||(F.checked?null!=E&&E(m.selected?null:
+c.value):""==J.value||b.isOffline()?(A.value="",x.value="",null!=E&&E("")):(J.value=mxUtils.trim(J.value),b.loadImage(J.value,function(Q){A.value=Q.width;x.value=Q.height;null!=E&&E(J.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));A.value="";x.value="";null!=E&&E(null)})))},y=mxUtils.bind(this,function(M){b.importFiles(M,0,0,b.maxBackgroundSize,function(E,Q,n,v,D,H){J.value=E;z();J.focus()},function(){},function(E){return"image/"==E.type.substring(0,
+6)},function(E){for(var Q=0;Q<E.length;Q++)E[Q]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?c.focus():J.focus();mxEvent.addListener(c,"focus",function(){C.removeAttribute("checked");F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(J,"focus",function(){F.removeAttribute("checked");C.setAttribute("checked","checked");C.checked=!0});if(Graph.fileSupport){J.setAttribute("placeholder",mxResources.get("dragImagesHere"));var M=d.parentNode,E=null;mxEvent.addListener(M,
+"dragleave",function(Q){null!=E&&(E.parentNode.removeChild(E),E=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(Q){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(M));Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(Q){null!=E&&(E.parentNode.removeChild(E),E=null);if(0<Q.dataTransfer.files.length)y(Q.dataTransfer.files);else if(0<=mxUtils.indexOf(Q.dataTransfer.types,
+"text/uri-list")){var n=Q.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)&&(J.value=decodeURIComponent(n),z())}Q.stopPropagation();Q.preventDefault()}),!1)}};d.appendChild(C);d.appendChild(J);mxUtils.br(d);e=document.createElement("span");e.style.marginLeft="30px";mxUtils.write(e,mxResources.get("width")+":");d.appendChild(e);var A=document.createElement("input");A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";
+A.value=null==k||u?"":k.width;d.appendChild(A);mxUtils.write(d,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==k||u?"":k.height;d.appendChild(x);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(J,"change",z);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],
+null!=M&&(J.value=M.url,z()));J.focus()};d.appendChild(F);d.appendChild(c);mxUtils.br(d);u?(F.setAttribute("checked","checked"),F.checked=!0):(C.setAttribute("checked","checked"),C.checked=!0);!t&&F.checked&&(mxUtils.write(m,mxResources.get("pageNotFound")),m.setAttribute("disabled","disabled"),m.setAttribute("selected","selected"),m.setAttribute("value","pageNotFound"),c.appendChild(m),mxEvent.addListener(c,"change",function(){null==m.parentNode||m.selected||m.parentNode.removeChild(m)}));k=document.createElement("div");
+k.style.marginTop="30px";k.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){p=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&k.appendChild(t);e=mxUtils.button(mxResources.get("reset"),function(){J.value="";A.value="";x.value="";C.checked=!0;p=!1});mxEvent.addGestureListeners(e,function(){p=!0});e.className="geBtn";e.width="100";k.appendChild(e);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
+"file");mxEvent.addListener(I,"change",function(M){null!=I.files&&(y(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);e=mxUtils.button(mxResources.get("open"),function(){I.click()});e.className="geBtn";k.appendChild(e)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(M){f(""!=M&&null!=M?new mxImage(M,A.value,x.value):null,null==M)})});mxEvent.addGestureListeners(applyBtn,function(){q=!0});applyBtn.className="geBtn gePrimaryBtn";
+k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(t);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(p,q,z){var y=p.split("\n");if("plantUmlPng"==q||"plantUmlSvg"==q||"plantUmlTxt"==q){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(T,V,U,X,l){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(new mxRectangle(0,0,X,l));var B=null;x.getModel().beginUpdate();try{B="txt"==V?b.insertAsPreText(U,u.x,u.y):x.insertVertex(null,null,null,u.x,u.y,
+X,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),x.setAttributeForCell(B,"plantUmlData",JSON.stringify({data:T,format:V},null,2))}finally{x.getModel().endUpdate()}null!=B&&(x.setSelectionCell(B),x.scrollCellToVisible(B))},x=b.editor.graph,I="plantUmlTxt"==q?"txt":"plantUmlPng"==q?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+p&&"svg"==I?window.setTimeout(function(){b.spinner.stop();A(p,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(p,I,function(T,V,U){b.spinner.stop();A(p,I,T,V,U)},function(T){b.handleError(T)})}}else if("mermaid"==q)b.spinner.spin(document.body,mxResources.get("inserting"))&&(x=b.editor.graph,b.generateMermaidImage(p,I,function(T,V,U){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(new mxRectangle(0,0,V,U));b.spinner.stop();var X=null;x.getModel().beginUpdate();try{X=x.insertVertex(null,null,null,u.x,u.y,V,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+T+";"),x.setAttributeForCell(X,"mermaidData",JSON.stringify({data:p,config:EditorUi.defaultMermaidConfig},null,2))}finally{x.getModel().endUpdate()}null!=X&&(x.setSelectionCell(X),x.scrollCellToVisible(X))},function(T){b.handleError(T)}));else if("table"==q){q=null;for(var M=[],E=0,Q={},n=0;n<y.length;n++){var v=mxUtils.trim(y[n]);if("primary key"==v.substring(0,11).toLowerCase()){var D=v.match(/\((.+)\)/);D&&D[1]&&(Q[D[1]]=!0);y.splice(n,1)}else 0<v.toLowerCase().indexOf("primary key")&&(Q[v.split(" ")[0]]=
+!0,y[n]=mxUtils.trim(v.replace(/primary key/i,"")))}for(n=0;n<y.length;n++)if(v=mxUtils.trim(y[n]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-1))),q=new mxCell(v,new mxGeometry(E,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),q.vertex=!0,M.push(q),v=b.editor.graph.getPreferredSizeForCell(H),null!=
+v&&(q.geometry.width=v.width+10);else if(null!=q&&")"==v.charAt(0))E+=q.geometry.width+40,q=null;else if("("!=v&&null!=q){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);D=Q[v.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(D?"1":"0")+";");H.vertex=!0;var K=new mxCell(D?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(D?"fontStyle=1;":""));K.vertex=!0;H.insert(K);v=new mxCell(v,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(D?"fontStyle=5;":""));v.vertex=!0;H.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&q.geometry.width<v.width+30&&(q.geometry.width=Math.min(320,
+Math.max(q.geometry.width,v.width+30)));q.insert(H,D?0:null);q.geometry.height+=30}0<M.length&&(x=b.editor.graph,u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0)),x.setSelectionCells(x.importCells(M,u.x,u.y)),x.scrollCellToVisible(x.getSelectionCell()))}else if("list"==q){if(0<y.length){x=b.editor.graph;H=null;M=[];for(n=q=0;n<y.length;n++)";"!=y[n].charAt(0)&&(0==y[n].length?H=null:null==H?(H=new mxCell(y[n],new mxGeometry(q,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+H.vertex=!0,M.push(H),v=x.getPreferredSizeForCell(H),null!=v&&H.geometry.width<v.width+10&&(H.geometry.width=v.width+10),q+=H.geometry.width+40):"--"==y[n]?(v=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),v.vertex=!0,H.geometry.height+=v.geometry.height,H.insert(v)):0<y[n].length&&(E=new mxCell(y[n],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+E.vertex=!0,v=x.getPreferredSizeForCell(E),null!=v&&E.geometry.width<v.width&&(E.geometry.width=v.width),H.geometry.width=Math.max(H.geometry.width,E.geometry.width),H.geometry.height+=E.geometry.height,H.insert(E)));if(0<M.length){u=mxEvent.isAltDown(z)?u:x.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0));x.getModel().beginUpdate();try{M=x.importCells(M,u.x,u.y);v=[];for(n=0;n<M.length;n++)v.push(M[n]),v=v.concat(M[n].children);x.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{x.getModel().endUpdate()}x.setSelectionCells(M);
+x.scrollCellToVisible(x.getSelectionCell())}}}else{H=function(T){var V=G[T];null==V&&(V=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),V.vertex=!0,G[T]=V,M.push(V));return V};var G={};M=[];for(n=0;n<y.length;n++)if(";"!=y[n].charAt(0)){var N=y[n].split("->");2<=N.length&&(D=H(N[0]),K=H(N[N.length-1]),N=new mxCell(2<N.length?N[1]:"",new mxGeometry),N.edge=!0,D.insertEdge(N,!0),K.insertEdge(N,!1),M.push(N))}if(0<M.length){y=document.createElement("div");y.style.visibility="hidden";
+document.body.appendChild(y);x=new Graph(y);x.getModel().beginUpdate();try{M=x.importCells(M);for(n=0;n<M.length;n++)x.getModel().isVertex(M[n])&&(v=x.getPreferredSizeForCell(M[n]),M[n].geometry.width=Math.max(M[n].geometry.width,v.width),M[n].geometry.height=Math.max(M[n].geometry.height,v.height));n=!0;"horizontalFlow"==q||"verticalFlow"==q?((new mxHierarchicalLayout(x,"horizontalFlow"==q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(x.getDefaultParent(),M),n=!1):"circle"==q?
+(new mxCircleLayout(x)).execute(x.getDefaultParent()):(E=new mxFastOrganicLayout(x),E.disableEdgeStyle=!1,E.forceConstant=180,E.execute(x.getDefaultParent()));n&&(Q=new mxParallelEdgeLayout(x),Q.spacing=30,Q.execute(x.getDefaultParent()))}finally{x.getModel().endUpdate()}x.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{M=x.getModel().getChildren(x.getDefaultParent()),u=mxEvent.isAltDown(z)?u:b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(M,!0)),v=b.editor.graph.importCells(M,
+u.x,u.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());x.destroy();y.parentNode.removeChild(y)}}}function t(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value?
+"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
+"plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var u=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
+"none";C.style.width="100%";C.style.height="354px";C.style.marginBottom="16px";var F=document.createElement("select");if("formatSql"==k||"mermaid"==k)F.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=k&&F.appendChild(J);null!=k&&"fromText"!=k||J.setAttribute("selected","selected");J=document.createElement("option");J.setAttribute("value","table");mxUtils.write(J,mxResources.get("formatSql"));"formatSql"==
+k&&(F.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","mermaid");mxUtils.write(J,mxResources.get("formatSql"));"mermaid"==k&&(F.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));var c=document.createElement("option");c.setAttribute("value","circle");mxUtils.write(c,mxResources.get("circle"));var e=document.createElement("option");
+e.setAttribute("value","horizontalFlow");mxUtils.write(e,mxResources.get("horizontalFlow"));var g=document.createElement("option");g.setAttribute("value","verticalFlow");mxUtils.write(g,mxResources.get("verticalFlow"));"plantUml"!=k&&(F.appendChild(J),F.appendChild(c),F.appendChild(e),F.appendChild(g));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&J.setAttribute("selected",
+"selected");c=document.createElement("option");c.setAttribute("value","plantUmlPng");mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(F.appendChild(J),F.appendChild(c),F.appendChild(e));var m=t();C.value=m;f.appendChild(C);this.init=function(){C.focus()};
+Graph.fileSupport&&(C.addEventListener("dragover",function(p){p.stopPropagation();p.preventDefault()},!1),C.addEventListener("drop",function(p){p.stopPropagation();p.preventDefault();if(0<p.dataTransfer.files.length){p=p.dataTransfer.files[0];var q=new FileReader;q.onload=function(z){C.value=z.target.result};q.readAsText(p)}},!1));f.appendChild(F);mxEvent.addListener(F,"change",function(){var p=t();if(0==C.value.length||C.value==m)m=p,C.value=m});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(J=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),J.className="geBtn",f.appendChild(J));J=mxUtils.button(mxResources.get("close"),function(){C.value==m?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&f.appendChild(J);c=mxUtils.button(mxResources.get("insert"),function(p){b.hideDialog();d(C.value,F.value,p)});f.appendChild(c);c.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+f.appendChild(J);this.container=f},NewDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q,z,y,A){function x(la){null!=la&&(Ga=Ea=la?135:140);la=!0;if(null!=xa)for(;G<xa.length&&(la||0!=mxUtils.mod(G,30));){var da=xa[G++];da=E(da.url,da.libs,da.title,da.tooltip?da.tooltip:da.title,da.select,da.imgUrl,da.info,da.onClick,da.preview,da.noImg,da.clibs);la&&da.click();la=!1}}function I(){if(aa&&null!=p)k||b.hideDialog(),p(aa,Z,K.value);else if(d)k||b.hideDialog(),d(S,K.value,Y,O);else{var la=K.value;null!=la&&
+0<la.length&&b.pickFolder(b.mode,function(da){b.createFile(la,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,da,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function M(la,da,ca,na,ka,pa,ea){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");T.removeAttribute("disabled");S=da;O=ca;R=pa;W=la;aa=na;Y=ea;Z=ka;W.style.backgroundColor=F;W.style.border=J}function E(la,da,ca,na,ka,pa,ea,ia,
+oa,ua,wa){function Ca(Ja,Ta){null==Ha?(La=Ja,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Va){200<=Va.getStatus()&&299>=Va.getStatus()&&(Ha=Va.getText());Ta(Ha,La)}))):Ta(Ha,La)}function ya(Ja,Ta,Va){if(null!=Ja&&mxUtils.isAncestorNode(document.body,sa)){Ja=mxUtils.parseXml(Ja);Ja=Editor.parseDiagramNode(Ja.documentElement);var Wa=new mxCodec(Ja.ownerDocument),$a=new mxGraphModel;
+Wa.decode(Ja,$a);Ja=$a.root.getChildAt(0).children;b.sidebar.createTooltip(sa,Ja,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ca?mxResources.get(ca,null,ca):null,!0,new mxPoint(Ta,Va),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;M(sa,null,null,la,ea,wa)},!0,!1)}}function ta(Ja,Ta){null==la||Qa||
+b.sidebar.currentElt==sa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ia?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ia.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ia.naturalWidth+'" height="'+Ia.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ya(Ta,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja))):(b.sidebar.currentElt=
+sa,Qa=!0,Ca(la,function(Va){Qa&&b.sidebar.currentElt==sa&&ya(Va,mxEvent.getClientX(Ja),mxEvent.getClientY(Ja));Qa=!1})))}var sa=document.createElement("div");sa.className="geTemplate geAdaptiveAsset";sa.style.position="relative";sa.style.height=Ga+"px";sa.style.width=Ea+"px";var Ha=null,La=la;null!=ca?sa.setAttribute("title",mxResources.get(ca,null,ca)):null!=na&&0<na.length&&sa.setAttribute("title",na);var Qa=!1,Ia=null;if(null!=pa){sa.style.display="inline-flex";sa.style.justifyContent="center";
+sa.style.alignItems="center";ka=document.createElement("img");ka.setAttribute("src",pa);ka.setAttribute("alt",na);ka.style.maxWidth=Ga+"px";ka.style.maxHeight=Ea+"px";Ia=ka;var Na=pa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");sa.appendChild(ka);ka.onerror=function(){this.src!=Na?this.src=Na:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){M(sa,null,null,la,ea,wa)}),null,null);mxEvent.addListener(sa,"dblclick",function(Ja){I();
+mxEvent.consume(Ja)})}else if(!ua&&null!=la&&0<la.length){var Oa=function(Ja){T.setAttribute("disabled","disabled");sa.style.backgroundColor="transparent";sa.style.border="1px solid transparent";N.spin(ba);Ca(la,function(Ta,Va){N.stop();null!=Ta&&(M(sa,Ta,da,null,null,wa,Va),Ja&&I())})};ka=oa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";sa.style.backgroundImage="url("+ka+")";sa.style.backgroundPosition="center center";sa.style.backgroundRepeat="no-repeat";if(null!=ca){na=document.createElement("table");
+na.setAttribute("width","100%");na.setAttribute("height","100%");na.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";na.style.lineHeight="1.3em";na.style.border="inherit";pa=document.createElement("tbody");oa=document.createElement("tr");ua=document.createElement("td");ua.setAttribute("align","center");ua.setAttribute("valign","middle");var Ma=document.createElement("span");Ma.style.display="inline-block";Ma.style.padding="4px 8px 4px 8px";Ma.style.userSelect="none";Ma.style.borderRadius=
+"3px";Ma.style.background="rgba(255,255,255,0.85)";Ma.style.overflow="hidden";Ma.style.textOverflow="ellipsis";Ma.style.maxWidth=Ga-34+"px";mxUtils.write(Ma,mxResources.get(ca,null,ca));ua.appendChild(Ma);oa.appendChild(ua);pa.appendChild(oa);na.appendChild(pa);sa.appendChild(na)}mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){Oa()}),null,null);mxEvent.addListener(sa,"dblclick",function(Ja){Oa(!0);mxEvent.consume(Ja)})}else na=document.createElement("table"),na.setAttribute("width",
+"100%"),na.setAttribute("height","100%"),na.style.lineHeight="1.3em",pa=document.createElement("tbody"),oa=document.createElement("tr"),ua=document.createElement("td"),ua.setAttribute("align","center"),ua.setAttribute("valign","middle"),Ma=document.createElement("span"),Ma.style.display="inline-block",Ma.style.padding="4px 8px 4px 8px",Ma.style.userSelect="none",Ma.style.borderRadius="3px",Ma.style.background="#ffffff",Ma.style.overflow="hidden",Ma.style.textOverflow="ellipsis",Ma.style.maxWidth=
+Ga-34+"px",mxUtils.write(Ma,mxResources.get(ca,null,ca)),ua.appendChild(Ma),oa.appendChild(ua),pa.appendChild(oa),na.appendChild(pa),sa.appendChild(na),ka&&M(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(Ja){M(sa,null,null,la,ea)}),null,null),null!=ia?mxEvent.addListener(sa,"click",ia):(mxEvent.addListener(sa,"click",function(Ja){M(sa,null,null,la,ea)}),mxEvent.addListener(sa,"dblclick",function(Ja){I();mxEvent.consume(Ja)}));if(null!=la){var Sa=document.createElement("img");Sa.setAttribute("src",
+Sidebar.prototype.searchImage);Sa.setAttribute("title",mxResources.get("preview"));Sa.className="geActiveButton";Sa.style.position="absolute";Sa.style.cursor="default";Sa.style.padding="8px";Sa.style.right="0px";Sa.style.top="0px";sa.appendChild(Sa);var Ua=!1;mxEvent.addGestureListeners(Sa,mxUtils.bind(this,function(Ja){Ua=b.sidebar.currentElt==sa}),null,null);mxEvent.addListener(Sa,"click",mxUtils.bind(this,function(Ja){Ua||ta(Ja,Sa);mxEvent.consume(Ja)}))}ba.appendChild(sa);return sa}function Q(){function la(ta,
+sa){var Ha=mxResources.get(ta);null==Ha&&(Ha=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+sa.length+")"}function da(ta,sa,Ha){mxEvent.addListener(sa,"click",function(){Ba!=sa&&(Ba.style.backgroundColor="",Ba=sa,Ba.style.backgroundColor=C,ba.scrollTop=0,ba.innerText="",G=0,xa=Ha?Pa[ta][Ha]:za[ta],U=null,x(!1))})}qa&&(qa=!1,mxEvent.addListener(ba,"scroll",function(ta){ba.scrollTop+ba.clientHeight>=ba.scrollHeight&&(x(),mxEvent.consume(ta))}));
+if(0<Fa){var ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var na in Aa){var ka=document.createElement("div"),pa=na;ca=Aa[na];18<pa.length&&(pa=pa.substring(0,18)+"&hellip;");ka.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ka.setAttribute("title",
+pa+" ("+ca.length+")");mxUtils.write(ka,ka.getAttribute("title"));null!=c&&(ka.style.padding=c);ma.appendChild(ka);(function(ta,sa){mxEvent.addListener(ka,"click",function(){Ba!=sa&&(Ba.style.backgroundColor="",Ba=sa,Ba.style.backgroundColor=C,ba.scrollTop=0,ba.innerText="",G=0,xa=Aa[ta],U=null,x(!1))})})(na,ka)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ca,"draw.io");ma.appendChild(ca)}for(na in za){pa=
+Pa[na];var ea=ka=document.createElement(pa?"ul":"div");ca=za[na];var ia=la(na,ca);if(null!=pa){var oa=document.createElement("li"),ua=document.createElement("div");ua.className="geTempTreeCaret";ua.setAttribute("title",ia);mxUtils.write(ua,ia);ea=ua;oa.appendChild(ua);ia=document.createElement("ul");ia.className="geTempTreeNested";ia.style.visibility="hidden";for(var wa in pa){var Ca=document.createElement("li"),ya=la(wa,pa[wa]);Ca.setAttribute("title",ya);mxUtils.write(Ca,ya);da(na,Ca,wa);ia.appendChild(Ca)}oa.appendChild(ia);
+ka.className="geTempTree";ka.appendChild(oa);(function(ta,sa){mxEvent.addListener(sa,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);sa.classList.toggle("geTempTreeCaret-down")})})(ia,ua)}else ka.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ka.setAttribute("title",ia),mxUtils.write(ka,ia);null!=c&&(ka.style.padding=c);ma.appendChild(ka);null==Ba&&0<ca.length&&(Ba=ka,Ba.style.backgroundColor=C,xa=ca);da(na,ea)}x(!1)}var n=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;t=null!=t?t:!1;C=null!=C?C:"#ebf2f9";F=null!=F?F:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";J=null!=J?J:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var v=document.createElement("div");
+v.style.userSelect="none";v.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";k&&v.appendChild(D);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
+IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||n||!k||D.appendChild(H);k&&mxUtils.write(D,(n?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+H);K.style.marginLeft="10px";K.style.width=f||
+n?"144px":"244px";this.init=function(){k&&(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null));null!=ba.parentNode&&null!=ba.parentNode.parentNode&&mxEvent.addGestureListeners(ba.parentNode.parentNode,mxUtils.bind(this,function(la){b.sidebar.hideTooltip()}),null,null)};k&&(D.appendChild(K),A?K.style.width=f||n?"350px":"450px":(null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),A.style.marginLeft=
+"6px",A.style.width=f||n?"80px":"180px",D.appendChild(A)),null!=b.editor.fileExtensions&&(n=FilenameDialog.createTypeHint(b,K,b.editor.fileExtensions),n.style.marginTop="12px",D.appendChild(n))));D=!1;var G=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),T=mxUtils.button(z||mxResources.get("create"),function(){T.setAttribute("disabled","disabled");I();T.removeAttribute("disabled")});T.className="geBtn gePrimaryBtn";
+if(g||m){var V=[],U=null,X=null,l=null,B=function(la){T.setAttribute("disabled","disabled");for(var da=0;da<V.length;da++)V[da].className=da==la?"geBtn gePrimaryBtn":"geBtn"};D=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";v.appendChild(z);n=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";fa.style.display="";ba.style.left="160px";B(0);ba.scrollTop=0;ba.innerText="";G=0;U!=xa&&(xa=U,za=X,Fa=l,ma.innerText="",Q(),U=null)});
+V.push(n);z.appendChild(n);var L=function(la){ma.style.display="none";fa.style.display="none";ba.style.left="30px";B(la?-1:1);null==U&&(U=xa);ba.scrollTop=0;ba.innerText="";N.spin(ba);var da=function(ca,na,ka){G=0;N.stop();xa=ca;ka=ka||{};var pa=0,ea;for(ea in ka)pa+=ka[ea].length;if(na)ba.innerText=na;else if(0==ca.length&&0==pa)ba.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ba.innerText="",0<pa){ma.style.display="";ba.style.left="160px";ma.innerText="";Fa=0;za={"draw.io":ca};
+for(ea in ka)za[ea]=ka[ea];Q()}else x(!0)};la?m(P.value,da):g(da)};g&&(n=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),z.appendChild(n),V.push(n));if(m){n=document.createElement("span");n.style.marginLeft="10px";n.innerText=mxResources.get("search")+":";z.appendChild(n);var P=document.createElement("input");P.style.marginRight="10px";P.style.marginLeft="10px";P.style.width="220px";mxEvent.addListener(P,"keypress",function(la){13==la.keyCode&&L(!0)});z.appendChild(P);n=mxUtils.button(mxResources.get("search"),
+function(){L(!0)});n.className="geBtn";z.appendChild(n)}B(0)}var O=null,R=null,S=null,W=null,aa=null,Y=null,Z=null,ba=document.createElement("div");ba.style.border="1px solid #d3d3d3";ba.style.position="absolute";ba.style.left="160px";ba.style.right="34px";z=(k?72:40)+(D?30:0);ba.style.top=z+"px";ba.style.bottom="68px";ba.style.margin="6px 0 0 -1px";ba.style.padding="6px";ba.style.overflow="auto";var fa=document.createElement("div");fa.style.cssText="position:absolute;left:30px;width:128px;top:"+
+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ja=document.createElement("input");ja.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ja.setAttribute("placeholder",mxResources.get("search"));ja.setAttribute("type","text");fa.appendChild(ja);var ha=document.createElement("img"),ra="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ha.setAttribute("src",ra);ha.setAttribute("title",mxResources.get("search"));
+ha.style.position="relative";ha.style.left="-18px";ha.style.top="1px";ha.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(ha);mxEvent.addListener(ha,"click",function(){ha.getAttribute("src")==Dialog.prototype.closeImage&&(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search")),ja.value="",null!=Ra&&(Ra.click(),Ra=null));ja.focus()});mxEvent.addListener(ja,"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var da=ja.value;if(""==da)null!=Ra&&(Ra.click(),
+Ra=null);else{if(null==NewDialog.tagsList[e]){var ca={};for(wa in za)for(var na=za[wa],ka=0;ka<na.length;ka++){var pa=na[ka];if(null!=pa.tags)for(var ea=pa.tags.toLowerCase().split(";"),ia=0;ia<ea.length;ia++)null==ca[ea[ia]]&&(ca[ea[ia]]=[]),ca[ea[ia]].push(pa)}NewDialog.tagsList[e]=ca}var oa=da.toLowerCase().split(" ");ca=NewDialog.tagsList[e];if(0<Fa&&null==ca.__tagsList__){for(wa in Aa)for(na=Aa[wa],ka=0;ka<na.length;ka++)for(pa=na[ka],ea=pa.title.split(" "),ea.push(wa),ia=0;ia<ea.length;ia++){var ua=
+ea[ia].toLowerCase();null==ca[ua]&&(ca[ua]=[]);ca[ua].push(pa)}ca.__tagsList__=!0}var wa=[];na={};for(ka=ea=0;ka<oa.length;ka++)if(0<oa[ka].length){ua=ca[oa[ka]];var Ca={};wa=[];if(null!=ua)for(ia=0;ia<ua.length;ia++)pa=ua[ia],0==ea==(null==na[pa.url])&&(Ca[pa.url]=!0,wa.push(pa));na=Ca;ea++}ba.scrollTop=0;ba.innerText="";G=0;ca=document.createElement("div");ca.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ca,mxResources.get(0==wa.length?"noResultsFor":
+"resultsFor",[da]));ba.appendChild(ca);null!=Ba&&null==Ra&&(Ba.style.backgroundColor="",Ra=Ba,Ba=ca);xa=wa;U=null;x(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ja,"keyup",mxUtils.bind(this,function(la){""==ja.value?(ha.setAttribute("src",ra),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));z+=23;var ma=document.createElement("div");ma.style.cssText="position:absolute;left:30px;width:128px;top:"+
+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ba,"scroll",function(){b.sidebar.hideTooltip()});var Ga=140,Ea=140,za={},Pa={},Aa={},Fa=0,qa=!0,Ba=null,Ra=null;za.basic=[{title:"blankDiagram",select:!0}];var xa=za.basic;if(!f){var Da=function(){mxUtils.get(Ka,function(la){if(!va){va=!0;la=la.getXml().documentElement.firstChild;for(var da={};null!=la;){if("undefined"!==typeof la.getAttribute)if("clibs"==la.nodeName){for(var ca=la.getAttribute("name"),na=
+la.getElementsByTagName("add"),ka=[],pa=0;pa<na.length;pa++)ka.push(encodeURIComponent(mxUtils.getTextContent(na[pa])));null!=ca&&0<ka.length&&(da[ca]=ka.join(";"))}else if(ka=la.getAttribute("url"),null!=ka){na=la.getAttribute("section");ca=la.getAttribute("subsection");if(null==na&&(pa=ka.indexOf("/"),na=ka.substring(0,pa),null==ca)){var ea=ka.indexOf("/",pa+1);-1<ea&&(ca=ka.substring(pa+1,ea))}pa=za[na];null==pa&&(pa=[],za[na]=pa);ka=la.getAttribute("clibs");null!=da[ka]&&(ka=da[ka]);ka={url:la.getAttribute("url"),
+libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ka,tags:la.getAttribute("tags")};pa.push(ka);null!=ca&&(pa=Pa[na],null==pa&&(pa={},Pa[na]=pa),na=pa[ca],null==na&&(na=[],pa[ca]=na),na.push(ka))}la=la.nextSibling}N.stop();Q()}})};v.appendChild(fa);v.appendChild(ma);v.appendChild(ba);var va=!1,Ka=e;/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)&&(Ka=PROXY_URL+"?url="+encodeURIComponent(Ka));
+N.spin(ba);null!=y?y(function(la,da){Aa=la;l=Fa=da;Da()},Da):Da();X=za}mxEvent.addListener(K,"keypress",function(la){b.dialog.container.firstChild==v&&13==la.keyCode&&I()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!k||null!=d||t||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",y.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(z);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(da){null!=da&&0<da.length&&b.editor.loadUrl(b.editor.getProxiedUrl(da),function(ca){S=
+ca;O=null;templateRealURl=da;b.hideDialog();I()},function(ca){b.handleError(ca)})},mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&q&&(q=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(da){b.openFiles(la.files,!0);
+la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=la}b.newDlgFileInputElt.click()}),q.className="geBtn",y.appendChild(q));y.appendChild(T);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(z);v.appendChild(y);this.container=v};NewDialog.tagsList={};
+var CreateDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q,z,y){function A(D,H,K,G){function N(){mxEvent.addListener(T,"click",function(){var B=K;if(C){var L=M.value,P=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>P){B=null!=B?B:v.value;var O="";B==App.MODE_GOOGLE?O=b.drive.extension:B==App.MODE_GITHUB?O=b.gitHub.extension:B==App.MODE_GITLAB?O=b.gitLab.extension:B==App.MODE_TRELLO?O=b.trello.extension:B==App.MODE_DROPBOX?O=b.dropbox.extension:B==App.MODE_ONEDRIVE?O=b.oneDrive.extension:B==App.MODE_DEVICE&&
+(O=".drawio");0<=P&&(L=L.substring(0,P));M.value=L+O}}x(K)})}var T=document.createElement("a");T.style.overflow="hidden";var V=document.createElement("img");V.src=D;V.setAttribute("border","0");V.setAttribute("align","absmiddle");V.style.width="60px";V.style.height="60px";V.style.paddingBottom="6px";T.style.display="inline-block";T.className="geBaseButton";T.style.position="relative";T.style.margin="4px";T.style.padding="8px 8px 10px 8px";T.style.whiteSpace="nowrap";T.appendChild(V);T.style.color=
+"gray";T.style.fontSize="11px";var U=document.createElement("div");T.appendChild(U);mxUtils.write(U,H);if(null!=G&&null==b[G]){V.style.visibility="hidden";mxUtils.setOpacity(U,10);var X=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});X.spin(T);var l=window.setTimeout(function(){null==b[G]&&(X.stop(),T.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[G]&&(window.clearTimeout(l),
+mxUtils.setOpacity(U,100),V.style.visibility="",X.stop(),N())}))}else N();Q.appendChild(T);++n==g&&(mxUtils.br(Q),n=0)}function x(D){var H=M.value;if(null==D||null!=H&&0<H.length)y&&b.hideDialog(),k(H,D,M)}e="1"==urlParams.noDevice?!1:e;C=null!=C?C:!0;F=null!=F?F:!0;g=null!=g?g:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var I=document.createElement("h2");mxUtils.write(I,t||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
+"24px";u.appendChild(I);mxUtils.write(u,mxResources.get("filename")+":");var M=document.createElement("input");M.setAttribute("value",f);M.style.width="200px";M.style.marginLeft="10px";M.style.marginBottom="20px";M.style.maxWidth="70%";this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};u.appendChild(M);null!=z&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),
+t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,M,z)));z=null;if("1"!=urlParams.noDevice&&null!=m&&null!=p&&"image/"==p.substring(0,6)&&("image/svg"!=p.substring(0,9)||mxClient.IS_SVG)){M.style.width="160px";t=document.createElement("img");var E=q?m:btoa(unescape(encodeURIComponent(m)));t.setAttribute("src","data:"+p+";base64,"+E);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=p||(z=mxUtils.button(mxResources.get("copy"),function(D){D=b.base64ToBlob(E,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+p+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
+z.style.marginTop="6px",z.className="geBtn");J&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(D){mxEvent.isPopupTrigger(D)||x("_blank")}))}mxUtils.br(u);var Q=document.createElement("div");Q.style.textAlign="center";var n=0;Q.style.marginTop="6px";u.appendChild(Q);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(m=document.createElement("option"),m.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(m,mxResources.get("googleDrive")),v.appendChild(m),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(m,mxResources.get("oneDrive")),v.appendChild(m),b.mode==App.MODE_ONEDRIVE&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(m,mxResources.get("dropbox")),v.appendChild(m),b.mode==App.MODE_DROPBOX&&m.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_GITHUB),mxUtils.write(m,mxResources.get("github")),v.appendChild(m),A(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_GITLAB),mxUtils.write(m,mxResources.get("gitlab")),v.appendChild(m),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_TRELLO),mxUtils.write(m,mxResources.get("trello")),v.appendChild(m),A(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)m=document.createElement("option"),m.setAttribute("value",App.MODE_DEVICE),mxUtils.write(m,mxResources.get("device")),v.appendChild(m),b.mode!=App.MODE_DEVICE&&F||m.setAttribute("selected","selected"),e&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);F&&isLocalStorage&&"0"!=urlParams.browser&&(F=document.createElement("option"),
+F.setAttribute("value",App.MODE_BROWSER),mxUtils.write(F,mxResources.get("browser")),v.appendChild(F),b.mode==App.MODE_BROWSER&&F.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));F=document.createElement("div");F.style.marginTop="26px";F.style.textAlign="center";null!=c&&(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(c)}),e.className="geBtn",F.appendChild(e));e=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
+function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});e.className="geBtn";b.editor.cancelFirst&&null==d&&F.appendChild(e);null==d&&(m=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),m.className="geBtn",F.appendChild(m));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),J.className="geBtn",F.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),
+function(){x("download")}),J.className="geBtn",F.appendChild(J),null!=z&&(J.style.marginTop="6px",F.style.marginTop="6px"));null!=z&&(mxUtils.br(F),F.appendChild(z));b.editor.cancelFirst&&null==d||F.appendChild(e);mxEvent.addListener(M,"keypress",function(D){13==D.keyCode?x(App.MODE_DEVICE):27==D.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(F);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,f,k,d,t){t=null!=t?t:!0;var u=document.createElement("div");u.style.textAlign="left";u.style.height="100%";mxUtils.write(u,mxResources.get("fileOpenLocation"));mxUtils.br(u);mxUtils.br(u);var C=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";u.appendChild(C);mxUtils.br(u);var F=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
+null!=k&&k();b.openLink(f,null,!0)});F.className="geBtn gePrimaryBtn";F.style.width=C.style.width;u.appendChild(F);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,k,d,t,u,C,F){function J(){0<g.value.length?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}u=null!=u?u:!0;var c=b.editor.graph,e=document.createElement("div");mxUtils.write(e,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",k);g.setAttribute("type","text");g.setAttribute("spellcheck","false");g.setAttribute("autocorrect","off");g.setAttribute("autocomplete","off");g.setAttribute("autocapitalize","off");g.style.marginTop="6px";g.style.width=(Graph.fileSupport?460:340)-20+"px";g.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){g.value="";g.focus()});
-f.appendChild(g);f.appendChild(k);d.appendChild(f);var q=E,m,n,z=function(I,N,t,p){var F="data:"==I.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(K){b.spinner.stop();b.hideDialog();var D=!1===p?1:null!=N&&null!=t?Math.max(N/K.width,t/K.height):Math.min(1,Math.min(520/K.width,520/K.height));v&&(I=b.convertDataUri(I));e(I,Math.round(Number(K.width)*D),Math.round(Number(K.height)*D),q,m,n)},
-function(){b.spinner.stop();e(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),e(I,null,null,q,m,n)):(I=b.convertDataUri(I),N=null==N?120:N,t=null==t?100:t,b.hideDialog(),e(I,N,t,q,m,n))},C=function(I,N){if(null!=I){var t=u?null:c.getModel().getGeometry(c.getSelectionCell());null!=t?z(I,t.width,t.height,N):z(I,null,null,N)}else b.hideDialog(),e(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var I=d.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<t.dataTransfer.files.length)b.importFiles(t.dataTransfer.files,
-0,0,b.maxImageSize,function(F,K,D,H,J,G,P,T){C(F,T)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var K=0;K<F.length;K++)F[K]()},!mxEvent.isControlDown(t),null,null,!0);else if(0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")){var p=t.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(p)&&C(decodeURIComponent(p))}t.stopPropagation();t.preventDefault()}),!1)}};E=document.createElement("div");E.style.marginTop="14px";E.style.textAlign=
-"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&E.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type",
-"file");mxEvent.addListener(x,"change",function(I){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(N,t,p,F,K,D){C(N)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var t=0;t<N.length;t++)N[t]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";E.appendChild(f)}mxEvent.addListener(g,
-"keypress",function(I){13==I.keyCode&&C(g.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,q,function(N,t,p){q=N;m=t;n=p});b.showDialog(I.container,300,390,!0,!0)});B&&(y.className="geBtn",E.appendChild(y));mxEvent.addListener(g,"change",function(I){q=null;L()});L();B=mxUtils.button(mxResources.get("apply"),function(){C(g.value)});B.className="geBtn gePrimaryBtn";E.appendChild(B);b.editor.cancelFirst||E.appendChild(k);Graph.fileSupport&&(E.style.marginTop=
-"120px",d.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",d.style.backgroundPosition="center 65%",d.style.backgroundRepeat="no-repeat",B=document.createElement("div"),B.style.position="absolute",B.style.width="420px",B.style.top="58%",B.style.textAlign="center",B.style.fontSize="18px",B.style.color="#a0c3ff",mxUtils.write(B,mxResources.get("dragImagesHere")),d.appendChild(B));d.appendChild(E);this.container=d},LinkDialog=function(b,f,k,e,u,v,B){function E(I,N,t){t=mxUtils.button("",t);
-t.className="geBtn";t.setAttribute("title",N);N=document.createElement("img");N.style.height="26px";N.style.width="26px";N.setAttribute("src",I);t.style.minWidth="42px";t.style.verticalAlign="middle";t.appendChild(N);y.appendChild(t)}var L=document.createElement("div");L.style.height="100%";mxUtils.write(L,mxResources.get("editLink")+":");var c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
-"clip";c.style.cursor="default";c.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("dragUrlsHere"));d.setAttribute("type","text");d.style.marginTop="6px";d.style.width="97%";d.style.boxSizing="border-box";d.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";d.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title",
-mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){d.value="";d.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
-var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=B&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);B=null!=B?B:"_blank";z.setAttribute("title",B);v&&(d.style.width="340px");if(u&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(d.setAttribute("value",f),q.setAttribute("checked","checked"),q.defaultChecked=!0);c.appendChild(q);c.appendChild(d);c.appendChild(g);v&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(m);u=!1;for(v=0;v<b.pages.length;v++)g=document.createElement("option"),mxUtils.write(g,b.pages[v].getName()||mxResources.get("pageWithNumber",[v+1])),g.setAttribute("value",
-"data:page/id,"+b.pages[v].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),u=!0),n.appendChild(g);if(!u&&m.checked){var C=document.createElement("option");mxUtils.write(C,mxResources.get("pageNotFound"));C.setAttribute("disabled","disabled");C.setAttribute("selected","selected");C.setAttribute("value","pageNotFound");n.appendChild(C);mxEvent.addListener(n,"change",function(){null==C.parentNode||C.selected||C.parentNode.removeChild(C)})}c.appendChild(n)}else d.setAttribute("value",
-f),c.appendChild(d),c.appendChild(g);L.appendChild(c);var x=mxUtils.button(k,function(){b.hideDialog();e(m.checked?"pageNotFound"!==n.value?n.value:f:d.value,LinkDialog.selectedDocs,z.checked?B:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){m.checked?n.focus():(d.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(n,"focus",function(){q.removeAttribute("checked");m.setAttribute("checked",
-"checked");m.checked=!0});mxEvent.addListener(d,"focus",function(){m.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var I=L.parentNode,N=null;mxEvent.addListener(I,"dragleave",function(t){null!=N&&(N.parentNode.removeChild(N),N=null);t.stopPropagation();t.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(t){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=b.highlightElement(I));t.stopPropagation();t.preventDefault()}));
-mxEvent.addListener(I,"drop",mxUtils.bind(this,function(t){null!=N&&(N.parentNode.removeChild(N),N=null);0<=mxUtils.indexOf(t.dataTransfer.types,"text/uri-list")&&(d.value=decodeURIComponent(t.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,x.click());t.stopPropagation();t.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var N=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
-"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?N="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(N="https://drive.google.com/#folders/"+I.docs[0].id);d.value=N;d.focus()}else LinkDialog.selectedDocs=null;d.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&E(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(N){LinkDialog.filePicked(N)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&E(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){d.value=I[0].link;d.focus()}})});null!=b.oneDrive&&E(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(I,N){d.value=N.value[0].webUrl;d.focus()},!0)});null!=b.gitHub&&E(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var N=I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");d.value="https://github.com/"+N+"/"+t+"/blob/"+p+"/"+I;d.focus()}})});null!=b.gitLab&&E(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var N=
-I[0],t=I[1],p=I[2];I=I.slice(3,I.length).join("/");d.value=DRAWIO_GITLAB_URL+"/"+N+"/"+t+"/blob/"+p+"/"+I;d.focus()}})});mxEvent.addListener(d,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),e(m.checked?n.value:d.value,LinkDialog.selectedDocs))});y.appendChild(x);b.editor.cancelFirst||y.appendChild(k);L.appendChild(y);this.container=L},FeedbackDialog=function(b,f,k,e){var u=document.createElement("div"),v=document.createElement("div");mxUtils.write(v,mxResources.get("sendYourFeedback"));v.style.fontSize=
-"18px";v.style.marginBottom="18px";u.appendChild(v);v=document.createElement("div");mxUtils.write(v,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));u.appendChild(v);var B=document.createElement("input");B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="600px";var E=mxUtils.button(mxResources.get("sendMessage"),function(){var g=d.value+(c.checked?"\nDiagram:\n"+(null!=e?e:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;g.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(B.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
-":\n"+g),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});E.className="geBtn gePrimaryBtn";if(!k){E.setAttribute("disabled","disabled");var L=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(B,
-"change",function(){0<B.value.length&&0<L.test(B.value)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")});mxEvent.addListener(B,"keyup",function(){0<B.value.length&&L.test(B.value)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")})}u.appendChild(B);this.init=function(){B.focus()};var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
-k.appendChild(c);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(v);mxEvent.addListener(v,"click",function(g){c.checked=!c.checked;mxEvent.consume(g)});u.appendChild(k);v=document.createElement("div");mxUtils.write(v,mxResources.get("feedback"));u.appendChild(v);var d=document.createElement("textarea");d.style.resize="none";d.style.width="600px";d.style.height="140px";d.style.marginTop="6px";d.setAttribute("placeholder",mxResources.get("comments"));
-u.appendChild(d);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst?(k.appendChild(v),k.appendChild(E)):(k.appendChild(E),k.appendChild(v));u.appendChild(k);this.container=u};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,f,k){var e=document.createElement("div"),u=document.createElement("h3");u.style.marginTop="0px";mxUtils.write(u,mxResources.get("revisionHistory"));e.appendChild(u);u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.width="170px";u.style.height="378px";e.appendChild(u);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";v.style.left="199px";v.style.width="470px";v.style.height="376px";
-v.style.overflow="hidden";var B=document.createElement("div");B.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";v.appendChild(B);mxEvent.disableContextMenu(v);e.appendChild(v);var E=new Graph(v);E.setTooltips(!1);E.setEnabled(!1);E.setPanning(!0);E.panningHandler.ignoreCell=!0;E.panningHandler.useLeftButtonForPanning=!0;E.minFitScale=null;E.maxFitScale=null;E.centerZoom=!0;var L=0,c=null,d=0,g=E.getGlobalVariable;
-E.getGlobalVariable=function(X){return"page"==X&&null!=c&&null!=c[d]?c[d].getAttribute("name"):"pagenumber"==X?d+1:"pagecount"==X?null!=c?c.length:1:g.apply(this,arguments)};E.getLinkForCell=function(){return null};Editor.MathJaxRender&&E.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(E.container)}));var q={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},m=new Spinner(q),n=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),C={};for(q=0;q<z.length;q++)C[z[q].getAttribute("id")]=z[q];var x=null,y=null,I=null,N=null,t=mxUtils.button("",function(){null!=I&&E.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");
-mxUtils.setOpacity(t,20);var p=mxUtils.button("",function(){null!=I&&E.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var F=mxUtils.button("",function(){null!=I&&(E.maxFitScale=8,E.fit(8),E.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
-"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var K=mxUtils.button("",function(){null!=I&&(E.zoomActual(),E.center())});K.className="geSprite geSprite-actualsize";K.setAttribute("title",mxResources.get("actualSize"));K.style.outline="none";K.style.border="none";K.style.margin="2px";K.setAttribute("disabled","disabled");mxUtils.setOpacity(K,20);var D=mxUtils.button("",function(){});D.className="geSprite geSprite-middle";D.setAttribute("title",mxResources.get("compare"));
-D.style.outline="none";D.style.border="none";D.style.margin="2px";mxUtils.setOpacity(D,60);var H=v.cloneNode(!1);H.style.pointerEvent="none";v.parentNode.appendChild(H);var J=new Graph(H);J.setTooltips(!1);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;mxEvent.addGestureListeners(D,function(X){X=C[c[L].getAttribute("id")];mxUtils.setOpacity(D,20);B.innerText="";null==X?mxUtils.write(B,
-mxResources.get("pageNotFound")):(G.style.display="none",v.style.display="none",H.style.display="",H.style.backgroundColor=v.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,J.getModel()),J.view.scaleAndTranslate(E.view.scale,E.view.translate.x,E.view.translate.y))},null,function(){mxUtils.setOpacity(D,60);B.innerText="";"none"==v.style.display&&(G.style.display="",v.style.display="",H.style.display="none")});var G=document.createElement("div");G.style.position=
-"absolute";G.style.textAlign="right";G.style.color="gray";G.style.marginTop="10px";G.style.backgroundColor="transparent";G.style.top="440px";G.style.right="32px";G.style.maxWidth="380px";G.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var X=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,aa,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+X)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(X){null!=I&&null!=N&&(mxEvent.isShiftDown(X)?null!=I&&(X=b.getPagesForNode(I.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){n.patch([JSON.parse(aa)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(N):b.spinner.spin(document.body,mxResources.get("restoring"))&&n.save(!0,function(aa){b.spinner.stop();b.replaceFileData(N);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
-T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var W=document.createElement("select");W.setAttribute("disabled","disabled");W.style.maxWidth="80px";W.style.position="relative";W.style.top="-2px";W.style.verticalAlign="bottom";W.style.marginRight="6px";W.style.display="none";var U=null;mxEvent.addListener(W,"change",function(X){null!=U&&(U(X),mxEvent.consume(X))});var V=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=k&&(V.style.display="none");var l=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(W.selectedIndex))});l.className="geBtn gePrimaryBtn";l.setAttribute("disabled","disabled");null!=k&&(l.style.display="none",T.className="geBtn gePrimaryBtn");z=document.createElement("div");
-z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var A=document.createElement("div");A.className="geToolbarContainer";A.style.backgroundColor="transparent";A.style.padding="2px";A.style.border="none";A.style.left="199px";A.style.top="442px";var M=null;if(null!=f&&0<f.length){v.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";
-var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(L=mxUtils.indexOf(b.pages,b.currentPage));for(q=f.length-1;0<=q;q--){var S=function(X){var aa=new Date(X.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(ha){m.stop();B.innerText="";var ma=mxUtils.parseXml(ha),ia=b.editor.extractGraphModel(ma.documentElement,!0);if(null!=ia){var qa=function(Ca){null!=Ca&&(Ca=la(Editor.parseDiagramNode(Ca)));return Ca},la=function(Ca){var Da=Ca.getAttribute("background");
-if(null==Da||""==Da||Da==mxConstants.NONE)Da=E.defaultPageBackgroundColor;v.style.backgroundColor=Da;(new mxCodec(Ca.ownerDocument)).decode(Ca,E.getModel());E.maxFitScale=1;E.fit(8);E.center();return Ca};W.style.display="none";W.innerText="";I=ma;N=ha;c=parseSelectFunction=null;d=0;if("mxfile"==ia.nodeName){ma=ia.getElementsByTagName("diagram");c=[];for(ha=0;ha<ma.length;ha++)c.push(ma[ha]);d=Math.min(L,c.length-1);0<c.length&&qa(c[d]);if(1<c.length)for(W.removeAttribute("disabled"),W.style.display=
-"",ha=0;ha<c.length;ha++)ma=document.createElement("option"),mxUtils.write(ma,c[ha].getAttribute("name")||mxResources.get("pageWithNumber",[ha+1])),ma.setAttribute("value",ha),ha==d&&ma.setAttribute("selected","selected"),W.appendChild(ma);U=function(){try{var Ca=parseInt(W.value);d=L=Ca;qa(c[Ca])}catch(Da){W.value=L,b.handleError(Da)}}}else la(ia);ha=X.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=ha?ha+" ":"")+aa.toLocaleDateString()+
-" "+aa.toLocaleTimeString());G.setAttribute("title",Y.getAttribute("title"));t.removeAttribute("disabled");p.removeAttribute("disabled");F.removeAttribute("disabled");K.removeAttribute("disabled");D.removeAttribute("disabled");null!=n&&n.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),P.removeAttribute("disabled"),l.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(K,60);
-mxUtils.setOpacity(D,60)}else W.style.display="none",W.innerText="",G.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(B,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ba,
-aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ha){y!=X&&(m.stop(),null!=x&&(x.style.backgroundColor=""),y=X,x=Y,x.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",N=I=null,G.removeAttribute("title"),
-G.innerText=mxResources.get("loading")+"...",v.style.backgroundColor=E.defaultPageBackgroundColor,B.innerText="",E.getModel().clear(),T.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),W.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(K,20),mxUtils.setOpacity(D,20),m.spin(v),X.getXml(function(ma){if(y==X)try{Z(ma)}catch(ia){G.innerText=mxResources.get("error")+": "+ia.message}},function(ma){m.stop();W.style.display="none";W.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ha))});mxEvent.addListener(Y,"dblclick",function(ha){l.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ha)},!1);O.appendChild(Y)}return Y}(f[q]);null!=S&&q==f.length-1&&(M=S)}Q.appendChild(O);u.appendChild(Q)}else null==n||null==b.drive&&n.constructor==window.DriveFile||null==b.dropbox&&n.constructor==window.DropboxFile?(v.style.display="none",A.style.display="none",mxUtils.write(u,mxResources.get("notAvailable"))):(v.style.display="none",A.style.display="none",mxUtils.write(u,
-mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";A.appendChild(W);A.appendChild(t);A.appendChild(p);A.appendChild(K);A.appendChild(F);A.appendChild(D);b.editor.cancelFirst?(z.appendChild(u),z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l)):(z.appendChild(P),z.appendChild(V),z.appendChild(T),z.appendChild(l),z.appendChild(u));e.appendChild(z);e.appendChild(A);e.appendChild(G);
-this.container=e},DraftDialog=function(b,f,k,e,u,v,B,E,L){var c=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.lineHeight="normal";mxUtils.write(d,f);c.appendChild(d);var g=document.createElement("select"),q=mxUtils.bind(this,function(){y=mxUtils.parseXml(L[g.value].data);I=b.editor.extractGraphModel(y.documentElement,!0);N=0;this.init()});if(null!=L){g.style.marginLeft="4px";for(f=0;f<L.length;f++){var m=
-document.createElement("option");m.setAttribute("value",f);var n=new Date(L[f].created),z=new Date(L[f].modified);mxUtils.write(m,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(m)}d.appendChild(g);mxEvent.addListener(g,"change",q)}null==k&&(k=L[0].data);var C=document.createElement("div");C.style.position="absolute";C.style.border="1px solid lightGray";C.style.marginTop="10px";C.style.left=
-"40px";C.style.right="40px";C.style.top="46px";C.style.bottom="74px";C.style.overflow="hidden";mxEvent.disableContextMenu(C);c.appendChild(C);var x=new Graph(C);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var y=mxUtils.parseXml(k),I=b.editor.extractGraphModel(y.documentElement,!0),N=0,t=null,p=x.getGlobalVariable;x.getGlobalVariable=function(K){return"page"==K&&null!=t&&null!=t[N]?
-t[N].getAttribute("name"):"pagenumber"==K?N+1:"pagecount"==K?null!=t?t.length:1:p.apply(this,arguments)};x.getLinkForCell=function(){return null};k=mxUtils.button("",function(){x.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);d=mxUtils.button("",function(){x.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));
-d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);f=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);m=mxUtils.button("",function(){x.zoomActual();x.center()});m.className="geSprite geSprite-actualsize";m.setAttribute("title",mxResources.get("actualSize"));m.style.outline=
-"none";m.style.border="none";m.style.margin="2px";mxUtils.setOpacity(m,60);B=mxUtils.button(B||mxResources.get("discard"),function(){u.apply(this,[g.value,mxUtils.bind(this,function(){null!=g.parentNode&&(g.options[g.selectedIndex].parentNode.removeChild(g.options[g.selectedIndex]),0<g.options.length?(g.value=g.options[0].value,q()):b.hideDialog(!0))})])});B.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";v=mxUtils.button(v||mxResources.get("edit"),function(){e.apply(this,[g.value])});v.className="geBtn gePrimaryBtn";n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.right="40px";n.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
-function(){function K(G){if(null!=G){var P=G.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";C.style.backgroundColor=P;(new mxCodec(G.ownerDocument)).decode(G,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return G}function D(G){null!=G&&(G=K(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(F,"change",function(G){N=parseInt(F.value);D(t[N]);mxEvent.consume(G)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram");
-t=[];for(var J=0;J<H.length;J++)t.push(H[J]);0<t.length&&D(t[N]);F.innerText="";if(1<t.length)for(F.style.display="",J=0;J<t.length;J++)H=document.createElement("option"),mxUtils.write(H,t[J].getAttribute("name")||mxResources.get("pageWithNumber",[J+1])),H.setAttribute("value",J),J==N&&H.setAttribute("selected","selected"),F.appendChild(H);else F.style.display="none"}else K(I)};z.appendChild(F);z.appendChild(k);z.appendChild(d);z.appendChild(m);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});k.className="geBtn";E=null!=E?mxUtils.button(mxResources.get("ignore"),E):null;null!=E&&(E.className="geBtn");b.editor.cancelFirst?(n.appendChild(k),null!=E&&n.appendChild(E),n.appendChild(B),n.appendChild(v)):(n.appendChild(v),n.appendChild(B),null!=E&&n.appendChild(E),n.appendChild(k));c.appendChild(n);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,e,u,v){function B(U,V,l,A){if("object"===typeof V.value&&null!=V.value.attributes){V=V.value.attributes;
-for(var M=0;M<V.length;M++)if("label"!=V[M].nodeName){var Q=mxUtils.trim(V[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(A&&0<=Q.indexOf(l)||!A&&Q.substring(0,l.length)===l)||null!=U&&U.test(Q))return!0}}return!1}function E(){m&&t.value?(P.removeAttribute("disabled"),T.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));t.value&&N.value?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}function L(U,
-V,l){J.innerText="";var A=d.model.getDescendants(d.model.getRoot()),M=N.value.toLowerCase(),Q=p.checked?new RegExp(M):null,O=null;z=null;g!=M&&(g=M,q=null,n=!1);var R=null==q;if(0<M.length){if(n){n=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}U=(S+1)%b.pages.length;q=null;do n=!1,A=b.pages[U],d=b.createTemporaryGraph(d.getStylesheet()),b.updatePageRoot(A),d.model.setRoot(A.root),U=(U+1)%b.pages.length;while(!L(!0,V,l)&&U!=S);q&&(q=null,l?b.editor.graph.model.execute(new SelectPage(b,
-A)):b.selectPage(A));n=!1;d=b.editor.graph;return L(!0,V,l)}for(X=0;X<A.length;X++){S=d.view.getState(A[X]);V&&null!=Q&&(R=R||S==q);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(d.model.isVertex(S.cell)||d.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(K.innerHTML=d.sanitizeHtml(d.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([K])):label=d.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;V&&v&&null!=Q&&S==q&&(label=label.substr(C),
-aa=C);var Y=""==t.value,Z=Y;if(null==Q&&(Z&&0<=label.indexOf(M)||!Z&&label.substring(0,M.length)===M||Y&&B(Q,S.cell,M,Z))||null!=Q&&(Q.test(label)||Y&&B(Q,S.cell,M,Z)))if(v&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),C=aa+Y.index+z.length)):(z=M,C=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==q}}if(null!=O){if(X==A.length&&F.checked)return q=null,n=!0,L(!0,V,l);q=O;d.scrollCellToVisible(q.cell);d.isEnabled()&&!d.isCellLocked(q.cell)?l||d.getSelectionCell()==q.cell&&
-1==d.getSelectionCount()||d.setSelectionCell(q.cell):d.highlightCell(q.cell)}else{if(!U&&F.checked)return n=!0,L(!0,V,l);d.isEnabled()&&!l&&d.clearSelection()}m=null!=O;v&&!U&&E();return 0==M.length||null!=O}var c=b.actions.get("findReplace"),d=b.editor.graph,g=null,q=null,m=!1,n=!1,z=null,C=0,x=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var I=v?"260px":"200px",N=document.createElement("input");N.setAttribute("placeholder",
-mxResources.get("find"));N.setAttribute("type","text");N.style.marginTop="4px";N.style.marginBottom="6px";N.style.width=I;N.style.fontSize="12px";N.style.borderRadius="4px";N.style.padding="6px";y.appendChild(N);mxUtils.br(y);if(v){var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("replaceWith"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width=I;t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";
-y.appendChild(t);mxUtils.br(y);mxEvent.addListener(t,"input",E)}var p=document.createElement("input");p.setAttribute("id","geFindWinRegExChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";y.appendChild(p);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");y.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));y.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
-"6px";I.style.top="-1px";y.appendChild(I);mxUtils.br(y);var F=document.createElement("input");F.setAttribute("id","geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";y.appendChild(F);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");y.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));y.appendChild(I);var K=document.createElement("div");mxUtils.br(y);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
-"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";y.appendChild(I);var D=mxUtils.button(mxResources.get("reset"),function(){J.innerText="";N.value="";N.style.backgroundColor="";v&&(t.value="",E());g=q=null;n=!1;N.focus()});D.setAttribute("title",mxResources.get("reset"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.className="geBtn";v||I.appendChild(D);var H=mxUtils.button(mxResources.get("find"),
-function(){try{N.style.backgroundColor=L()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var J=document.createElement("div");J.style.marginTop="10px";if(v){var G=function(U,V,l,A,M){if(null==M||"1"!=M.html)return A=U.toLowerCase().indexOf(V,
-A),0>A?U:U.substr(0,A)+l+U.substr(A+V.length);var Q=U;V=mxUtils.htmlEntities(V);M=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)M.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");A=U.toLowerCase().indexOf(V,A);if(0>A)return Q;Q=A+V.length;l=mxUtils.htmlEntities(l);U=U.substr(0,A)+l+U.substr(Q);for(var R=0,S=0;S<M.length;S++){if(M[S]-R<A)U=U.substr(0,M[S])+O[S]+U.substr(M[S]);else{var X=M[S]-R<Q?A+R:M[S]+(l.length-V.length);U=U.substr(0,X)+O[S]+U.substr(X)}R+=O[S].length}return U.replace(/\n/g,
-"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=d.getLabel(U);d.isCellEditable(U)&&d.model.setValue(U,G(V,z,t.value,C-z.length,d.getCurrentCellStyle(U)));N.style.backgroundColor=L(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});P.setAttribute("title",mxResources.get("replFind"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
-"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");I.appendChild(P);mxUtils.br(I);var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&t.value){var U=q.cell,V=d.getLabel(U);d.model.setValue(U,G(V,z,t.value,C-z.length,d.getCurrentCellStyle(U)));P.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(l){b.handleError(l)}});T.setAttribute("title",mxResources.get("replace"));T.style.float="none";T.style.width="120px";
-T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");I.appendChild(T);var W=mxUtils.button(mxResources.get("replaceAll"),function(){J.innerText="";if(t.value){g=null;var U=b.currentPage,V=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;d.getModel().beginUpdate();try{for(var l=0,A={};L(!1,!0,!0)&&100>l;){var M=q.cell,Q=d.getLabel(M),O=A[M.id];if(O&&O.replAllMrk==
-x&&O.replAllPos>=C)break;A[M.id]={replAllMrk:x,replAllPos:C};d.isCellEditable(M)&&(d.model.setValue(M,G(Q,z,t.value,C-z.length,d.getCurrentCellStyle(M))),l++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(J,mxResources.get("matchesRepl",[l]))}catch(R){b.handleError(R)}finally{d.getModel().endUpdate(),b.editor.graph.setSelectionCells(V),b.editor.graph.rendering=!0}x++}});W.setAttribute("title",mxResources.get("replaceAll"));W.style.float="none";W.style.width="120px";
-W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");I.appendChild(W);mxUtils.br(I);I.appendChild(D);D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));D.setAttribute("title",mxResources.get("close"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow=
-"ellipsis";D.className="geBtn";I.appendChild(D);mxUtils.br(I);I.appendChild(J)}else D.style.width="90px",H.style.width="90px";mxEvent.addListener(N,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)c.funct();else if(g!=N.value.toLowerCase()||13==U.keyCode)try{N.style.backgroundColor=L()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){N.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(U){70==
-U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(c.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(v?"/"+mxResources.get("replace"):""),y,f,k,e,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?F.removeAttribute("disabled"):(F.checked=!1,F.setAttribute("disabled","disabled"))):d.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,e,u,v){var B=b.editor.graph,E=document.createElement("div");E.style.textAlign="center";E.style.userSelect="none";E.style.overflow="hidden";E.style.height="100%";if(v){var L=document.createElement("input");L.setAttribute("id","geFreehandBrush");L.setAttribute("type",
-"checkbox");L.checked=B.freehand.isPerfectFreehandMode();L.style.margin="10px 5px 0px 10px";L.style.float="left";E.appendChild(L);var c=document.createElement("label");c.setAttribute("for","geFreehandBrush");c.style.float="left";c.style.marginTop="10px";E.appendChild(c);mxUtils.write(c,mxResources.get("brush"));E.appendChild(c);mxUtils.br(E);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",B.freehand.getBrushSize());
-d.style.width="90%";d.style.visibility="hidden";E.appendChild(d);mxUtils.br(E);c=function(){B.freehand.setPerfectFreehandMode(L.checked);d.style.visibility=L.checked?"visible":"hidden"};mxEvent.addListener(L,"change",c);c();mxEvent.addListener(d,"change",function(){B.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){B.freehand.isDrawing()?B.freehand.stopDrawing():B.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing"));
-g.style.marginTop=v?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";E.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),E,f,k,e,u,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);B.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,
-mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.setAttribute("title",mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(B.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){B.freehand.isDrawing()&&B.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,e,u){var v=b.editor.graph,
-B=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(L,c){if(v.isEnabled()){var d=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var q=[],m=0;m<g.length;m++){var n=mxUtils.trim(g[m]);""!=n&&0>mxUtils.indexOf(L,n)&&q.push(n)}0<q.length&&(v.isSelectionEmpty()?c(L.concat(q)):v.addTagsForCells(v.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
-")");b.showDialog(d.container,300,80,!0,!0);d.init()}}),E=B.div;this.window=new mxWindow(mxResources.get("tags"),E,f,k,e,u,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){B.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,e){var u=document.createElement("div");u.style.textAlign=
-"center";var v=document.createElement("p");v.style.fontSize="16pt";v.style.padding="0px";v.style.margin="0px";v.style.color="gray";mxUtils.write(v,mxResources.get("authorizationRequired"));var B="Unknown",E=document.createElement("img");E.setAttribute("border","0");E.setAttribute("align","absmiddle");E.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),E.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(B=mxResources.get("dropbox"),E.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
-f==b.oneDrive?(B=mxResources.get("oneDrive"),E.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),E.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),E.src=IMAGE_PATH+"/gitlab-logo.svg",E.style.width="32px"):f==b.trello&&(B=mxResources.get("trello"),E.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[B]));var L=document.createElement("input");L.setAttribute("type",
-"checkbox");B=mxUtils.button(mxResources.get("authorize"),function(){e(L.checked)});B.insertBefore(E,B.firstChild);B.style.marginTop="6px";B.className="geBigButton";B.style.fontSize="18px";B.style.padding="14px";u.appendChild(v);u.appendChild(b);u.appendChild(B);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(L),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberMe")),k.appendChild(v),u.appendChild(k),L.checked=!0,L.defaultChecked=!0,mxEvent.addListener(v,
-"click",function(c){L.checked=!L.checked;mxEvent.consume(c)}));this.container=u},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var e=document.createElement("div"),u=[];if(null!=b.sidebar.customEntries)for(var v=0;v<b.sidebar.customEntries.length;v++){for(var B=b.sidebar.customEntries[v],E={title:b.getResource(B.title),entries:[]},L=0;L<B.entries.length;L++){var c=B.entries[L];E.entries.push({id:c.id,title:b.getResource(c.title),desc:b.getResource(c.desc),image:c.preview})}u.push(E)}for(v=
-0;v<k.length;v++)if(null==b.sidebar.enabledLibraries)u.push(k[v]);else{E={title:k[v].title,entries:[]};for(L=0;L<k[v].entries.length;L++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[v].entries[L].id)&&E.entries.push(k[v].entries[L]);0<E.entries.length&&u.push(E)}k=u;if(f){v=mxUtils.bind(this,function(p){for(var F=0;F<p.length;F++)(function(K){var D=n.cloneNode(!1);D.style.fontWeight="bold";D.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";D.style.padding="6px 0px 6px 20px";mxUtils.write(D,
-K.title);d.appendChild(D);for(var H=0;H<K.entries.length;H++)(function(J){var G=n.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",J.title+" ("+J.id+")");var P=document.createElement("input");P.setAttribute("type","checkbox");P.checked=b.sidebar.isEntryVisible(J.id);P.defaultChecked=P.checked;G.appendChild(P);mxUtils.write(G," "+J.title);d.appendChild(G);var T=function(W){if(null==
-W||"INPUT"!=mxEvent.getSource(W).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=J.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,J.desc);g.appendChild(U)}null!=J.imageCallback?J.imageCallback(g):null!=J.image?g.innerHTML+='<img border="0" src="'+J.image+'"/>':null==J.desc&&(g.style.padding="20px",g.style.color=
-"rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=G;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=W&&mxEvent.consume(W)}};mxEvent.addListener(G,"click",T);mxEvent.addListener(G,"dblclick",function(W){P.checked=!P.checked;mxEvent.consume(W)});m.push(function(){return P.checked?J.id:null});0==F&&0==H&&T()})(K.entries[H])})(p[F])});L=document.createElement("div");L.className="geDialogTitle";mxUtils.write(L,mxResources.get("shapes"));
-L.style.position="absolute";L.style.top="0px";L.style.left="0px";L.style.lineHeight="40px";L.style.height="40px";L.style.right="0px";var d=document.createElement("div"),g=document.createElement("div");d.style.position="absolute";d.style.top="40px";d.style.left="0px";d.style.width="202px";d.style.bottom="60px";d.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom="60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)";
-g.style.textAlign="center";var q=null,m=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";v(k);e.style.padding="30px";e.appendChild(L);e.appendChild(d);e.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("labels"));v.style.paddingRight="20px";k.appendChild(v);mxEvent.addListener(v,"click",function(p){z.checked=!z.checked;mxEvent.consume(p)});var C=document.createElement("input");C.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)v=document.createElement("span"),
-v.style.paddingRight="20px",v.appendChild(C),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),C.style.position="relative",C.style.top="1px",C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(v,"click",function(p){mxEvent.getSource(p)!=C&&(C.checked=!C.checked,mxEvent.consume(p))}),k.appendChild(v);v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";L=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var p=[],F=0;F<m.length;F++){var K=
-m[F].apply(this,arguments);null!=K&&p.push(K)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(F=mxUtils.indexOf(p,".scratchpad"),null!=b.scratchpad!=(0<=F&&0<p.splice(F,1).length)&&b.toggleScratchpad(),F=mxUtils.indexOf(p,"search"),mxSettings.settings.search=0<=F&&0<p.splice(F,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),C.checked&&mxSettings.save());b.sidebar.showEntries(p.join(";"),C.checked,!0);b.setSidebarTitles(z.checked,C.checked)});L.className="geBtn gePrimaryBtn"}else{var x=
-document.createElement("table");v=document.createElement("tbody");e.style.height="100%";e.style.overflow="auto";L=document.createElement("tr");x.style.width="100%";f=document.createElement("td");u=document.createElement("td");B=document.createElement("td");var y=mxUtils.bind(this,function(p,F,K){var D=document.createElement("input");D.type="checkbox";x.appendChild(D);D.checked=b.sidebar.isEntryVisible(K);var H=document.createElement("span");mxUtils.write(H,F);F=document.createElement("div");F.style.display=
-"block";F.appendChild(D);F.appendChild(H);mxEvent.addListener(H,"click",function(J){D.checked=!D.checked;mxEvent.consume(J)});p.appendChild(F);return function(){return D.checked?K:null}});L.appendChild(f);L.appendChild(u);L.appendChild(B);v.appendChild(L);x.appendChild(v);m=[];var I=0;for(v=0;v<k.length;v++)for(L=0;L<k[v].entries.length;L++)I++;var N=[f,u,B],t=0;for(v=0;v<k.length;v++)(function(p){for(var F=0;F<p.entries.length;F++){var K=p.entries[F];m.push(y(N[Math.floor(t/(I/3))],K.title,K.id));
-t++}})(k[v]);e.appendChild(x);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";C=document.createElement("input");isLocalStorage&&(C.setAttribute("type","checkbox"),C.checked=!0,C.defaultChecked=!0,k.appendChild(C),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),k.appendChild(v),mxEvent.addListener(v,"click",function(p){C.checked=!C.checked;mxEvent.consume(p)}));e.appendChild(k);v=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});v.className="geBtn";L=mxUtils.button(mxResources.get("apply"),function(){for(var p=["search"],F=0;F<m.length;F++){var K=m[F].apply(this,arguments);null!=K&&p.push(K)}b.sidebar.showEntries(0<p.length?p.join(";"):"",C.checked);b.hideDialog()});L.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(v),k.appendChild(L)):(k.appendChild(L),k.appendChild(v));e.appendChild(k);this.container=
-e},PluginsDialog=function(b,f,k,e){function u(){L=!0;if(0==E.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var n=0;n<E.length;n++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var C=document.createElement("span");C.className="geSprite geSprite-delete";C.style.position="relative";C.style.cursor="pointer";C.style.top="5px";C.style.marginRight="4px";C.style.display="inline-block";z.appendChild(C);mxUtils.write(z,E[n]);B.appendChild(z);mxUtils.br(B);mxEvent.addListener(C,
-"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+E[x]+'"?',function(){null!=k&&k(E[x]);E.splice(x,1);u()})}}(n))}}}var v=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var E=mxSettings.getPlugins().slice(),L=!1;v.appendChild(B);u();L=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(n){n&&0>mxUtils.indexOf(E,n)&&E.push(n);u()})}:function(){var n=document.createElement("div"),z=document.createElement("span");
-z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");n.appendChild(z);var C=document.createElement("select");C.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[z]);x.value=App.publicPlugin[z];C.appendChild(x)}n.appendChild(C);mxUtils.br(n);mxUtils.br(n);z=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();
-if(null!=I&&0<I.length){I=I.split(";");for(var N=0;N<I.length;N++){var t=I[N],p=App.pluginRegistry[t];null!=p&&(t=p);0<t.length&&0>mxUtils.indexOf(E,t)&&E.push(t)}u()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});z.className="geBtn";n=new CustomDialog(b,n,mxUtils.bind(this,function(){var y=App.pluginRegistry[C.value];0>mxUtils.indexOf(E,y)&&(E.push(y),u())}),null,null,null,z);b.showDialog(n.container,360,100,!0,!0)});c.className=
-"geBtn";var d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var g=mxUtils.button(e?mxResources.get("close"):mxResources.get("apply"),function(){L?(mxSettings.setPlugins(E),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-m.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");q.appendChild(m);b.editor.cancelFirst?(e||q.appendChild(d),q.appendChild(c),q.appendChild(g)):(q.appendChild(c),q.appendChild(g),e||q.appendChild(d));v.appendChild(q);this.container=v},CropImageDialog=function(b,f,k,e){function u(){var p=C.checked,F=x.checked,K=m.geometry,D=L.width,H=L.height,J=(300-D)/2,G=(300-H)/2;K.x<J?(K.width-=J-K.x,K.x=J):K.x+K.width>J+D&&(K.width=J+D-K.x,K.x=Math.min(K.x,J+D));K.y<G?(K.height-=
-G-K.y,K.y=G):K.y+K.height>G+H&&(K.height=G+H-K.y,K.y=Math.min(K.y,G+H));var P=(K.x-J)/D*100;D=100-(K.x+K.width-J)/D*100;J=(K.y-G)/H*100;K=100-(K.y+K.height-G)/H*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(D)+"% "+mxUtils.format(K)+"% "+mxUtils.format(P)+"%"+(p?" round "+q+"%":F?" round 50%":"")+")"}function v(p){null!=d&&(!0!==p&&(d.model.setGeometry(m,g.clone()),q=5,I.value=q),d.model.setStyle(m,n+u()),d.selectAll(),y.style.visibility=C.checked?"visible":"hidden")}var B=document.createElement("div"),
-E=document.createElement("div");E.style.height="300px";E.style.width="300px";E.style.display="inline-flex";E.style.justifyContent="center";E.style.alignItems="center";E.style.position="absolute";var L=document.createElement("img");L.onload=function(){function p(){d.model.setStyle(m,n+u())}d=new Graph(c);d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!1);d.setConnectable(!1);d.getRubberband().setEnabled(!1);d.graphHandler.allowLivePreview=!1;var F=d.createVertexHandler;
-d.createVertexHandler=function(){var Q=F.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var K=m.geometry,D=L.width,H=L.height,J=(300-D)/2,G=(300-H)/2,P=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(P[0]),W=parseFloat(P[1]),U=parseFloat(P[2]),V=parseFloat(P[3]);isFinite(T)&&isFinite(W)&&isFinite(U)&&isFinite(V)?(K.x=V/100*D+J,K.y=T/100*H+G,K.width=(100-W)/100*D+J-K.x,K.height=(100-U)/100*H+G-K.y,"round"==P[4]?"50%"==P[5]?x.setAttribute("checked",
-"checked"):(q=parseInt(P[5]),I.value=q,C.setAttribute("checked","checked"),y.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}m.style=n+(k?k:u());m.vertex=!0;d.addCell(m,null,null,null,null);d.selectAll();d.addListener(mxEvent.CELLS_MOVED,p);d.addListener(mxEvent.CELLS_RESIZED,p);var l=d.graphHandler.mouseUp,A=d.graphHandler.mouseDown;d.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};d.graphHandler.mouseDown=function(){A.apply(this,
-arguments);c.style.backgroundColor=""};d.dblClick=function(){};var M=d.getSelectionModel().changeSelection;d.getSelectionModel().changeSelection=function(){M.call(this,[m],[m])}};L.onerror=function(){L.onload=null;L.src=Editor.errorImage};L.setAttribute("src",f);L.style.maxWidth="300px";L.style.maxHeight="300px";E.appendChild(L);B.appendChild(E);var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";B.appendChild(c);
-var d=null,g=new mxGeometry(100,100,100,100),q=5,m=new mxCell("",g.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
-B.appendChild(f);var C=document.createElement("input");C.setAttribute("type","radio");C.setAttribute("id","croppingRounded");C.setAttribute("name","croppingShape");C.style.margin="5px";B.appendChild(C);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));B.appendChild(f);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";
-B.appendChild(x);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));B.appendChild(f);mxEvent.addListener(z,"change",v);mxEvent.addListener(C,"change",v);mxEvent.addListener(x,"change",v);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",q);I.setAttribute("title",
-mxResources.get("arcSize"));y.appendChild(I);B.appendChild(y);mxEvent.addListener(I,"change",function(){q=this.value;v(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){e(u(),m.geometry.width,m.geometry.height);b.hideDialog()});E.className="geBtn gePrimaryBtn";var N=mxUtils.button(mxResources.get("reset"),function(){e(null,L.width,L.height);b.hideDialog()});N.className="geBtn";var t=document.createElement("div");
-t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(f),t.appendChild(N),t.appendChild(E)):(t.appendChild(N),t.appendChild(E),t.appendChild(f));B.appendChild(t);this.container=B},EditGeometryDialog=function(b,f){var k=b.editor.graph,e=1==f.length?k.getCellGeometry(f[0]):null,u=document.createElement("div"),v=document.createElement("table"),B=document.createElement("tbody"),E=document.createElement("tr"),L=document.createElement("td"),c=document.createElement("td");
-v.style.paddingLeft="6px";mxUtils.write(L,mxResources.get("relative")+":");var d=document.createElement("input");d.setAttribute("type","checkbox");null!=e&&e.relative&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);this.init=function(){d.focus()};c.appendChild(d);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("left")+":");var g=document.createElement("input");
-g.setAttribute("type","text");g.style.width="100px";g.value=null!=e?e.x:"";c.appendChild(g);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=e?e.y:"";c.appendChild(q);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");
-c=document.createElement("td");mxUtils.write(L,mxResources.get("dx")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=e&&null!=e.offset?e.offset.x:"";c.appendChild(m);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("dy")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";
-n.value=null!=e&&null!=e.offset?e.offset.y:"";c.appendChild(n);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=e?e.width:"";c.appendChild(z);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=
-document.createElement("td");mxUtils.write(L,mxResources.get("height")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.width="100px";C.value=null!=e?e.height:"";c.appendChild(C);E.appendChild(L);E.appendChild(c);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");c=document.createElement("td");mxUtils.write(L,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=
-1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(x);E.appendChild(L);E.appendChild(c);B.appendChild(E);v.appendChild(B);u.appendChild(v);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var I=0;I<f.length;I++){var N=k.getCellGeometry(f[I]);null!=N&&(N=N.clone(),k.isCellMovable(f[I])&&(N.relative=d.checked,
-0<mxUtils.trim(g.value).length&&(N.x=Number(g.value)),0<mxUtils.trim(q.value).length&&(N.y=Number(q.value)),0<mxUtils.trim(m.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.x=Number(m.value)),0<mxUtils.trim(n.value).length&&(null==N.offset&&(N.offset=new mxPoint),N.offset.y=Number(n.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(N.width=Number(z.value)),0<mxUtils.trim(C.value).length&&(N.height=Number(C.value))),k.getModel().setGeometry(f[I],N));0<mxUtils.trim(x.value).length&&
-k.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[f[I]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(I){13==I.keyCode&&y.click()});v=document.createElement("div");v.style.marginTop="20px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(e),v.appendChild(y)):(v.appendChild(y),v.appendChild(e));u.appendChild(v);this.container=u},LibraryDialog=function(b,f,k,e,u,v){function B(F){for(F=document.elementFromPoint(F.clientX,
-F.clientY);null!=F&&F.parentNode!=m;)F=F.parentNode;var K=null;if(null!=F){var D=m.firstChild;for(K=0;null!=D&&D!=F;)D=D.nextSibling,K++}return K}function E(F,K,D,H,J,G,P,T,W){try{if(b.spinner.stop(),null==K||"image/"==K.substring(0,6))if(null==F&&null!=P||null==z[F]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
-X.title.length?"#d0d0d0":""};m.style.backgroundImage="";n.style.display="none";var V=J,l=G;if(J>b.maxImageSize||G>b.maxImageSize){var A=Math.min(1,Math.min(b.maxImageSize/Math.max(1,J)),b.maxImageSize/Math.max(1,G));J*=A;G*=A}V>l?(l=Math.round(100*l/V),V=100):(V=Math.round(100*V/l),l=100);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display="inline-block";M.style.position="relative";M.style.padding="0 12px";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition",
-"transform .1s ease-in-out");if(null!=F){var Q=document.createElement("img");Q.setAttribute("src",I.convert(F));Q.style.width=V+"px";Q.style.height=l+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-l)/2)+"px";Q.style.paddingLeft=Math.floor((100-V)/2)+"px";M.appendChild(Q)}else if(null!=P){var O=b.stringToCells(Graph.decompress(P.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,M,null,!0,!1),M.firstChild.style.display="inline-block",M.firstChild.style.cursor="")}var R=document.createElement("img");
-R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ha,ma){mxEvent.addListener(R,"click",function(ia){z[ha]=null;for(var qa=0;qa<d.length;qa++)if(null!=d[qa].data&&d[qa].data==ha||null!=d[qa].xml&&
-null!=ma&&d[qa].xml==ma.xml){d.splice(qa,1);break}M.parentNode.removeChild(ba);0==d.length&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.display="");mxEvent.consume(ia)});mxEvent.addListener(R,"dblclick",function(ia){mxEvent.consume(ia)})})(M,F,P);M.appendChild(R);M.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=F?(X={data:F,w:J,h:G,title:W},null!=T&&(X.aspect=T),z[F]=Q,d.push(X)):null!=P&&(P.aspect="fixed",d.push(P),X=P);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(ba))});U();M.appendChild(S);mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ha=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ma){null!=ma&&(X.title=ma,U())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;U()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(M,"dblclick",O);m.appendChild(M);mxEvent.addListener(M,"dragstart",function(ba){null==F&&null!=P&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=P.xml&&ba.dataTransfer.setData("Text",
-P.xml);C=B(ba);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(ba){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");C=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else N||(N=!0,b.handleError({message:mxResources.get("fileExists")}));else{J=
-!1;try{if(V=mxUtils.parseXml(F),"mxlibrary"==V.documentElement.nodeName){l=JSON.parse(mxUtils.getTextContent(V.documentElement));if(null!=l&&0<l.length)for(var aa=0;aa<l.length;aa++)null!=l[aa].xml?E(null,null,0,0,0,0,l[aa]):E(l[aa].data,null,0,0,l[aa].w,l[aa].h,null,"fixed",l[aa].title);J=!0}else if("mxfile"==V.documentElement.nodeName){var Y=V.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){l=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(l));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);
-E(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}J=!0}}catch(ba){}J||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function L(F){F.dataTransfer.dropEffect=null!=C?"move":"copy";F.stopPropagation();F.preventDefault()}function c(F){F.stopPropagation();F.preventDefault();N=!1;x=B(F);if(null!=C)null!=x&&x<m.children.length?(d.splice(x>C?x-1:x,0,d.splice(C,1)[0]),m.insertBefore(m.children[C],m.children[x])):(d.push(d.splice(C,1)[0]),m.appendChild(m.children[C]));
-else if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,0,0,b.maxImageSize,t(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var K=decodeURIComponent(F.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(K)||/(\.png)($|\?)/i.test(K)||/(\.gif)($|\?)/i.test(K)||/(\.svg)($|\?)/i.test(K))&&b.loadImage(K,function(D){E(K,null,0,0,D.width,D.height);m.scrollTop=m.scrollHeight})}F.stopPropagation();F.preventDefault()}var d=[];k=document.createElement("div");
-k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",f);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==u||u.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==u||u.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};g.appendChild(q);var m=document.createElement("div");m.style.borderWidth="1px 0px 1px 0px";m.style.borderColor="#d3d3d3";m.style.borderStyle="solid";m.style.marginTop="6px";m.style.overflow="auto";m.style.height="340px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";0==d.length&&Graph.fileSupport&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var n=document.createElement("div");
-n.style.position="absolute";n.style.width="640px";n.style.top="260px";n.style.textAlign="center";n.style.fontSize="22px";n.style.color="#a0c3ff";mxUtils.write(n,mxResources.get("dragImagesHere"));k.appendChild(n);var z={},C=null,x=null,y=null;f=function(F){"true"!=mxEvent.getSource(F).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(F))};mxEvent.addListener(m,"mousedown",f);mxEvent.addListener(m,"pointerdown",f);mxEvent.addListener(m,"touchstart",f);var I=new mxUrlConverter,N=
-!1;if(null!=e)for(f=0;f<e.length;f++)g=e[f],E(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(m,"dragleave",function(F){n.style.cursor="";for(var K=mxEvent.getSource(F);null!=K;){if(K==m||K==n){F.stopPropagation();F.preventDefault();break}K=K.parentNode}});var t=function(F){return function(K,D,H,J,G,P,T,W,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(V){E(V,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)?
-null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(K,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(E(V.responseText,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(E(K,D,H,J,G,P,T,"fixed",mxEvent.isAltDown(F)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight)}};mxEvent.addListener(m,"dragover",L);mxEvent.addListener(m,"drop",c);mxEvent.addListener(n,"dragover",L);mxEvent.addListener(n,"drop",c);k.appendChild(m);e=document.createElement("div");e.style.textAlign="right";e.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
-e.appendChild(f);"draw.io"!=b.getServiceName()||null==u||u.constructor!=DriveLibrary&&u.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&u.getPublicUrl(function(F){b.spinner.stop();if(null!=F){var K=b.getSearch("create title mode url drive splash state clibs ui".split(" "));K+=(0==K.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(F);F=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+K,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(F.container,450,240,!0);F.init()}else u.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(u.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("export"),
-function(){var F=b.createLibraryDataFromImages(d),K=q.value;/(\.xml)$/i.test(K)||(K+=".xml");b.isLocalFileSave()?b.saveLocalFile(F,K,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(K)+"&format=xml&xml="+encodeURIComponent(F))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";e.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");
-p.setAttribute("type","file");mxEvent.addListener(p,"change",function(F){N=!1;b.importFiles(p.files,0,0,b.maxImageSize,function(K,D,H,J,G,P,T,W,U){null!=p.files&&(t(F)(K,D,H,J,G,P,T,W,U),p.type="",p.type="file",p.value="")});m.scrollTop=m.scrollHeight});p.style.display="none";document.body.appendChild(p);b.libDlgFileInputElt=p}g=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";e.appendChild(g)}g=
-mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(F,K,D){N=!1;if(null!=F){if("data:image/"==F.substring(0,11)){var H=F.indexOf(",");0<H&&(F=F.substring(0,H)+";base64,"+F.substring(H+1))}E(F,null,0,0,K,D);m.scrollTop=m.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";e.appendChild(g);this.saveBtnClickHandler=function(F,K,D,H){b.saveLibrary(F,K,D,H)};g=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(q.value,d,u,v)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";e.appendChild(g);b.editor.cancelFirst||e.appendChild(f);k.appendChild(e);this.container=k},EditShapeDialog=function(b,f,k,e,u){e=null!=e?e:300;u=null!=u?u:120;var v=document.createElement("table"),B=document.createElement("tbody");v.style.cellPadding="4px";var E=document.createElement("tr");var L=document.createElement("td");L.setAttribute("colspan",
-"2");L.style.fontSize="10pt";mxUtils.write(L,k);E.appendChild(L);B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=e-200+"px";c.style.height=u+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};L.appendChild(c);E.appendChild(L);L=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top=
-"6px";k.style.width="200px";k.style.height=u+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);L.appendChild(k);var d=new Graph(k);d.setEnabled(!1);var g=b.editor.graph.cloneCell(f);d.addCells([g]);k=d.view.getState(g);var q="";null!=k.shape&&null!=k.shape.stencil&&(q=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,q||"");k=d.getGraphBounds();u=Math.min(160/k.width,(u-40)/k.height);d.view.scaleAndTranslate(u,20/u-k.x,20/u-k.y);E.appendChild(L);
-B.appendChild(E);E=document.createElement("tr");L=document.createElement("td");L.setAttribute("colspan","2");L.style.paddingTop="2px";L.style.whiteSpace="nowrap";L.setAttribute("align","right");b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),u.className="geBtn",L.appendChild(u));u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&L.appendChild(u);
-var m=function(n,z,C){var x=c.value,y=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(C&&b.hideDialog(),y=!n.model.contains(z),!C||y||x!=q){x=Graph.compress(x);n.getModel().beginUpdate();try{if(y){var I=b.editor.graph.getFreeInsertPoint();z.geometry.x=I.x;z.geometry.y=I.y;n.addCell(z)}n.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+x+")",[z])}catch(N){throw N;}finally{n.getModel().endUpdate()}y&&(n.setSelectionCell(z),n.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){m(d,g,!1)});k.className="geBtn";L.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){m(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";L.appendChild(k);b.editor.cancelFirst||L.appendChild(u);E.appendChild(L);B.appendChild(E);v.appendChild(B);this.container=v},CustomDialog=function(b,f,k,e,u,v,
-B,E,L,c,d){var g=document.createElement("div");g.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=B&&q.appendChild(B);b.isOffline()||null==v||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(v)}),f.className="geBtn",q.appendChild(f));L=mxUtils.button(L||mxResources.get("cancel"),function(){b.hideDialog();null!=e&&e()});L.className="geBtn";E&&(L.style.display="none");b.editor.cancelFirst&&q.appendChild(L);u=mxUtils.button(u||
-mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var m=k();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}c&&b.hideDialog(null,null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(L);if(null!=d)for(E=0;E<d.length;E++)(function(m,n,z){m=mxUtils.button(m,function(C){n(C)});null!=z&&m.setAttribute("title",z);m.className="geBtn";q.appendChild(m)})(d[E][0],d[E][1],d[E][2]);
-g.appendChild(q);this.cancelBtn=L;this.okButton=u;this.container=g},TemplatesDialog=function(b,f,k,e,u,v,B,E,L,c,d,g,q,m,n){function z(da){Ia.innerText=da;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function C(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",A=l,l=null)}function x(da,fa,ja,ra,oa,Aa,xa){if(-1<da.className.indexOf("geTempDlgRadioBtnActive"))return!1;da.className+=" geTempDlgRadioBtnActive";W.querySelector(".geTempDlgRadioBtn[data-id="+
-ra+"]").className="geTempDlgRadioBtn "+(xa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");W.querySelector("."+fa).src="/images/"+ja+"-sel.svg";W.querySelector("."+oa).src="/images/"+Aa+".svg";return!0}function y(da,fa,ja,ra){function oa(pa,Ha){null==xa?(pa=/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)?PROXY_URL+"?url="+encodeURIComponent(pa):TEMPLATE_PATH+"/"+pa,mxUtils.get(pa,mxUtils.bind(this,function(Ma){200<=Ma.getStatus()&&299>=Ma.getStatus()&&(xa=Ma.getText());Ha(xa)}))):Ha(xa)}
-function Aa(pa,Ha,Ma){if(null!=pa&&mxUtils.isAncestorNode(document.body,fa)&&(pa=mxUtils.parseXml(pa),pa=Editor.extractGraphModel(pa.documentElement,!0),null!=pa)){"mxfile"==pa.nodeName&&(pa=Editor.parseDiagramNode(pa.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(pa.ownerDocument),Ja=new mxGraphModel;Ra.decode(pa,Ja);pa=Ja.root.getChildAt(0).children||[];b.sidebar.createTooltip(fa,pa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ha,Ma),!0,null,!0);var Oa=document.createElement("div");Oa.className="geTempDlgDialogMask";W.appendChild(Oa);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Oa&&(W.removeChild(Oa),Oa=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Oa,"click",function(){b.sidebar.hideTooltip()})}}var xa=null;if(Ga||b.sidebar.currentElt==
-fa)b.sidebar.hideTooltip();else{var ta=function(pa){Ga&&b.sidebar.currentElt==fa&&Aa(pa,mxEvent.getClientX(ra),mxEvent.getClientY(ra));Ga=!1;ja.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=fa;Ga=!0;ja.src="/images/aui-wait.gif";da.isExt?L(da,ta,function(){z(mxResources.get("cantLoadPrev"));Ga=!1;ja.src="/images/icon-search.svg"}):oa(da.url,ta)}}function I(da,fa,ja){if(null!=M){for(var ra=M.className.split(" "),oa=0;oa<ra.length;oa++)if(-1<ra[oa].indexOf("Active")){ra.splice(oa,
-1);break}M.className=ra.join(" ")}null!=da?(M=da,M.className+=" "+fa,Q=ja,Pa.className="geTempDlgCreateBtn"):(Q=M=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function N(da,fa){if(null!=Q){var ja=function(ta){xa.isExternal?L(xa,function(pa){ra(pa,ta)},oa):xa.url?mxUtils.get(TEMPLATE_PATH+"/"+xa.url,mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?ra(pa.getText(),ta):oa()})):ra(b.emptyDiagramXml,ta)},ra=function(ta,pa){n||b.hideDialog(!0);f(ta,pa,xa,fa)},oa=function(){z(mxResources.get("cannotLoad"));
-Aa()},Aa=function(){Q=xa;Pa.className="geTempDlgCreateBtn";fa&&(za.className="geTempDlgOpenBtn")},xa=Q;Q=null;"boolean"!==typeof fa&&(fa=xa.isExternal&&g);1==da?c(xa.url,xa):fa?(za.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",da=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),da=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ja,da,function(ta){var pa=null!=ta&&0<ta.length;return pa&&n?(ja(ta),!1):pa},null,null,null,Aa,m?null:[]),b.showDialog(da.container,350,80,!0,!0),da.init())}}function t(da){Pa.innerText=mxResources.get(ba||da?"create":"copy");da=da?"none":"";g&&(za.style.display=da);for(var fa=W.querySelectorAll(".geTempDlgLinkToDiagram"),ja=0;ja<fa.length;ja++)fa[ja].style.display=da}function p(da,fa,ja,ra,oa){oa||(ma.innerText="",I(),X=da,aa=ra);var Aa=null;if(ja){Aa=document.createElement("table");
-Aa.className="geTempDlgDiagramsListGrid";var xa=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");xa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");xa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("lastModifiedOn");xa.appendChild(ta);Aa.appendChild(xa);ma.appendChild(Aa)}for(xa=0;xa<da.length;xa++){da[xa].isExternal=
-!fa;var pa=da[xa].url,Ha=(ta=mxUtils.htmlEntities(fa?mxResources.get(da[xa].title,null,da[xa].title):da[xa].title))||da[xa].url,Ma=da[xa].imgUrl,Ra=da[xa].changedBy||"",Ja="";da[xa].lastModifiedOn&&(Ja=b.timeSince(new Date(da[xa].lastModifiedOn)),null==Ja&&(Ja=mxResources.get("lessThanAMinute")),Ja=mxResources.get("timeAgo",[Ja],"{1} ago"));Ma||(Ma=TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png");pa=ja?50:15;null!=ta&&ta.length>pa&&(ta=ta.substring(0,pa)+"&hellip;");if(ja){var Oa=document.createElement("tr");
-Ma=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Ma.appendChild(Qa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;Ma.appendChild(Ha);Oa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ra;Oa.appendChild(Ma);Ma=document.createElement("td");Ma.innerText=Ja;Oa.appendChild(Ma);Aa.appendChild(Oa);
-null==M&&(t(fa),I(Oa,"geTempDlgDiagramsListGridActive",da[xa]));(function(Ka,Ta,Va){mxEvent.addListener(Oa,"click",function(){M!=Ta&&(t(fa),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Oa,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(da[xa],Oa,Qa)}else{var Na=document.createElement("div");Na.className="geTempDlgDiagramTile";Na.setAttribute("title",Ha);null==M&&(t(fa),I(Na,"geTempDlgDiagramTileActive",da[xa]));Ra=document.createElement("div");Ra.className=
-"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ka,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,Ra,Ma?Ma.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=Ma;Ra.appendChild(Sa);Na.appendChild(Ra);Ra=document.createElement("div");
-Ra.className="geTempDlgDiagramTileLbl";Ra.innerHTML=null!=ta?ta:"";Na.appendChild(Ra);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Na.appendChild(Qa);(function(Ka,Ta,Va){mxEvent.addListener(Na,"click",function(){M!=Ta&&(t(fa),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Na,"dblclick",N);mxEvent.addListener(Qa,"click",function(Wa){y(Ka,Ta,Va,Wa)})})(da[xa],Na,Qa);ma.appendChild(Na)}}for(var Ua in ra)da=
-ra[Ua],0<da.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerText=mxResources.get(Ua,null,Ua),ma.appendChild(oa),p(da,fa,ja,null,!0))}function F(da,fa){ya.innerText="";I();var ja=Math.floor(ya.offsetWidth/150)-1;fa=!fa&&da.length>ja?ja:da.length;for(var ra=0;ra<fa;ra++){var oa=da[ra];oa.isCategory=!0;var Aa=document.createElement("div"),xa=mxResources.get(oa.title);null==xa&&(xa=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));Aa.className="geTempDlgNewDiagramCatItem";
-Aa.setAttribute("title",xa);xa=mxUtils.htmlEntities(xa);15<xa.length&&(xa=xa.substring(0,15)+"&hellip;");null==M&&(t(!0),I(Aa,"geTempDlgNewDiagramCatItemActive",oa));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var pa=document.createElement("img");pa.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;ta.appendChild(pa);Aa.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=xa;Aa.appendChild(ta);ya.appendChild(Aa);(function(Ha,
-Ma){mxEvent.addListener(Aa,"click",function(){M!=Ma&&(t(!0),I(Ma,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Aa,"dblclick",N)})(oa,Aa)}Aa=document.createElement("div");Aa.className="geTempDlgNewDiagramCatItem";xa=mxResources.get("showAllTemps");Aa.setAttribute("title",xa);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Aa.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";
-ta.innerText=xa;Aa.appendChild(ta);ya.appendChild(Aa);mxEvent.addListener(Aa,"click",function(){function Ha(){var Ra=Ma.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}ba=!0;var Ma=W.querySelector(".geTemplatesList");Ma.style.display="block";la.style.width="";Fa.style.display="";Fa.value="";Y=null;Ha()});ha.style.display=da.length<=ja?"none":""}function K(da,fa,ja){function ra(Sa,Ua){var Ka=mxResources.get(Sa);null==Ka&&(Ka=Sa.substring(0,1).toUpperCase()+Sa.substring(1));
-Sa=Ka+" ("+Ua.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function oa(Sa,Ua,Ka,Ta,Va){mxEvent.addListener(Ka,"click",function(){l!=Ka&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Da.style.display="none",Ca.style.minHeight="100%"),l=Ka,l.style.fontWeight="bold",l.style.textDecoration="underline",la.scrollTop=0,U&&(V=!0),ia.innerHTML=Ua,qa.style.display="none",p(Va?fa[Sa]:
-Ta?La[Sa][Ta]:da[Sa],Va?!1:!0))})}var Aa=W.querySelector(".geTemplatesList");if(0<ja){ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,mxResources.get("custom"));Aa.appendChild(ja);for(var xa in fa){ja=document.createElement("div");var ta=fa[xa];ta=ra(xa,ta);ja.className="geTemplateCatLink";ja.setAttribute("title",ta.fullLbl);ja.innerHTML=ta.lbl;Aa.appendChild(ja);oa(xa,ta.lblOnly,ja,
-null,!0)}ja=document.createElement("div");ja.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ja,"draw.io");Aa.appendChild(ja)}for(xa in da){var pa=La[xa],Ha=ja=document.createElement(pa?"ul":"div");ta=da[xa];ta=ra(xa,ta);if(null!=pa){var Ma=document.createElement("li"),Ra=document.createElement("div");Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ta.fullLbl);
-Ra.innerHTML=ta.lbl;Ha=Ra;Ma.appendChild(Ra);var Ja=document.createElement("ul");Ja.className="geTempTreeNested";Ja.style.visibility="hidden";for(var Oa in pa){var Qa=document.createElement("li"),Na=ra(Oa,pa[Oa]);Qa.setAttribute("title",Na.fullLbl);Qa.innerHTML=Na.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";oa(xa,Na.lblOnly,Qa,Oa);Ja.appendChild(Qa)}Ma.appendChild(Ja);ja.className="geTempTree";ja.appendChild(Ma);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ka=
-Sa.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ka.length;Va++)Ka[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ja,Ra)}else ja.className="geTemplateCatLink geTemplateDrawioCatLink",ja.setAttribute("title",ta.fullLbl),ja.innerHTML=ta.lbl;Aa.appendChild(ja);oa(xa,ta.lblOnly,
-Ha)}}function D(){mxUtils.get(e,function(da){if(!na){na=!0;da=da.getXml().documentElement.firstChild;for(var fa={};null!=da;){if("undefined"!==typeof da.getAttribute)if("clibs"==da.nodeName){for(var ja=da.getAttribute("name"),ra=da.getElementsByTagName("add"),oa=[],Aa=0;Aa<ra.length;Aa++)oa.push(encodeURIComponent(mxUtils.getTextContent(ra[Aa])));null!=ja&&0<oa.length&&(fa[ja]=oa.join(";"))}else if(oa=da.getAttribute("url"),null!=oa){ra=da.getAttribute("section");ja=da.getAttribute("subsection");
-if(null==ra&&(Aa=oa.indexOf("/"),ra=oa.substring(0,Aa),null==ja)){var xa=oa.indexOf("/",Aa+1);-1<xa&&(ja=oa.substring(Aa+1,xa))}Aa=wa[ra];null==Aa&&(sa++,Aa=[],wa[ra]=Aa);oa=da.getAttribute("clibs");null!=fa[oa]&&(oa=fa[oa]);oa={url:da.getAttribute("url"),libs:da.getAttribute("libs"),title:da.getAttribute("title")||da.getAttribute("name"),preview:da.getAttribute("preview"),clibs:oa,tags:da.getAttribute("tags")};Aa.push(oa);null!=ja&&(Aa=La[ra],null==Aa&&(Aa={},La[ra]=Aa),ra=Aa[ja],null==ra&&(ra=[],
-Aa[ja]=ra),ra.push(oa))}da=da.nextSibling}K(wa,ka,va)}})}function H(da){B&&(la.scrollTop=0,ma.innerText="",Ba.spin(ma),V=!1,U=!0,ia.innerText=mxResources.get("recentDiag"),Y=null,B(ca,function(){z(mxResources.get("cannotLoad"));ca([])},da?null:v))}function J(da){if(""==da)null!=A&&(A.click(),A=null);else{if(null==TemplatesDialog.tagsList[e]){var fa={};for(Ha in wa)for(var ja=wa[Ha],ra=0;ra<ja.length;ra++){var oa=ja[ra];if(null!=oa.tags)for(var Aa=oa.tags.toLowerCase().split(";"),xa=0;xa<Aa.length;xa++)null==
-fa[Aa[xa]]&&(fa[Aa[xa]]=[]),fa[Aa[xa]].push(oa)}TemplatesDialog.tagsList[e]=fa}var ta=da.toLowerCase().split(" ");fa=TemplatesDialog.tagsList[e];if(0<va&&null==fa.__tagsList__){for(Ha in ka)for(ja=ka[Ha],ra=0;ra<ja.length;ra++)for(oa=ja[ra],Aa=oa.title.split(" "),Aa.push(Ha),xa=0;xa<Aa.length;xa++){var pa=Aa[xa].toLowerCase();null==fa[pa]&&(fa[pa]=[]);fa[pa].push(oa)}fa.__tagsList__=!0}var Ha=[];ja={};for(ra=Aa=0;ra<ta.length;ra++)if(0<ta[ra].length){pa=fa[ta[ra]];var Ma={};Ha=[];if(null!=pa)for(xa=
-0;xa<pa.length;xa++)oa=pa[xa],0==Aa==(null==ja[oa.url])&&(Ma[oa.url]=!0,Ha.push(oa));ja=Ma;Aa++}0==Ha.length?ia.innerText=mxResources.get("noResultsFor",[da]):p(Ha,!0)}}function G(da){if(Y!=da||R!=Z)C(),la.scrollTop=0,ma.innerText="",ia.innerText=mxResources.get("searchResults")+' "'+da+'"',ea=null,ba?J(da):E&&(da?(Ba.spin(ma),V=!1,U=!0,E(da,ca,function(){z(mxResources.get("searchFailed"));ca([])},R?null:v)):H(R)),Y=da,Z=R}function P(da){null!=ea&&clearTimeout(ea);13==da.keyCode?G(Fa.value):ea=setTimeout(function(){G(Fa.value)},
-1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(E?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+
-mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
+f.appendChild(g);f.appendChild(k);e.appendChild(f);var m=F,p,q,z=function(I,M,E,Q){var n="data:"==I.substring(0,5);!b.isOffline()||n&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(v){b.spinner.stop();b.hideDialog();var D=!1===Q?1:null!=M&&null!=E?Math.max(M/v.width,E/v.height):Math.min(1,Math.min(520/v.width,520/v.height));u&&(I=b.convertDataUri(I));d(I,Math.round(Number(v.width)*D),Math.round(Number(v.height)*D),m,p,q)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,m,p,q)):(I=b.convertDataUri(I),M=null==M?120:M,E=null==E?100:E,b.hideDialog(),d(I,M,E,m,p,q))},y=function(I,M){if(null!=I){var E=t?null:c.getModel().getGeometry(c.getSelectionCell());null!=E?z(I,E.width,E.height,M):z(I,null,null,M)}else b.hideDialog(),d(null)};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var I=e.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(E){null!=M&&(M.parentNode.removeChild(M),M=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,
+0,0,b.maxImageSize,function(n,v,D,H,K,G,N,T){y(n,T)},function(){},function(n){return"image/"==n.type.substring(0,6)},function(n){for(var v=0;v<n.length;v++)n[v]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var Q=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(Q)&&y(decodeURIComponent(Q))}E.stopPropagation();E.preventDefault()}),!1)}};F=document.createElement("div");F.style.marginTop="14px";F.style.textAlign=
+"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&F.appendChild(k);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(g.value=I.url));g.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type",
+"file");mxEvent.addListener(A,"change",function(I){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(M,E,Q,n,v,D){y(M)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var E=0;E<M.length;E++)M[E]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";F.appendChild(f)}mxEvent.addListener(g,
+"keypress",function(I){13==I.keyCode&&y(g.value)});var x=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,g.value,m,function(M,E,Q){m=M;p=E;q=Q});b.showDialog(I.container,300,390,!0,!0)});C&&(x.className="geBtn",F.appendChild(x));mxEvent.addListener(g,"change",function(I){m=null;J()});J();C=mxUtils.button(mxResources.get("apply"),function(){y(g.value)});C.className="geBtn gePrimaryBtn";F.appendChild(C);b.editor.cancelFirst||F.appendChild(k);Graph.fileSupport&&(F.style.marginTop=
+"120px",e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",e.style.backgroundPosition="center 65%",e.style.backgroundRepeat="no-repeat",C=document.createElement("div"),C.style.position="absolute",C.style.width="420px",C.style.top="58%",C.style.textAlign="center",C.style.fontSize="18px",C.style.color="#a0c3ff",mxUtils.write(C,mxResources.get("dragImagesHere")),e.appendChild(C));e.appendChild(F);this.container=e},LinkDialog=function(b,f,k,d,t,u,C){function F(I,M,E){E=mxUtils.button("",E);
+E.className="geBtn";E.setAttribute("title",M);M=document.createElement("img");M.style.height="26px";M.style.width="26px";M.setAttribute("src",I);E.style.minWidth="42px";E.style.verticalAlign="middle";E.appendChild(M);x.appendChild(E)}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,mxResources.get("editLink")+":");var c=document.createElement("div");c.className="geTitle";c.style.backgroundColor="transparent";c.style.borderColor="transparent";c.style.whiteSpace="nowrap";c.style.textOverflow=
+"clip";c.style.cursor="default";c.style.paddingRight="20px";var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="97%";e.style.boxSizing="border-box";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";e.style.marginBottom="4px";var g=document.createElement("div");g.setAttribute("title",
+mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";g.style.display="inline-block";g.style.top="3px";g.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){e.value="";e.focus()});var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geLinkDialogOption");
+var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","geLinkDialogOption");var q=document.createElement("select");q.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=C&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);C=null!=C?C:"_blank";z.setAttribute("title",C);u&&(e.style.width="340px");if(t&&
+null!=b.pages){null!=f&&Graph.isPageLink(f)?(p.setAttribute("checked","checked"),p.defaultChecked=!0):(e.setAttribute("value",f),m.setAttribute("checked","checked"),m.defaultChecked=!0);c.appendChild(m);c.appendChild(e);c.appendChild(g);u&&(c.appendChild(z),mxUtils.write(c,mxResources.get("openInNewWindow")));mxUtils.br(c);c.appendChild(p);t=!1;for(u=0;u<b.pages.length;u++)g=document.createElement("option"),mxUtils.write(g,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),g.setAttribute("value",
+"data:page/id,"+b.pages[u].getId()),f==g.getAttribute("value")&&(g.setAttribute("selected","selected"),t=!0),q.appendChild(g);if(!t&&p.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");q.appendChild(y);mxEvent.addListener(q,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}c.appendChild(q)}else e.setAttribute("value",
+f),c.appendChild(e),c.appendChild(g);J.appendChild(c);var A=mxUtils.button(k,function(){b.hideDialog();d(p.checked?"pageNotFound"!==q.value?q.value:f:e.value,LinkDialog.selectedDocs,z.checked?C:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){p.checked?q.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){m.removeAttribute("checked");p.setAttribute("checked",
+"checked");p.checked=!0});mxEvent.addListener(e,"focus",function(){p.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){var I=J.parentNode,M=null;mxEvent.addListener(I,"dragleave",function(E){null!=M&&(M.parentNode.removeChild(M),M=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=b.highlightElement(I));E.stopPropagation();E.preventDefault()}));
+mxEvent.addListener(I,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),m.setAttribute("checked","checked"),m.checked=!0,A.click());E.stopPropagation();E.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="18px";x.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+k.style.verticalAlign="middle";k.className="geBtn";x.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&x.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var M=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
+"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?M="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(M="https://drive.google.com/#folders/"+I.docs[0].id);e.value=M;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&F(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(M){LinkDialog.filePicked(M)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){e.value=I[0].link;e.focus()}})});null!=b.oneDrive&&F(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(I,M){e.value=M.value[0].webUrl;e.focus()},!0)});null!=b.gitHub&&F(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var M=I[0],E=I[1],Q=I[2];I=I.slice(3,I.length).join("/");e.value="https://github.com/"+M+"/"+E+"/blob/"+Q+"/"+I;e.focus()}})});null!=b.gitLab&&F(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var M=
+I[0],E=I[1],Q=I[2];I=I.slice(3,I.length).join("/");e.value=DRAWIO_GITLAB_URL+"/"+M+"/"+E+"/blob/"+Q+"/"+I;e.focus()}})});mxEvent.addListener(e,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(p.checked?q.value:e.value,LinkDialog.selectedDocs))});x.appendChild(A);b.editor.cancelFirst||x.appendChild(k);J.appendChild(x);this.container=J},FeedbackDialog=function(b,f,k,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
+"18px";u.style.marginBottom="18px";t.appendChild(u);u=document.createElement("div");mxUtils.write(u,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));t.appendChild(u);var C=document.createElement("input");C.setAttribute("type","text");C.style.marginTop="6px";C.style.width="600px";var F=mxUtils.button(mxResources.get("sendMessage"),function(){var g=e.value+(c.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;g.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
+":\n"+g),function(m){b.spinner.stop();200<=m.getStatus()&&299>=m.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});F.className="geBtn gePrimaryBtn";if(!k){F.setAttribute("disabled","disabled");var J=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(C,
+"change",function(){0<C.value.length&&0<J.test(C.value)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&J.test(C.value)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")})}t.appendChild(C);this.init=function(){C.focus()};var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
+k.appendChild(c);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(u);mxEvent.addListener(u,"click",function(g){c.checked=!c.checked;mxEvent.consume(g)});t.appendChild(k);u=document.createElement("div");mxUtils.write(u,mxResources.get("feedback"));t.appendChild(u);var e=document.createElement("textarea");e.style.resize="none";e.style.width="600px";e.style.height="140px";e.style.marginTop="6px";e.setAttribute("placeholder",mxResources.get("comments"));
+t.appendChild(e);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst?(k.appendChild(u),k.appendChild(F)):(k.appendChild(F),k.appendChild(u));t.appendChild(k);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,f,k){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="0px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.left="199px";u.style.width="470px";u.style.height="376px";
+u.style.overflow="hidden";var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";u.appendChild(C);mxEvent.disableContextMenu(u);d.appendChild(u);var F=new Graph(u);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;var J=0,c=null,e=0,g=F.getGlobalVariable;
+F.getGlobalVariable=function(W){return"page"==W&&null!=c&&null!=c[e]?c[e].getAttribute("name"):"pagenumber"==W?e+1:"pagecount"==W?null!=c?c.length:1:g.apply(this,arguments)};F.getLinkForCell=function(){return null};Editor.MathJaxRender&&F.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,aa){b.editor.graph.mathEnabled&&Editor.MathJaxRender(F.container)}));var m={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},p=new Spinner(m),q=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(m=0;m<z.length;m++)y[z[m].getAttribute("id")]=z[m];var A=null,x=null,I=null,M=null,E=mxUtils.button("",function(){null!=I&&F.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
+mxUtils.setOpacity(E,20);var Q=mxUtils.button("",function(){null!=I&&F.zoomOut()});Q.className="geSprite geSprite-zoomout";Q.setAttribute("title",mxResources.get("zoomOut"));Q.style.outline="none";Q.style.border="none";Q.style.margin="2px";Q.setAttribute("disabled","disabled");mxUtils.setOpacity(Q,20);var n=mxUtils.button("",function(){null!=I&&(F.maxFitScale=8,F.fit(8),F.center())});n.className="geSprite geSprite-fit";n.setAttribute("title",mxResources.get("fit"));n.style.outline="none";n.style.border=
+"none";n.style.margin="2px";n.setAttribute("disabled","disabled");mxUtils.setOpacity(n,20);var v=mxUtils.button("",function(){null!=I&&(F.zoomActual(),F.center())});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var D=mxUtils.button("",function(){});D.className="geSprite geSprite-middle";D.setAttribute("title",mxResources.get("compare"));
+D.style.outline="none";D.style.border="none";D.style.margin="2px";mxUtils.setOpacity(D,60);var H=u.cloneNode(!1);H.style.pointerEvent="none";u.parentNode.appendChild(H);var K=new Graph(H);K.setTooltips(!1);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;mxEvent.addGestureListeners(D,function(W){W=y[c[J].getAttribute("id")];mxUtils.setOpacity(D,20);C.innerText="";null==W?mxUtils.write(C,
+mxResources.get("pageNotFound")):(G.style.display="none",u.style.display="none",H.style.display="",H.style.backgroundColor=u.style.backgroundColor,W=Editor.parseDiagramNode(W),(new mxCodec(W.ownerDocument)).decode(W,K.getModel()),K.view.scaleAndTranslate(F.view.scale,F.view.translate.x,F.view.translate.y))},null,function(){mxUtils.setOpacity(D,60);C.innerText="";"none"==u.style.display&&(G.style.display="",u.style.display="",H.style.display="none")});var G=document.createElement("div");G.style.position=
+"absolute";G.style.textAlign="right";G.style.color="gray";G.style.marginTop="10px";G.style.backgroundColor="transparent";G.style.top="440px";G.style.right="32px";G.style.maxWidth="380px";G.style.cursor="default";var N=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var W=mxUtils.getXml(I.documentElement),aa=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(W,aa,"text/xml"):(W="undefined"===typeof pako?"&xml="+encodeURIComponent(W):"&data="+encodeURIComponent(Graph.compress(W)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(aa)+"&format=xml"+W)).simulate(document,"_blank"))}});N.className="geBtn";N.setAttribute("disabled","disabled");var T=mxUtils.button(mxResources.get("restore"),function(W){null!=I&&null!=M&&(mxEvent.isShiftDown(W)?null!=I&&(W=b.getPagesForNode(I.documentElement),W=b.diffPages(b.pages,W),W=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(W,null,2),function(aa){if(0<aa.length)try{b.confirm(mxResources.get("areYouSure"),function(){q.patch([JSON.parse(aa)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(Y){b.handleError(Y)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(W.container,620,460,!0,!0),W.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(M):b.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(aa){b.spinner.stop();b.replaceFileData(M);b.hideDialog()},function(aa){b.spinner.stop();b.editor.setStatus("");b.handleError(aa,null!=aa?mxResources.get("errorSavingFile"):null)})}))});
+T.className="geBtn";T.setAttribute("disabled","disabled");T.setAttribute("title","Shift+Click for Diff");var V=document.createElement("select");V.setAttribute("disabled","disabled");V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";var U=null;mxEvent.addListener(V,"change",function(W){null!=U&&(U(W),mxEvent.consume(W))});var X=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});X.className="geBtn";X.setAttribute("disabled","disabled");null!=k&&(X.style.display="none");var l=mxUtils.button(mxResources.get("show"),function(){null!=x&&b.openLink(x.getUrl(V.selectedIndex))});l.className="geBtn gePrimaryBtn";l.setAttribute("disabled","disabled");null!=k&&(l.style.display="none",T.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var L=null;if(null!=f&&0<f.length){u.style.cursor="move";var P=document.createElement("table");P.style.border="1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";
+var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(m=f.length-1;0<=m;m--){var S=function(W){var aa=new Date(W.modifiedDate),Y=null;if(0<=aa.getTime()){var Z=function(fa){p.stop();C.innerText="";var ja=mxUtils.parseXml(fa),ha=b.editor.extractGraphModel(ja.documentElement,!0);if(null!=ha){var ra=function(Ga){null!=Ga&&(Ga=ma(Editor.parseDiagramNode(Ga)));return Ga},ma=function(Ga){var Ea=Ga.getAttribute("background");
+if(null==Ea||""==Ea||Ea==mxConstants.NONE)Ea=F.defaultPageBackgroundColor;u.style.backgroundColor=Ea;(new mxCodec(Ga.ownerDocument)).decode(Ga,F.getModel());F.maxFitScale=1;F.fit(8);F.center();return Ga};V.style.display="none";V.innerText="";I=ja;M=fa;c=parseSelectFunction=null;e=0;if("mxfile"==ha.nodeName){ja=ha.getElementsByTagName("diagram");c=[];for(fa=0;fa<ja.length;fa++)c.push(ja[fa]);e=Math.min(J,c.length-1);0<c.length&&ra(c[e]);if(1<c.length)for(V.removeAttribute("disabled"),V.style.display=
+"",fa=0;fa<c.length;fa++)ja=document.createElement("option"),mxUtils.write(ja,c[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),ja.setAttribute("value",fa),fa==e&&ja.setAttribute("selected","selected"),V.appendChild(ja);U=function(){try{var Ga=parseInt(V.value);e=J=Ga;ra(c[Ga])}catch(Ea){V.value=J,b.handleError(Ea)}}}else ma(ha);fa=W.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=fa?fa+" ":"")+aa.toLocaleDateString()+
+" "+aa.toLocaleTimeString());G.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");Q.removeAttribute("disabled");n.removeAttribute("disabled");v.removeAttribute("disabled");D.removeAttribute("disabled");null!=q&&q.isRestricted()||(b.editor.graph.isEnabled()&&T.removeAttribute("disabled"),N.removeAttribute("disabled"),l.removeAttribute("disabled"),X.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(n,60);mxUtils.setOpacity(v,60);
+mxUtils.setOpacity(D,60)}else V.style.display="none",V.innerText="",G.innerText="",mxUtils.write(G,mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottom="1px solid lightGray";Y.style.fontSize="12px";Y.style.cursor="pointer";var ba=document.createElement("td");ba.style.padding="6px";ba.style.whiteSpace="nowrap";W==f[f.length-1]?mxUtils.write(ba,mxResources.get("current")):aa.toDateString()===R?mxUtils.write(ba,
+aa.toLocaleTimeString()):mxUtils.write(ba,aa.toLocaleDateString()+" "+aa.toLocaleTimeString());Y.appendChild(ba);Y.setAttribute("title",aa.toLocaleDateString()+" "+aa.toLocaleTimeString()+(null!=W.fileSize?" "+b.formatFileSize(parseInt(W.fileSize)):"")+(null!=W.lastModifyingUserName?" "+W.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(fa){x!=W&&(p.stop(),null!=A&&(A.style.backgroundColor=""),x=W,A=Y,A.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",M=I=null,G.removeAttribute("title"),
+G.innerText=mxResources.get("loading")+"...",u.style.backgroundColor=F.defaultPageBackgroundColor,C.innerText="",F.getModel().clear(),T.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),V.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(n,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(D,20),p.spin(u),W.getXml(function(ja){if(x==W)try{Z(ja)}catch(ha){G.innerText=mxResources.get("error")+": "+ha.message}},function(ja){p.stop();V.style.display="none";V.innerText="";G.innerText="";mxUtils.write(G,mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(Y,"dblclick",function(fa){l.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);O.appendChild(Y)}return Y}(f[m]);null!=S&&m==f.length-1&&(L=S)}P.appendChild(O);t.appendChild(P)}else null==q||null==b.drive&&q.constructor==window.DriveFile||null==b.dropbox&&q.constructor==window.DropboxFile?(u.style.display="none",B.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",B.style.display="none",mxUtils.write(t,
+mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";B.appendChild(V);B.appendChild(E);B.appendChild(Q);B.appendChild(v);B.appendChild(n);B.appendChild(D);b.editor.cancelFirst?(z.appendChild(t),z.appendChild(N),z.appendChild(X),z.appendChild(T),z.appendChild(l)):(z.appendChild(N),z.appendChild(X),z.appendChild(T),z.appendChild(l),z.appendChild(t));d.appendChild(z);d.appendChild(B);d.appendChild(G);
+this.container=d},DraftDialog=function(b,f,k,d,t,u,C,F,J){var c=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight="normal";mxUtils.write(e,f);c.appendChild(e);var g=document.createElement("select"),m=mxUtils.bind(this,function(){x=mxUtils.parseXml(J[g.value].data);I=b.editor.extractGraphModel(x.documentElement,!0);M=0;this.init()});if(null!=J){g.style.marginLeft="4px";for(f=0;f<J.length;f++){var p=
+document.createElement("option");p.setAttribute("value",f);var q=new Date(J[f].created),z=new Date(J[f].modified);mxUtils.write(p,q.toLocaleDateString()+" "+q.toLocaleTimeString()+" - "+(q.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());g.appendChild(p)}e.appendChild(g);mxEvent.addListener(g,"change",m)}null==k&&(k=J[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";y.style.marginTop="10px";y.style.left=
+"40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);c.appendChild(y);var A=new Graph(y);A.setEnabled(!1);A.setPanning(!0);A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var x=mxUtils.parseXml(k),I=b.editor.extractGraphModel(x.documentElement,!0),M=0,E=null,Q=A.getGlobalVariable;A.getGlobalVariable=function(v){return"page"==v&&null!=E&&null!=E[M]?
+E[M].getAttribute("name"):"pagenumber"==v?M+1:"pagecount"==v?null!=E?E.length:1:Q.apply(this,arguments)};A.getLinkForCell=function(){return null};k=mxUtils.button("",function(){A.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);e=mxUtils.button("",function(){A.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));
+e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);f=mxUtils.button("",function(){A.maxFitScale=8;A.fit(8);A.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);p=mxUtils.button("",function(){A.zoomActual();A.center()});p.className="geSprite geSprite-actualsize";p.setAttribute("title",mxResources.get("actualSize"));p.style.outline=
+"none";p.style.border="none";p.style.margin="2px";mxUtils.setOpacity(p,60);C=mxUtils.button(C||mxResources.get("discard"),function(){t.apply(this,[g.value,mxUtils.bind(this,function(){null!=g.parentNode&&(g.options[g.selectedIndex].parentNode.removeChild(g.options[g.selectedIndex]),0<g.options.length?(g.value=g.options[0].value,m()):b.hideDialog(!0))})])});C.className="geBtn";var n=document.createElement("select");n.style.maxWidth="80px";n.style.position="relative";n.style.top="-2px";n.style.verticalAlign=
+"bottom";n.style.marginRight="6px";n.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[g.value])});u.className="geBtn gePrimaryBtn";q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.right="40px";q.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=
+function(){function v(G){if(null!=G){var N=G.getAttribute("background");if(null==N||""==N||N==mxConstants.NONE)N=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=N;(new mxCodec(G.ownerDocument)).decode(G,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return G}function D(G){null!=G&&(G=v(Editor.parseDiagramNode(G)));return G}mxEvent.addListener(n,"change",function(G){M=parseInt(n.value);D(E[M]);mxEvent.consume(G)});if("mxfile"==I.nodeName){var H=I.getElementsByTagName("diagram");
+E=[];for(var K=0;K<H.length;K++)E.push(H[K]);0<E.length&&D(E[M]);n.innerText="";if(1<E.length)for(n.style.display="",K=0;K<E.length;K++)H=document.createElement("option"),mxUtils.write(H,E[K].getAttribute("name")||mxResources.get("pageWithNumber",[K+1])),H.setAttribute("value",K),K==M&&H.setAttribute("selected","selected"),n.appendChild(H);else n.style.display="none"}else v(I)};z.appendChild(n);z.appendChild(k);z.appendChild(e);z.appendChild(p);z.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});k.className="geBtn";F=null!=F?mxUtils.button(mxResources.get("ignore"),F):null;null!=F&&(F.className="geBtn");b.editor.cancelFirst?(q.appendChild(k),null!=F&&q.appendChild(F),q.appendChild(C),q.appendChild(u)):(q.appendChild(u),q.appendChild(C),null!=F&&q.appendChild(F),q.appendChild(k));c.appendChild(q);c.appendChild(z);this.container=c},FindWindow=function(b,f,k,d,t,u){function C(U,X,l,B){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var L=0;L<X.length;L++)if("label"!=X[L].nodeName){var P=mxUtils.trim(X[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(B&&0<=P.indexOf(l)||!B&&P.substring(0,l.length)===l)||null!=U&&U.test(P))return!0}}return!1}function F(){p&&E.value?(N.removeAttribute("disabled"),T.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));E.value&&M.value?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}function J(U,
+X,l){K.innerText="";var B=e.model.getDescendants(e.model.getRoot()),L=M.value.toLowerCase(),P=Q.checked?new RegExp(L):null,O=null;z=null;g!=L&&(g=L,m=null,q=!1);var R=null==m;if(0<L.length){if(q){q=!1;for(var S,W=0;W<b.pages.length;W++)if(b.currentPage==b.pages[W]){S=W;break}U=(S+1)%b.pages.length;m=null;do q=!1,B=b.pages[U],e=b.createTemporaryGraph(e.getStylesheet()),b.updatePageRoot(B),e.model.setRoot(B.root),U=(U+1)%b.pages.length;while(!J(!0,X,l)&&U!=S);m&&(m=null,l?b.editor.graph.model.execute(new SelectPage(b,
+B)):b.selectPage(B));q=!1;e=b.editor.graph;return J(!0,X,l)}for(W=0;W<B.length;W++){S=e.view.getState(B[W]);X&&null!=P&&(R=R||S==m);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(e.model.isVertex(S.cell)||e.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(v.innerHTML=e.sanitizeHtml(e.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([v])):label=e.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;X&&u&&null!=P&&S==m&&(label=label.substr(y),
+aa=y);var Y=""==E.value,Z=Y;if(null==P&&(Z&&0<=label.indexOf(L)||!Z&&label.substring(0,L.length)===L||Y&&C(P,S.cell,L,Z))||null!=P&&(P.test(label)||Y&&C(P,S.cell,L,Z)))if(u&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(z=Y[0].toLowerCase(),y=aa+Y.index+z.length)):(z=L,y=z.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==m}}if(null!=O){if(W==B.length&&n.checked)return m=null,q=!0,J(!0,X,l);m=O;e.scrollCellToVisible(m.cell);e.isEnabled()&&!e.isCellLocked(m.cell)?l||e.getSelectionCell()==m.cell&&
+1==e.getSelectionCount()||e.setSelectionCell(m.cell):e.highlightCell(m.cell)}else{if(!U&&n.checked)return q=!0,J(!0,X,l);e.isEnabled()&&!l&&e.clearSelection()}p=null!=O;u&&!U&&F();return 0==L.length||null!=O}var c=b.actions.get("findReplace"),e=b.editor.graph,g=null,m=null,p=!1,q=!1,z=null,y=0,A=1,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.padding="10px";x.style.height="100%";var I=u?"260px":"200px",M=document.createElement("input");M.setAttribute("placeholder",
+mxResources.get("find"));M.setAttribute("type","text");M.style.marginTop="4px";M.style.marginBottom="6px";M.style.width=I;M.style.fontSize="12px";M.style.borderRadius="4px";M.style.padding="6px";x.appendChild(M);mxUtils.br(x);if(u){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=I;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";
+x.appendChild(E);mxUtils.br(x);mxEvent.addListener(E,"input",F)}var Q=document.createElement("input");Q.setAttribute("id","geFindWinRegExChck");Q.setAttribute("type","checkbox");Q.style.marginRight="4px";x.appendChild(Q);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");x.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));x.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
+"6px";I.style.top="-1px";x.appendChild(I);mxUtils.br(x);var n=document.createElement("input");n.setAttribute("id","geFindWinAllPagesChck");n.setAttribute("type","checkbox");n.style.marginRight="4px";x.appendChild(n);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");x.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));x.appendChild(I);var v=document.createElement("div");mxUtils.br(x);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
+"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";x.appendChild(I);var D=mxUtils.button(mxResources.get("reset"),function(){K.innerText="";M.value="";M.style.backgroundColor="";u&&(E.value="",F());g=m=null;q=!1;M.focus()});D.setAttribute("title",mxResources.get("reset"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.className="geBtn";u||I.appendChild(D);var H=mxUtils.button(mxResources.get("find"),
+function(){try{M.style.backgroundColor=J()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";I.appendChild(H);var K=document.createElement("div");K.style.marginTop="10px";if(u){var G=function(U,X,l,B,L){if(null==L||"1"!=L.html)return B=U.toLowerCase().indexOf(X,
+B),0>B?U:U.substr(0,B)+l+U.substr(B+X.length);var P=U;X=mxUtils.htmlEntities(X);L=[];var O=-1;for(U=U.replace(/<br>/ig,"\n");-1<(O=U.indexOf("<",O+1));)L.push(O);O=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");B=U.toLowerCase().indexOf(X,B);if(0>B)return P;P=B+X.length;l=mxUtils.htmlEntities(l);U=U.substr(0,B)+l+U.substr(P);for(var R=0,S=0;S<L.length;S++){if(L[S]-R<B)U=U.substr(0,L[S])+O[S]+U.substr(L[S]);else{var W=L[S]-R<P?B+R:L[S]+(l.length-X.length);U=U.substr(0,W)+O[S]+U.substr(W)}R+=O[S].length}return U.replace(/\n/g,
+"<br>")},N=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=m&&E.value){var U=m.cell,X=e.getLabel(U);e.isCellEditable(U)&&e.model.setValue(U,G(X,z,E.value,y-z.length,e.getCurrentCellStyle(U)));M.style.backgroundColor=J(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(l){b.handleError(l)}});N.setAttribute("title",mxResources.get("replFind"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
+"ellipsis";N.className="geBtn gePrimaryBtn";N.setAttribute("disabled","disabled");I.appendChild(N);mxUtils.br(I);var T=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=m&&E.value){var U=m.cell,X=e.getLabel(U);e.model.setValue(U,G(X,z,E.value,y-z.length,e.getCurrentCellStyle(U)));N.setAttribute("disabled","disabled");T.setAttribute("disabled","disabled")}}catch(l){b.handleError(l)}});T.setAttribute("title",mxResources.get("replace"));T.style.float="none";T.style.width="120px";
+T.style.marginTop="6px";T.style.marginLeft="8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");I.appendChild(T);var V=mxUtils.button(mxResources.get("replaceAll"),function(){K.innerText="";if(E.value){g=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;e.getModel().beginUpdate();try{for(var l=0,B={};J(!1,!0,!0)&&100>l;){var L=m.cell,P=e.getLabel(L),O=B[L.id];if(O&&O.replAllMrk==
+A&&O.replAllPos>=y)break;B[L.id]={replAllMrk:A,replAllPos:y};e.isCellEditable(L)&&(e.model.setValue(L,G(P,z,E.value,y-z.length,e.getCurrentCellStyle(L))),l++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(K,mxResources.get("matchesRepl",[l]))}catch(R){b.handleError(R)}finally{e.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}A++}});V.setAttribute("title",mxResources.get("replaceAll"));V.style.float="none";V.style.width="120px";
+V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn gePrimaryBtn";V.setAttribute("disabled","disabled");I.appendChild(V);mxUtils.br(I);I.appendChild(D);D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));D.setAttribute("title",mxResources.get("close"));D.style.float="none";D.style.width="120px";D.style.marginTop="6px";D.style.marginLeft="8px";D.style.overflow="hidden";D.style.textOverflow=
+"ellipsis";D.className="geBtn";I.appendChild(D);mxUtils.br(I);I.appendChild(K)}else D.style.width="90px",H.style.width="90px";mxEvent.addListener(M,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)c.funct();else if(g!=M.value.toLowerCase()||13==U.keyCode)try{M.style.backgroundColor=J()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){M.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(x,"keydown",function(U){70==
+U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(c.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(u?"/"+mxResources.get("replace"):""),x,f,k,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?n.removeAttribute("disabled"):(n.checked=!1,n.setAttribute("disabled","disabled"))):e.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,d,t,u){var C=b.editor.graph,F=document.createElement("div");F.style.textAlign="center";F.style.userSelect="none";F.style.overflow="hidden";F.style.height="100%";if(u){var J=document.createElement("input");J.setAttribute("id","geFreehandBrush");J.setAttribute("type",
+"checkbox");J.checked=C.freehand.isPerfectFreehandMode();J.style.margin="10px 5px 0px 10px";J.style.float="left";F.appendChild(J);var c=document.createElement("label");c.setAttribute("for","geFreehandBrush");c.style.float="left";c.style.marginTop="10px";F.appendChild(c);mxUtils.write(c,mxResources.get("brush"));F.appendChild(c);mxUtils.br(F);var e=document.createElement("input");e.setAttribute("type","range");e.setAttribute("min","2");e.setAttribute("max","30");e.setAttribute("value",C.freehand.getBrushSize());
+e.style.width="90%";e.style.visibility="hidden";F.appendChild(e);mxUtils.br(F);c=function(){C.freehand.setPerfectFreehandMode(J.checked);e.style.visibility=J.checked?"visible":"hidden"};mxEvent.addListener(J,"change",c);c();mxEvent.addListener(e,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?C.freehand.stopDrawing():C.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing"));
+g.style.marginTop=u?"5px":"10px";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";F.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),F,f,k,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);C.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,
+mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));var m=document.createElement("span");m.style.opacity="0.7";m.style["float"]="right";mxUtils.write(m,"X");g.appendChild(m);g.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));g.className="geBtn"+(C.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&
+C.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,t){var u=b.editor.graph,C=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,c){if(u.isEnabled()){var e=new FilenameDialog(b,"",mxResources.get("add"),function(g){b.hideDialog();if(null!=g&&0<g.length){g=g.split(" ");for(var m=[],p=0;p<g.length;p++){var q=mxUtils.trim(g[p]);""!=q&&0>mxUtils.indexOf(J,q)&&m.push(q)}0<m.length&&(u.isSelectionEmpty()?c(J.concat(m)):
+u.addTagsForCells(u.getSelectionCells(),m))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(e.container,300,80,!0,!0);e.init()}}),F=C.div;this.window=new mxWindow(mxResources.get("tags"),F,f,k,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){C.refresh();this.window.fit()}));b.installResizeHandler(this,
+!0)},AuthDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("authorizationRequired"));var C="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
+f==b.dropbox?(C=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg",F.style.width="32px"):f==b.trello&&(C=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
+[C]));var J=document.createElement("input");J.setAttribute("type","checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});C.insertBefore(F,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize="18px";C.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(C);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(J),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),k.appendChild(u),
+t.appendChild(k),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(u,"click",function(c){J.checked=!J.checked;mxEvent.consume(c)}));this.container=t},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var C=b.sidebar.customEntries[u],F={title:b.getResource(C.title),entries:[]},J=0;J<C.entries.length;J++){var c=C.entries[J];F.entries.push({id:c.id,title:b.getResource(c.title),
+desc:b.getResource(c.desc),image:c.preview})}t.push(F)}for(u=0;u<k.length;u++)if(null==b.sidebar.enabledLibraries)t.push(k[u]);else{F={title:k[u].title,entries:[]};for(J=0;J<k[u].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[u].entries[J].id)&&F.entries.push(k[u].entries[J]);0<F.entries.length&&t.push(F)}k=t;if(f){u=mxUtils.bind(this,function(Q){for(var n=0;n<Q.length;n++)(function(v){var D=q.cloneNode(!1);D.style.fontWeight="bold";D.style.backgroundColor=Editor.isDarkMode()?
+"#505759":"#e5e5e5";D.style.padding="6px 0px 6px 20px";mxUtils.write(D,v.title);e.appendChild(D);for(var H=0;H<v.entries.length;H++)(function(K){var G=q.cloneNode(!1);G.style.cursor="pointer";G.style.padding="4px 0px 4px 20px";G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.setAttribute("title",K.title+" ("+K.id+")");var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=b.sidebar.isEntryVisible(K.id);N.defaultChecked=N.checked;G.appendChild(N);
+mxUtils.write(G," "+K.title);e.appendChild(G);var T=function(V){if(null==V||"INPUT"!=mxEvent.getSource(V).nodeName){g.style.textAlign="center";g.style.padding="0px";g.style.color="";g.innerText="";if(null!=K.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,K.desc);g.appendChild(U)}null!=K.imageCallback?K.imageCallback(g):null!=K.image?g.innerHTML+='<img border="0" src="'+
+K.image+'"/>':null==K.desc&&(g.style.padding="20px",g.style.color="rgb(179, 179, 179)",mxUtils.write(g,mxResources.get("noPreview")));null!=m&&(m.style.backgroundColor="");m=G;m.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=V&&mxEvent.consume(V)}};mxEvent.addListener(G,"click",T);mxEvent.addListener(G,"dblclick",function(V){N.checked=!N.checked;mxEvent.consume(V)});p.push(function(){return N.checked?K.id:null});0==n&&0==H&&T()})(v.entries[H])})(Q[n])});J=document.createElement("div");
+J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height="40px";J.style.right="0px";var e=document.createElement("div"),g=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";g.style.position="absolute";g.style.left="202px";g.style.right="0px";g.style.top="40px";g.style.bottom=
+"60px";g.style.overflow="auto";g.style.borderLeft="1px solid rgb(211, 211, 211)";g.style.textAlign="center";var m=null,p=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";u(k);d.style.padding="30px";d.appendChild(J);d.appendChild(e);d.appendChild(g);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height=
+"60px";k.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;k.appendChild(z);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";k.appendChild(u);mxEvent.addListener(u,"click",function(Q){z.checked=!z.checked;mxEvent.consume(Q)});var y=document.createElement("input");y.setAttribute("type","checkbox");
+if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(Q){mxEvent.getSource(Q)!=y&&(y.checked=!y.checked,mxEvent.consume(Q))}),k.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";J=mxUtils.button(mxResources.get("apply"),
+function(){b.hideDialog();for(var Q=[],n=0;n<p.length;n++){var v=p[n].apply(this,arguments);null!=v&&Q.push(v)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(n=mxUtils.indexOf(Q,".scratchpad"),null!=b.scratchpad!=(0<=n&&0<Q.splice(n,1).length)&&b.toggleScratchpad(),n=mxUtils.indexOf(Q,"search"),mxSettings.settings.search=0<=n&&0<Q.splice(n,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(Q.join(";"),y.checked,!0);b.setSidebarTitles(z.checked,
+y.checked)});J.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");A.style.width="100%";f=document.createElement("td");t=document.createElement("td");C=document.createElement("td");var x=mxUtils.bind(this,function(Q,n,v){var D=document.createElement("input");D.type="checkbox";A.appendChild(D);D.checked=b.sidebar.isEntryVisible(v);var H=document.createElement("span");
+mxUtils.write(H,n);n=document.createElement("div");n.style.display="block";n.appendChild(D);n.appendChild(H);mxEvent.addListener(H,"click",function(K){D.checked=!D.checked;mxEvent.consume(K)});Q.appendChild(n);return function(){return D.checked?v:null}});J.appendChild(f);J.appendChild(t);J.appendChild(C);u.appendChild(J);A.appendChild(u);p=[];var I=0;for(u=0;u<k.length;u++)for(J=0;J<k[u].entries.length;J++)I++;var M=[f,t,C],E=0;for(u=0;u<k.length;u++)(function(Q){for(var n=0;n<Q.entries.length;n++){var v=
+Q.entries[n];p.push(x(M[Math.floor(E/(I/3))],v.title,v.id));E++}})(k[u]);d.appendChild(A);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";y=document.createElement("input");isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,k.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),k.appendChild(u),mxEvent.addListener(u,"click",function(Q){y.checked=!y.checked;mxEvent.consume(Q)}));
+d.appendChild(k);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var Q=["search"],n=0;n<p.length;n++){var v=p[n].apply(this,arguments);null!=v&&Q.push(v)}b.sidebar.showEntries(0<Q.length?Q.join(";"):"",y.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(u),k.appendChild(J)):
+(k.appendChild(J),k.appendChild(u));d.appendChild(k);this.container=d},PluginsDialog=function(b,f,k,d){function t(){J=!0;if(0==F.length)C.innerText=mxResources.get("noPlugins");else{C.innerText="";for(var q=0;q<F.length;q++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";z.appendChild(y);
+mxUtils.write(z,F[q]);C.appendChild(z);mxUtils.br(C);mxEvent.addListener(y,"click",function(A){return function(){b.confirm(mxResources.get("delete")+' "'+F[A]+'"?',function(){null!=k&&k(F[A]);F.splice(A,1);t()})}}(q))}}}var u=document.createElement("div"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var F=mxSettings.getPlugins().slice(),J=!1;u.appendChild(C);t();J=!1;var c=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(q){q&&0>mxUtils.indexOf(F,
+q)&&F.push(q);t()})}:function(){var q=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");q.appendChild(z);var y=document.createElement("select");y.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var A=document.createElement("option");mxUtils.write(A,App.publicPlugin[z]);A.value=App.publicPlugin[z];y.appendChild(A)}q.appendChild(y);mxUtils.br(q);mxUtils.br(q);z=mxUtils.button(mxResources.get("custom")+
+"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var M=0;M<I.length;M++){var E=I[M],Q=App.pluginRegistry[E];null!=Q&&(E=Q);0<E.length&&0>mxUtils.indexOf(F,E)&&F.push(E)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});z.className="geBtn";q=new CustomDialog(b,q,mxUtils.bind(this,function(){var x=App.pluginRegistry[y.value];0>mxUtils.indexOf(F,
+x)&&(F.push(x),t())}),null,null,null,z);b.showDialog(q.container,360,100,!0,!0)});c.className="geBtn";var e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var g=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(F),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});g.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";
+m.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});p.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");m.appendChild(p);b.editor.cancelFirst?(d||m.appendChild(e),m.appendChild(c),m.appendChild(g)):(m.appendChild(c),m.appendChild(g),d||m.appendChild(e));u.appendChild(m);this.container=u},CropImageDialog=function(b,f,k,d){function t(){var Q=y.checked,n=A.checked,v=p.geometry,D=J.width,
+H=J.height,K=(300-D)/2,G=(300-H)/2;v.x<K?(v.width-=K-v.x,v.x=K):v.x+v.width>K+D&&(v.width=K+D-v.x,v.x=Math.min(v.x,K+D));v.y<G?(v.height-=G-v.y,v.y=G):v.y+v.height>G+H&&(v.height=G+H-v.y,v.y=Math.min(v.y,G+H));var N=(v.x-K)/D*100;D=100-(v.x+v.width-K)/D*100;K=(v.y-G)/H*100;v=100-(v.y+v.height-G)/H*100;return"inset("+mxUtils.format(K)+"% "+mxUtils.format(D)+"% "+mxUtils.format(v)+"% "+mxUtils.format(N)+"%"+(Q?" round "+m+"%":n?" round 50%":"")+")"}function u(Q){null!=e&&(!0!==Q&&(e.model.setGeometry(p,
+g.clone()),m=5,I.value=m),e.model.setStyle(p,q+t()),e.selectAll(),x.style.visibility=y.checked?"visible":"hidden")}var C=document.createElement("div"),F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var J=document.createElement("img");J.onload=function(){function Q(){e.model.setStyle(p,q+t())}e=new Graph(c);e.autoExtend=!1;e.autoScroll=!1;e.setGridEnabled(!1);
+e.setEnabled(!0);e.setPanning(!1);e.setConnectable(!1);e.getRubberband().setEnabled(!1);e.graphHandler.allowLivePreview=!1;var n=e.createVertexHandler;e.createVertexHandler=function(){var P=n.apply(this,arguments);P.livePreview=!1;return P};if(null!=k)try{if("inset"==k.substring(0,5)){var v=p.geometry,D=J.width,H=J.height,K=(300-D)/2,G=(300-H)/2,N=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),T=parseFloat(N[0]),V=parseFloat(N[1]),U=parseFloat(N[2]),X=parseFloat(N[3]);isFinite(T)&&isFinite(V)&&isFinite(U)&&
+isFinite(X)?(v.x=X/100*D+K,v.y=T/100*H+G,v.width=(100-V)/100*D+K-v.x,v.height=(100-U)/100*H+G-v.y,"round"==N[4]?"50%"==N[5]?A.setAttribute("checked","checked"):(m=parseInt(N[5]),I.value=m,y.setAttribute("checked","checked"),x.style.visibility="visible"):z.setAttribute("checked","checked")):k=null}else k=null}catch(P){}p.style=q+(k?k:t());p.vertex=!0;e.addCell(p,null,null,null,null);e.selectAll();e.addListener(mxEvent.CELLS_MOVED,Q);e.addListener(mxEvent.CELLS_RESIZED,Q);var l=e.graphHandler.mouseUp,
+B=e.graphHandler.mouseDown;e.graphHandler.mouseUp=function(){l.apply(this,arguments);c.style.backgroundColor="#fff9"};e.graphHandler.mouseDown=function(){B.apply(this,arguments);c.style.backgroundColor=""};e.dblClick=function(){};var L=e.getSelectionModel().changeSelection;e.getSelectionModel().changeSelection=function(){L.call(this,[p],[p])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",f);J.style.maxWidth="300px";J.style.maxHeight="300px";F.appendChild(J);C.appendChild(F);
+var c=document.createElement("div");c.style.width="300px";c.style.height="300px";c.style.overflow="hidden";c.style.backgroundColor="#fff9";C.appendChild(c);var e=null,g=new mxGeometry(100,100,100,100),m=5,p=new mxCell("",g.clone(),""),q="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked",
+"checked");z.style.margin="5px";C.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));C.appendChild(f);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";C.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));C.appendChild(f);
+var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingEllipse");A.setAttribute("name","croppingShape");A.style.margin="5px";C.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));C.appendChild(f);mxEvent.addListener(z,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(A,"change",u);var x=document.createElement("div");x.style.textAlign="center";x.style.visibility=
+"hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",m);I.setAttribute("title",mxResources.get("arcSize"));x.appendChild(I);C.appendChild(x);mxEvent.addListener(I,"change",function(){m=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){d(t(),p.geometry.width,p.geometry.height);b.hideDialog()});
+F.className="geBtn gePrimaryBtn";var M=mxUtils.button(mxResources.get("reset"),function(){d(null,J.width,J.height);b.hideDialog()});M.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(f),E.appendChild(M),E.appendChild(F)):(E.appendChild(M),E.appendChild(F),E.appendChild(f));C.appendChild(E);this.container=C},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,t=document.createElement("div"),
+u=document.createElement("table"),C=document.createElement("tbody"),F=document.createElement("tr"),J=document.createElement("td"),c=document.createElement("td");u.style.paddingLeft="6px";mxUtils.write(J,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=d&&d.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};c.appendChild(e);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");
+J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=d?d.x:"";c.appendChild(g);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width=
+"100px";m.value=null!=d?d.y:"";c.appendChild(m);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("dx")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d&&null!=d.offset?d.offset.x:"";c.appendChild(p);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");
+c=document.createElement("td");mxUtils.write(J,mxResources.get("dy")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d&&null!=d.offset?d.offset.y:"";c.appendChild(q);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";
+z.value=null!=d?d.width:"";c.appendChild(z);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");mxUtils.write(J,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";c.appendChild(y);F.appendChild(J);F.appendChild(c);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");c=document.createElement("td");
+mxUtils.write(J,mxResources.get("rotation")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(A);F.appendChild(J);F.appendChild(c);C.appendChild(F);u.appendChild(C);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();
+try{for(var I=0;I<f.length;I++){var M=k.getCellGeometry(f[I]);null!=M&&(M=M.clone(),k.isCellMovable(f[I])&&(M.relative=e.checked,0<mxUtils.trim(g.value).length&&(M.x=Number(g.value)),0<mxUtils.trim(m.value).length&&(M.y=Number(m.value)),0<mxUtils.trim(p.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==M.offset&&(M.offset=new mxPoint),M.offset.y=Number(q.value))),k.isCellResizable(f[I])&&(0<mxUtils.trim(z.value).length&&(M.width=
+Number(z.value)),0<mxUtils.trim(y.value).length&&(M.height=Number(y.value))),k.getModel().setGeometry(f[I],M));0<mxUtils.trim(A.value).length&&k.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[f[I]])}}finally{k.getModel().endUpdate()}});x.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(I){13==I.keyCode&&x.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(x)):(u.appendChild(x),
+u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,k,d,t,u){function C(n){for(n=document.elementFromPoint(n.clientX,n.clientY);null!=n&&n.parentNode!=p;)n=n.parentNode;var v=null;if(null!=n){var D=p.firstChild;for(v=0;null!=D&&D!=n;)D=D.nextSibling,v++}return v}function F(n,v,D,H,K,G,N,T,V){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==n&&null!=N||null==z[n]){var U=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow=
+"ellipsis";mxUtils.write(S,null!=W.title&&0<W.title.length?W.title:mxResources.get("untitled"));S.style.color=null==W.title||0==W.title.length?"#d0d0d0":""};p.style.backgroundImage="";q.style.display="none";var X=K,l=G;if(K>b.maxImageSize||G>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,K)),b.maxImageSize/Math.max(1,G));K*=B;G*=B}X>l?(l=Math.round(100*l/X),X=100):(X=Math.round(100*X/l),l=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display=
+"inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition","transform .1s ease-in-out");if(null!=n){var P=document.createElement("img");P.setAttribute("src",I.convert(n));P.style.width=X+"px";P.style.height=l+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((100-l)/2)+"px";P.style.paddingLeft=Math.floor((100-X)/2)+"px";L.appendChild(P)}else if(null!=N){var O=b.stringToCells(Graph.decompress(N.xml));0<O.length&&
+(b.sidebar.createThumb(O,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var R=document.createElement("img");R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(ba){mxEvent.consume(ba)});
+(function(ba,fa,ja){mxEvent.addListener(R,"click",function(ha){z[fa]=null;for(var ra=0;ra<e.length;ra++)if(null!=e[ra].data&&e[ra].data==fa||null!=e[ra].xml&&null!=ja&&e[ra].xml==ja.xml){e.splice(ra,1);break}L.parentNode.removeChild(ba);0==e.length&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(ha)});mxEvent.addListener(R,"dblclick",function(ha){mxEvent.consume(ha)})})(L,n,N);L.appendChild(R);L.style.marginBottom="30px";var S=document.createElement("div");
+S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var W=null;null!=n?(W={data:n,w:K,h:G,title:V},null!=T&&(W.aspect=T),z[n]=P,e.push(W)):null!=N&&(N.aspect="fixed",e.push(N),W=N);mxEvent.addListener(S,"keydown",function(ba){13==ba.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(ba))});U();L.appendChild(S);
+mxEvent.addListener(S,"mousedown",function(ba){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(ba)});O=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,W.title||"",mxResources.get("ok"),function(ja){null!=ja&&(W.title=ja,U())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ba)}else if("true"!=S.getAttribute("contentEditable")){null!=x&&(x(),x=null);if(null==
+W.title||0==W.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);x=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";W.title=S.innerHTML;U()};mxEvent.consume(ba)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(L,"dblclick",O);p.appendChild(L);mxEvent.addListener(L,
+"dragstart",function(ba){null==n&&null!=N&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=N.xml&&ba.dataTransfer.setData("Text",N.xml);y=C(ba);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);R.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(ba){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");
+y=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else M||(M=!0,b.handleError({message:mxResources.get("fileExists")}));else{K=!1;try{if(X=mxUtils.parseXml(n),"mxlibrary"==X.documentElement.nodeName){l=JSON.parse(mxUtils.getTextContent(X.documentElement));if(null!=l&&0<l.length)for(var aa=0;aa<l.length;aa++)null!=l[aa].xml?F(null,null,0,0,0,0,l[aa]):F(l[aa].data,null,0,0,l[aa].w,l[aa].h,null,"fixed",l[aa].title);K=!0}else if("mxfile"==X.documentElement.nodeName){var Y=
+X.documentElement.getElementsByTagName("diagram");for(aa=0;aa<Y.length;aa++){l=mxUtils.getTextContent(Y[aa]);O=b.stringToCells(Graph.decompress(l));var Z=b.editor.graph.getBoundingBoxFromGeometry(O);F(null,null,0,0,0,0,{xml:l,w:Z.width,h:Z.height})}K=!0}}catch(ba){}K||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function J(n){n.dataTransfer.dropEffect=null!=y?"move":"copy";n.stopPropagation();n.preventDefault()}function c(n){n.stopPropagation();
+n.preventDefault();M=!1;A=C(n);if(null!=y)null!=A&&A<p.children.length?(e.splice(A>y?A-1:A,0,e.splice(y,1)[0]),p.insertBefore(p.children[y],p.children[A])):(e.push(e.splice(y,1)[0]),p.appendChild(p.children[y]));else if(0<n.dataTransfer.files.length)b.importFiles(n.dataTransfer.files,0,0,b.maxImageSize,E(n));else if(0<=mxUtils.indexOf(n.dataTransfer.types,"text/uri-list")){var v=decodeURIComponent(n.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(v)||/(\.png)($|\?)/i.test(v)||/(\.gif)($|\?)/i.test(v)||
+/(\.svg)($|\?)/i.test(v))&&b.loadImage(v,function(D){F(v,null,0,0,D.width,D.height);p.scrollTop=p.scrollHeight})}n.stopPropagation();n.preventDefault()}var e=[];k=document.createElement("div");k.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";k.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",f);m.style.marginRight="20px";m.style.marginLeft=
+"10px";m.style.width="500px";null==t||t.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};g.appendChild(m);var p=document.createElement("div");p.style.borderWidth="1px 0px 1px 0px";p.style.borderColor="#d3d3d3";p.style.borderStyle="solid";p.style.marginTop="6px";p.style.overflow="auto";p.style.height="340px";p.style.backgroundPosition=
+"center center";p.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));k.appendChild(q);var z={},y=null,A=null,x=null;f=function(n){"true"!=mxEvent.getSource(n).getAttribute("contentEditable")&&
+null!=x&&(x(),x=null,mxEvent.consume(n))};mxEvent.addListener(p,"mousedown",f);mxEvent.addListener(p,"pointerdown",f);mxEvent.addListener(p,"touchstart",f);var I=new mxUrlConverter,M=!1;if(null!=d)for(f=0;f<d.length;f++)g=d[f],F(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(p,"dragleave",function(n){q.style.cursor="";for(var v=mxEvent.getSource(n);null!=v;){if(v==p||v==q){n.stopPropagation();n.preventDefault();break}v=v.parentNode}});var E=function(n){return function(v,D,H,K,G,N,
+T,V,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(X){F(X,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(v,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(X){4==X.readyState&&(b.spinner.stop(),200<=X.status&&299>=X.status&&(F(X.responseText,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?
+null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(F(v,D,H,K,G,N,T,"fixed",mxEvent.isAltDown(n)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),p.scrollTop=p.scrollHeight)}};mxEvent.addListener(p,"dragover",J);mxEvent.addListener(p,"drop",c);mxEvent.addListener(q,"dragover",J);mxEvent.addListener(q,"drop",c);k.appendChild(p);d=document.createElement("div");d.style.textAlign=
+"right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&t.getPublicUrl(function(n){b.spinner.stop();if(null!=n){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));
+v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(n);n=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(n.container,450,240,!0);n.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):
+b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var n=b.createLibraryDataFromImages(e),v=m.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(n,v,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(n))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";
+d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var Q=document.createElement("input");Q.setAttribute("multiple","multiple");Q.setAttribute("type","file");mxEvent.addListener(Q,"change",function(n){M=!1;b.importFiles(Q.files,0,0,b.maxImageSize,function(v,D,H,K,G,N,T,V,U){null!=Q.files&&(E(n)(v,D,H,K,G,N,T,V,U),Q.type="",Q.type="file",Q.value="")});p.scrollTop=p.scrollHeight});Q.style.display="none";document.body.appendChild(Q);b.libDlgFileInputElt=Q}g=mxUtils.button(mxResources.get("import"),
+function(){null!=x&&(x(),x=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),function(){null!=x&&(x(),x=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(n,v,D){M=!1;if(null!=n){if("data:image/"==n.substring(0,11)){var H=n.indexOf(",");0<H&&(n=n.substring(0,H)+";base64,"+n.substring(H+1))}F(n,null,0,0,v,D);p.scrollTop=p.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className=
+"geBtn";d.appendChild(g);this.saveBtnClickHandler=function(n,v,D,H){b.saveLibrary(n,v,D,H)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(m.value,e,t,u)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,t){d=null!=d?d:300;t=null!=t?t:120;var u=document.createElement("table"),C=document.createElement("tbody");
+u.style.cellPadding="4px";var F=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,k);F.appendChild(J);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=d-200+"px";c.style.height=t+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};J.appendChild(c);F.appendChild(J);J=document.createElement("td");
+k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top="6px";k.style.width="200px";k.style.height=t+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);J.appendChild(k);var e=new Graph(k);e.setEnabled(!1);var g=b.editor.graph.cloneCell(f);e.addCells([g]);k=e.view.getState(g);var m="";null!=k.shape&&null!=k.shape.stencil&&(m=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(c,m||"");k=e.getGraphBounds();
+t=Math.min(160/k.width,(t-40)/k.height);e.view.scaleAndTranslate(t,20/t-k.x,20/t-k.y);F.appendChild(J);C.appendChild(F);F=document.createElement("tr");J=document.createElement("td");J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",J.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&J.appendChild(t);var p=function(q,z,y){var A=c.value,x=mxUtils.parseXml(A);A=mxUtils.getPrettyXml(x.documentElement);x=x.documentElement.getElementsByTagName("parsererror");if(null!=x&&0<x.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),x=!q.model.contains(z),!y||x||A!=m){A=Graph.compress(A);q.getModel().beginUpdate();try{if(x){var I=b.editor.graph.getFreeInsertPoint();
+z.geometry.x=I.x;z.geometry.y=I.y;q.addCell(z)}q.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+A+")",[z])}catch(M){throw M;}finally{q.getModel().endUpdate()}x&&(q.setSelectionCell(z),q.scrollCellToVisible(z))}};k=mxUtils.button(mxResources.get("preview"),function(){p(e,g,!1)});k.className="geBtn";J.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){p(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";J.appendChild(k);b.editor.cancelFirst||J.appendChild(t);F.appendChild(J);
+C.appendChild(F);u.appendChild(C);this.container=u},CustomDialog=function(b,f,k,d,t,u,C,F,J,c,e){var g=document.createElement("div");g.appendChild(f);var m=document.createElement("div");m.style.marginTop="30px";m.style.textAlign="center";null!=C&&m.appendChild(C);b.isOffline()||null==u||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(u)}),f.className="geBtn",m.appendChild(f));J=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});J.className="geBtn";
+F&&(J.style.display="none");b.editor.cancelFirst&&m.appendChild(J);t=mxUtils.button(t||mxResources.get("ok"),mxUtils.bind(this,function(){c||b.hideDialog(null,null,this.container);if(null!=k){var p=k();if("string"===typeof p){b.showError(mxResources.get("error"),p);return}}c&&b.hideDialog(null,null,this.container)}));m.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||m.appendChild(J);if(null!=e)for(F=0;F<e.length;F++)(function(p,q,z){p=mxUtils.button(p,function(y){q(y)});null!=
+z&&p.setAttribute("title",z);p.className="geBtn";m.appendChild(p)})(e[F][0],e[F][1],e[F][2]);g.appendChild(m);this.cancelBtn=J;this.okButton=t;this.container=g},TemplatesDialog=function(b,f,k,d,t,u,C,F,J,c,e,g,m,p,q){function z(ea){qa.innerText=ea;qa.style.display="block";setTimeout(function(){qa.style.display="none"},4E3)}function y(){null!=l&&(l.style.fontWeight="normal",l.style.textDecoration="none",B=l,l=null)}function A(ea,ia,oa,ua,wa,Ca,ya){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;
+ea.className+=" geTempDlgRadioBtnActive";V.querySelector(".geTempDlgRadioBtn[data-id="+ua+"]").className="geTempDlgRadioBtn "+(ya?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");V.querySelector("."+ia).src="/images/"+oa+"-sel.svg";V.querySelector("."+wa).src="/images/"+Ca+".svg";return!0}function x(ea,ia,oa,ua){function wa(sa,Ha){null==ya?(sa=/^https?:\/\//.test(sa)&&!b.editor.isCorsEnabledForUrl(sa)?PROXY_URL+"?url="+encodeURIComponent(sa):TEMPLATE_PATH+"/"+sa,mxUtils.get(sa,mxUtils.bind(this,
+function(La){200<=La.getStatus()&&299>=La.getStatus()&&(ya=La.getText());Ha(ya)}))):Ha(ya)}function Ca(sa,Ha,La){if(null!=sa&&mxUtils.isAncestorNode(document.body,ia)&&(sa=mxUtils.parseXml(sa),sa=Editor.extractGraphModel(sa.documentElement,!0),null!=sa)){"mxfile"==sa.nodeName&&(sa=Editor.parseDiagramNode(sa.getElementsByTagName("diagram")[0]));var Qa=new mxCodec(sa.ownerDocument),Ia=new mxGraphModel;Qa.decode(sa,Ia);sa=Ia.root.getChildAt(0).children||[];b.sidebar.createTooltip(ia,sa,Math.min((window.innerWidth||
+document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(Ha,La),!0,null,!0);var Na=document.createElement("div");Na.className="geTempDlgDialogMask";V.appendChild(Na);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Na&&(V.removeChild(Na),Na=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=
+Oa)};mxEvent.addListener(Na,"click",function(){b.sidebar.hideTooltip()})}}var ya=null;if(Ra||b.sidebar.currentElt==ia)b.sidebar.hideTooltip();else{var ta=function(sa){Ra&&b.sidebar.currentElt==ia&&Ca(sa,mxEvent.getClientX(ua),mxEvent.getClientY(ua));Ra=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ia;Ra=!0;oa.src="/images/aui-wait.gif";ea.isExt?J(ea,ta,function(){z(mxResources.get("cantLoadPrev"));Ra=!1;oa.src="/images/icon-search.svg"}):wa(ea.url,ta)}}function I(ea,
+ia,oa){if(null!=L){for(var ua=L.className.split(" "),wa=0;wa<ua.length;wa++)if(-1<ua[wa].indexOf("Active")){ua.splice(wa,1);break}L.className=ua.join(" ")}null!=ea?(L=ea,L.className+=" "+ia,P=oa,Pa.className="geTempDlgCreateBtn"):(P=L=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function M(ea,ia){if(null!=P){var oa=function(ta){ya.isExternal?J(ya,function(sa){ua(sa,ta)},wa):ya.url?mxUtils.get(TEMPLATE_PATH+"/"+ya.url,mxUtils.bind(this,function(sa){200<=sa.getStatus()&&299>=sa.getStatus()?
+ua(sa.getText(),ta):wa()})):ua(b.emptyDiagramXml,ta)},ua=function(ta,sa){q||b.hideDialog(!0);f(ta,sa,ya,ia)},wa=function(){z(mxResources.get("cannotLoad"));Ca()},Ca=function(){P=ya;Pa.className="geTempDlgCreateBtn";ia&&(Aa.className="geTempDlgOpenBtn")},ya=P;P=null;"boolean"!==typeof ia&&(ia=ya.isExternal&&g);1==ea?c(ya.url,ya):ia?(Aa.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==
+App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),oa,ea,function(ta){var sa=null!=ta&&0<ta.length;return sa&&q?(oa(ta),!1):sa},null,null,null,Ca,p?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function E(ea){Pa.innerText=mxResources.get(ba||ea?"create":"copy");ea=ea?"none":"";g&&(Aa.style.display=ea);for(var ia=V.querySelectorAll(".geTempDlgLinkToDiagram"),oa=
+0;oa<ia.length;oa++)ia[oa].style.display=ea}function Q(ea,ia,oa,ua,wa){wa||(ja.innerText="",I(),W=ea,aa=ua);var Ca=null;if(oa){Ca=document.createElement("table");Ca.className="geTempDlgDiagramsListGrid";var ya=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerText=mxResources.get("diagram");ya.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerText=mxResources.get("changedBy");ya.appendChild(ta);ta=document.createElement("th");ta.style.width=
+"25%";ta.innerText=mxResources.get("lastModifiedOn");ya.appendChild(ta);Ca.appendChild(ya);ja.appendChild(Ca)}for(ya=0;ya<ea.length;ya++){ea[ya].isExternal=!ia;var sa=ea[ya].url,Ha=(ta=mxUtils.htmlEntities(ia?mxResources.get(ea[ya].title,null,ea[ya].title):ea[ya].title))||ea[ya].url,La=ea[ya].imgUrl,Qa=ea[ya].changedBy||"",Ia="";ea[ya].lastModifiedOn&&(Ia=b.timeSince(new Date(ea[ya].lastModifiedOn)),null==Ia&&(Ia=mxResources.get("lessThanAMinute")),Ia=mxResources.get("timeAgo",[Ia],"{1} ago"));La||
+(La=TEMPLATE_PATH+"/"+sa.substring(0,sa.length-4)+".png");sa=oa?50:15;null!=ta&&ta.length>sa&&(ta=ta.substring(0,sa)+"&hellip;");if(oa){var Na=document.createElement("tr");La=document.createElement("td");var Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramListPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));wa||La.appendChild(Oa);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=ta;La.appendChild(Ha);
+Na.appendChild(La);La=document.createElement("td");La.innerText=Qa;Na.appendChild(La);La=document.createElement("td");La.innerText=Ia;Na.appendChild(La);Ca.appendChild(Na);null==L&&(E(ia),I(Na,"geTempDlgDiagramsListGridActive",ea[ya]));(function(Ja,Ta,Va){mxEvent.addListener(Na,"click",function(){L!=Ta&&(E(ia),I(Ta,"geTempDlgDiagramsListGridActive",Ja))});mxEvent.addListener(Na,"dblclick",M);mxEvent.addListener(Oa,"click",function(Wa){x(Ja,Ta,Va,Wa)})})(ea[ya],Na,Oa)}else{var Ma=document.createElement("div");
+Ma.className="geTempDlgDiagramTile";Ma.setAttribute("title",Ha);null==L&&(E(ia),I(Ma,"geTempDlgDiagramTileActive",ea[ya]));Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Sa=document.createElement("img");Sa.style.display="none";(function(Ja,Ta,Va){Sa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ja.style.display=""};Sa.onerror=function(){this.src!=Va?this.src=Va:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Sa,
+Qa,La?La.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Sa.src=La;Qa.appendChild(Sa);Ma.appendChild(Qa);Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileLbl";Qa.innerHTML=null!=ta?ta:"";Ma.appendChild(Qa);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));wa||Ma.appendChild(Oa);(function(Ja,Ta,Va){mxEvent.addListener(Ma,"click",function(){L!=Ta&&(E(ia),
+I(Ta,"geTempDlgDiagramTileActive",Ja))});mxEvent.addListener(Ma,"dblclick",M);mxEvent.addListener(Oa,"click",function(Wa){x(Ja,Ta,Va,Wa)})})(ea[ya],Ma,Oa);ja.appendChild(Ma)}}for(var Ua in ua)ea=ua[Ua],0<ea.length&&(wa=document.createElement("div"),wa.className="geTempDlgImportCat",wa.innerText=mxResources.get(Ua,null,Ua),ja.appendChild(wa),Q(ea,ia,oa,null,!0))}function n(ea,ia){za.innerText="";I();var oa=Math.floor(za.offsetWidth/150)-1;ia=!ia&&ea.length>oa?oa:ea.length;for(var ua=0;ua<ia;ua++){var wa=
+ea[ua];wa.isCategory=!0;var Ca=document.createElement("div"),ya=mxResources.get(wa.title);null==ya&&(ya=wa.title.substring(0,1).toUpperCase()+wa.title.substring(1));Ca.className="geTempDlgNewDiagramCatItem";Ca.setAttribute("title",ya);ya=mxUtils.htmlEntities(ya);15<ya.length&&(ya=ya.substring(0,15)+"&hellip;");null==L&&(E(!0),I(Ca,"geTempDlgNewDiagramCatItemActive",wa));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var sa=document.createElement("img");sa.src=NEW_DIAGRAM_CATS_PATH+
+"/"+wa.img;ta.appendChild(sa);Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ya;Ca.appendChild(ta);za.appendChild(Ca);(function(Ha,La){mxEvent.addListener(Ca,"click",function(){L!=La&&(E(!0),I(La,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(Ca,"dblclick",M)})(wa,Ca)}Ca=document.createElement("div");Ca.className="geTempDlgNewDiagramCatItem";ya=mxResources.get("showAllTemps");Ca.setAttribute("title",ya);ta=document.createElement("div");
+ta.className="geTempDlgNewDiagramCatItemImg";ta.innerText="...";ta.style.fontSize="32px";Ca.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerText=ya;Ca.appendChild(ta);za.appendChild(Ca);mxEvent.addListener(Ca,"click",function(){function Ha(){var Qa=La.querySelector(".geTemplateDrawioCatLink");null!=Qa?Qa.click():setTimeout(Ha,200)}ba=!0;var La=V.querySelector(".geTemplatesList");La.style.display="block";ma.style.width="";Fa.style.display="";Fa.value=
+"";Y=null;Ha()});fa.style.display=ea.length<=oa?"none":""}function v(ea,ia,oa){function ua(Sa,Ua){var Ja=mxResources.get(Sa);null==Ja&&(Ja=Sa.substring(0,1).toUpperCase()+Sa.substring(1));Sa=Ja+" ("+Ua.length+")";var Ta=Ja=mxUtils.htmlEntities(Ja);15<Ja.length&&(Ja=Ja.substring(0,15)+"&hellip;");return{lbl:Ja+" ("+Ua.length+")",fullLbl:Sa,lblOnly:Ta}}function wa(Sa,Ua,Ja,Ta,Va){mxEvent.addListener(Ja,"click",function(){l!=Ja&&(null!=l?(l.style.fontWeight="normal",l.style.textDecoration="none"):(Ea.style.display=
+"none",Ga.style.minHeight="100%"),l=Ja,l.style.fontWeight="bold",l.style.textDecoration="underline",ma.scrollTop=0,U&&(X=!0),ha.innerHTML=Ua,ra.style.display="none",Q(Va?ia[Sa]:Ta?Ka[Sa][Ta]:ea[Sa],Va?!1:!0))})}var Ca=V.querySelector(".geTemplatesList");if(0<oa){oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,mxResources.get("custom"));Ca.appendChild(oa);for(var ya in ia){oa=document.createElement("div");
+var ta=ia[ya];ta=ua(ya,ta);oa.className="geTemplateCatLink";oa.setAttribute("title",ta.fullLbl);oa.innerHTML=ta.lbl;Ca.appendChild(oa);wa(ya,ta.lblOnly,oa,null,!0)}oa=document.createElement("div");oa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(oa,"draw.io");Ca.appendChild(oa)}for(ya in ea){var sa=Ka[ya],Ha=oa=document.createElement(sa?"ul":"div");ta=ea[ya];ta=ua(ya,ta);if(null!=sa){var La=document.createElement("li"),
+Qa=document.createElement("div");Qa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Qa.style.padding="0";Qa.setAttribute("title",ta.fullLbl);Qa.innerHTML=ta.lbl;Ha=Qa;La.appendChild(Qa);var Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var Na in sa){var Oa=document.createElement("li"),Ma=ua(Na,sa[Na]);Oa.setAttribute("title",Ma.fullLbl);Oa.innerHTML=Ma.lbl;Oa.className="geTemplateCatLink";Oa.style.padding="0";Oa.style.margin=
+"0";wa(ya,Ma.lblOnly,Oa,Na);Ia.appendChild(Oa)}La.appendChild(Ia);oa.className="geTempTree";oa.appendChild(La);(function(Sa,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ja=Sa.querySelectorAll("li"),Ta=0;Ta<Ja.length;Ta++)Ja[Ta].style.margin="";Sa.style.visibility="visible";Sa.classList.toggle("geTempTreeActive");Sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Va=0;Va<Ja.length;Va++)Ja[Va].style.margin="0";Sa.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ia,
+Qa)}else oa.className="geTemplateCatLink geTemplateDrawioCatLink",oa.setAttribute("title",ta.fullLbl),oa.innerHTML=ta.lbl;Ca.appendChild(oa);wa(ya,ta.lblOnly,Ha)}}function D(){mxUtils.get(d,function(ea){if(!xa){xa=!0;ea=ea.getXml().documentElement.firstChild;for(var ia={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var oa=ea.getAttribute("name"),ua=ea.getElementsByTagName("add"),wa=[],Ca=0;Ca<ua.length;Ca++)wa.push(encodeURIComponent(mxUtils.getTextContent(ua[Ca])));
+null!=oa&&0<wa.length&&(ia[oa]=wa.join(";"))}else if(wa=ea.getAttribute("url"),null!=wa){ua=ea.getAttribute("section");oa=ea.getAttribute("subsection");if(null==ua&&(Ca=wa.indexOf("/"),ua=wa.substring(0,Ca),null==oa)){var ya=wa.indexOf("/",Ca+1);-1<ya&&(oa=wa.substring(Ca+1,ya))}Ca=va[ua];null==Ca&&(ca++,Ca=[],va[ua]=Ca);wa=ea.getAttribute("clibs");null!=ia[wa]&&(wa=ia[wa]);wa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),
+clibs:wa,tags:ea.getAttribute("tags")};Ca.push(wa);null!=oa&&(Ca=Ka[ua],null==Ca&&(Ca={},Ka[ua]=Ca),ua=Ca[oa],null==ua&&(ua=[],Ca[oa]=ua),ua.push(wa))}ea=ea.nextSibling}v(va,la,na)}})}function H(ea){C&&(ma.scrollTop=0,ja.innerText="",Ba.spin(ja),X=!1,U=!0,ha.innerText=mxResources.get("recentDiag"),Y=null,C(ka,function(){z(mxResources.get("cannotLoad"));ka([])},ea?null:u))}function K(ea){if(""==ea)null!=B&&(B.click(),B=null);else{if(null==TemplatesDialog.tagsList[d]){var ia={};for(Ha in va)for(var oa=
+va[Ha],ua=0;ua<oa.length;ua++){var wa=oa[ua];if(null!=wa.tags)for(var Ca=wa.tags.toLowerCase().split(";"),ya=0;ya<Ca.length;ya++)null==ia[Ca[ya]]&&(ia[Ca[ya]]=[]),ia[Ca[ya]].push(wa)}TemplatesDialog.tagsList[d]=ia}var ta=ea.toLowerCase().split(" ");ia=TemplatesDialog.tagsList[d];if(0<na&&null==ia.__tagsList__){for(Ha in la)for(oa=la[Ha],ua=0;ua<oa.length;ua++)for(wa=oa[ua],Ca=wa.title.split(" "),Ca.push(Ha),ya=0;ya<Ca.length;ya++){var sa=Ca[ya].toLowerCase();null==ia[sa]&&(ia[sa]=[]);ia[sa].push(wa)}ia.__tagsList__=
+!0}var Ha=[];oa={};for(ua=Ca=0;ua<ta.length;ua++)if(0<ta[ua].length){sa=ia[ta[ua]];var La={};Ha=[];if(null!=sa)for(ya=0;ya<sa.length;ya++)wa=sa[ya],0==Ca==(null==oa[wa.url])&&(La[wa.url]=!0,Ha.push(wa));oa=La;Ca++}0==Ha.length?ha.innerText=mxResources.get("noResultsFor",[ea]):Q(Ha,!0)}}function G(ea){if(Y!=ea||R!=Z)y(),ma.scrollTop=0,ja.innerText="",ha.innerText=mxResources.get("searchResults")+' "'+ea+'"',pa=null,ba?K(ea):F&&(ea?(Ba.spin(ja),X=!1,U=!0,F(ea,ka,function(){z(mxResources.get("searchFailed"));
+ka([])},R?null:u)):H(R)),Y=ea,Z=R}function N(ea){null!=pa&&clearTimeout(pa);13==ea.keyCode?G(Fa.value):pa=setTimeout(function(){G(Fa.value)},1E3)}var T='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(F?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
-(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(g?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",W=document.createElement("div");W.innerHTML=T;W.className=
-"geTemplateDlg";this.container=W;e=null!=e?e:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,V=!1,l=null,A=null,M=null,Q=null,O=!1,R=!0,S=!1,X=[],aa=null,Y,Z,ba=!1,ha=W.querySelector(".geTempDlgShowAllBtn"),ma=W.querySelector(".geTempDlgDiagramsTiles"),ia=W.querySelector(".geTempDlgDiagramsListTitle"),qa=W.querySelector(".geTempDlgDiagramsListBtns"),la=W.querySelector(".geTempDlgContent"),Ca=W.querySelector(".geTempDlgDiagramsList"),Da=W.querySelector(".geTempDlgNewDiagramCat"),
-ya=W.querySelector(".geTempDlgNewDiagramCatList"),Pa=W.querySelector(".geTempDlgCreateBtn"),za=W.querySelector(".geTempDlgOpenBtn"),Fa=W.querySelector(".geTempDlgSearchBox"),Ia=W.querySelector(".geTempDlgErrMsg"),Ba=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(W.querySelector(".geTempDlgBack"),"click",function(){C();ba=!1;W.querySelector(".geTemplatesList").style.display="none";la.style.width=
-"100%";Da.style.display="";Ca.style.minHeight="calc(100% - 280px)";Fa.style.display=E?"":"none";Fa.value="";Y=null;H(R)});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){x(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):G(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){x(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
-"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):G(Y))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){x(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,p(X,!1,S,aa))});mxEvent.addListener(W.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){x(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,p(X,!1,S,aa))});var Ga=!1;
-mxEvent.addListener(ha,"click",function(){O?(Da.style.height="280px",ya.style.height="190px",ha.innerText=mxResources.get("showMore"),F(ua)):(Da.style.height="440px",ya.style.height="355px",ha.innerText=mxResources.get("showLess"),F(ua,!0));O=!O});var na=!1,Ea=!1,wa={},La={},ka={},ua=[],sa=1,va=0;null!=d?d(function(da,fa){ka=da;va=fa;D()},D):D();mxUtils.get(u,function(da){if(!Ea){Ea=!0;for(da=da.getXml().documentElement.firstChild;null!=da;)"undefined"!==typeof da.getAttribute&&null!=da.getAttribute("title")&&
-ua.push({img:da.getAttribute("img"),libs:da.getAttribute("libs"),clibs:da.getAttribute("clibs"),title:da.getAttribute("title")}),da=da.nextSibling;F(ua)}});var ca=function(da,fa,ja){qa.style.display="";Ba.stop();U=!1;if(V)V=!1;else if(fa)ma.innerText=fa;else{ja=ja||{};fa=0;for(var ra in ja)fa+=ja[ra].length;0==da.length&&0==fa?ma.innerText=mxResources.get("noDiagrams"):p(da,!1,S,0==fa?null:ja)}};H(R);var ea=null;mxEvent.addListener(Fa,"keyup",P);mxEvent.addListener(Fa,"search",P);mxEvent.addListener(Fa,
-"input",P);mxEvent.addListener(Pa,"click",function(da){N(!1,!1)});g&&mxEvent.addListener(za,"click",function(da){N(!1,!0)});q&&mxEvent.addListener(W.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(da){N(!0)});mxEvent.addListener(W.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();n||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,f,k,e){var u=document.createElement("div");u.style.textAlign="center";var v=document.createElement("p");v.style.fontSize="16pt";v.style.padding="0px";v.style.margin="0px";v.style.color="gray";mxUtils.write(v,mxResources.get("done"));var B="Unknown",E=document.createElement("img");E.setAttribute("border","0");E.setAttribute("align","absmiddle");E.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),E.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
-(B=mxResources.get("dropbox"),E.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),E.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),E.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),E.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(B=mxResources.get("trello"),E.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[B],"You are now authorized in {1}"));
-k=mxUtils.button(k,e);k.insertBefore(E,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";u.appendChild(v);u.appendChild(b);u.appendChild(k);this.container=u},FontDialog=function(b,f,k,e,u){function v(I){this.style.border="";13==I.keyCode&&y.click()}var B=document.createElement("table"),E=document.createElement("tbody");B.style.marginTop="8px";var L=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace=
-"nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","sysfonts");d.setAttribute("type","radio");d.setAttribute("name","current-fontdialog");d.setAttribute("id","fontdialog-sysfonts");c.appendChild(d);var g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));c.appendChild(g);L.appendChild(c);
-E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");L.appendChild(c);var q=document.createElement("input");"s"==e&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(q);L.appendChild(c);E.appendChild(L);L=document.createElement("tr");
-c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","googlefonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id","fontdialog-googlefonts");c.appendChild(m);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
-null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));L.appendChild(c);E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");
-L.appendChild(c);var n=document.createElement("input");"g"==e&&n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(n);L.appendChild(c);E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
-"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft=
-"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");L.appendChild(c);var C=document.createElement("input");"w"==e&&(Editor.enableWebFonts?C.setAttribute("value",f):q.setAttribute("value",f));C.style.marginLeft="4px";C.style.width="250px";C.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(C);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);L=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
-c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");L.appendChild(c);var x=document.createElement("input");x.setAttribute("value",k||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(x);L.appendChild(c);Editor.enableWebFonts&&E.appendChild(L);this.init=function(){var I=q;"g"==e?I=n:"w"==e&&Editor.enableWebFonts&&(I=C);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-I.select():document.execCommand("selectAll",!1,null)};L=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();u()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f);
-var y=mxUtils.button(mxResources.get("apply"),function(){if(d.checked){var I=q.value;var N="s"}else if(m.checked){I=n.value;var t=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");N="g"}else z.checked&&(I=C.value,t=x.value,N="w");var p=t;var F=N,K=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(B.querySelector(".dlg_fontName_"+F).style.border="1px solid red",p=!1):"w"!=F||K.test(p)?p=!0:(B.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",p=!1);p&&(u(I,t,N),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",v);mxEvent.addListener(n,"keypress",v);mxEvent.addListener(C,"keypress",v);mxEvent.addListener(x,"keypress",v);mxEvent.addListener(q,"focus",function(){d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(n,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(C,"focus",function(){z.setAttribute("checked","checked");z.checked=
-!0});mxEvent.addListener(x,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(y);b.editor.cancelFirst||c.appendChild(f);L.appendChild(c);E.appendChild(L);B.appendChild(E);this.container=B};
-function AspectDialog(b,f,k,e,u){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var v=document.createElement("h5");v.style.margin="0 0 10px";mxUtils.write(v,mxResources.get("pages"));f.appendChild(v);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);v=document.createElement("h5");v.style.margin="0 0 10px";mxUtils.write(v,mxResources.get("layers"));f.appendChild(v);v=document.createElement("div");v.className="geAspectDlgList";
-f.appendChild(v);this.pagesContainer=k;this.layersContainer=v;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=u&&u()});v.className="geBtn";b.editor.cancelFirst&&k.appendChild(v);var B=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();e({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(B);B.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||k.appendChild(v);B.setAttribute("disabled","disabled");this.okBtn=B;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,f,k,e){mxEvent.disableContextMenu(b);b.style.userSelect="none";var u=new Graph(b);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!1);u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var v=f.getAttribute("background");if(null==v||""==v||v==mxConstants.NONE)v=null!=e?e:"#ffffff";b.style.backgroundColor=v;e=new mxCodec(f.ownerDocument);b=u.getModel();e.decode(f,b);f=b.getChildCount(b.root);
-e=null==k;for(v=0;v<f;v++){var B=b.getChildAt(b.root,v);b.setVisible(B,e||k==B.id)}u.maxFitScale=1;u.fit(0);u.center()}return u};
-AspectDialog.prototype.createPageItem=function(b,f,k){var e=document.createElement("div");e.className="geAspectDlgListItem";e.setAttribute("data-page-id",b);e.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(e);var u=this.createViewer(e.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=e;
-this.selectedPage=b;e.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var v=u.model;v=v.getChildCells(v.getRoot());for(var B=0;B<v.length;B++)this.createLayerItem(v[B],b,u,k)});mxEvent.addListener(e,"click",f);this.aspect.pageId==b&&f()};
-AspectDialog.prototype.createLayerItem=function(b,f,k,e){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var u=document.createElement("div");u.setAttribute("data-layer-id",b.id);u.className="geAspectDlgListItem";u.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(u);this.createViewer(u.childNodes[0],e,b.id);e=mxUtils.bind(this,function(){0<=u.className.indexOf("geAspectDlgListItemSelected")?
-(u.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(u.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(u,"click",e);-1!=this.aspect.layerIds.indexOf(b.id)&&e()};
-var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var e=b.getCurrentFile();var u=null!=e&&null!=e.getTitle()?e.getTitle():b.defaultFilename;var v=function(){};if(/(\.png)$/i.test(u)){v=1;var B=0;u=b.fileNode;null!=u&&(u.hasAttribute("scale")&&(v=parseFloat(u.getAttribute("scale"))),u.hasAttribute("border")&&(B=parseInt(u.getAttribute("border"))));u=document.createElement("tr");var E=document.createElement("td");
-E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";mxUtils.write(E,mxResources.get("zoom")+":");u.appendChild(E);var L=document.createElement("input");L.setAttribute("value",100*v+"%");L.style.marginLeft="4px";L.style.width="180px";E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(L);u.appendChild(E);k.appendChild(u);u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";
-mxUtils.write(E,mxResources.get("borderWidth")+":");u.appendChild(E);var c=document.createElement("input");c.setAttribute("value",B);c.style.marginLeft="4px";c.style.width="180px";E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(c);u.appendChild(E);k.appendChild(u);this.init=function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)};v=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(L.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=e&&e.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u)){var d=null!=e?e.isCompressed():Editor.compressXml;u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";E.style.width="120px";mxUtils.write(E,mxResources.get("compressed")+":");u.appendChild(E);var g=document.createElement("input");g.setAttribute("type","checkbox");
-d&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(g);u.appendChild(E);k.appendChild(u);this.init=function(){g.focus()};v=function(){null!=b.fileNode&&d!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=e&&e.fileChanged());b.hideDialog()}}if(null!=e&&e.isRealtimeOptional()){u=document.createElement("tr");E=document.createElement("td");E.style.whiteSpace="nowrap";E.style.fontSize="10pt";
-E.style.width="120px";mxUtils.write(E,mxResources.get("realtimeCollaboration")+":");u.appendChild(E);var q=document.createElement("input");q.setAttribute("type","checkbox");var m=e.isRealtimeEnabled();if(m="disabled"!=b.drive.getCustomProperty(e.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=v;v=function(){prevApply();b.hideDialog();q.checked!=m&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&e.setRealtimeEnabled(q.checked,mxUtils.bind(this,
-function(n){b.spinner.stop()}),mxUtils.bind(this,function(n){b.spinner.stop();b.showError(mxResources.get("error"),null!=n&&null!=n.error?n.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};E=document.createElement("td");E.style.whiteSpace="nowrap";E.appendChild(q);E.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));u.appendChild(E);k.appendChild(u)}this.init=null!=this.init?this.init:
-function(){};v=mxUtils.button(mxResources.get("apply"),v);v.className="geBtn gePrimaryBtn";u=document.createElement("tr");E=document.createElement("td");E.colSpan=2;E.style.paddingTop="20px";E.style.whiteSpace="nowrap";E.setAttribute("align","center");B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";b.editor.cancelFirst&&E.appendChild(B);E.appendChild(v);b.editor.cancelFirst||E.appendChild(B);u.appendChild(E);k.appendChild(u);f.appendChild(k);this.container=
-f},ConnectionPointsDialog=function(b,f){function k(){null!=u&&u.destroy()}var e=document.createElement("div");e.style.userSelect="none";var u=null;this.init=function(){function v(J,G){J=new mxCell("",new mxGeometry(J,G,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");J.vertex=!0;J.cp=!0;return g.addCell(J)}function B(J){J=g.getSelectionCells();g.deleteCells(J)}function E(){var J=parseInt(F.value)||0;J=0>J?0:100<J?100:J;
-F.value=J;var G=parseInt(D.value)||0;G=0>G?0:100<G?100:G;D.value=G;var P=parseInt(K.value)||0,T=parseInt(H.value)||0;J=g.getConnectionPoint(n,new mxConnectionConstraint(new mxPoint(J/100,G/100),!1,null,P,T));G=g.getSelectionCell();if(null!=G){P=G.geometry.clone();T=g.view.scale;var W=g.view.translate;P.x=(J.x-3*T)/T-W.x;P.y=(J.y-3*T)/T-W.y;g.model.setGeometry(G,P)}}function L(J){var G=0,P=0,T=q.geometry,W=mxUtils.format((J.geometry.x+3-T.x)/T.width);J=mxUtils.format((J.geometry.y+3-T.y)/T.height);
-0>W?(G=W*T.width,W=0):1<W&&(G=(W-1)*T.width,W=1);0>J?(P=J*T.height,J=0):1<J&&(P=(J-1)*T.height,J=1);return{x:W,y:J,dx:parseInt(G),dy:parseInt(P)}}function c(){if(1==g.getSelectionCount()){var J=g.getSelectionCell();J=L(J);F.value=100*J.x;D.value=100*J.y;K.value=J.dx;H.value=J.dy;p.style.visibility=""}else p.style.visibility="hidden"}var d=document.createElement("div");d.style.width="350px";d.style.height="350px";d.style.overflow="hidden";d.style.border="1px solid lightGray";d.style.boxSizing="border-box";
-mxEvent.disableContextMenu(d);e.appendChild(d);var g=new Graph(d);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;d=f.geometry;var q=new mxCell(f.value,new mxGeometry(0,0,d.width,d.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;g.addCell(q);g.dblClick=function(J,G){if(null!=G&&G!=q)g.setSelectionCell(G);else{G=
-mxUtils.convertPoint(g.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=g.view.scale;var P=g.view.translate;g.setSelectionCell(v((G.x-3*J)/J-P.x,(G.y-3*J)/J-P.y))}};u=new mxKeyHandler(g);u.bindKey(46,B);u.bindKey(8,B);g.getRubberband().isForceRubberbandEvent=function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==q)};g.panningHandler.isForcePanningEvent=function(J){return 2==J.evt.button};var m=g.isCellSelectable;g.isCellSelectable=function(J){return J==q?!1:
-m.apply(this,arguments)};g.getLinkForCell=function(){return null};var n=g.view.getState(q);d=g.getAllConnectionConstraints(n);for(var z=0;null!=d&&z<d.length;z++){var C=g.getConnectionPoint(n,d[z]);v(C.x-3,C.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(z,60);C=mxUtils.button("",function(){g.zoomOut()});C.className="geSprite geSprite-zoomout";C.setAttribute("title",mxResources.get("zoomOut"));C.style.position="relative";C.style.outline="none";C.style.border="none";C.style.margin="2px";C.style.cursor="pointer";C.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(C,60);var x=mxUtils.button("",function(){g.fit(8);g.center()});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.position=
-"relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,60);var y=mxUtils.button("",function(){g.zoomActual();g.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,
-60);var I=mxUtils.button("",B);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);d=document.createElement("div");d.appendChild(z);d.appendChild(C);d.appendChild(y);d.appendChild(x);d.appendChild(I);e.appendChild(d);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min",
-"1");N.setAttribute("value","1");N.style.width="45px";N.style.position="relative";N.style.top=mxClient.IS_FF?"0px":"-4px";N.style.margin="0 4px 0 4px";d.appendChild(N);var t=document.createElement("select");t.style.position="relative";t.style.top=mxClient.IS_FF?"0px":"-4px";C=["left","right","top","bottom"];for(z=0;z<C.length;z++)x=C[z],y=document.createElement("option"),mxUtils.write(y,mxResources.get(x)),y.value=x,t.appendChild(y);d.appendChild(t);z=mxUtils.button(mxResources.get("add"),function(){var J=
-parseInt(N.value);J=1>J?1:100<J?100:J;N.value=J;for(var G=t.value,P=q.geometry,T=[],W=0;W<J;W++){switch(G){case "left":var U=P.x;var V=P.y+(W+1)*P.height/(J+1);break;case "right":U=P.x+P.width;V=P.y+(W+1)*P.height/(J+1);break;case "top":U=P.x+(W+1)*P.width/(J+1);V=P.y;break;case "bottom":U=P.x+(W+1)*P.width/(J+1),V=P.y+P.height}T.push(v(U-3,V-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";d.appendChild(z);var p=document.createElement("div");
-p.style.margin="4px 0px 8px 0px";p.style.whiteSpace="nowrap";p.style.height="24px";d=document.createElement("span");mxUtils.write(d,mxResources.get("dx"));p.appendChild(d);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","0");F.setAttribute("max","100");F.style.width="45px";F.style.margin="0 4px 0 4px";p.appendChild(F);mxUtils.write(p,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px";
-p.appendChild(K);mxUtils.write(p,"pt");d=document.createElement("span");mxUtils.write(d,mxResources.get("dy"));d.style.marginLeft="12px";p.appendChild(d);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min","0");D.setAttribute("max","100");D.style.width="45px";D.style.margin="0 4px 0 4px";p.appendChild(D);mxUtils.write(p,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";p.appendChild(H);
-mxUtils.write(p,"pt");e.appendChild(p);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(F,"change",E);mxEvent.addListener(D,"change",E);mxEvent.addListener(K,"change",E);mxEvent.addListener(H,"change",E);d=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});d.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var J=
-g.model.cells,G=[],P=[],T;for(T in J){var W=J[T];W.cp&&P.push(L(W))}P.sort(function(U,V){return U.x!=V.x?U.x-V.x:U.y!=V.y?U.y-V.y:U.dx!=V.dx?U.dx-V.dx:U.dy-V.dy});for(J=0;J<P.length;J++)0<J&&P[J].x==P[J-1].x&&P[J].y==P[J-1].y&&P[J].dx==P[J-1].dx&&P[J].dy==P[J-1].dy||G.push("["+P[J].x+","+P[J].y+",0,"+P[J].dx+","+P[J].dy+"]");b.editor.graph.setCellStyles("points","["+G.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";C=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);k();b.hideDialog()});C.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(C),x.appendChild(z)):(x.appendChild(C),x.appendChild(z),x.appendChild(d));e.appendChild(x)};this.destroy=k;this.container=e};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+(m?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(g?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",V=document.createElement("div");V.innerHTML=T;V.className=
+"geTemplateDlg";this.container=V;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,X=!1,l=null,B=null,L=null,P=null,O=!1,R=!0,S=!1,W=[],aa=null,Y,Z,ba=!1,fa=V.querySelector(".geTempDlgShowAllBtn"),ja=V.querySelector(".geTempDlgDiagramsTiles"),ha=V.querySelector(".geTempDlgDiagramsListTitle"),ra=V.querySelector(".geTempDlgDiagramsListBtns"),ma=V.querySelector(".geTempDlgContent"),Ga=V.querySelector(".geTempDlgDiagramsList"),Ea=V.querySelector(".geTempDlgNewDiagramCat"),
+za=V.querySelector(".geTempDlgNewDiagramCatList"),Pa=V.querySelector(".geTempDlgCreateBtn"),Aa=V.querySelector(".geTempDlgOpenBtn"),Fa=V.querySelector(".geTempDlgSearchBox"),qa=V.querySelector(".geTempDlgErrMsg"),Ba=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(V.querySelector(".geTempDlgBack"),"click",function(){y();ba=!1;V.querySelector(".geTemplatesList").style.display="none";ma.style.width=
+"100%";Ea.style.display="";Ga.style.minHeight="calc(100% - 280px)";Fa.style.display=F?"":"none";Fa.value="";Y=null;H(R)});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){A(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==Y?H(R):G(Y))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){A(this,"geTempDlgMyDiagramsBtnImg","my-diagrams",
+"allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==Y?H(R):G(Y))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){A(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,Q(W,!1,S,aa))});mxEvent.addListener(V.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){A(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,Q(W,!1,S,aa))});var Ra=!1;
+mxEvent.addListener(fa,"click",function(){O?(Ea.style.height="280px",za.style.height="190px",fa.innerText=mxResources.get("showMore"),n(da)):(Ea.style.height="440px",za.style.height="355px",fa.innerText=mxResources.get("showLess"),n(da,!0));O=!O});var xa=!1,Da=!1,va={},Ka={},la={},da=[],ca=1,na=0;null!=e?e(function(ea,ia){la=ea;na=ia;D()},D):D();mxUtils.get(t,function(ea){if(!Da){Da=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==typeof ea.getAttribute&&null!=ea.getAttribute("title")&&
+da.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;n(da)}});var ka=function(ea,ia,oa){ra.style.display="";Ba.stop();U=!1;if(X)X=!1;else if(ia)ja.innerText=ia;else{oa=oa||{};ia=0;for(var ua in oa)ia+=oa[ua].length;0==ea.length&&0==ia?ja.innerText=mxResources.get("noDiagrams"):Q(ea,!1,S,0==ia?null:oa)}};H(R);var pa=null;mxEvent.addListener(Fa,"keyup",N);mxEvent.addListener(Fa,"search",N);mxEvent.addListener(Fa,
+"input",N);mxEvent.addListener(Pa,"click",function(ea){M(!1,!1)});g&&mxEvent.addListener(Aa,"click",function(ea){M(!1,!0)});m&&mxEvent.addListener(V.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){M(!0)});mxEvent.addListener(V.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();q||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("done"));var C="Unknown",F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("align","absmiddle");F.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),F.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
+(C=mxResources.get("dropbox"),F.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),F.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),F.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),F.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(C=mxResources.get("trello"),F.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"You are now authorized in {1}"));
+k=mxUtils.button(k,d);k.insertBefore(F,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(k);this.container=t},FontDialog=function(b,f,k,d,t){function u(I){this.style.border="";13==I.keyCode&&x.click()}var C=document.createElement("table"),F=document.createElement("tbody");C.style.marginTop="8px";var J=document.createElement("tr");var c=document.createElement("td");c.colSpan=2;c.style.whiteSpace=
+"nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","sysfonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-sysfonts");c.appendChild(e);var g=document.createElement("label");g.setAttribute("for","fontdialog-sysfonts");mxUtils.write(g,mxResources.get("sysFonts",null,"System Fonts"));c.appendChild(g);J.appendChild(c);
+F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(c);var m=document.createElement("input");"s"==d&&m.setAttribute("value",f);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_s";c=document.createElement("td");c.appendChild(m);J.appendChild(c);F.appendChild(J);J=document.createElement("tr");
+c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","googlefonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-googlefonts");c.appendChild(p);g=document.createElement("label");g.setAttribute("for","fontdialog-googlefonts");mxUtils.write(g,mxResources.get("googleFonts",
+null,"Google Fonts"));c.appendChild(g);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(g=b.menus.createHelpLink("https://fonts.google.com/"),g.getElementsByTagName("img")[0].setAttribute("valign","middle"),c.appendChild(g));J.appendChild(c);F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");
+J.appendChild(c);var q=document.createElement("input");"g"==d&&q.setAttribute("value",f);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_g";c=document.createElement("td");c.appendChild(q);J.appendChild(c);F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");c.appendChild(z);g=document.createElement("label");g.setAttribute("for","fontdialog-webfonts");mxUtils.write(g,mxResources.get("webfonts",null,"Web Fonts"));c.appendChild(g);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";c.style.paddingLeft=
+"15px";mxUtils.write(c,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(c);var y=document.createElement("input");"w"==d&&(Editor.enableWebFonts?y.setAttribute("value",f):m.setAttribute("value",f));y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";c=document.createElement("td");c.appendChild(y);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);J=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
+c.style.width="120px";c.style.paddingLeft="15px";mxUtils.write(c,mxResources.get("fontUrl",null,"Font URL")+":");J.appendChild(c);var A=document.createElement("input");A.setAttribute("value",k||"");A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontUrl";c=document.createElement("td");c.appendChild(A);J.appendChild(c);Editor.enableWebFonts&&F.appendChild(J);this.init=function(){var I=m;"g"==d?I=q:"w"==d&&Editor.enableWebFonts&&(I=y);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+I.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",c.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&c.appendChild(f);
+var x=mxUtils.button(mxResources.get("apply"),function(){if(e.checked){var I=m.value;var M="s"}else if(p.checked){I=q.value;var E=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");M="g"}else z.checked&&(I=y.value,E=A.value,M="w");var Q=E;var n=M,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(C.querySelector(".dlg_fontName_"+n).style.border="1px solid red",Q=!1):"w"!=n||v.test(Q)?Q=!0:(C.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",Q=!1);Q&&(t(I,E,M),b.hideDialog())});x.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",u);mxEvent.addListener(q,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(A,"keypress",u);mxEvent.addListener(m,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(q,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(y,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});c.appendChild(x);b.editor.cancelFirst||c.appendChild(f);J.appendChild(c);F.appendChild(J);C.appendChild(F);this.container=C};
+function AspectDialog(b,f,k,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("pages"));f.appendChild(u);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("layers"));f.appendChild(u);u=document.createElement("div");u.className="geAspectDlgList";
+f.appendChild(u);this.pagesContainer=k;this.layersContainer=u;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});u.className="geBtn";b.editor.cancelFirst&&k.appendChild(u);var C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(C);C.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||k.appendChild(u);C.setAttribute("disabled","disabled");this.okBtn=C;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,f,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var t=new Graph(b);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!1);t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var u=f.getAttribute("background");if(null==u||""==u||u==mxConstants.NONE)u=null!=d?d:"#ffffff";b.style.backgroundColor=u;d=new mxCodec(f.ownerDocument);b=t.getModel();d.decode(f,b);f=b.getChildCount(b.root);
+d=null==k;for(u=0;u<f;u++){var C=b.getChildAt(b.root,u);b.setVisible(C,d||k==C.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};
+AspectDialog.prototype.createPageItem=function(b,f,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var C=0;C<u.length;C++)this.createLayerItem(u[C],b,t,k)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
+AspectDialog.prototype.createLayerItem=function(b,f,k,d){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var t=document.createElement("div");t.setAttribute("data-layer-id",b.id);t.className="geAspectDlgListItem";t.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(t);this.createViewer(t.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=t.className.indexOf("geAspectDlgListItemSelected")?
+(t.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(t.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(t,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
+var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var t=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var u=function(){};if(/(\.png)$/i.test(t)){u=1;var C=0;t=b.fileNode;null!=t&&(t.hasAttribute("scale")&&(u=parseFloat(t.getAttribute("scale"))),t.hasAttribute("border")&&(C=parseInt(t.getAttribute("border"))));t=document.createElement("tr");var F=document.createElement("td");
+F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";mxUtils.write(F,mxResources.get("zoom")+":");t.appendChild(F);var J=document.createElement("input");J.setAttribute("value",100*u+"%");J.style.marginLeft="4px";J.style.width="180px";F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(J);t.appendChild(F);k.appendChild(t);t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";
+mxUtils.write(F,mxResources.get("borderWidth")+":");t.appendChild(F);var c=document.createElement("input");c.setAttribute("value",C);c.style.marginLeft="4px";c.style.width="180px";F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(c);t.appendChild(F);k.appendChild(t);this.init=function(){J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};u=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(J.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(c.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t)){var e=null!=d?d.isCompressed():Editor.compressXml;t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";F.style.width="120px";mxUtils.write(F,mxResources.get("compressed")+":");t.appendChild(F);var g=document.createElement("input");g.setAttribute("type","checkbox");
+e&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(g);t.appendChild(F);k.appendChild(t);this.init=function(){g.focus()};u=function(){null!=b.fileNode&&e!=g.checked&&(b.fileNode.setAttribute("compressed",g.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){t=document.createElement("tr");F=document.createElement("td");F.style.whiteSpace="nowrap";F.style.fontSize="10pt";
+F.style.width="120px";mxUtils.write(F,mxResources.get("realtimeCollaboration")+":");t.appendChild(F);var m=document.createElement("input");m.setAttribute("type","checkbox");var p=d.isRealtimeEnabled();if(p="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))m.setAttribute("checked","checked"),m.defaultChecked=!0;prevApply=u;u=function(){prevApply();b.hideDialog();m.checked!=p&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(m.checked,mxUtils.bind(this,
+function(q){b.spinner.stop()}),mxUtils.bind(this,function(q){b.spinner.stop();b.showError(mxResources.get("error"),null!=q&&null!=q.error?q.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){m.focus()};F=document.createElement("td");F.style.whiteSpace="nowrap";F.appendChild(m);F.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));t.appendChild(F);k.appendChild(t)}this.init=null!=this.init?this.init:
+function(){};u=mxUtils.button(mxResources.get("apply"),u);u.className="geBtn gePrimaryBtn";t=document.createElement("tr");F=document.createElement("td");F.colSpan=2;F.style.paddingTop="20px";F.style.whiteSpace="nowrap";F.setAttribute("align","center");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&F.appendChild(C);F.appendChild(u);b.editor.cancelFirst||F.appendChild(C);t.appendChild(F);k.appendChild(t);f.appendChild(k);this.container=
+f},ConnectionPointsDialog=function(b,f){function k(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(K,G){K=new mxCell("",new mxGeometry(K,G,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");K.vertex=!0;K.cp=!0;return g.addCell(K)}function C(K){K=g.getSelectionCells();g.deleteCells(K)}function F(){var K=parseInt(n.value)||0;K=0>K?0:100<K?100:K;
+n.value=K;var G=parseInt(D.value)||0;G=0>G?0:100<G?100:G;D.value=G;var N=parseInt(v.value)||0,T=parseInt(H.value)||0;K=g.getConnectionPoint(q,new mxConnectionConstraint(new mxPoint(K/100,G/100),!1,null,N,T));G=g.getSelectionCell();if(null!=G){N=G.geometry.clone();T=g.view.scale;var V=g.view.translate;N.x=(K.x-3*T)/T-V.x;N.y=(K.y-3*T)/T-V.y;g.model.setGeometry(G,N)}}function J(K){var G=0,N=0,T=m.geometry,V=mxUtils.format((K.geometry.x+3-T.x)/T.width);K=mxUtils.format((K.geometry.y+3-T.y)/T.height);
+0>V?(G=V*T.width,V=0):1<V&&(G=(V-1)*T.width,V=1);0>K?(N=K*T.height,K=0):1<K&&(N=(K-1)*T.height,K=1);return{x:V,y:K,dx:parseInt(G),dy:parseInt(N)}}function c(){if(1==g.getSelectionCount()){var K=g.getSelectionCell();K=J(K);n.value=100*K.x;D.value=100*K.y;v.value=K.dx;H.value=K.dy;Q.style.visibility=""}else Q.style.visibility="hidden"}var e=document.createElement("div");e.style.width="350px";e.style.height="350px";e.style.overflow="hidden";e.style.border="1px solid lightGray";e.style.boxSizing="border-box";
+mxEvent.disableContextMenu(e);d.appendChild(e);var g=new Graph(e);g.autoExtend=!1;g.autoScroll=!1;g.setGridEnabled(!1);g.setEnabled(!0);g.setPanning(!0);g.setConnectable(!1);g.setTooltips(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;g.maxFitScale=2;e=f.geometry;var m=new mxCell(f.value,new mxGeometry(0,0,e.width,e.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");m.vertex=!0;g.addCell(m);g.dblClick=function(K,G){if(null!=G&&G!=m)g.setSelectionCell(G);else{G=
+mxUtils.convertPoint(g.container,mxEvent.getClientX(K),mxEvent.getClientY(K));mxEvent.consume(K);K=g.view.scale;var N=g.view.translate;g.setSelectionCell(u((G.x-3*K)/K-N.x,(G.y-3*K)/K-N.y))}};t=new mxKeyHandler(g);t.bindKey(46,C);t.bindKey(8,C);g.getRubberband().isForceRubberbandEvent=function(K){return 0==K.evt.button&&(null==K.getCell()||K.getCell()==m)};g.panningHandler.isForcePanningEvent=function(K){return 2==K.evt.button};var p=g.isCellSelectable;g.isCellSelectable=function(K){return K==m?!1:
+p.apply(this,arguments)};g.getLinkForCell=function(){return null};var q=g.view.getState(m);e=g.getAllConnectionConstraints(q);for(var z=0;null!=e&&z<e.length;z++){var y=g.getConnectionPoint(q,e[z]);u(y.x-3,y.y-3)}g.fit(8);g.center();z=mxUtils.button("",function(){g.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(z,60);y=mxUtils.button("",function(){g.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var A=mxUtils.button("",function(){g.fit(8);g.center()});A.className="geSprite geSprite-fit";A.setAttribute("title",mxResources.get("fit"));A.style.position=
+"relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var x=mxUtils.button("",function(){g.zoomActual();g.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.position="relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,
+60);var I=mxUtils.button("",C);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);e=document.createElement("div");e.appendChild(z);e.appendChild(y);e.appendChild(x);e.appendChild(A);e.appendChild(I);d.appendChild(e);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min",
+"1");M.setAttribute("value","1");M.style.width="45px";M.style.position="relative";M.style.top=mxClient.IS_FF?"0px":"-4px";M.style.margin="0 4px 0 4px";e.appendChild(M);var E=document.createElement("select");E.style.position="relative";E.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(z=0;z<y.length;z++)A=y[z],x=document.createElement("option"),mxUtils.write(x,mxResources.get(A)),x.value=A,E.appendChild(x);e.appendChild(E);z=mxUtils.button(mxResources.get("add"),function(){var K=
+parseInt(M.value);K=1>K?1:100<K?100:K;M.value=K;for(var G=E.value,N=m.geometry,T=[],V=0;V<K;V++){switch(G){case "left":var U=N.x;var X=N.y+(V+1)*N.height/(K+1);break;case "right":U=N.x+N.width;X=N.y+(V+1)*N.height/(K+1);break;case "top":U=N.x+(V+1)*N.width/(K+1);X=N.y;break;case "bottom":U=N.x+(V+1)*N.width/(K+1),X=N.y+N.height}T.push(u(U-3,X-3))}g.setSelectionCells(T)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";e.appendChild(z);var Q=document.createElement("div");
+Q.style.margin="4px 0px 8px 0px";Q.style.whiteSpace="nowrap";Q.style.height="24px";e=document.createElement("span");mxUtils.write(e,mxResources.get("dx"));Q.appendChild(e);var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";Q.appendChild(n);mxUtils.write(Q,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";
+Q.appendChild(v);mxUtils.write(Q,"pt");e=document.createElement("span");mxUtils.write(e,mxResources.get("dy"));e.style.marginLeft="12px";Q.appendChild(e);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min","0");D.setAttribute("max","100");D.style.width="45px";D.style.margin="0 4px 0 4px";Q.appendChild(D);mxUtils.write(Q,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";Q.appendChild(H);
+mxUtils.write(Q,"pt");d.appendChild(Q);c();g.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<g.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);c()});g.addListener(mxEvent.CELLS_MOVED,c);mxEvent.addListener(n,"change",F);mxEvent.addListener(D,"change",F);mxEvent.addListener(v,"change",F);mxEvent.addListener(H,"change",F);e=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});e.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var K=
+g.model.cells,G=[],N=[],T;for(T in K){var V=K[T];V.cp&&N.push(J(V))}N.sort(function(U,X){return U.x!=X.x?U.x-X.x:U.y!=X.y?U.y-X.y:U.dx!=X.dx?U.dx-X.dx:U.dy-X.dy});for(K=0;K<N.length;K++)0<K&&N[K].x==N[K-1].x&&N[K].y==N[K-1].y&&N[K].dx==N[K-1].dx&&N[K].dy==N[K-1].dy||G.push("["+N[K].x+","+N[K].y+",0,"+N[K].dx+","+N[K].dy+"]");b.editor.graph.setCellStyles("points","["+G.join(",")+"]",[f]);k();b.hideDialog()});z.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[f]);k();b.hideDialog()});y.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign="right";b.editor.cancelFirst?(A.appendChild(e),A.appendChild(y),A.appendChild(z)):(A.appendChild(y),A.appendChild(z),A.appendChild(e));d.appendChild(A)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11185,109 +11187,109 @@ Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAAC
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,A){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,
-A){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,A){return"1"==
-mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,A){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
+null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,B){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,
+B){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",
+dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?
+"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(l,B){return"1"==
+mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
+defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(l,A){A=A.editorUi.editor.graph;return 1==l.vertices.length&&
-0==l.edges.length&&A.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,A){A=A.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&A.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,A){l=A.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},
-isVisible:function(l,A){A=A.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&A.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,A){l=A.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,A){A=A.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&A.isTable(l.vertices[0])}},{name:"fillOpacity",
+dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&
+0==l.edges.length&&B.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},
+isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(l,A){return A.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,A){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
+defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(l,B){return B.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,B){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,A){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;A=A.editorUi.editor.graph;return null!=l&&(A.isSwimlane(l)||0<A.model.getChildCount(l))},
-isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,A){var M=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;A=A.editorUi.editor.graph;return null!=M&&(A.isContainer(M)&&"0"!=l.style.collapsible||!A.isContainer(M)&&"1"==l.style.collapsible)},isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(l,A){return 1==l.vertices.length&&0==l.edges.length&&!A.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(l,A){A=A.editorUi.editor.graph.model;return 0<l.vertices.length?A.isVertex(A.getParent(l.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,A){l=0<l.vertices.length?A.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
+{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,B){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=l&&(B.isSwimlane(l)||0<B.model.getChildCount(l))},
+isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,B){var L=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=L&&(B.isContainer(L)&&"0"!=l.style.collapsible||!B.isContainer(L)&&"1"==l.style.collapsible)},isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
+isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length&&!B.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(l,B){B=B.editorUi.editor.graph.model;return 0<l.vertices.length?B.isVertex(B.getParent(l.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
+type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,B){l=0<l.vertices.length?B.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
-dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,A){var M=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return A.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,A){return 0<l.vertices.length&&
-A.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(l){var A=rough.canvas({getContext:function(){return l}});A.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<Q.length;O++){var R=Q[O];switch(R.type){case "path":null!=M.stroke&&this._drawToContext(l,R,M);break;case "fillPath":this._drawToContext(l,R,M);break;case "fillSketch":this.fillSketch(l,R,M)}}};A.fillSketch=function(M,Q,O){var R=l.state.strokeColor,S=l.state.strokeWidth,X=l.state.strokeAlpha,aa=l.state.dashed,Y=O.fillWeight;
-0>Y&&(Y=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(Y);l.setDashed(!1);this._drawToContext(M,Q,O);l.setDashed(aa);l.setStrokeWidth(S);l.setStrokeColor(R);l.setStrokeAlpha(X)};A._drawToContext=function(M,Q,O){M.begin();for(var R=0;R<Q.ops.length;R++){var S=Q.ops[R],X=S.data;switch(S.op){case "move":M.moveTo(X[0],X[1]);break;case "bcurveTo":M.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":M.lineTo(X[0],X[1])}}M.end();"fillPath"===Q.type&&
-O.filled?M.fill():M.stroke()};return A};(function(){function l(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(l,B){var L=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return B.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,B){return 0<l.vertices.length&&
+B.editorUi.editor.graph.isContainer(l.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(l){var B=rough.canvas({getContext:function(){return l}});B.draw=function(L){var P=L.sets||[];L=L.options||this.getDefaultOptions();for(var O=0;O<P.length;O++){var R=P[O];switch(R.type){case "path":null!=L.stroke&&this._drawToContext(l,R,L);break;case "fillPath":this._drawToContext(l,R,L);break;case "fillSketch":this.fillSketch(l,R,L)}}};B.fillSketch=function(L,P,O){var R=l.state.strokeColor,S=l.state.strokeWidth,W=l.state.strokeAlpha,aa=l.state.dashed,Y=O.fillWeight;
+0>Y&&(Y=O.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(O.fill||"");l.setStrokeWidth(Y);l.setDashed(!1);this._drawToContext(L,P,O);l.setDashed(aa);l.setStrokeWidth(S);l.setStrokeColor(R);l.setStrokeAlpha(W)};B._drawToContext=function(L,P,O){L.begin();for(var R=0;R<P.ops.length;R++){var S=P.ops[R],W=S.data;switch(S.op){case "move":L.moveTo(W[0],W[1]);break;case "bcurveTo":L.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":L.lineTo(W[0],W[1])}}L.end();"fillPath"===P.type&&
+O.filled?L.fill():L.stroke()};return B};(function(){function l(R,S,W){this.canvas=R;this.rc=S;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,l.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(R,S){var X=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)X=(X<<5)-X+aa.charCodeAt(Y)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};aa=this.rc.getDefaultOptions();X.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;R=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",aa.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=R||null!=S&&X.fill==S)?"solid":aa.fillStyle);X.fillStyle=S;return X};l.prototype.begin=function(){this.passThrough?
+this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(R,S){var W=1;if(null!=this.shape.state){var aa=this.shape.state.cell.id;if(null!=aa)for(var Y=0;Y<aa.length;Y++)W=(W<<5)-W+aa.charCodeAt(Y)<<0}W={strokeWidth:this.canvas.state.strokeWidth,seed:W,preserveVertices:!0};aa=this.rc.getDefaultOptions();W.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;R=null;(W.filled=S)?(W.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):W.fill="";W.bowing=mxUtils.getValue(this.shape.style,"bowing",aa.bowing);W.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",aa.hachureAngle);W.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",aa.curveFitting);W.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",aa.roughness);W.simplification=mxUtils.getValue(this.shape.style,"simplification",aa.simplification);W.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",aa.disableMultiStroke);W.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",aa.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);W.hachureGap="auto"==S?-1:S;W.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);W.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",S);W.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);W.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=W.fill&&(null!=R||null!=S&&W.fill==S)?"solid":aa.fillStyle);W.fillStyle=S;return W};l.prototype.begin=function(){this.passThrough?
this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,R,S),this.lastX=R,this.lastY=S)};l.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(R,S,X,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,
-S,X,aa),this.lastX=X,this.lastY=aa)};l.prototype.curveTo=function(R,S,X,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,aa,Y,Z),this.lastX=Y,this.lastY=Z)};l.prototype.arcTo=function(R,S,X,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ha=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,aa,Y,Z,ba);if(null!=ha)for(var ma=0;ma<ha.length;ma+=6)this.curveTo(ha[ma],ha[ma+1],ha[ma+2],ha[ma+3],ha[ma+4],ha[ma+
-5]);this.lastX=Z;this.lastY=ba}};l.prototype.rect=function(R,S,X,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,aa,this.getStyle(!0,!0)))};l.prototype.ellipse=function(R,S,X,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+aa/2,X,aa,this.getStyle(!0,!0)))};l.prototype.roundrect=function(R,S,X,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(R+Y,S),this.lineTo(R+X-Y,S),this.quadTo(R+X,S,R+X,S+Z),this.lineTo(R+X,S+aa-Z),this.quadTo(R+X,S+aa,R+X-Y,S+aa),this.lineTo(R+Y,S+aa),this.quadTo(R,S+aa,R,S+aa-Z),this.lineTo(R,S+Z),this.quadTo(R,S,R+Y,S))};l.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];R.stroke!=mxConstants.NONE&&null!=R.stroke||
+arguments):(this.addOp(this.lineOp,R,S),this.lastX=R,this.lastY=S)};l.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(R,S,W,aa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,
+S,W,aa),this.lastX=W,this.lastY=aa)};l.prototype.curveTo=function(R,S,W,aa,Y,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,W,aa,Y,Z),this.lastX=Y,this.lastY=Z)};l.prototype.arcTo=function(R,S,W,aa,Y,Z,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,W,aa,Y,Z,ba);if(null!=fa)for(var ja=0;ja<fa.length;ja+=6)this.curveTo(fa[ja],fa[ja+1],fa[ja+2],fa[ja+3],fa[ja+4],fa[ja+
+5]);this.lastX=Z;this.lastY=ba}};l.prototype.rect=function(R,S,W,aa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,W,aa,this.getStyle(!0,!0)))};l.prototype.ellipse=function(R,S,W,aa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+W/2,S+aa/2,W,aa,this.getStyle(!0,!0)))};l.prototype.roundrect=function(R,S,W,aa,Y,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(R+Y,S),this.lineTo(R+W-Y,S),this.quadTo(R+W,S,R+W,S+Z),this.lineTo(R+W,S+aa-Z),this.quadTo(R+W,S+aa,R+W-Y,S+aa),this.lineTo(R+Y,S+aa),this.quadTo(R,S+aa,R,S+aa-Z),this.lineTo(R,S+Z),this.quadTo(R,S,R+Y,S))};l.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(W){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];R.stroke!=mxConstants.NONE&&null!=R.stroke||
delete this.nextShape.options.stroke;R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
arguments):this.drawPath(this.getStyle(!0,!0))};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new l(R,Editor.createRoughCanvas(R),this)};var A=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,aa,Y){null!=R.handJiggle&&R.handJiggle.passThrough||M.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==l&&!this.outline){R.save();
-var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=R.setStrokeColor;R.setStrokeColor=function(){};var ha=R.setFillColor;R.setFillColor=function(){};X||null==aa||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;Q.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=ha;R.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;R.restore();X&&null!=aa&&(R.addTolerance=function(){})}Q.apply(this,arguments);
-R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(R,S,X,aa,Y,Z){null!=R.handJiggle&&R.handJiggle.constructor==l?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?
-l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,A,M){if(null!=l&&"undefined"!==typeof pako){var Q=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=Q&&0<Q.length)for(var R=0;R<Q.length;R++)if("mxgraph"==Q[R].getAttribute("class")){O.push(Q[R]);break}0<O.length&&(Q=O[0].getAttribute("data-mxgraph"),null!=Q?(O=JSON.parse(Q),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
-(Q=mxUtils.getTextContent(O[0]),Q=Graph.decompress(Q,null,M),0<Q.length&&(l=mxUtils.parseXml(Q),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(Q=l.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)l=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||A||(O=null,"diagram"==l.nodeName?O=l:"mxfile"==
-l.nodeName&&(Q=l.getElementsByTagName("diagram"),0<Q.length&&(O=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,M)));null==l||"mxGraphModel"==l.nodeName||A&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,A){var M=mxUtils.trim(mxUtils.getTextContent(l)),Q=null;0<M.length?(l=Graph.decompress(M,null,A),null!=l&&0<l.length&&(Q=mxUtils.parseXml(l).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(Q=mxUtils.createXmlDocument(),
-Q.appendChild(Q.importNode(l[0],!0)),Q=Q.documentElement));return Q};Editor.getDiagramNodeXml=function(l){var A=mxUtils.getTextContent(l),M=null;0<A.length?M=Graph.decompress(A):null!=l.firstChild&&(M=mxUtils.getXml(l.firstChild));return M};Editor.extractGraphModelFromPdf=function(l){l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var A=l.indexOf("EmbeddedFile");if(-1<A){var M=l.indexOf("stream",A)+9;if(0<l.substring(A,M).indexOf("application#2Fvnd.jgraph.mxfile"))return A=
-l.indexOf("endstream",M-1),pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(M,A)),{to:"string"})}return null}M=null;A="";for(var Q=0,O=0,R=[],S=null;O<l.length;){var X=l.charCodeAt(O);O+=1;10!=X&&(A+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var aa=l.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){M=l.substring(O,aa);break}}10==X&&("endobj"==A?S=null:"obj"==A.substring(A.length-3,A.length)||"xref"==A||"trailer"==A?(S=[],R[A.split(" ")[0]]=S):null!=S&&S.push(A),
-A="")}null==M&&(M=Editor.extractGraphModelFromXref(R));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(l){var A=l.trailer,M=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=l[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(l=l[A[1]],null!=l&&(l=l.join("\n"),M=l.substring(1,l.length-1))))));return M};Editor.extractParserError=function(l,A){var M=
-null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(M=A||mxResources.get("invalidChars"),A=l[0].getElementsByTagName("div"),0<A.length&&(M=mxUtils.getTextContent(A[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(l,A){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=A))};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;Menus.prototype.defaultFonts=l.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new l(R,Editor.createRoughCanvas(R),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(R):this.createRoughCanvas(R)};var L=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,W,aa,Y){null!=R.handJiggle&&R.handJiggle.passThrough||L.apply(this,arguments)};var P=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,W=!0;null!=this.style&&(W="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==l&&!this.outline){R.save();
+var aa=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ba=R.setStrokeColor;R.setStrokeColor=function(){};var fa=R.setFillColor;R.setFillColor=function(){};W||null==aa||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;P.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=fa;R.setStrokeColor=ba;this.configurePointerEvents=Z;this.stroke=Y;this.fill=aa;R.restore();W&&null!=aa&&(R.addTolerance=function(){})}P.apply(this,arguments);
+R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(R,S,W,aa,Y,Z){null!=R.handJiggle&&R.handJiggle.constructor==l?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?
+l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,B,L){if(null!=l&&"undefined"!==typeof pako){var P=l.ownerDocument.getElementsByTagName("div"),O=[];if(null!=P&&0<P.length)for(var R=0;R<P.length;R++)if("mxgraph"==P[R].getAttribute("class")){O.push(P[R]);break}0<O.length&&(P=O[0].getAttribute("data-mxgraph"),null!=P?(O=JSON.parse(P),null!=O&&null!=O.xml&&(l=mxUtils.parseXml(O.xml),l=l.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
+(P=mxUtils.getTextContent(O[0]),P=Graph.decompress(P,null,L),0<P.length&&(l=mxUtils.parseXml(P),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(P=l.getAttribute("content"),null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&(P=unescape(window.atob?atob(P):Base64.decode(cont,P))),null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P)),null!=P&&0<P.length)l=mxUtils.parseXml(P).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||B||(O=null,"diagram"==l.nodeName?O=l:"mxfile"==
+l.nodeName&&(P=l.getElementsByTagName("diagram"),0<P.length&&(O=P[Math.max(0,Math.min(P.length-1,urlParams.page||0))])),null!=O&&(l=Editor.parseDiagramNode(O,L)));null==l||"mxGraphModel"==l.nodeName||B&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,B){var L=mxUtils.trim(mxUtils.getTextContent(l)),P=null;0<L.length?(l=Graph.decompress(L,null,B),null!=l&&0<l.length&&(P=mxUtils.parseXml(l).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(P=mxUtils.createXmlDocument(),
+P.appendChild(P.importNode(l[0],!0)),P=P.documentElement));return P};Editor.getDiagramNodeXml=function(l){var B=mxUtils.getTextContent(l),L=null;0<B.length?L=Graph.decompress(B):null!=l.firstChild&&(L=mxUtils.getXml(l.firstChild));return L};Editor.extractGraphModelFromPdf=function(l){l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var B=l.indexOf("EmbeddedFile");if(-1<B){var L=l.indexOf("stream",B)+9;if(0<l.substring(B,L).indexOf("application#2Fvnd.jgraph.mxfile"))return B=
+l.indexOf("endstream",L-1),pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(L,B)),{to:"string"})}return null}L=null;B="";for(var P=0,O=0,R=[],S=null;O<l.length;){var W=l.charCodeAt(O);O+=1;10!=W&&(B+=String.fromCharCode(W));W=="/Subject (%3Cmxfile".charCodeAt(P)?P++:P=0;if(19==P){var aa=l.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(aa>O){L=l.substring(O,aa);break}}10==W&&("endobj"==B?S=null:"obj"==B.substring(B.length-3,B.length)||"xref"==B||"trailer"==B?(S=[],R[B.split(" ")[0]]=S):null!=S&&S.push(B),
+B="")}null==L&&(L=Editor.extractGraphModelFromXref(R));null!=L&&(L=decodeURIComponent(L.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return L};Editor.extractGraphModelFromXref=function(l){var B=l.trailer,L=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=l[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(l=l[B[1]],null!=l&&(l=l.join("\n"),L=l.substring(1,l.length-1))))));return L};Editor.extractParserError=function(l,B){var L=
+null;l=null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(L=B||mxResources.get("invalidChars"),B=l[0].getElementsByTagName("div"),0<B.length&&(L=mxUtils.getTextContent(B[0])));return null!=L?mxUtils.trim(L):L};Editor.addRetryToError=function(l,B){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=B))};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=l.version;Menus.prototype.defaultFonts=l.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
l.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=l.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=l.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=l.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=l.autosaveDelay||DrawioFile.prototype.autosaveDelay;
l.debug&&(urlParams.test="1");null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.compressXml=l.compressXml);null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
l.oneDriveInlinePicker);null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.lightColor&&(Editor.lightColor=l.lightColor);null!=l.settingsName&&(Editor.configurationKey="."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(l.css));var M=document.getElementsByTagName("script")[0];M.parentNode.insertBefore(A,M)}null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=l.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(l.css));var L=document.getElementsByTagName("script")[0];L.parentNode.insertBefore(B,L)}null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?Sidebar.prototype.enabledLibraries=
l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=l.defaultEdgeStyle);
-null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(A=parseFloat(l.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.gridSteps&&(A=parseInt(l.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=l.pageFormat&&(A=parseInt(l.pageFormat.width),M=parseInt(l.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(M)&&0<M?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,M),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-l.emptyLibraryXml);l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);l.sidebarTitleSize&&(A=parseInt(l.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=l.autosaveDelay&&(A=parseInt(l.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors)}};
-Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(l));A.parentNode.insertBefore(M,A);l=l.split("url(");for(M=1;M<l.length;M++){var Q=l[M].indexOf(")");Q=Editor.trimCssUrl(l[M].substring(0,Q));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",Q);
-O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var A=[],M=0;M<l;M++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return A.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var A=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[l],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==l.nodeName){A=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=M&&(Q=new mxCodec(M.ownerDocument),Q.decode(M,this.graph.getStylesheet())));else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=M){var Q=new mxCodec(M.ownerDocument);Q.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");A=l.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(A=l.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<A.length;M++)this.graph.addExtFont(A[M].name,A[M].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,A){l=null!=l?l:!0;var M=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=Q&&M.setAttribute("backgroundImage",JSON.stringify(Q));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
-0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",Q.join("|")));return M};Editor.prototype.isDataSvg=function(l){try{var A=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var M=mxUtils.parseXml(A).documentElement;return"mxfile"==
-M.nodeName||"mxGraphModel"==M.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(l,A,M){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var e=
-Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){e.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
-Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
-Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",l);A[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var A="",M=[""],Q=0,O=!0,R;l=$jscomp.makeIterator(l);for(R=l.next();!R.done;R=l.next())R=R.value,'"'===R?(O&&R===A&&(M[Q]+=R),O=!O):","===R&&O?R=M[++Q]="":M[Q]+=R,A=R;return M}return[]};Editor.prototype.getProxiedUrl=
-function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var A=/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l);A=/\.png$/i.test(l)||/\.pdf$/i.test(l)||A;var M="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+M+(A?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==
-window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var A=l.convert,M=this;l.convert=function(Q){if(null!=
-Q){var O="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);O&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!O||Q.substring(0,l.baseUrl.length)==l.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=A.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=
-function(l,A){try{var M=!0,Q=window.setTimeout(mxUtils.bind(this,function(){M=!1;A(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(l))mxUtils.get(l,mxUtils.bind(this,function(R){window.clearTimeout(Q);M&&A(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(Q);M&&A(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(Q);if(M)try{var R=document.createElement("canvas"),S=R.getContext("2d");
-R.height=O.height;R.width=O.width;S.drawImage(O,0,0);A(R.toDataURL())}catch(X){A(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(Q);M&&A(Editor.svgBrokenImage.src)};O.src=l}}catch(R){A(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(l,A,M,Q){null==Q&&(Q=this.createImageUrlConverter());var O=0,R=M||{};M=mxUtils.bind(this,function(S,X){S=l.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=Q.convert(Y.getAttribute(X));
-if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=R[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(ha){null!=ha&&(R[Z]=ha,Y.setAttribute(X,ha));O--;0==O&&A(l)})):Y.setAttribute(X,ba)}else null!=Z&&Y.setAttribute(X,Z)}}catch(ha){}})(S[aa])});M("image","xlink:href");M("img","src");0==O&&A(l)};Editor.base64Encode=function(l){for(var A="",M=0,Q=l.length,O,R,S;M<Q;){O=l.charCodeAt(M++)&255;if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);A+="==";break}R=l.charCodeAt(M++);if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);A+="=";break}S=l.charCodeAt(M++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(R&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return A};Editor.prototype.loadUrl=function(l,A,M,Q,O,R,S,X){try{var aa=!S&&(Q||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=A){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var ha=0;ha<Z.length;ha++)ba[ha]=String.fromCharCode(Z[ha]);ba=ba.join("")}R=null!=R?R:"data:image/png;base64,";ba=R+Editor.base64Encode(ba)}A(ba)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?M({code:Z.getStatus()},
-Z):M({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:Y})},X)});Y()}catch(Z){null!=M&&M(Z)}};Editor.prototype.absoluteCssFonts=function(l){var A=null;if(null!=l){var M=l.split("url(");if(0<M.length){A=[M[0]];l=window.location.pathname;var Q=null!=l?l.lastIndexOf("/"):-1;0<=Q&&(l=l.substring(0,Q+1));Q=document.getElementsByTagName("base");var O=
-null;null!=Q&&0<Q.length&&(O=Q[0].getAttribute("href"));for(var R=1;R<M.length;R++)if(Q=M[R].indexOf(")"),0<Q){var S=Editor.trimCssUrl(M[R].substring(0,Q));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":l)+S);A.push('url("'+S+'"'+M[R].substring(Q))}else A.push(M[R])}else A=[l]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(l,A,M){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+
-encodeURIComponent(A));M(l,A)};Editor.prototype.embedCssFonts=function(l,A){var M=l.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==Q){for(var aa=[M[0]],Y=1;Y<M.length;Y++){var Z=M[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(M[Y].substring(0,Z))]);aa.push('"'+M[Y].substring(Z))}A(aa.join(""))}});if(0<M.length){for(l=1;l<M.length;l++){var R=M[l].indexOf(")"),S=null,X=M[l].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(M[l].substring(X+
-7,M[l].indexOf(")",X))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;Q++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject";
-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(ha){this.cachedFonts[aa]=ha;Q--;O()}),mxUtils.bind(this,function(ha){Q--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[l].substring(0,R)),S)}O()}else A(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=
-A;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(l[A]=Graph.fontMapping[A]);return l};Editor.prototype.embedExtFonts=function(l){var A=this.graph.getCustomFonts();if(0<A.length){var M=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(M.join(""),l)}),R=0;R<A.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?
-null==this.cachedGoogleFonts[X]?(Q++,this.loadUrl(X,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[X]=aa;M.push(aa+"\n");Q--;O()}),mxUtils.bind(this,function(aa){Q--;M.push("@import url("+X+");\n");O()}))):M.push(this.cachedGoogleFonts[X]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(A[R].name,A[R].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var A=document.getElementsByTagName("style"),M=0;M<
-A.length;M++){var Q=mxUtils.getTextContent(A[M]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&l[0].appendChild(A[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var M=l.getElementsByTagName("defs"),Q=l.ownerDocument;0==M.length?(M=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=l.firstChild?l.insertBefore(M,l.firstChild):l.appendChild(M)):M=M[0];l=null!=Q.createElementNS?
-Q.createElementNS(mxConstants.NS_SVG,"style"):Q.createElement("style");l.setAttribute("type","text/css");mxUtils.setTextContent(l,A);M.appendChild(l)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,A,M){var Q=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(Q/l,Q/A))};Editor.prototype.exportToCanvas=function(l,A,M,Q,O,R,S,X,aa,Y,Z,ba,ha,ma,ia,qa,la,Ca){try{R=null!=R?R:!0;S=null!=S?S:!0;ba=null!=
-ba?ba:this.graph;ha=null!=ha?ha:0;var Da=aa?null:ba.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=Q);null==Da&&0==aa&&(Da=qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,ha,ma,null,S,null,null,null,Y,null,qa,la,Ca),mxUtils.bind(this,function(ya){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){na.drawImage(Pa,0,0);l(Ia,ya)},0):(na.drawImage(Pa,0,0),l(Ia,ya))},Ia=document.createElement("canvas"),
-Ba=parseInt(ya.getAttribute("width")),Ga=parseInt(ya.getAttribute("height"));X=null!=X?X:1;null!=A&&(X=R?Math.min(1,Math.min(3*A/(4*Ga),A/Ba)):A/Ba);X=this.getMaxCanvasScale(Ba,Ga,X);Ba=Math.ceil(X*Ba);Ga=Math.ceil(X*Ga);Ia.setAttribute("width",Ba);Ia.setAttribute("height",Ga);var na=Ia.getContext("2d");null!=Da&&(na.beginPath(),na.rect(0,0,Ba,Ga),na.fillStyle=Da,na.fill());1!=X&&na.scale(X,X);if(ia){var Ea=ba.view,wa=Ea.scale;Ea.scale=1;var La=btoa(unescape(encodeURIComponent(Ea.createSvgGrid(Ea.gridColor))));
-Ea.scale=wa;La="data:image/svg+xml;base64,"+La;var ka=ba.gridSize*Ea.gridSteps*X,ua=ba.getGraphBounds(),sa=Ea.translate.x*wa,va=Ea.translate.y*wa,ca=sa+(ua.x-sa)/wa-ha,ea=va+(ua.y-va)/wa-ha,da=new Image;da.onload=function(){try{for(var fa=-Math.round(ka-mxUtils.mod((sa-ca)*X,ka)),ja=-Math.round(ka-mxUtils.mod((va-ea)*X,ka));fa<Ba;fa+=ka)for(var ra=ja;ra<Ga;ra+=ka)na.drawImage(da,fa/X,ra/X);Fa()}catch(oa){null!=O&&O(oa)}};da.onerror=function(fa){null!=O&&O(fa)};da.src=La}else Fa()}catch(fa){null!=
-O&&O(fa)}});Pa.onerror=function(Fa){null!=O&&O(Fa)};Y&&this.graph.addSvgShadow(ya);this.graph.mathEnabled&&this.addMathCss(ya);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ya,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(ya))}catch(Fa){null!=O&&O(Fa)}});this.embedExtFonts(mxUtils.bind(this,function(Fa){try{null!=Fa&&this.addFontCss(ya,Fa),this.loadFonts(za)}catch(Ia){null!=O&&O(Ia)}}))}catch(Fa){null!=O&&O(Fa)}}),M,Z)}catch(ya){null!=O&&
-O(ya)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var v=u,B=0;8>B;B++)v=1==(v&1)?3988292384^v>>>1:v>>>1,Editor.crcTable[u]=v;Editor.updateCRC=function(l,A,M,Q){for(var O=0;O<Q;O++)l=Editor.crcTable[(l^A.charCodeAt(M+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var A=-1,M=0;M<l.length;M++)A=A>>>8^Editor.crcTable[(A^l.charCodeAt(M))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(l,A,M,Q,O){function R(Z,ba){var ha=aa;aa+=ba;return Z.substring(ha,aa)}function S(Z){Z=R(Z,4);return Z.charCodeAt(3)+
-(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var aa=0;if(R(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(l,4),"IHDR"!=R(l,4))null!=O&&O();else{R(l,17);O=l.substring(0,aa);do{var Y=S(l);if("IDAT"==R(l,4)){O=l.substring(0,aa-8);"pHYs"==A&&"dpi"==M?(M=Math.round(Q/.0254),M=X(M)+X(M)+String.fromCharCode(1)):
-M=M+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,A,0,4);Q=Editor.updateCRC(Q,M,0,M.length);O+=X(M.length)+A+M+X(Q^4294967295);O+=l.substring(aa-8,l.length);break}O+=l.substring(aa-8,aa-4+Y);R(l,Y);R(l,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var E=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(l,A){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var L=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,A){var M=null;null!=l.editor.graph.getModel().getParent(A)?M=A.getId():null!=l.currentPage&&(M=l.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var c=
-Format.prototype.init;Format.prototype.init=function(){c.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var d=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?d.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var l=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=l&&l.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(l){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(l){l=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var A=this.editorUi,M=A.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var R=new ChangePageSetup(A);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;M.model.execute(R)},{install:function(O){this.listener=function(){O(M.shadowVisible)};
-A.addListener("shadowVisibleChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));l.appendChild(Q)}return l};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=q.apply(this,arguments);var A=this.editorUi,M=A.editor.graph;if(M.isEnabled()){var Q=A.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(S){A.editor.setAutosave(S);A.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(S){this.listener=function(){S(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}});l.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return M.mathEnabled},function(S){A.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(M.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});O.style.paddingTop="5px";l.appendChild(O);var R=A.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(B=parseFloat(l.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.gridSteps&&(B=parseInt(l.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=l.pageFormat&&(B=parseInt(l.pageFormat.width),L=parseInt(l.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(L)&&0<L?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,L),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+l.emptyLibraryXml);l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=l.sidebarTitles);l.sidebarTitleSize&&(B=parseInt(l.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=l.autosaveDelay&&(B=parseInt(l.autosaveDelay),!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors)}};
+Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(l));B.parentNode.insertBefore(L,B);l=l.split("url(");for(L=1;L<l.length;L++){var P=l[L].indexOf(")");P=Editor.trimCssUrl(l[L].substring(0,P));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",P);
+O.setAttribute("as","font");O.setAttribute("crossorigin","");B.parentNode.insertBefore(O,B)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var B=[],L=0;L<l;L++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
+Editor.GUID_ALPHABET.length)));return B.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var B=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[l],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==l.nodeName){B=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=L&&(P=new mxCodec(L.ownerDocument),P.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=L){var P=new mxCodec(L.ownerDocument);P.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");B=l.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==l.getAttribute("shadow"),!1);if(B=l.getAttribute("extFonts"))try{for(B=B.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),L=0;L<B.length;L++)this.graph.addExtFont(B[L].name,B[L].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
+};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(l,B){l=null!=l?l:!0;var L=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var P=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=P&&L.setAttribute("backgroundImage",JSON.stringify(P));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(P=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),L.setAttribute("extFonts",P.join("|")));return L};Editor.prototype.isDataSvg=function(l){try{var B=mxUtils.parseXml(l).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var L=mxUtils.parseXml(B).documentElement;return"mxfile"==
+L.nodeName||"mxGraphModel"==L.nodeName}}catch(P){}return!1};Editor.prototype.extractGraphModel=function(l,B,L){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var d=
+Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
+Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=B?B:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
+Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+O);this.graph.addListener(mxEvent.REFRESH,O)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",l);B[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var B="",L=[""],P=0,O=!0,R;l=$jscomp.makeIterator(l);for(R=l.next();!R.done;R=l.next())R=R.value,'"'===R?(O&&R===B&&(L[P]+=R),O=!O):","===R&&O?R=L[++P]="":L[P]+=R,B=R;return L}return[]};Editor.prototype.getProxiedUrl=
+function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(l)){var B=/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l);B=/\.png$/i.test(l)||/\.pdf$/i.test(l)||B;var L="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+L+(B?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==
+window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var B=l.convert,L=this;l.convert=function(P){if(null!=
+P){var O="http://"==P.substring(0,7)||"https://"==P.substring(0,8);O&&!navigator.onLine?P=Editor.svgBrokenImage.src:!O||P.substring(0,l.baseUrl.length)==l.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(P)?"chrome-extension://"==P.substring(0,19)||mxClient.IS_CHROMEAPP||(P=B.apply(this,arguments)):P=PROXY_URL+"?url="+encodeURIComponent(P)}return P};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=
+function(l,B){try{var L=!0,P=window.setTimeout(mxUtils.bind(this,function(){L=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(l))mxUtils.get(l,mxUtils.bind(this,function(R){window.clearTimeout(P);L&&B(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(P);L&&B(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(P);if(L)try{var R=document.createElement("canvas"),S=R.getContext("2d");
+R.height=O.height;R.width=O.width;S.drawImage(O,0,0);B(R.toDataURL())}catch(W){B(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(P);L&&B(Editor.svgBrokenImage.src)};O.src=l}}catch(R){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(l,B,L,P){null==P&&(P=this.createImageUrlConverter());var O=0,R=L||{};L=mxUtils.bind(this,function(S,W){S=l.getElementsByTagName(S);for(var aa=0;aa<S.length;aa++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=P.convert(Y.getAttribute(W));
+if(null!=Z&&"data:"!=Z.substring(0,5)){var ba=R[Z];null==ba?(O++,this.convertImageToDataUri(Z,function(fa){null!=fa&&(R[Z]=fa,Y.setAttribute(W,fa));O--;0==O&&B(l)})):Y.setAttribute(W,ba)}else null!=Z&&Y.setAttribute(W,Z)}}catch(fa){}})(S[aa])});L("image","xlink:href");L("img","src");0==O&&B(l)};Editor.base64Encode=function(l){for(var B="",L=0,P=l.length,O,R,S;L<P;){O=l.charCodeAt(L++)&255;if(L==P){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);B+="==";break}R=l.charCodeAt(L++);if(L==P){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);B+="=";break}S=l.charCodeAt(L++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(R&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return B};Editor.prototype.loadUrl=function(l,B,L,P,O,R,S,W){try{var aa=!S&&(P||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));O=null!=O?O:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
+299>=Z.getStatus()){if(null!=B){var ba=Z.getText();if(aa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();ba=Array(Z.length);for(var fa=0;fa<Z.length;fa++)ba[fa]=String.fromCharCode(Z[fa]);ba=ba.join("")}R=null!=R?R:"data:image/png;base64,";ba=R+Editor.base64Encode(ba)}B(ba)}}else null!=L&&(0==Z.getStatus()?L({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?L({code:Z.getStatus()},
+Z):L({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=L&&L({message:mxResources.get("error")+" "+Z.getStatus()})},aa,this.timeout,function(){O&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:Y})},W)});Y()}catch(Z){null!=L&&L(Z)}};Editor.prototype.absoluteCssFonts=function(l){var B=null;if(null!=l){var L=l.split("url(");if(0<L.length){B=[L[0]];l=window.location.pathname;var P=null!=l?l.lastIndexOf("/"):-1;0<=P&&(l=l.substring(0,P+1));P=document.getElementsByTagName("base");var O=
+null;null!=P&&0<P.length&&(O=P[0].getAttribute("href"));for(var R=1;R<L.length;R++)if(P=L[R].indexOf(")"),0<P){var S=Editor.trimCssUrl(L[R].substring(0,P));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":l)+S);B.push('url("'+S+'"'+L[R].substring(P))}else B.push(L[R])}else B=[l]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(l,B,L){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+
+encodeURIComponent(B));L(l,B)};Editor.prototype.embedCssFonts=function(l,B){var L=l.split("url("),P=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==P){for(var aa=[L[0]],Y=1;Y<L.length;Y++){var Z=L[Y].indexOf(")");aa.push('url("');aa.push(this.cachedFonts[Editor.trimCssUrl(L[Y].substring(0,Z))]);aa.push('"'+L[Y].substring(Z))}B(aa.join(""))}});if(0<L.length){for(l=1;l<L.length;l++){var R=L[l].indexOf(")"),S=null,W=L[l].indexOf("format(",R);0<W&&(S=Editor.trimCssUrl(L[l].substring(W+
+7,L[l].indexOf(")",W))));mxUtils.bind(this,function(aa){if(null==this.cachedFonts[aa]){this.cachedFonts[aa]=aa;P++;var Y="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(aa))Y="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(aa))Y="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(aa))Y="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(aa))Y="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(aa))Y="application/vnd.ms-fontobject";
+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(aa))Y="application/font-sfnt";this.mapFontUrl(Y,aa,mxUtils.bind(this,function(Z,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[aa]=fa;P--;O()}),mxUtils.bind(this,function(fa){P--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[l].substring(0,R)),S)}O()}else B(l)};Editor.prototype.loadFonts=function(l){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=
+B;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(l[B]=Graph.fontMapping[B]);return l};Editor.prototype.embedExtFonts=function(l){var B=this.graph.getCustomFonts();if(0<B.length){var L=[],P=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==P&&this.embedCssFonts(L.join(""),l)}),R=0;R<B.length;R++)mxUtils.bind(this,function(S,W){Graph.isCssFontUrl(W)?
+null==this.cachedGoogleFonts[W]?(P++,this.loadUrl(W,mxUtils.bind(this,function(aa){this.cachedGoogleFonts[W]=aa;L.push(aa+"\n");P--;O()}),mxUtils.bind(this,function(aa){P--;L.push("@import url("+W+");\n");O()}))):L.push(this.cachedGoogleFonts[W]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+W+'")}\n')})(B[R].name,B[R].url);O()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var B=document.getElementsByTagName("style"),L=0;L<
+B.length;L++){var P=mxUtils.getTextContent(B[L]);0>P.indexOf("mxPageSelector")&&0<P.indexOf("MathJax")&&l[0].appendChild(B[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var L=l.getElementsByTagName("defs"),P=l.ownerDocument;0==L.length?(L=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=l.firstChild?l.insertBefore(L,l.firstChild):l.appendChild(L)):L=L[0];l=null!=P.createElementNS?
+P.createElementNS(mxConstants.NS_SVG,"style"):P.createElement("style");l.setAttribute("type","text/css");mxUtils.setTextContent(l,B);L.appendChild(l)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,B,L){var P=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(P/l,P/B))};Editor.prototype.exportToCanvas=function(l,B,L,P,O,R,S,W,aa,Y,Z,ba,fa,ja,ha,ra,ma,Ga){try{R=null!=R?R:!0;S=null!=S?S:!0;ba=null!=
+ba?ba:this.graph;fa=null!=fa?fa:0;var Ea=aa?null:ba.background;Ea==mxConstants.NONE&&(Ea=null);null==Ea&&(Ea=P);null==Ea&&0==aa&&(Ea=ra?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(ba.getSvg(null,null,fa,ja,null,S,null,null,null,Y,null,ra,ma,Ga),mxUtils.bind(this,function(za){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){xa.drawImage(Pa,0,0);l(qa,za)},0):(xa.drawImage(Pa,0,0),l(qa,za))},qa=document.createElement("canvas"),
+Ba=parseInt(za.getAttribute("width")),Ra=parseInt(za.getAttribute("height"));W=null!=W?W:1;null!=B&&(W=R?Math.min(1,Math.min(3*B/(4*Ra),B/Ba)):B/Ba);W=this.getMaxCanvasScale(Ba,Ra,W);Ba=Math.ceil(W*Ba);Ra=Math.ceil(W*Ra);qa.setAttribute("width",Ba);qa.setAttribute("height",Ra);var xa=qa.getContext("2d");null!=Ea&&(xa.beginPath(),xa.rect(0,0,Ba,Ra),xa.fillStyle=Ea,xa.fill());1!=W&&xa.scale(W,W);if(ha){var Da=ba.view,va=Da.scale;Da.scale=1;var Ka=btoa(unescape(encodeURIComponent(Da.createSvgGrid(Da.gridColor))));
+Da.scale=va;Ka="data:image/svg+xml;base64,"+Ka;var la=ba.gridSize*Da.gridSteps*W,da=ba.getGraphBounds(),ca=Da.translate.x*va,na=Da.translate.y*va,ka=ca+(da.x-ca)/va-fa,pa=na+(da.y-na)/va-fa,ea=new Image;ea.onload=function(){try{for(var ia=-Math.round(la-mxUtils.mod((ca-ka)*W,la)),oa=-Math.round(la-mxUtils.mod((na-pa)*W,la));ia<Ba;ia+=la)for(var ua=oa;ua<Ra;ua+=la)xa.drawImage(ea,ia/W,ua/W);Fa()}catch(wa){null!=O&&O(wa)}};ea.onerror=function(ia){null!=O&&O(ia)};ea.src=Ka}else Fa()}catch(ia){null!=
+O&&O(ia)}});Pa.onerror=function(Fa){null!=O&&O(Fa)};Y&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(za,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Fa){null!=O&&O(Fa)}});this.embedExtFonts(mxUtils.bind(this,function(Fa){try{null!=Fa&&this.addFontCss(za,Fa),this.loadFonts(Aa)}catch(qa){null!=O&&O(qa)}}))}catch(Fa){null!=O&&O(Fa)}}),L,Z)}catch(za){null!=O&&
+O(za)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var u=t,C=0;8>C;C++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(l,B,L,P){for(var O=0;O<P;O++)l=Editor.crcTable[(l^B.charCodeAt(L+O))&255]^l>>>8;return l};Editor.crc32=function(l){for(var B=-1,L=0;L<l.length;L++)B=B>>>8^Editor.crcTable[(B^l.charCodeAt(L))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(l,B,L,P,O){function R(Z,ba){var fa=aa;aa+=ba;return Z.substring(fa,aa)}function S(Z){Z=R(Z,4);return Z.charCodeAt(3)+
+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function W(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var aa=0;if(R(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(l,4),"IHDR"!=R(l,4))null!=O&&O();else{R(l,17);O=l.substring(0,aa);do{var Y=S(l);if("IDAT"==R(l,4)){O=l.substring(0,aa-8);"pHYs"==B&&"dpi"==L?(L=Math.round(P/.0254),L=W(L)+W(L)+String.fromCharCode(1)):
+L=L+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+P;P=4294967295;P=Editor.updateCRC(P,B,0,4);P=Editor.updateCRC(P,L,0,L.length);O+=W(L.length)+B+L+W(P^4294967295);O+=l.substring(aa-8,l.length);break}O+=l.substring(aa-8,aa-4+Y);R(l,Y);R(l,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
+function(l,B){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,B){var L=null;null!=l.editor.graph.getModel().getParent(B)?L=B.getId():null!=l.currentPage&&(L=l.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var c=
+Format.prototype.init;Format.prototype.init=function(){c.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var e=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?e.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var l=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=l&&l.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
+function(l){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(l){l=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var B=this.editorUi,L=B.editor.graph,P=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(O){var R=new ChangePageSetup(B);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;L.model.execute(R)},{install:function(O){this.listener=function(){O(L.shadowVisible)};
+B.addListener("shadowVisibleChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});Editor.enableShadowOption||(P.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(P,60));l.appendChild(P)}return l};var m=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=m.apply(this,arguments);var B=this.editorUi,L=B.editor.graph;if(L.isEnabled()){var P=B.getCurrentFile();if(null!=P&&P.isAutosaveOptional()){var O=
+this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(S){B.editor.setAutosave(S);B.editor.autosave&&P.isModified()&&P.fileChanged()},{install:function(S){this.listener=function(){S(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}});l.appendChild(O)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return L.mathEnabled},function(S){B.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});O.style.paddingTop="5px";l.appendChild(O);var R=B.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return l};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{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",
@@ -11310,92 +11312,92 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(l,A,M){if(null!=A){var Q=function(R){if(null!=R)if(M)for(var S=0;S<R.length;S++)A[R[S].name]=R[S];else for(var X in A){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==A[X].type){aa=!0;break}aa||delete A[X]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),Q(O.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{Q(JSON.parse(l))}catch(R){}}};var m=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));m.apply(this,arguments);if(Editor.enableCustomProperties){for(var A=
-{},M=l.vertices,Q=l.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],A,0==O);for(O=0;O<Q.length;O++)this.findCommonProperties(Q[O],A,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,l))}};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return n.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(l,A,M){function Q(na,Ea,wa,La){ba.getModel().beginUpdate();try{var ka=[],ua=[];if(null!=wa.index){for(var sa=[],va=wa.parentRow.nextSibling;va&&va.getAttribute("data-pName")==na;)sa.push(va.getAttribute("data-pValue")),va=va.nextSibling;wa.index<sa.length?null!=La?sa.splice(La,1):sa[wa.index]=Ea:sa.push(Ea);null!=wa.size&&sa.length>wa.size&&(sa=sa.slice(0,wa.size));Ea=sa.join(",");null!=wa.countProperty&&(ba.setCellStyles(wa.countProperty,sa.length,
-ba.getSelectionCells()),ka.push(wa.countProperty),ua.push(sa.length))}ba.setCellStyles(na,Ea,ba.getSelectionCells());ka.push(na);ua.push(Ea);if(null!=wa.dependentProps)for(na=0;na<wa.dependentProps.length;na++){var ca=wa.dependentPropsDefVal[na],ea=wa.dependentPropsVals[na];if(ea.length>Ea)ea=ea.slice(0,Ea);else for(var da=ea.length;da<Ea;da++)ea.push(ca);ea=ea.join(",");ba.setCellStyles(wa.dependentProps[na],ea,ba.getSelectionCells());ka.push(wa.dependentProps[na]);ua.push(ea)}if("function"==typeof wa.onChange)wa.onChange(ba,
-Ea);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ua,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(na,Ea,wa){var La=mxUtils.getOffset(l,!0),ka=mxUtils.getOffset(na,!0);Ea.style.position="absolute";Ea.style.left=ka.x-La.x+"px";Ea.style.top=ka.y-La.y+"px";Ea.style.width=na.offsetWidth+"px";Ea.style.height=na.offsetHeight-(wa?4:0)+"px";Ea.style.zIndex=5}function R(na,Ea,wa){var La=document.createElement("div");La.style.width="32px";La.style.height=
-"4px";La.style.margin="2px";La.style.border="1px solid black";La.style.background=Ea&&"none"!=Ea?Ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ka){this.editorUi.pickColor(Ea,function(ua){La.style.background="none"==ua?"url('"+Dialog.prototype.noColorImage+"')":ua;Q(na,ua,wa)});mxEvent.consume(ka)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(La);return btn}function S(na,Ea,wa,La,ka,ua,sa){null!=Ea&&(Ea=Ea.split(","),
-ha.push({name:na,values:Ea,type:wa,defVal:La,countProperty:ka,parentRow:ua,isDeletable:!0,flipBkg:sa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(va){for(var ca=ua,ea=0;null!=ca.nextSibling;)if(ca.nextSibling.getAttribute("data-pName")==na)ca=ca.nextSibling,ea++;else break;var da={type:wa,parentRow:ua,index:ea,isDeletable:!0,defVal:La,countProperty:ka};ea=Y(na,"",da,0==ea%2,sa);Q(na,La,da);ca.parentNode.insertBefore(ea,ca.nextSibling);mxEvent.consume(va)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function X(na,Ea,wa,La,ka,ua,sa){if(0<ka){var va=Array(ka);Ea=null!=Ea?Ea.split(","):[];for(var ca=0;ca<ka;ca++)va[ca]=null!=Ea[ca]?Ea[ca]:null!=La?La:"";ha.push({name:na,values:va,type:wa,defVal:La,parentRow:ua,flipBkg:sa,size:ka})}return document.createElement("div")}function aa(na,Ea,wa){var La=document.createElement("input");La.type="checkbox";La.checked="1"==Ea;mxEvent.addListener(La,"change",function(){Q(na,La.checked?"1":"0",wa)});return La}function Y(na,
-Ea,wa,La,ka){var ua=wa.dispName,sa=wa.type,va=document.createElement("tr");va.className="gePropRow"+(ka?"Dark":"")+(La?"Alt":"")+" gePropNonHeaderRow";va.setAttribute("data-pName",na);va.setAttribute("data-pValue",Ea);La=!1;null!=wa.index&&(va.setAttribute("data-index",wa.index),ua=(null!=ua?ua:"")+"["+wa.index+"]",La=!0);var ca=document.createElement("td");ca.className="gePropRowCell";ua=mxResources.get(ua,null,ua);mxUtils.write(ca,ua);ca.setAttribute("title",ua);La&&(ca.style.textAlign="right");
-va.appendChild(ca);ca=document.createElement("td");ca.className="gePropRowCell";if("color"==sa)ca.appendChild(R(na,Ea,wa));else if("bool"==sa||"boolean"==sa)ca.appendChild(aa(na,Ea,wa));else if("enum"==sa){var ea=wa.enumList;for(ka=0;ka<ea.length;ka++)if(ua=ea[ka],ua.val==Ea){mxUtils.write(ca,mxResources.get(ua.dispName,null,ua.dispName));break}mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){var da=document.createElement("select");O(ca,da);for(var fa=0;fa<ea.length;fa++){var ja=ea[fa],ra=
-document.createElement("option");ra.value=mxUtils.htmlEntities(ja.val);mxUtils.write(ra,mxResources.get(ja.dispName,null,ja.dispName));da.appendChild(ra)}da.value=Ea;l.appendChild(da);mxEvent.addListener(da,"change",function(){var oa=mxUtils.htmlEntities(da.value);Q(na,oa,wa)});da.focus();mxEvent.addListener(da,"blur",function(){l.removeChild(da)})}))}else"dynamicArr"==sa?ca.appendChild(S(na,Ea,wa.subType,wa.subDefVal,wa.countProperty,va,ka)):"staticArr"==sa?ca.appendChild(X(na,Ea,wa.subType,wa.subDefVal,
-wa.size,va,ka)):"readOnly"==sa?(ka=document.createElement("input"),ka.setAttribute("readonly",""),ka.value=Ea,ka.style.width="96px",ka.style.borderWidth="0px",ca.appendChild(ka)):(ca.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Ea)),mxEvent.addListener(ca,"click",mxUtils.bind(Z,function(){function da(){var ja=fa.value;ja=0==ja.length&&"string"!=sa?0:ja;wa.allowAuto&&(null!=ja.trim&&"auto"==ja.trim().toLowerCase()?(ja="auto",sa="string"):(ja=parseFloat(ja),ja=isNaN(ja)?0:ja));null!=wa.min&&ja<
-wa.min?ja=wa.min:null!=wa.max&&ja>wa.max&&(ja=wa.max);ja=encodeURIComponent(("int"==sa?parseInt(ja):ja)+"");Q(na,ja,wa)}var fa=document.createElement("input");O(ca,fa,!0);fa.value=decodeURIComponent(Ea);fa.className="gePropEditor";"int"!=sa&&"float"!=sa||wa.allowAuto||(fa.type="number",fa.step="int"==sa?"1":"any",null!=wa.min&&(fa.min=parseFloat(wa.min)),null!=wa.max&&(fa.max=parseFloat(wa.max)));l.appendChild(fa);mxEvent.addListener(fa,"keypress",function(ja){13==ja.keyCode&&da()});fa.focus();mxEvent.addListener(fa,
-"blur",function(){da()})})));wa.isDeletable&&(ka=mxUtils.button("-",mxUtils.bind(Z,function(da){Q(na,"",wa,wa.index);mxEvent.consume(da)})),ka.style.height="16px",ka.style.width="25px",ka.style.float="right",ka.className="geColorBtn",ca.appendChild(ka));va.appendChild(ca);return va}var Z=this,ba=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var ma=document.createElement("table");ma.className="geProperties";ma.style.whiteSpace="nowrap";ma.style.width="100%";var ia=
-document.createElement("tr");ia.className="gePropHeader";var qa=document.createElement("th");qa.className="gePropHeaderCell";var la=document.createElement("img");la.src=Sidebar.prototype.expandedImage;la.style.verticalAlign="middle";qa.appendChild(la);mxUtils.write(qa,mxResources.get("property"));ia.style.cursor="pointer";var Ca=function(){var na=ma.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){la.src=Sidebar.prototype.collapsedImage;var Ea="none";for(var wa=l.childNodes.length-
-1;0<=wa;wa--)try{var La=l.childNodes[wa],ka=La.nodeName.toUpperCase();"INPUT"!=ka&&"SELECT"!=ka||l.removeChild(La)}catch(ua){}}else la.src=Sidebar.prototype.expandedImage,Ea="";for(wa=0;wa<na.length;wa++)na[wa].style.display=Ea};mxEvent.addListener(ia,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});ia.appendChild(qa);qa=document.createElement("th");qa.className="gePropHeaderCell";qa.innerHTML=mxResources.get("value");ia.appendChild(qa);ma.appendChild(ia);var Da=
-!1,ya=!1;ia=null;1==M.vertices.length&&0==M.edges.length?ia=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ia=M.edges[0].id);null!=ia&&ma.appendChild(Y("id",mxUtils.htmlEntities(ia),{dispName:"ID",type:"readOnly"},!0,!1));for(var Pa in A)if(ia=A[Pa],"function"!=typeof ia.isVisible||ia.isVisible(M,this)){var za=null!=M.style[Pa]?mxUtils.htmlEntities(M.style[Pa]+""):null!=ia.getDefaultValue?ia.getDefaultValue(M,this):ia.defVal;if("separator"==ia.type)ya=!ya;else{if("staticArr"==ia.type)ia.size=
-parseInt(M.style[ia.sizeProperty]||A[ia.sizeProperty].defVal)||0;else if(null!=ia.dependentProps){var Fa=ia.dependentProps,Ia=[],Ba=[];for(qa=0;qa<Fa.length;qa++){var Ga=M.style[Fa[qa]];Ba.push(A[Fa[qa]].subDefVal);Ia.push(null!=Ga?Ga.split(","):[])}ia.dependentPropsDefVal=Ba;ia.dependentPropsVals=Ia}ma.appendChild(Y(Pa,za,ia,Da,ya));Da=!Da}}for(qa=0;qa<ha.length;qa++)for(ia=ha[qa],A=ia.parentRow,M=0;M<ia.values.length;M++)Pa=Y(ia.name,ia.values[M],{type:ia.type,parentRow:ia.parentRow,isDeletable:ia.isDeletable,
-index:M,defVal:ia.defVal,countProperty:ia.countProperty,size:ia.size},0==M%2,ia.flipBkg),A.parentNode.insertBefore(Pa,A.nextSibling),A=Pa;l.appendChild(ma);Ca();return l};StyleFormatPanel.prototype.addStyles=function(l){function A(ia){mxEvent.addListener(ia,"mouseenter",function(){ia.style.opacity="1"});mxEvent.addListener(ia,"mouseleave",function(){ia.style.opacity="0.5"})}var M=this.editorUi,Q=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
-O.style.paddingRight="20px";l.style.paddingLeft="16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(O);var R="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
-document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ia){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ia)}))})(aa);X.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ia){null!=X[ia]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ia,ba(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ia){var qa=mxUtils.bind(this,function(Ca){var Da=mxUtils.button("",mxUtils.bind(this,function(za){Q.getModel().beginUpdate();try{for(var Fa=M.getSelectionState().cells,Ia=0;Ia<Fa.length;Ia++){for(var Ba=Q.getModel().getStyle(Fa[Ia]),Ga=0;Ga<R.length;Ga++)Ba=mxUtils.removeStylename(Ba,
-R[Ga]);var na=Q.getModel().isVertex(Fa[Ia])?Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=Ca?(mxEvent.isShiftDown(za)||(Ba=""==Ca.fill?mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,Ca.fill||mxUtils.getValue(na,mxConstants.STYLE_FILLCOLOR,null)),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,Ca.gradient||mxUtils.getValue(na,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(za)||mxClient.IS_MAC&&mxEvent.isMetaDown(za)||!Q.getModel().isVertex(Fa[Ia])||
-(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,Ca.font||mxUtils.getValue(na,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(za)||(Ba=""==Ca.stroke?mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,Ca.stroke||mxUtils.getValue(na,mxConstants.STYLE_STROKECOLOR,null)))):(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(na,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(na,
-mxConstants.STYLE_STROKECOLOR,"#000000")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(na,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(Fa[Ia])&&(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(na,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(Fa[Ia],Ba)}}finally{Q.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px";
-if(null!=Ca){var ya="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ca.border&&(ya=Ca.border);null!=Ca.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ca.fill+"', EndColorStr='"+Ca.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+Ca.fill+" 0px,"+Ca.gradient+" 100%)":Ca.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+"')":Da.style.backgroundColor=""==Ca.fill?
-mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ca.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=Ca.stroke==mxConstants.NONE?ya+" transparent":""==Ca.stroke?ya+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):ya+" "+(Ca.stroke||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ca.title&&Da.setAttribute("title",Ca.title)}else{ya=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Pa=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=ya;Da.style.border="1px solid "+Pa}Da.style.borderRadius="0";O.appendChild(Da)});O.innerText="";for(var la=0;la<ia.length;la++)0<la&&0==mxUtils.mod(la,4)&&mxUtils.br(O),qa(ia[la])});null==this.format.currentScheme?
-Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ma=document.createElement("div");ma.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(l.appendChild(ha),l.appendChild(ma));mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(ha);A(ma);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(S);return l};StyleFormatPanel.prototype.addEditOps=function(l){var A=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,Q=null;1==A.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",l.appendChild(Q));M=1==A.cells.length?M.view.getState(A.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(A=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),A.setAttribute("title",
-mxResources.get("editShape")),A.style.marginBottom="2px",null==Q?A.style.width="210px":(Q.style.width="104px",A.style.width="104px",A.style.marginLeft="2px"),l.appendChild(A)):A.image&&0<A.cells.length&&(A=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),A.setAttribute("title",mxResources.get("editImage")),A.style.marginBottom="2px",null==Q?A.style.width="210px":(Q.style.width="104px",A.style.width="104px",A.style.marginLeft="2px"),
-l.appendChild(A));return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.createFontElement=function(l,
-A){var M=Graph.fontMapping[A];null==M&&Graph.isCssFontUrl(A)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",A)):(null==M&&(M='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+A+'");\n}'),l=document.createElement("style"),mxUtils.write(l,M));return l};Graph.addFont=function(l,A,M){if(null!=l&&0<l.length&&null!=A&&0<A.length){var Q=l.toLowerCase();if("helvetica"!=Q&&"arial"!=l&&"sans-serif"!=
-Q){var O=Graph.customFontElements[Q];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:l,url:A,elt:Graph.createFontElement(l,O)},Graph.customFontElements[Q]=O,Graph.recentCustomFonts[Q]=O,A=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=A&&A.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
-return l};Graph.getFontUrl=function(l,A){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(A=l.url);return A};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var A=0;A<l.length;A++){var M=l[A].getAttribute("data-font-src");if(null!=M){var Q="FONT"==l[A].nodeName?l[A].getAttribute("face"):l[A].style.fontFamily;null!=Q&&Graph.addFont(Q,M)}}};Graph.processFontStyle=function(l){if(null!=l){var A=mxUtils.getValue(l,"fontSource",null);if(null!=A){var M=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,
-null);null!=M&&Graph.addFont(M,decodeURIComponent(A))}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function l(O){A=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=A};var M=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):M.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom=
-R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var C=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,A){return Graph.processFontStyle(C.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,A,M,Q,O,R,S,X,aa,Y,Z){x.apply(this,arguments);Graph.processFontAttributes(Z)};
-var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,A,M){function Q(){for(var ia=S.getSelectionCells(),qa=[],la=0;la<ia.length;la++)S.isCellVisible(ia[la])&&qa.push(ia[la]);S.setSelectionCells(qa)}function O(ia){S.setHiddenTags(ia?[]:X.slice());Q();S.refresh()}function R(ia,qa){Y.innerText="";if(0<ia.length){var la=document.createElement("table");
-la.setAttribute("cellpadding","2");la.style.boxSizing="border-box";la.style.tableLayout="fixed";la.style.width="100%";var Ca=document.createElement("tbody");if(null!=ia&&0<ia.length)for(var Da=0;Da<ia.length;Da++)(function(ya){var Pa=0>mxUtils.indexOf(S.hiddenTags,ya),za=document.createElement("tr"),Fa=document.createElement("td");Fa.style.align="center";Fa.style.width="16px";var Ia=document.createElement("img");Ia.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);Ia.setAttribute("title",
-mxResources.get(Pa?"hideIt":"show",[ya]));mxUtils.setOpacity(Ia,Pa?75:25);Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";Fa.appendChild(Ia);mxEvent.addListener(Ia,"click",function(Ga){mxEvent.isShiftDown(Ga)?O(0<=mxUtils.indexOf(S.hiddenTags,ya)):(S.toggleHiddenTag(ya),Q(),S.refresh());mxEvent.consume(Ga)});za.appendChild(Fa);Fa=document.createElement("td");Fa.style.overflow="hidden";Fa.style.whiteSpace="nowrap";
-Fa.style.textOverflow="ellipsis";Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.setAttribute("title",ya);a=document.createElement("a");mxUtils.write(a,ya);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Fa.appendChild(a);mxEvent.addListener(Fa,"click",function(Ga){if(mxEvent.isShiftDown(Ga)){O(!0);var na=S.getCellsForTags([ya],null,null,!0);S.isEnabled()?S.setSelectionCells(na):S.highlightCells(na)}else if(Pa&&0<S.hiddenTags.length)O(!0);else{na=
-X.slice();var Ea=mxUtils.indexOf(na,ya);na.splice(Ea,1);S.setHiddenTags(na);Q();S.refresh()}mxEvent.consume(Ga)});za.appendChild(Fa);if(S.isEnabled()){Fa=document.createElement("td");Fa.style.verticalAlign="middle";Fa.style.textAlign="center";Fa.style.width="18px";if(null==qa){Fa.style.align="center";Fa.style.width="16px";Ia=document.createElement("img");Ia.setAttribute("src",Editor.crossImage);Ia.setAttribute("title",mxResources.get("removeIt",[ya]));mxUtils.setOpacity(Ia,Pa?75:25);Ia.style.verticalAlign=
-"middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(A||Editor.isDarkMode())Ia.style.filter="invert(100%)";mxEvent.addListener(Ia,"click",function(Ga){var na=mxUtils.indexOf(X,ya);0<=na&&X.splice(na,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[ya]);S.refresh();mxEvent.consume(Ga)});Fa.appendChild(Ia)}else{var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.margin="0px";Ba.defaultChecked=null!=qa&&0<=mxUtils.indexOf(qa,ya);Ba.checked=Ba.defaultChecked;
-Ba.style.background="transparent";Ba.setAttribute("title",mxResources.get(Ba.defaultChecked?"removeIt":"add",[ya]));mxEvent.addListener(Ba,"change",function(Ga){Ba.checked?S.addTagsForCells(S.getSelectionCells(),[ya]):S.removeTagsForCells(S.getSelectionCells(),[ya]);mxEvent.consume(Ga)});Fa.appendChild(Ba)}za.appendChild(Fa)}Ca.appendChild(za)})(ia[Da]);la.appendChild(Ca);Y.appendChild(la)}}var S=this,X=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow=
-"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ia){S.setHiddenTags([]);mxEvent.isShiftDown(ia)||
-(X=S.hiddenTags.slice());Q();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(X,function(ia){X=ia;ha()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var ha=mxUtils.bind(this,function(ia,qa){if(l()){ia=S.getAllTags();for(qa=0;qa<ia.length;qa++)0>mxUtils.indexOf(X,
-ia[qa])&&X.push(ia[qa]);X.sort();S.isSelectionEmpty()?R(X):R(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ha);S.model.addListener(mxEvent.CHANGE,ha);S.addListener(mxEvent.REFRESH,ha);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow="hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(Z),
-ma.appendChild(ba),aa.appendChild(ma));return{div:aa,refresh:ha}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var A in Graph.customFontElements){var M=Graph.customFontElements[A];l.push({name:M.name,url:M.url})}return l};Graph.prototype.setFont=function(l,A){Graph.addFont(l,A);document.execCommand("fontname",!1,l);if(null!=A){var M=this.cellEditor.textarea.getElementsByTagName("font");A=Graph.getFontUrl(l,A);for(var Q=0;Q<M.length;Q++)M[Q].getAttribute("face")==
-l&&M[Q].getAttribute("data-font-src")!=A&&M[Q].setAttribute("data-font-src",A)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var A in l)this.globalVars[A]=
-l[A]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[l]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var t=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,A,M,Q,O,R,S,X,aa,Y,Z,ba,ha,ma){var ia=null,qa=null,la=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ia=this.stylesheet,qa=this.shapeForegroundColor,la=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ca=t.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var ya=Ca.ownerDocument,Pa=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"):ya.createElement("style");null!=ya.setAttributeNS?Pa.setAttributeNS("type","text/css"):Pa.setAttribute("type","text/css");for(var za="",Fa="",Ia=0;Ia<Da.length;Ia++){var Ba=Da[Ia].name,Ga=Da[Ia].url;Graph.isCssFontUrl(Ga)?
-za+="@import url("+Ga+");\n":Fa+='@font-face {\nfont-family: "'+Ba+'";\nsrc: url("'+Ga+'");\n}\n'}Pa.appendChild(ya.createTextNode(za+Fa));Ca.getElementsByTagName("defs")[0].appendChild(Pa)}this.mathEnabled&&(document.body.appendChild(Ca),Editor.MathJaxRender(Ca),Ca.parentNode.removeChild(Ca));null!=ia&&(this.shapeBackgroundColor=la,this.shapeForegroundColor=qa,this.stylesheet=ia,this.refresh());return Ca};var p=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){p.apply(this,
-arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var K=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return K.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var A="1"==mxUtils.getValue(l.style,"enumerate",0);A&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):A||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);A=l.secondLabel;if(null!=A){var M=l.view.scale,Q=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*M,l.y+4*M,0,0):mxRectangle.fromPoint(l.view.getPoint(l));A.bounds.equals(l)&&A.value==Q&&A.scale==M||(A.bounds=l,A.value=Q,A.scale=
-M,A.redraw())}};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var l=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+function(l,B,L){if(null!=B){var P=function(R){if(null!=R)if(L)for(var S=0;S<R.length;S++)B[R[S].name]=R[S];else for(var W in B){var aa=!1;for(S=0;S<R.length;S++)if(R[S].name==W&&R[S].type==B[W].type){aa=!0;break}aa||delete B[W]}},O=this.editorUi.editor.graph.view.getState(l);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),P(O.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{P(JSON.parse(l))}catch(R){}}};var p=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));p.apply(this,arguments);if(Editor.enableCustomProperties){for(var B=
+{},L=l.vertices,P=l.edges,O=0;O<L.length;O++)this.findCommonProperties(L[O],B,0==O);for(O=0;O<P.length;O++)this.findCommonProperties(P[O],B,0==L.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(B).length&&this.container.appendChild(this.addProperties(this.createPanel(),B,l))}};var q=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){this.addActions(l,["copyStyle","pasteStyle"]);return q.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(l,B,L){function P(xa,Da,va,Ka){ba.getModel().beginUpdate();try{var la=[],da=[];if(null!=va.index){for(var ca=[],na=va.parentRow.nextSibling;na&&na.getAttribute("data-pName")==xa;)ca.push(na.getAttribute("data-pValue")),na=na.nextSibling;va.index<ca.length?null!=Ka?ca.splice(Ka,1):ca[va.index]=Da:ca.push(Da);null!=va.size&&ca.length>va.size&&(ca=ca.slice(0,va.size));Da=ca.join(",");null!=va.countProperty&&(ba.setCellStyles(va.countProperty,ca.length,
+ba.getSelectionCells()),la.push(va.countProperty),da.push(ca.length))}ba.setCellStyles(xa,Da,ba.getSelectionCells());la.push(xa);da.push(Da);if(null!=va.dependentProps)for(xa=0;xa<va.dependentProps.length;xa++){var ka=va.dependentPropsDefVal[xa],pa=va.dependentPropsVals[xa];if(pa.length>Da)pa=pa.slice(0,Da);else for(var ea=pa.length;ea<Da;ea++)pa.push(ka);pa=pa.join(",");ba.setCellStyles(va.dependentProps[xa],pa,ba.getSelectionCells());la.push(va.dependentProps[xa]);da.push(pa)}if("function"==typeof va.onChange)va.onChange(ba,
+Da);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",la,"values",da,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function O(xa,Da,va){var Ka=mxUtils.getOffset(l,!0),la=mxUtils.getOffset(xa,!0);Da.style.position="absolute";Da.style.left=la.x-Ka.x+"px";Da.style.top=la.y-Ka.y+"px";Da.style.width=xa.offsetWidth+"px";Da.style.height=xa.offsetHeight-(va?4:0)+"px";Da.style.zIndex=5}function R(xa,Da,va){var Ka=document.createElement("div");Ka.style.width="32px";Ka.style.height=
+"4px";Ka.style.margin="2px";Ka.style.border="1px solid black";Ka.style.background=Da&&"none"!=Da?Da:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(la){this.editorUi.pickColor(Da,function(da){Ka.style.background="none"==da?"url('"+Dialog.prototype.noColorImage+"')":da;P(xa,da,va)});mxEvent.consume(la)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ka);return btn}function S(xa,Da,va,Ka,la,da,ca){null!=Da&&(Da=Da.split(","),
+fa.push({name:xa,values:Da,type:va,defVal:Ka,countProperty:la,parentRow:da,isDeletable:!0,flipBkg:ca}));btn=mxUtils.button("+",mxUtils.bind(Z,function(na){for(var ka=da,pa=0;null!=ka.nextSibling;)if(ka.nextSibling.getAttribute("data-pName")==xa)ka=ka.nextSibling,pa++;else break;var ea={type:va,parentRow:da,index:pa,isDeletable:!0,defVal:Ka,countProperty:la};pa=Y(xa,"",ea,0==pa%2,ca);P(xa,Ka,ea);ka.parentNode.insertBefore(pa,ka.nextSibling);mxEvent.consume(na)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function W(xa,Da,va,Ka,la,da,ca){if(0<la){var na=Array(la);Da=null!=Da?Da.split(","):[];for(var ka=0;ka<la;ka++)na[ka]=null!=Da[ka]?Da[ka]:null!=Ka?Ka:"";fa.push({name:xa,values:na,type:va,defVal:Ka,parentRow:da,flipBkg:ca,size:la})}return document.createElement("div")}function aa(xa,Da,va){var Ka=document.createElement("input");Ka.type="checkbox";Ka.checked="1"==Da;mxEvent.addListener(Ka,"change",function(){P(xa,Ka.checked?"1":"0",va)});return Ka}function Y(xa,
+Da,va,Ka,la){var da=va.dispName,ca=va.type,na=document.createElement("tr");na.className="gePropRow"+(la?"Dark":"")+(Ka?"Alt":"")+" gePropNonHeaderRow";na.setAttribute("data-pName",xa);na.setAttribute("data-pValue",Da);Ka=!1;null!=va.index&&(na.setAttribute("data-index",va.index),da=(null!=da?da:"")+"["+va.index+"]",Ka=!0);var ka=document.createElement("td");ka.className="gePropRowCell";da=mxResources.get(da,null,da);mxUtils.write(ka,da);ka.setAttribute("title",da);Ka&&(ka.style.textAlign="right");
+na.appendChild(ka);ka=document.createElement("td");ka.className="gePropRowCell";if("color"==ca)ka.appendChild(R(xa,Da,va));else if("bool"==ca||"boolean"==ca)ka.appendChild(aa(xa,Da,va));else if("enum"==ca){var pa=va.enumList;for(la=0;la<pa.length;la++)if(da=pa[la],da.val==Da){mxUtils.write(ka,mxResources.get(da.dispName,null,da.dispName));break}mxEvent.addListener(ka,"click",mxUtils.bind(Z,function(){var ea=document.createElement("select");O(ka,ea);for(var ia=0;ia<pa.length;ia++){var oa=pa[ia],ua=
+document.createElement("option");ua.value=mxUtils.htmlEntities(oa.val);mxUtils.write(ua,mxResources.get(oa.dispName,null,oa.dispName));ea.appendChild(ua)}ea.value=Da;l.appendChild(ea);mxEvent.addListener(ea,"change",function(){var wa=mxUtils.htmlEntities(ea.value);P(xa,wa,va)});ea.focus();mxEvent.addListener(ea,"blur",function(){l.removeChild(ea)})}))}else"dynamicArr"==ca?ka.appendChild(S(xa,Da,va.subType,va.subDefVal,va.countProperty,na,la)):"staticArr"==ca?ka.appendChild(W(xa,Da,va.subType,va.subDefVal,
+va.size,na,la)):"readOnly"==ca?(la=document.createElement("input"),la.setAttribute("readonly",""),la.value=Da,la.style.width="96px",la.style.borderWidth="0px",ka.appendChild(la)):(ka.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Da)),mxEvent.addListener(ka,"click",mxUtils.bind(Z,function(){function ea(){var oa=ia.value;oa=0==oa.length&&"string"!=ca?0:oa;va.allowAuto&&(null!=oa.trim&&"auto"==oa.trim().toLowerCase()?(oa="auto",ca="string"):(oa=parseFloat(oa),oa=isNaN(oa)?0:oa));null!=va.min&&oa<
+va.min?oa=va.min:null!=va.max&&oa>va.max&&(oa=va.max);oa=encodeURIComponent(("int"==ca?parseInt(oa):oa)+"");P(xa,oa,va)}var ia=document.createElement("input");O(ka,ia,!0);ia.value=decodeURIComponent(Da);ia.className="gePropEditor";"int"!=ca&&"float"!=ca||va.allowAuto||(ia.type="number",ia.step="int"==ca?"1":"any",null!=va.min&&(ia.min=parseFloat(va.min)),null!=va.max&&(ia.max=parseFloat(va.max)));l.appendChild(ia);mxEvent.addListener(ia,"keypress",function(oa){13==oa.keyCode&&ea()});ia.focus();mxEvent.addListener(ia,
+"blur",function(){ea()})})));va.isDeletable&&(la=mxUtils.button("-",mxUtils.bind(Z,function(ea){P(xa,"",va,va.index);mxEvent.consume(ea)})),la.style.height="16px",la.style.width="25px",la.style.float="right",la.className="geColorBtn",ka.appendChild(la));na.appendChild(ka);return na}var Z=this,ba=this.editorUi.editor.graph,fa=[];l.style.position="relative";l.style.padding="0";var ja=document.createElement("table");ja.className="geProperties";ja.style.whiteSpace="nowrap";ja.style.width="100%";var ha=
+document.createElement("tr");ha.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";var ma=document.createElement("img");ma.src=Sidebar.prototype.expandedImage;ma.style.verticalAlign="middle";ra.appendChild(ma);mxUtils.write(ra,mxResources.get("property"));ha.style.cursor="pointer";var Ga=function(){var xa=ja.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ma.src=Sidebar.prototype.collapsedImage;var Da="none";for(var va=l.childNodes.length-
+1;0<=va;va--)try{var Ka=l.childNodes[va],la=Ka.nodeName.toUpperCase();"INPUT"!=la&&"SELECT"!=la||l.removeChild(Ka)}catch(da){}}else ma.src=Sidebar.prototype.expandedImage,Da="";for(va=0;va<xa.length;va++)xa[va].style.display=Da};mxEvent.addListener(ha,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ga()});ha.appendChild(ra);ra=document.createElement("th");ra.className="gePropHeaderCell";ra.innerHTML=mxResources.get("value");ha.appendChild(ra);ja.appendChild(ha);var Ea=
+!1,za=!1;ha=null;1==L.vertices.length&&0==L.edges.length?ha=L.vertices[0].id:0==L.vertices.length&&1==L.edges.length&&(ha=L.edges[0].id);null!=ha&&ja.appendChild(Y("id",mxUtils.htmlEntities(ha),{dispName:"ID",type:"readOnly"},!0,!1));for(var Pa in B)if(ha=B[Pa],"function"!=typeof ha.isVisible||ha.isVisible(L,this)){var Aa=null!=L.style[Pa]?mxUtils.htmlEntities(L.style[Pa]+""):null!=ha.getDefaultValue?ha.getDefaultValue(L,this):ha.defVal;if("separator"==ha.type)za=!za;else{if("staticArr"==ha.type)ha.size=
+parseInt(L.style[ha.sizeProperty]||B[ha.sizeProperty].defVal)||0;else if(null!=ha.dependentProps){var Fa=ha.dependentProps,qa=[],Ba=[];for(ra=0;ra<Fa.length;ra++){var Ra=L.style[Fa[ra]];Ba.push(B[Fa[ra]].subDefVal);qa.push(null!=Ra?Ra.split(","):[])}ha.dependentPropsDefVal=Ba;ha.dependentPropsVals=qa}ja.appendChild(Y(Pa,Aa,ha,Ea,za));Ea=!Ea}}for(ra=0;ra<fa.length;ra++)for(ha=fa[ra],B=ha.parentRow,L=0;L<ha.values.length;L++)Pa=Y(ha.name,ha.values[L],{type:ha.type,parentRow:ha.parentRow,isDeletable:ha.isDeletable,
+index:L,defVal:ha.defVal,countProperty:ha.countProperty,size:ha.size},0==L%2,ha.flipBkg),B.parentNode.insertBefore(Pa,B.nextSibling),B=Pa;l.appendChild(ja);Ga();return l};StyleFormatPanel.prototype.addStyles=function(l){function B(ha){mxEvent.addListener(ha,"mouseenter",function(){ha.style.opacity="1"});mxEvent.addListener(ha,"mouseleave",function(){ha.style.opacity="0.5"})}var L=this.editorUi,P=L.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";
+O.style.paddingRight="20px";l.style.paddingLeft="16px";l.style.paddingBottom="6px";l.style.position="relative";l.appendChild(O);var R="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var Y=
+document.createElement("div");Y.style.display="inline-block";Y.style.width="6px";Y.style.height="6px";Y.style.marginLeft="4px";Y.style.marginRight="3px";Y.style.borderRadius="3px";Y.style.cursor="pointer";Y.style.background="transparent";Y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ha){mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){Z(ha)}))})(aa);W.push(Y);S.appendChild(Y)}var Z=mxUtils.bind(this,function(ha){null!=W[ha]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&
+(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ha,ba(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),ba=mxUtils.bind(this,function(ha){var ra=mxUtils.bind(this,function(Ga){var Ea=mxUtils.button("",mxUtils.bind(this,function(Aa){P.getModel().beginUpdate();try{for(var Fa=L.getSelectionState().cells,qa=0;qa<Fa.length;qa++){for(var Ba=P.getModel().getStyle(Fa[qa]),Ra=0;Ra<R.length;Ra++)Ba=mxUtils.removeStylename(Ba,
+R[Ra]);var xa=P.getModel().isVertex(Fa[qa])?P.defaultVertexStyle:P.defaultEdgeStyle;null!=Ga?(mxEvent.isShiftDown(Aa)||(Ba=""==Ga.fill?mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,Ga.fill||mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,null)),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,Ga.gradient||mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!P.getModel().isVertex(Fa[qa])||
+(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,Ga.font||mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Aa)||(Ba=""==Ga.stroke?mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,Ga.stroke||mxUtils.getValue(xa,mxConstants.STYLE_STROKECOLOR,null)))):(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(xa,
+mxConstants.STYLE_STROKECOLOR,"#000000")),Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),P.getModel().isVertex(Fa[qa])&&(Ba=mxUtils.setStyle(Ba,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null))));P.getModel().setStyle(Fa[qa],Ba)}}finally{P.getModel().endUpdate()}}));Ea.className="geStyleButton";Ea.style.width="36px";Ea.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ea.style.margin="0px 6px 6px 0px";
+if(null!=Ga){var za="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ga.border&&(za=Ga.border);null!=Ga.gradient?mxClient.IS_IE&&10>document.documentMode?Ea.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ga.fill+"', EndColorStr='"+Ga.gradient+"', GradientType=0)":Ea.style.backgroundImage="linear-gradient("+Ga.fill+" 0px,"+Ga.gradient+" 100%)":Ga.fill==mxConstants.NONE?Ea.style.background="url('"+Dialog.prototype.noColorImage+"')":Ea.style.backgroundColor=""==Ga.fill?
+mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ga.fill||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ea.style.border=Ga.stroke==mxConstants.NONE?za+" transparent":""==Ga.stroke?za+" "+mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):za+" "+(Ga.stroke||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ga.title&&Ea.setAttribute("title",Ga.title)}else{za=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Pa=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ea.style.backgroundColor=za;Ea.style.border="1px solid "+Pa}Ea.style.borderRadius="0";O.appendChild(Ea)});O.innerText="";for(var ma=0;ma<ha.length;ma++)0<ma&&0==mxUtils.mod(ma,4)&&mxUtils.br(O),ra(ha[ma])});null==this.format.currentScheme?
+Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ja=document.createElement("div");ja.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(l.appendChild(fa),l.appendChild(ja));mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));B(fa);B(ja);ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(S);return l};StyleFormatPanel.prototype.addEditOps=function(l){var B=this.editorUi.getSelectionState(),L=this.editorUi.editor.graph,P=null;1==B.cells.length&&(P=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),P.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),P.style.width="210px",P.style.marginBottom="2px",l.appendChild(P));L=1==B.cells.length?L.view.getState(B.cells[0]):null;null!=L&&null!=L.shape&&null!=L.shape.stencil?(B=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),B.setAttribute("title",
+mxResources.get("editShape")),B.style.marginBottom="2px",null==P?B.style.width="210px":(P.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),l.appendChild(B)):B.image&&0<B.cells.length&&(B=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),B.setAttribute("title",mxResources.get("editImage")),B.style.marginBottom="2px",null==P?B.style.width="210px":(P.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),
+l.appendChild(B));return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.createFontElement=function(l,
+B){var L=Graph.fontMapping[B];null==L&&Graph.isCssFontUrl(B)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",B)):(null==L&&(L='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+B+'");\n}'),l=document.createElement("style"),mxUtils.write(l,L));return l};Graph.addFont=function(l,B,L){if(null!=l&&0<l.length&&null!=B&&0<B.length){var P=l.toLowerCase();if("helvetica"!=P&&"arial"!=l&&"sans-serif"!=
+P){var O=Graph.customFontElements[P];null!=O&&O.url!=B&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=B,"http:"==B.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(B)),O={name:l,url:B,elt:Graph.createFontElement(l,O)},Graph.customFontElements[P]=O,Graph.recentCustomFonts[P]=O,B=document.getElementsByTagName("head")[0],null!=L&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=L,O.elt.onerror=L):L()),null!=B&&B.appendChild(O.elt)):null!=L&&L()}else null!=L&&L()}else null!=L&&L();
+return l};Graph.getFontUrl=function(l,B){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(B=l.url);return B};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var B=0;B<l.length;B++){var L=l[B].getAttribute("data-font-src");if(null!=L){var P="FONT"==l[B].nodeName?l[B].getAttribute("face"):l[B].style.fontFamily;null!=P&&Graph.addFont(P,L)}}};Graph.processFontStyle=function(l){if(null!=l){var B=mxUtils.getValue(l,"fontSource",null);if(null!=B){var L=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,
+null);null!=L&&Graph.addFont(L,decodeURIComponent(B))}}return l};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function l(O){B=O}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(O){B=null});this.isMouseInsertPoint=function(){return null!=B};var L=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):L.apply(this,arguments)};var P=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom=
+R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return P.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,B){return Graph.processFontStyle(y.apply(this,arguments))};var A=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,B,L,P,O,R,S,W,aa,Y,Z){A.apply(this,arguments);Graph.processFontAttributes(Z)};
+var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,B,L){function P(){for(var ha=S.getSelectionCells(),ra=[],ma=0;ma<ha.length;ma++)S.isCellVisible(ha[ma])&&ra.push(ha[ma]);S.setSelectionCells(ra)}function O(ha){S.setHiddenTags(ha?[]:W.slice());P();S.refresh()}function R(ha,ra){Y.innerText="";if(0<ha.length){var ma=document.createElement("table");
+ma.setAttribute("cellpadding","2");ma.style.boxSizing="border-box";ma.style.tableLayout="fixed";ma.style.width="100%";var Ga=document.createElement("tbody");if(null!=ha&&0<ha.length)for(var Ea=0;Ea<ha.length;Ea++)(function(za){var Pa=0>mxUtils.indexOf(S.hiddenTags,za),Aa=document.createElement("tr"),Fa=document.createElement("td");Fa.style.align="center";Fa.style.width="16px";var qa=document.createElement("img");qa.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);qa.setAttribute("title",
+mxResources.get(Pa?"hideIt":"show",[za]));mxUtils.setOpacity(qa,Pa?75:25);qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.style.width="16px";if(B||Editor.isDarkMode())qa.style.filter="invert(100%)";Fa.appendChild(qa);mxEvent.addListener(qa,"click",function(Ra){mxEvent.isShiftDown(Ra)?O(0<=mxUtils.indexOf(S.hiddenTags,za)):(S.toggleHiddenTag(za),P(),S.refresh());mxEvent.consume(Ra)});Aa.appendChild(Fa);Fa=document.createElement("td");Fa.style.overflow="hidden";Fa.style.whiteSpace="nowrap";
+Fa.style.textOverflow="ellipsis";Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.setAttribute("title",za);a=document.createElement("a");mxUtils.write(a,za);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Pa?100:40);Fa.appendChild(a);mxEvent.addListener(Fa,"click",function(Ra){if(mxEvent.isShiftDown(Ra)){O(!0);var xa=S.getCellsForTags([za],null,null,!0);S.isEnabled()?S.setSelectionCells(xa):S.highlightCells(xa)}else if(Pa&&0<S.hiddenTags.length)O(!0);else{xa=
+W.slice();var Da=mxUtils.indexOf(xa,za);xa.splice(Da,1);S.setHiddenTags(xa);P();S.refresh()}mxEvent.consume(Ra)});Aa.appendChild(Fa);if(S.isEnabled()){Fa=document.createElement("td");Fa.style.verticalAlign="middle";Fa.style.textAlign="center";Fa.style.width="18px";if(null==ra){Fa.style.align="center";Fa.style.width="16px";qa=document.createElement("img");qa.setAttribute("src",Editor.crossImage);qa.setAttribute("title",mxResources.get("removeIt",[za]));mxUtils.setOpacity(qa,Pa?75:25);qa.style.verticalAlign=
+"middle";qa.style.cursor="pointer";qa.style.width="16px";if(B||Editor.isDarkMode())qa.style.filter="invert(100%)";mxEvent.addListener(qa,"click",function(Ra){var xa=mxUtils.indexOf(W,za);0<=xa&&W.splice(xa,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[za]);S.refresh();mxEvent.consume(Ra)});Fa.appendChild(qa)}else{var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.margin="0px";Ba.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,za);Ba.checked=Ba.defaultChecked;
+Ba.style.background="transparent";Ba.setAttribute("title",mxResources.get(Ba.defaultChecked?"removeIt":"add",[za]));mxEvent.addListener(Ba,"change",function(Ra){Ba.checked?S.addTagsForCells(S.getSelectionCells(),[za]):S.removeTagsForCells(S.getSelectionCells(),[za]);mxEvent.consume(Ra)});Fa.appendChild(Ba)}Aa.appendChild(Fa)}Ga.appendChild(Aa)})(ha[Ea]);ma.appendChild(Ga);Y.appendChild(ma)}}var S=this,W=S.hiddenTags.slice(),aa=document.createElement("div");aa.style.userSelect="none";aa.style.overflow=
+"hidden";aa.style.padding="10px";aa.style.height="100%";var Y=document.createElement("div");Y.style.boxSizing="border-box";Y.style.borderRadius="4px";Y.style.userSelect="none";Y.style.overflow="auto";Y.style.position="absolute";Y.style.left="10px";Y.style.right="10px";Y.style.top="10px";Y.style.border=S.isEnabled()?"1px solid #808080":"none";Y.style.bottom=S.isEnabled()?"48px":"10px";aa.appendChild(Y);var Z=mxUtils.button(mxResources.get("reset"),function(ha){S.setHiddenTags([]);mxEvent.isShiftDown(ha)||
+(W=S.hiddenTags.slice());P();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ba=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(W,function(ha){W=ha;fa()})});ba.setAttribute("title",mxResources.get("add"));ba.className="geBtn";ba.style.margin="0";S.addListener(mxEvent.ROOT,function(){W=S.hiddenTags.slice()});var fa=mxUtils.bind(this,function(ha,ra){if(l()){ha=S.getAllTags();for(ra=0;ra<ha.length;ra++)0>mxUtils.indexOf(W,
+ha[ra])&&W.push(ha[ra]);W.sort();S.isSelectionEmpty()?R(W):R(W,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,fa);S.model.addListener(mxEvent.CHANGE,fa);S.addListener(mxEvent.REFRESH,fa);var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.whiteSpace="nowrap";ja.style.position="absolute";ja.style.overflow="hidden";ja.style.bottom="0px";ja.style.height="42px";ja.style.right="10px";ja.style.left="10px";S.isEnabled()&&(ja.appendChild(Z),
+ja.appendChild(ba),aa.appendChild(ja));return{div:aa,refresh:fa}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var B in Graph.customFontElements){var L=Graph.customFontElements[B];l.push({name:L.name,url:L.url})}return l};Graph.prototype.setFont=function(l,B){Graph.addFont(l,B);document.execCommand("fontname",!1,l);if(null!=B){var L=this.cellEditor.textarea.getElementsByTagName("font");B=Graph.getFontUrl(l,B);for(var P=0;P<L.length;P++)L[P].getAttribute("face")==
+l&&L[P].getAttribute("data-font-src")!=B&&L[P].setAttribute("data-font-src",B)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var l=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=l)for(var B in l)this.globalVars[B]=
+l[B]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var M=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var B=M.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[l]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,B,L,P,O,R,S,W,aa,Y,Z,ba,fa,ja){var ha=null,ra=null,ma=null;ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ha=this.stylesheet,ra=this.shapeForegroundColor,ma=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ga=E.apply(this,arguments),Ea=this.getCustomFonts();if(Z&&0<Ea.length){var za=Ga.ownerDocument,Pa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?Pa.setAttributeNS("type","text/css"):Pa.setAttribute("type","text/css");for(var Aa="",Fa="",qa=0;qa<Ea.length;qa++){var Ba=Ea[qa].name,Ra=Ea[qa].url;Graph.isCssFontUrl(Ra)?
+Aa+="@import url("+Ra+");\n":Fa+='@font-face {\nfont-family: "'+Ba+'";\nsrc: url("'+Ra+'");\n}\n'}Pa.appendChild(za.createTextNode(Aa+Fa));Ga.getElementsByTagName("defs")[0].appendChild(Pa)}this.mathEnabled&&(document.body.appendChild(Ga),Editor.MathJaxRender(Ga),Ga.parentNode.removeChild(Ga));null!=ha&&(this.shapeBackgroundColor=ma,this.shapeForegroundColor=ra,this.stylesheet=ha,this.refresh());return Ga};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(l){Q.apply(this,
+arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var n=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){n.apply(this,arguments);this.enumerationState=0};var v=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&this.redrawEnumerationState(l);return v.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var B="1"==mxUtils.getValue(l.style,"enumerate",0);B&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):B||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);B=l.secondLabel;if(null!=B){var L=l.view.scale,P=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*L,l.y+4*L,0,0):mxRectangle.fromPoint(l.view.getPoint(l));B.bounds.equals(l)&&B.value==P&&B.scale==L||(B.bounds=l,B.value=P,B.scale=
+L,B.redraw())}};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var l=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",l.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,l.ownerSVGElement))}};var H=Graph.prototype.refresh;Graph.prototype.refresh=function(){H.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=
-l.actions&&this.executeCustomActions(l.actions))};Graph.prototype.executeCustomActions=function(l,A){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,Q=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&aa()}),aa=mxUtils.bind(this,function(){if(O<l.length){var Y=this.stoppingCustomActions,Z=l[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var ha=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ha),1);this.setCellsVisible(ha,!0)}null!=Z.hide&&(R(),ha=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ha),0),this.setCellsVisible(ha,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ha=[];null!=Z.select&&this.isEnabled()&&(ha=this.getCellsForAction(Z.select),this.setSelectionCells(ha));null!=Z.highlight&&(ha=this.getCellsForAction(Z.highlight),this.highlightCells(ha,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(ha=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ha.length&&this.scrollCellToVisible(ha[0]);if(null!=Z.tags){ha=[];null!=Z.tags.hidden&&(ha=ha.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ma=this.getAllTags(),ia=0;ia<ma.length;ia++)0>mxUtils.indexOf(Z.tags.visible,ma[ia])&&0>mxUtils.indexOf(ha,ma[ia])&&ha.push(ma[ia]);this.setHiddenTags(ha);this.refresh()}0<ba.length&&(Q++,this.executeAnimations(ba,X,Y?1:Z.steps,Y?0:Z.delay));
-0==Q?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=A&&A()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,A){var M=this.getLinkForCell(A);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(l,M));if(this.isHtmlLabel(A)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(A));for(var O=Q.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),null!=M&&"data:action/json,"==
-M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(l,M)),R=!0);R&&this.labelChanged(A,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(l,A){if("data:action/json,"==A.substring(0,17))try{var M=JSON.parse(A.substring(17));null!=M.actions&&(this.updateCustomLinkActions(l,M.actions),A="data:action/json,"+JSON.stringify(M))}catch(Q){}return A};Graph.prototype.updateCustomLinkActions=function(l,A){for(var M=0;M<A.length;M++){var Q=A[M],O;for(O in Q)this.updateCustomLinkAction(l,
-Q[O],"cells"),this.updateCustomLinkAction(l,Q[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,A,M){if(null!=A&&null!=A[M]){for(var Q=[],O=0;O<A[M].length;O++)if("*"==A[M][O])Q.push(A[M][O]);else{var R=l[A[M][O]];null!=R?""!=R&&Q.push(R):Q.push(A[M][O])}A[M]=Q}};Graph.prototype.getCellsForAction=function(l,A){A=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,A));if(null!=l.excludeCells){for(var M=[],Q=0;Q<A.length;Q++)0>l.excludeCells.indexOf(A[Q].id)&&M.push(A[Q]);
-A=M}return A};Graph.prototype.getCellsById=function(l){var A=[];if(null!=l)for(var M=0;M<l.length;M++)if("*"==l[M]){var Q=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(R){return R!=Q},Q))}else{var O=this.model.getCell(l[M]);null!=O&&A.push(O)}return A};var G=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return G.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(l){var A=mxUtils.indexOf(this.hiddenTags,l);0>A?this.hiddenTags.push(l):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var A=0;A<l.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,l[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,A,M,
-Q){var O=[];if(null!=l){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<l.length;X++)0<l[X].length&&(S[l[X]]=!0,R++);for(X=0;X<A.length;X++)if(M&&this.model.getParent(A[X])==this.model.root||this.model.isVertex(A[X])||this.model.isEdge(A[X])){var aa=this.getTagsForCell(A[X]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=l.length)){for(var Z=Y=0;Z<aa.length&&Y<R;Z++)null!=S[aa[Z]]&&Y++;Y=Y==R}Y&&(1!=Q||this.isCellVisible(A[X]))&&O.push(A[X])}}return O};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var A=null,M=[],Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);M=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==A||null!=A[O[S]])R[O[S]]=!0,M.push(O[S]);A=R}else return[]}return M};Graph.prototype.getTagsForCells=function(l){for(var A=[],M={},Q=0;Q<l.length;Q++){var O=this.getTagsForCell(l[Q]);if(0<O.length){O=O.split(" ");for(var R=
-0;R<O.length;R++)null==M[O[R]]&&(M[O[R]]=!0,A.push(O[R]))}}return A};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var M=0;M<l.length;M++){for(var Q=this.getTagsForCell(l[M]),O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.trim(A[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(Q=0<Q.length?Q+" "+X:X,R=!0)}R&&this.setAttributeForCell(l[M],"tags",Q)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(l,A){if(0<l.length&&0<A.length){this.model.beginUpdate();try{for(var M=0;M<l.length;M++){var Q=this.getTagsForCell(l[M]);if(0<Q.length){for(var O=Q.split(" "),R=!1,S=0;S<A.length;S++){var X=mxUtils.indexOf(O,A[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(l[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var A=0;A<l.length;A++)this.model.setVisible(l[A],!this.model.isVisible(l[A]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(l,A){this.model.beginUpdate();try{for(var M=0;M<l.length;M++)this.model.setVisible(l[M],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,A,M,Q){for(var O=0;O<l.length;O++)this.highlightCell(l[O],A,M,Q)};Graph.prototype.highlightCell=function(l,A,M,Q,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;l=this.view.getState(l);var R=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,
-1)+O),R=new mxCellHighlight(this,A,O,!1),null!=Q&&(R.opacity=Q),R.highlight(l),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},M));return R};Graph.prototype.addSvgShadow=function(l,A,M,Q){M=null!=M?M:!1;Q=null!=Q?Q:!0;var O=l.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var K=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){K.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(l){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=
+l.actions&&this.executeCustomActions(l.actions))};Graph.prototype.executeCustomActions=function(l,B){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,P=0,O=0,R=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<P&&P--;0==P&&aa()}),aa=mxUtils.bind(this,function(){if(O<l.length){var Y=this.stoppingCustomActions,Z=l[O++],ba=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||Y||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,W,Y?0:Z.fadeIn.delay));null!=Z.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,W,Y?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var fa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(fa),1);this.setCellsVisible(fa,!0)}null!=Z.hide&&(R(),fa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(fa),0),this.setCellsVisible(fa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));fa=[];null!=Z.select&&this.isEnabled()&&(fa=this.getCellsForAction(Z.select),this.setSelectionCells(fa));null!=Z.highlight&&(fa=this.getCellsForAction(Z.highlight),this.highlightCells(fa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
+null!=Z.scroll&&(fa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<fa.length&&this.scrollCellToVisible(fa[0]);if(null!=Z.tags){fa=[];null!=Z.tags.hidden&&(fa=fa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ja=this.getAllTags(),ha=0;ha<ja.length;ha++)0>mxUtils.indexOf(Z.tags.visible,ja[ha])&&0>mxUtils.indexOf(fa,ja[ha])&&fa.push(ja[ha]);this.setHiddenTags(fa);this.refresh()}0<ba.length&&(P++,this.executeAnimations(ba,W,Y?1:Z.steps,Y?0:Z.delay));
+0==P?aa():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=B&&B()});aa()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,B){var L=this.getLinkForCell(B);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(l,L));if(this.isHtmlLabel(B)){var P=document.createElement("div");P.innerHTML=this.sanitizeHtml(this.getLabel(B));for(var O=P.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)L=O[S].getAttribute("href"),null!=L&&"data:action/json,"==
+L.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(l,L)),R=!0);R&&this.labelChanged(B,P.innerHTML)}};Graph.prototype.updateCustomLink=function(l,B){if("data:action/json,"==B.substring(0,17))try{var L=JSON.parse(B.substring(17));null!=L.actions&&(this.updateCustomLinkActions(l,L.actions),B="data:action/json,"+JSON.stringify(L))}catch(P){}return B};Graph.prototype.updateCustomLinkActions=function(l,B){for(var L=0;L<B.length;L++){var P=B[L],O;for(O in P)this.updateCustomLinkAction(l,
+P[O],"cells"),this.updateCustomLinkAction(l,P[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,B,L){if(null!=B&&null!=B[L]){for(var P=[],O=0;O<B[L].length;O++)if("*"==B[L][O])P.push(B[L][O]);else{var R=l[B[L][O]];null!=R?""!=R&&P.push(R):P.push(B[L][O])}B[L]=P}};Graph.prototype.getCellsForAction=function(l,B){B=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,B));if(null!=l.excludeCells){for(var L=[],P=0;P<B.length;P++)0>l.excludeCells.indexOf(B[P].id)&&L.push(B[P]);
+B=L}return B};Graph.prototype.getCellsById=function(l){var B=[];if(null!=l)for(var L=0;L<l.length;L++)if("*"==l[L]){var P=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(R){return R!=P},P))}else{var O=this.model.getCell(l[L]);null!=O&&B.push(O)}return B};var G=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return G.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(l){var B=mxUtils.indexOf(this.hiddenTags,l);0>B?this.hiddenTags.push(l):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var B=0;B<l.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,l[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,B,L,
+P){var O=[];if(null!=l){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},W=0;W<l.length;W++)0<l[W].length&&(S[l[W]]=!0,R++);for(W=0;W<B.length;W++)if(L&&this.model.getParent(B[W])==this.model.root||this.model.isVertex(B[W])||this.model.isEdge(B[W])){var aa=this.getTagsForCell(B[W]),Y=!1;if(0<aa.length&&(aa=aa.split(" "),aa.length>=l.length)){for(var Z=Y=0;Z<aa.length&&Y<R;Z++)null!=S[aa[Z]]&&Y++;Y=Y==R}Y&&(1!=P||this.isCellVisible(B[W]))&&O.push(B[W])}}return O};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var B=null,L=[],P=0;P<l.length;P++){var O=this.getTagsForCell(l[P]);L=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==B||null!=B[O[S]])R[O[S]]=!0,L.push(O[S]);B=R}else return[]}return L};Graph.prototype.getTagsForCells=function(l){for(var B=[],L={},P=0;P<l.length;P++){var O=this.getTagsForCell(l[P]);if(0<O.length){O=O.split(" ");for(var R=
+0;R<O.length;R++)null==L[O[R]]&&(L[O[R]]=!0,B.push(O[R]))}}return B};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){for(var P=this.getTagsForCell(l[L]),O=P.split(" "),R=!1,S=0;S<B.length;S++){var W=mxUtils.trim(B[S]);""!=W&&0>mxUtils.indexOf(O,W)&&(P=0<P.length?P+" "+W:W,R=!0)}R&&this.setAttributeForCell(l[L],"tags",P)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var L=0;L<l.length;L++){var P=this.getTagsForCell(l[L]);if(0<P.length){for(var O=P.split(" "),R=!1,S=0;S<B.length;S++){var W=mxUtils.indexOf(O,B[S]);0<=W&&(O.splice(W,1),R=!0)}R&&this.setAttributeForCell(l[L],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var B=0;B<l.length;B++)this.model.setVisible(l[B],!this.model.isVisible(l[B]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(l,B){this.model.beginUpdate();try{for(var L=0;L<l.length;L++)this.model.setVisible(l[L],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,B,L,P){for(var O=0;O<l.length;O++)this.highlightCell(l[O],B,L,P)};Graph.prototype.highlightCell=function(l,B,L,P,O){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;L=null!=L?L:1E3;l=this.view.getState(l);var R=null;null!=l&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,
+1)+O),R=new mxCellHighlight(this,B,O,!1),null!=P&&(R.opacity=P),R.highlight(l),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},L));return R};Graph.prototype.addSvgShadow=function(l,B,L,P){L=null!=L?L:!1;P=null!=P?P:!0;var O=l.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
"offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=l.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=S[0];O.appendChild(R);M||(A=null!=A?A:l.getElementsByTagName("g")[0],
-null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&Q&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),A=l.getAttribute("viewBox"),null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,l.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(l,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=
-null!=A?A:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),A=0;do var M=this.model.getChildAt(this.model.root,A);while(A++<l&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}};
+S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=l.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=l.firstChild?l.insertBefore(O,l.firstChild):l.appendChild(O)):O=S[0];O.appendChild(R);L||(B=null!=B?B:l.getElementsByTagName("g")[0],
+null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&P&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),B=l.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,l.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(l,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=
+null!=B?B:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),B=0;do var L=this.model.getChildAt(this.model.root,B);while(B++<l&&"1"==mxUtils.getValue(this.getCellStyle(L),"locked","0"));null!=L&&this.setDefaultParent(L)}};
mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
@@ -11407,529 +11409,555 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
-[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(l){var A=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?A="mxgraph.er":"sysML"==l.substring(0,5)&&(A="mxgraph.sysml"));return A};var P=mxMarker.createMarker;mxMarker.createMarker=function(l,A,M,Q,O,R,S,X,aa,Y){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return P.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,
-A,M,Q,O,R){"1"==mxUtils.getValue(A.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,arguments)};PrintDialog.prototype.create=function(l,A){function M(){ha.value=Math.max(1,Math.min(X,Math.max(parseInt(ha.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ha.value),parseInt(ba.value))))}function Q(ua){function sa(Ja,Oa,Qa){var Na=Ja.useCssTransforms,Sa=Ja.currentTranslate,Ua=Ja.currentScale,Ka=
-Ja.view.translate,Ta=Ja.view.scale;Ja.useCssTransforms&&(Ja.useCssTransforms=!1,Ja.currentTranslate=new mxPoint(0,0),Ja.currentScale=1,Ja.view.translate=new mxPoint(0,0),Ja.view.scale=1);var Va=Ja.getGraphBounds(),Wa=0,$a=0,Xa=La.get(),ab=1/Ja.pageScale,Za=Ca.checked;if(Za){ab=parseInt(Ea.value);var gb=parseInt(wa.value);ab=Math.min(Xa.height*gb/(Va.height/Ja.view.scale),Xa.width*ab/(Va.width/Ja.view.scale))}else ab=parseInt(la.value)/(100*Ja.pageScale),isNaN(ab)&&(va=1/Ja.pageScale,la.value="100 %");
-Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*va);Xa.height=Math.ceil(Xa.height*va);ab*=va;!Za&&Ja.pageVisible?(Va=Ja.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ja,ab,Xa,0,Wa,$a,Za);Oa.pageSelector=!1;Oa.mathEnabled=!1;ma.checked&&(Oa.isCellVisible=function(Ya){return Ja.isCellSelected(Ya)});Wa=l.getCurrentFile();null!=Wa&&(Oa.title=Wa.getTitle());var hb=Oa.writeHead;Oa.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
-(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=l.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(l.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ja.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
-(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Oa.renderPage;Oa.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
-Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Oa.open(null,null,Qa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ja.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Oa.backgroundColor=Xa;Oa.autoOrigin=Za;Oa.appendGraph(Ja,
-ab,Wa,$a,Qa,!0);Qa=Ja.getCustomFonts();if(null!=Oa.wnd)for(Wa=0;Wa<Qa.length;Wa++)$a=Qa[Wa].name,Za=Qa[Wa].url,Graph.isCssFontUrl(Za)?Oa.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Oa.wnd.document.writeln('<style type="text/css">'),Oa.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Oa.wnd.document.writeln("</style>"))}Na&&(Ja.useCssTransforms=Na,
-Ja.currentTranslate=Sa,Ja.currentScale=Ua,Ja.view.translate=Ka,Ja.view.scale=Ta);return Oa}var va=parseInt(ka.value)/100;isNaN(va)&&(va=1,ka.value="100 %");va*=.75;var ca=null,ea=O.shapeForegroundColor,da=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ca=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var fa=ba.value,ja=ha.value,ra=!Y.checked,oa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,
-Y.checked,fa,ja,Ca.checked,Ea.value,wa.value,parseInt(la.value)/100,parseInt(ka.value)/100,La.get());else{ra&&(ra=ma.checked||fa==aa&&ja==aa);if(!ra&&null!=l.pages&&l.pages.length){var Aa=0;ra=l.pages.length-1;Y.checked||(Aa=parseInt(fa)-1,ra=parseInt(ja)-1);for(var xa=Aa;xa<=ra;xa++){var ta=l.pages[xa];fa=ta==l.currentPage?O:null;if(null==fa){fa=l.createTemporaryGraph(O.stylesheet);fa.shapeForegroundColor=O.shapeForegroundColor;fa.shapeBackgroundColor=O.shapeBackgroundColor;ja=!0;Aa=!1;var pa=null,
-Ha=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(ja=ta.viewState.pageVisible,Aa=ta.viewState.mathEnabled,pa=ta.viewState.background,Ha=ta.viewState.backgroundImage,fa.extFonts=ta.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=l.createImageForPageLink(Ha.originalSrc,ta));fa.background=pa;fa.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,Ha.height,Ha.x,Ha.y):null;fa.pageVisible=ja;fa.mathEnabled=Aa;var Ma=fa.getGraphBounds;fa.getGraphBounds=function(){var Ja=
-Ma.apply(this,arguments),Oa=this.backgroundImage;if(null!=Oa&&null!=Oa.width&&null!=Oa.height){var Qa=this.view.translate,Na=this.view.scale;Ja=mxRectangle.fromRectangle(Ja);Ja.add(new mxRectangle((Qa.x+Oa.x)*Na,(Qa.y+Oa.y)*Na,Oa.width*Na,Oa.height*Na))}return Ja};var Ra=fa.getGlobalVariable;fa.getGlobalVariable=function(Ja){return"page"==Ja?ta.getName():"pagenumber"==Ja?xa+1:"pagecount"==Ja?null!=l.pages?l.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(fa.container);l.updatePageRoot(ta);
-fa.model.setRoot(ta.root)}oa=sa(fa,oa,xa!=ra);fa!=O&&fa.container.parentNode.removeChild(fa.container)}}else oa=sa(O);null==oa?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(oa.mathEnabled&&(ra=oa.wnd.document,ua&&(oa.wnd.IMMEDIATE_PRINT=!0),ra.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),oa.closeDocument(),!oa.mathEnabled&&ua&&PrintDialog.printPreview(oa));null!=ca&&(O.shapeForegroundColor=ea,O.shapeBackgroundColor=da,O.stylesheet=
-ca,O.refresh())}}var O=l.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,A||mxResources.get("print"));R.appendChild(S);var X=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
-"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);A=document.createElement("span");mxUtils.write(A,mxResources.get("printAllPages"));S.appendChild(A);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");S.appendChild(A);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type",
-"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));S.appendChild(A);var ha=ba.cloneNode(!0);S.appendChild(ha);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",M);mxEvent.addListener(ha,"change",M);if(null!=l.pages&&(X=l.pages.length,null!=l.currentPage))for(A=0;A<l.pages.length;A++)if(l.currentPage==l.pages[A]){aa=
-A+1;ba.value=aa;ha.value=aa;break}ba.setAttribute("max",X);ha.setAttribute("max",X);l.isPagesEnabled()?1<X&&(R.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ma=document.createElement("input");ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.style.marginRight="8px";O.isSelectionEmpty()&&ma.setAttribute("disabled","disabled");var ia=document.createElement("div");ia.style.marginBottom="10px";1==X?(ma.setAttribute("type","checkbox"),ma.style.marginBottom="12px",ia.appendChild(ma)):
-(ma.setAttribute("name","pages-printdialog"),ma.style.marginBottom="8px",S.appendChild(ma));A=document.createElement("span");mxUtils.write(A,mxResources.get("selectionOnly"));ma.parentNode.appendChild(A);1==X&&mxUtils.br(ma.parentNode);var qa=document.createElement("input");qa.style.marginRight="8px";qa.setAttribute("value","adjust");qa.setAttribute("type","radio");qa.setAttribute("name","printZoom");ia.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("adjustTo"));
-ia.appendChild(A);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="50px";ia.appendChild(la);mxEvent.addListener(la,"focus",function(){qa.checked=!0});R.appendChild(ia);S=S.cloneNode(!1);var Ca=qa.cloneNode(!0);Ca.setAttribute("value","fit");qa.setAttribute("checked","checked");A=document.createElement("div");A.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";A.appendChild(Ca);S.appendChild(A);ia=
-document.createElement("table");ia.style.display="inline-block";var Da=document.createElement("tbody"),ya=document.createElement("tr"),Pa=ya.cloneNode(!0),za=document.createElement("td"),Fa=za.cloneNode(!0),Ia=za.cloneNode(!0),Ba=za.cloneNode(!0),Ga=za.cloneNode(!0),na=za.cloneNode(!0);za.style.textAlign="right";Ba.style.textAlign="right";mxUtils.write(za,mxResources.get("fitTo"));var Ea=document.createElement("input");Ea.style.cssText="margin:0 8px 0 8px;";Ea.setAttribute("value","1");Ea.setAttribute("min",
-"1");Ea.setAttribute("type","number");Ea.style.width="40px";Fa.appendChild(Ea);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Ia.appendChild(A);mxUtils.write(Ba,mxResources.get("fitToBy"));var wa=Ea.cloneNode(!0);Ga.appendChild(wa);mxEvent.addListener(Ea,"focus",function(){Ca.checked=!0});mxEvent.addListener(wa,"focus",function(){Ca.checked=!0});A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));na.appendChild(A);ya.appendChild(za);
-ya.appendChild(Fa);ya.appendChild(Ia);Pa.appendChild(Ba);Pa.appendChild(Ga);Pa.appendChild(na);Da.appendChild(ya);Da.appendChild(Pa);ia.appendChild(Da);S.appendChild(ia);R.appendChild(S);S=document.createElement("div");A=document.createElement("div");A.style.fontWeight="bold";A.style.marginBottom="12px";mxUtils.write(A,mxResources.get("paperSize"));S.appendChild(A);A=document.createElement("div");A.style.marginBottom="12px";var La=PageSetupDialog.addPageFormatPanel(A,"printdialog",l.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(A);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageScale"));S.appendChild(A);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","100 %");ka.style.width="60px";S.appendChild(ka);R.appendChild(S);A=document.createElement("div");A.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});S.className="geBtn";l.editor.cancelFirst&&
-A.appendChild(S);l.isOffline()||(ia=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ia.className="geBtn",A.appendChild(ia));PrintDialog.previewEnabled&&(ia=mxUtils.button(mxResources.get("preview"),function(){l.hideDialog();Q(!1)}),ia.className="geBtn",A.appendChild(ia));ia=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){l.hideDialog();Q(!0)});ia.className="geBtn gePrimaryBtn";A.appendChild(ia);l.editor.cancelFirst||
-A.appendChild(S);R.appendChild(A);this.container=R};var W=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else W.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
-!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),V=new Image;V.onload=function(){try{U.getContext("2d").drawImage(V,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(A){}};V.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=
-!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(l){var B=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?B="mxgraph.er":"sysML"==l.substring(0,5)&&(B="mxgraph.sysml"));return B};var N=mxMarker.createMarker;mxMarker.createMarker=function(l,B,L,P,O,R,S,W,aa,Y){if(null!=L&&null==mxMarker.markers[L]){var Z=this.getPackageForType(L);null!=Z&&mxStencilRegistry.getStencil(Z)}return N.apply(this,arguments)};var T=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,
+B,L,P,O,R){"1"==mxUtils.getValue(B.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return T.apply(this,arguments)};PrintDialog.prototype.create=function(l,B){function L(){fa.value=Math.max(1,Math.min(W,Math.max(parseInt(fa.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(W,Math.min(parseInt(fa.value),parseInt(ba.value))))}function P(da){function ca(Ia,Na,Oa){var Ma=Ia.useCssTransforms,Sa=Ia.currentTranslate,Ua=Ia.currentScale,Ja=
+Ia.view.translate,Ta=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Va=Ia.getGraphBounds(),Wa=0,$a=0,Xa=Ka.get(),ab=1/Ia.pageScale,Za=Ga.checked;if(Za){ab=parseInt(Da.value);var gb=parseInt(va.value);ab=Math.min(Xa.height*gb/(Va.height/Ia.view.scale),Xa.width*ab/(Va.width/Ia.view.scale))}else ab=parseInt(ma.value)/(100*Ia.pageScale),isNaN(ab)&&(na=1/Ia.pageScale,ma.value="100 %");
+Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*na);Xa.height=Math.ceil(Xa.height*na);ab*=na;!Za&&Ia.pageVisible?(Va=Ia.getPageLayout(),Wa-=Va.x*Xa.width,$a-=Va.y*Xa.height):Za=!0;if(null==Na){Na=PrintDialog.createPrintPreview(Ia,ab,Xa,0,Wa,$a,Za);Na.pageSelector=!1;Na.mathEnabled=!1;ja.checked&&(Na.isCellVisible=function(Ya){return Ia.isCellSelected(Ya)});Wa=l.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var hb=Na.writeHead;Na.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
+(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=l.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(l.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ia.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
+(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Na.renderPage;Na.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
+Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Na.open(null,null,Oa,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ia.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";Na.backgroundColor=Xa;Na.autoOrigin=Za;Na.appendGraph(Ia,
+ab,Wa,$a,Oa,!0);Oa=Ia.getCustomFonts();if(null!=Na.wnd)for(Wa=0;Wa<Oa.length;Wa++)$a=Oa[Wa].name,Za=Oa[Wa].url,Graph.isCssFontUrl(Za)?Na.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Na.wnd.document.writeln('<style type="text/css">'),Na.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Na.wnd.document.writeln("</style>"))}Ma&&(Ia.useCssTransforms=Ma,
+Ia.currentTranslate=Sa,Ia.currentScale=Ua,Ia.view.translate=Ja,Ia.view.scale=Ta);return Na}var na=parseInt(la.value)/100;isNaN(na)&&(na=1,la.value="100 %");na*=.75;var ka=null,pa=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(ka=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var ia=ba.value,oa=fa.value,ua=!Y.checked,wa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,
+Y.checked,ia,oa,Ga.checked,Da.value,va.value,parseInt(ma.value)/100,parseInt(la.value)/100,Ka.get());else{ua&&(ua=ja.checked||ia==aa&&oa==aa);if(!ua&&null!=l.pages&&l.pages.length){var Ca=0;ua=l.pages.length-1;Y.checked||(Ca=parseInt(ia)-1,ua=parseInt(oa)-1);for(var ya=Ca;ya<=ua;ya++){var ta=l.pages[ya];ia=ta==l.currentPage?O:null;if(null==ia){ia=l.createTemporaryGraph(O.stylesheet);ia.shapeForegroundColor=O.shapeForegroundColor;ia.shapeBackgroundColor=O.shapeBackgroundColor;oa=!0;Ca=!1;var sa=null,
+Ha=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(oa=ta.viewState.pageVisible,Ca=ta.viewState.mathEnabled,sa=ta.viewState.background,Ha=ta.viewState.backgroundImage,ia.extFonts=ta.viewState.extFonts);null!=Ha&&null!=Ha.originalSrc&&(Ha=l.createImageForPageLink(Ha.originalSrc,ta));ia.background=sa;ia.backgroundImage=null!=Ha?new mxImage(Ha.src,Ha.width,Ha.height,Ha.x,Ha.y):null;ia.pageVisible=oa;ia.mathEnabled=Ca;var La=ia.getGraphBounds;ia.getGraphBounds=function(){var Ia=
+La.apply(this,arguments),Na=this.backgroundImage;if(null!=Na&&null!=Na.width&&null!=Na.height){var Oa=this.view.translate,Ma=this.view.scale;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Oa.x+Na.x)*Ma,(Oa.y+Na.y)*Ma,Na.width*Ma,Na.height*Ma))}return Ia};var Qa=ia.getGlobalVariable;ia.getGlobalVariable=function(Ia){return"page"==Ia?ta.getName():"pagenumber"==Ia?ya+1:"pagecount"==Ia?null!=l.pages?l.pages.length:1:Qa.apply(this,arguments)};document.body.appendChild(ia.container);l.updatePageRoot(ta);
+ia.model.setRoot(ta.root)}wa=ca(ia,wa,ya!=ua);ia!=O&&ia.container.parentNode.removeChild(ia.container)}}else wa=ca(O);null==wa?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(wa.mathEnabled&&(ua=wa.wnd.document,da&&(wa.wnd.IMMEDIATE_PRINT=!0),ua.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),wa.closeDocument(),!wa.mathEnabled&&da&&PrintDialog.printPreview(wa));null!=ka&&(O.shapeForegroundColor=pa,O.shapeBackgroundColor=ea,O.stylesheet=
+ka,O.refresh())}}var O=l.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,B||mxResources.get("print"));R.appendChild(S);var W=1,aa=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Y=document.createElement("input");Y.style.cssText="margin-right:8px;margin-bottom:8px;";Y.setAttribute("value","all");Y.setAttribute("type",
+"radio");Y.setAttribute("name","pages-printdialog");S.appendChild(Y);B=document.createElement("span");mxUtils.write(B,mxResources.get("printAllPages"));S.appendChild(B);mxUtils.br(S);var Z=Y.cloneNode(!0);Y.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);B=document.createElement("span");mxUtils.write(B,mxResources.get("pages")+":");S.appendChild(B);var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","1");ba.setAttribute("type",
+"number");ba.setAttribute("min","1");ba.style.width="50px";S.appendChild(ba);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));S.appendChild(B);var fa=ba.cloneNode(!0);S.appendChild(fa);mxEvent.addListener(ba,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(fa,"change",L);if(null!=l.pages&&(W=l.pages.length,null!=l.currentPage))for(B=0;B<l.pages.length;B++)if(l.currentPage==l.pages[B]){aa=
+B+1;ba.value=aa;fa.value=aa;break}ba.setAttribute("max",W);fa.setAttribute("max",W);l.isPagesEnabled()?1<W&&(R.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ja=document.createElement("input");ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.style.marginRight="8px";O.isSelectionEmpty()&&ja.setAttribute("disabled","disabled");var ha=document.createElement("div");ha.style.marginBottom="10px";1==W?(ja.setAttribute("type","checkbox"),ja.style.marginBottom="12px",ha.appendChild(ja)):
+(ja.setAttribute("name","pages-printdialog"),ja.style.marginBottom="8px",S.appendChild(ja));B=document.createElement("span");mxUtils.write(B,mxResources.get("selectionOnly"));ja.parentNode.appendChild(B);1==W&&mxUtils.br(ja.parentNode);var ra=document.createElement("input");ra.style.marginRight="8px";ra.setAttribute("value","adjust");ra.setAttribute("type","radio");ra.setAttribute("name","printZoom");ha.appendChild(ra);B=document.createElement("span");mxUtils.write(B,mxResources.get("adjustTo"));
+ha.appendChild(B);var ma=document.createElement("input");ma.style.cssText="margin:0 8px 0 8px;";ma.setAttribute("value","100 %");ma.style.width="50px";ha.appendChild(ma);mxEvent.addListener(ma,"focus",function(){ra.checked=!0});R.appendChild(ha);S=S.cloneNode(!1);var Ga=ra.cloneNode(!0);Ga.setAttribute("value","fit");ra.setAttribute("checked","checked");B=document.createElement("div");B.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";B.appendChild(Ga);S.appendChild(B);ha=
+document.createElement("table");ha.style.display="inline-block";var Ea=document.createElement("tbody"),za=document.createElement("tr"),Pa=za.cloneNode(!0),Aa=document.createElement("td"),Fa=Aa.cloneNode(!0),qa=Aa.cloneNode(!0),Ba=Aa.cloneNode(!0),Ra=Aa.cloneNode(!0),xa=Aa.cloneNode(!0);Aa.style.textAlign="right";Ba.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("min",
+"1");Da.setAttribute("type","number");Da.style.width="40px";Fa.appendChild(Da);B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));qa.appendChild(B);mxUtils.write(Ba,mxResources.get("fitToBy"));var va=Da.cloneNode(!0);Ra.appendChild(va);mxEvent.addListener(Da,"focus",function(){Ga.checked=!0});mxEvent.addListener(va,"focus",function(){Ga.checked=!0});B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsDown"));xa.appendChild(B);za.appendChild(Aa);
+za.appendChild(Fa);za.appendChild(qa);Pa.appendChild(Ba);Pa.appendChild(Ra);Pa.appendChild(xa);Ea.appendChild(za);Ea.appendChild(Pa);ha.appendChild(Ea);S.appendChild(ha);R.appendChild(S);S=document.createElement("div");B=document.createElement("div");B.style.fontWeight="bold";B.style.marginBottom="12px";mxUtils.write(B,mxResources.get("paperSize"));S.appendChild(B);B=document.createElement("div");B.style.marginBottom="12px";var Ka=PageSetupDialog.addPageFormatPanel(B,"printdialog",l.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(B);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageScale"));S.appendChild(B);var la=document.createElement("input");la.style.cssText="margin:0 8px 0 8px;";la.setAttribute("value","100 %");la.style.width="60px";S.appendChild(la);R.appendChild(S);B=document.createElement("div");B.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});S.className="geBtn";l.editor.cancelFirst&&
+B.appendChild(S);l.isOffline()||(ha=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ha.className="geBtn",B.appendChild(ha));PrintDialog.previewEnabled&&(ha=mxUtils.button(mxResources.get("preview"),function(){l.hideDialog();P(!1)}),ha.className="geBtn",B.appendChild(ha));ha=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){l.hideDialog();P(!0)});ha.className="geBtn gePrimaryBtn";B.appendChild(ha);l.editor.cancelFirst||
+B.appendChild(S);R.appendChild(B);this.container=R};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var l=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(B){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}Editor.prototype.useCanvasForExport=
+!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,d,g,q,m,n,z){n=null!=n?n:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==d||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=C+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=q?":colno:"+
-encodeURIComponent(q):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(x){}try{z||null==window.console||console.error(n,c,d,g,q,m)}catch(x){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);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!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
-function(c,d){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{d=null!=d?d:5E4,c.length>d&&(c=c.substring(0,d)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],d=0;d<arguments.length;d++)c.push(arguments[d]);console.log.apply(console,
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,m,p,q,z){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var y=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(c);(new Image).src=y+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
+encodeURIComponent(m):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(A){}try{z||null==window.console||console.error(q,c,e,g,m,p)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(m){}try{var d=document.createElement("canvas"),g=new Image;g.onload=function(){try{d.getContext("2d").drawImage(g,0,0);var m=
-d.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.length}catch(n){}};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(m){}try{d=document.createElement("canvas");d.width=d.height=1;var q=d.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,d,g){return this.editor.graph.openLink(c,d,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,d){d(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,d,g){localStorage.setItem(c,d);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,d){localStorage.removeItem(c);d()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var p=
+e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.length}catch(q){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{e=document.createElement("canvas");e.width=e.height=1;var m=e.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,d,g){var q=null==c||null==d;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),n=m.spin;m.spin=function(C,x){var y=!1;this.active||(n.call(this,C),this.active=!0,null!=x&&(q&&(d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
-y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,d+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=x.substring(x.length-3,x.length)&&"!"!=x.charAt(x.length-1)&&(x+="..."),y.innerHTML=x,C.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(C,x)}));this.stop();return I}),y=!0);return y};var z=m.stop;m.stop=function(){z.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
-return m};EditorUi.prototype.isCompatibleString=function(c){try{var d=mxUtils.parseXml(c),g=this.editor.extractGraphModel(d.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(c,e,g){var m=null==c||null==e;g=null!=g?g:24;var p=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,A){var x=!1;this.active||(q.call(this,y),this.active=!0,null!=A&&(m&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),x=document.createElement("div"),
+x.style.position="absolute",x.style.whiteSpace="nowrap",x.style.background="#4B4243",x.style.color="white",x.style.fontFamily=Editor.defaultHtmlFont,x.style.fontSize="9pt",x.style.padding="6px",x.style.paddingLeft="10px",x.style.paddingRight="10px",x.style.zIndex=2E9,x.style.left=Math.max(0,c)+"px",x.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(x.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(x.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),x.innerHTML=A,y.appendChild(x),p.status=x),this.pause=mxUtils.bind(this,function(){var I=function(){};this.active&&(I=mxUtils.bind(this,function(){this.spin(y,A)}));this.stop();return I}),x=!0);return x};var z=p.stop;p.stop=function(){z.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
+return p};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(c){var d=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=d.getFunction,q=this.editor.graph,m=this;d.getFunction=function(n){if(q.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var z=m.getSelectedPageIndex();if(mxEvent.isShiftDown(n)){if(37==n.keyCode)return function(){0<z&&m.movePage(z,z-1)};if(38==n.keyCode)return function(){0<z&&m.movePage(z,0)};if(39==n.keyCode)return function(){z<m.pages.length-1&&m.movePage(z,
-z+1)};if(40==n.keyCode)return function(){z<m.pages.length-1&&m.movePage(z,m.pages.length-1)}}else if(mxEvent.isControlDown(n)||mxClient.IS_MAC&&mxEvent.isMetaDown(n)){if(37==n.keyCode)return function(){0<z&&m.selectNextPage(!1)};if(38==n.keyCode)return function(){0<z&&m.selectPage(m.pages[0])};if(39==n.keyCode)return function(){z<m.pages.length-1&&m.selectNextPage(!0)};if(40==n.keyCode)return function(){z<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return!(65<=n.keyCode&&90>=n.keyCode)||
-q.isSelectionEmpty()||mxEvent.isAltDown(n)||mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||mxClient.IS_MAC&&mxEvent.isMetaDown(n)?g.apply(this,arguments):null}}return d};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var d=f.apply(this,arguments);if(null==d)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var q=c.lastIndexOf("&lt;/mxfile&gt;");q>g&&(d=c.substring(g,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var m=mxUtils.parseXml(c),n=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);d=null!=n?mxUtils.getXml(n):""}}catch(z){}return d};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var d=c.indexOf('<meta charset="utf-8">');0<=d&&(c=c.slice(0,d)+'<meta charset="utf-8"/>'+c.slice(d+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
-c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var d=null!=c?this.editor.extractGraphModel(c,!0):null;null!=d&&(c=d);if(null!=c){d=this.editor.graph;d.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=q.length-1;0<=m;m--){var n=this.updatePageRoot(new DiagramPage(q[m]));null==n.getName()&&
-n.setName(mxResources.get("pageWithNumber",[m+1]));d.model.execute(new ChangePage(this,n,0==m?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(m=0;m<g.length;m++)d.model.execute(new ChangePage(this,g[m],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,d,g,q,m,n,z,C,x,y,I){d=null!=d?d:this.editor.graph;m=null!=m?m:!1;x=null!=x?x:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var t="_blank";else N=t=q;if(null==c)return"";var p=c;if("mxfile"!=p.nodeName.toLowerCase()){if(I){var F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());
-F.appendChild(c)}else{F=Graph.zapGremlins(mxUtils.getXml(c));p=Graph.compress(F);if(Graph.decompress(p)!=F)return F;F=c.ownerDocument.createElement("diagram");F.setAttribute("id",Editor.guid());mxUtils.setTextContent(F,p)}p=c.ownerDocument.createElement("mxfile");p.appendChild(F)}y?(p=p.cloneNode(!0),p.removeAttribute("modified"),p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):
-(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",window.location.hostname),p.setAttribute("modified",(new Date).toISOString()),p.setAttribute("agent",navigator.appVersion),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
-null!=c&&p.setAttribute("type",c),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!n&&!m&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(p),d,null!=g?g.getTitle():null,t,N);else if(n||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(q=null),I=this.getEmbeddedSvg(I,d,q,null,C,x,N);return I};EditorUi.prototype.getXmlFileData=
-function(c,d,g,q){c=null!=c?c:!0;d=null!=d?d:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,q);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(x){var y=x.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(x)),x=x.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&x.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?x=x.cloneNode(!0):(x=x.cloneNode(!1),mxUtils.setTextContent(x,
-Graph.compressNode(y)));m.appendChild(x)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),d)c(this.currentPage.node);else for(d=0;d<this.pages.length;d++){var n=this.pages[d],z=n.node;if(n!=this.currentPage)if(n.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(n.root));this.editor.graph.saveViewState(n.viewState,C,null,q);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z,
-Graph.compressNode(C));delete n.needsUpdate}else q&&(this.updatePageRoot(n),null!=n.viewState.backgroundImage&&(null!=n.viewState.backgroundImage.originalSrc?n.viewState.backgroundImage=this.createImageForPageLink(n.viewState.backgroundImage.originalSrc,n):Graph.isPageLink(n.viewState.backgroundImage.src)&&(n.viewState.backgroundImage=this.createImageForPageLink(n.viewState.backgroundImage.src,n))),null!=n.viewState.backgroundImage&&null!=n.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),
-C=C.encode(new mxGraphModel(n.root)),this.editor.graph.saveViewState(n.viewState,C,null,q),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(C))));c(z)}return m};EditorUi.prototype.anonymizeString=function(c,d){for(var g=[],q=0;q<c.length;q++){var m=c.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(m)?g.push(" "):g.push("?"):g.push(d?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var d=0;d<c[EditorUi.DIFF_INSERT].length;d++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(g)}catch(n){c[EditorUi.DIFF_INSERT][d].data=
-n.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var q in c[EditorUi.DIFF_UPDATE]){var m=c[EditorUi.DIFF_UPDATE][q];null!=m.name&&(m.name=this.anonymizeString(m.name));null!=m.cells&&(d=mxUtils.bind(this,function(n){var z=m.cells[n];if(null!=z){for(var C in z)null!=z[C].value&&(z[C].value="["+z[C].value.length+"]"),null!=z[C].xmlValue&&(z[C].xmlValue="["+z[C].xmlValue.length+"]"),null!=z[C].style&&(z[C].style="["+z[C].style.length+"]"),mxUtils.isEmptyObject(z[C])&&delete z[C];mxUtils.isEmptyObject(z)&&
-delete m.cells[n]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(m.cells)&&delete m.cells);mxUtils.isEmptyObject(m)&&delete c[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,d){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,d));if(null!=c.childNodes)for(g=
-0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],d)};EditorUi.prototype.anonymizeNode=function(c,d){d=c.getElementsByTagName("mxCell");for(var g=0;g<d.length;g++)null!=d[g].getAttribute("value")&&d[g].setAttribute("value","["+d[g].getAttribute("value").length+"]"),null!=d[g].getAttribute("xmlValue")&&d[g].setAttribute("xmlValue","["+d[g].getAttribute("xmlValue").length+"]"),null!=d[g].getAttribute("style")&&d[g].setAttribute("style","["+d[g].getAttribute("style").length+"]"),null!=
-d[g].parentNode&&"root"!=d[g].parentNode.nodeName&&null!=d[g].parentNode.parentNode&&(d[g].setAttribute("id",d[g].parentNode.getAttribute("id")),d[g].parentNode.parentNode.replaceChild(d[g],d[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&d.invalidChecksum?d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),
-this.editor.setStatus(""),c?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){d.handleFileError(g,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){d.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,d,g,q,m,n,z,C,x,y,I){m=null!=m?m:!0;n=null!=n?n:!1;var N=this.editor.graph;if(d||!c&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var t=
-null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(t||null!=this.pages&&this.currentPage!=this.pages[0]){var p=N.getGlobalVariable;N=this.createTemporaryGraph(t?N.getDefaultStylesheet():N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var F=this.pages[0];this.currentPage==F?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&N.setBackgroundImage(F.viewState.backgroundImage);N.getGlobalVariable=
-function(K){return"page"==K?F.getName():"pagenumber"==K?1:p.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(F.root)}}z=null!=z?z:this.getXmlFileData(m,n,y,I);x=null!=x?x:this.getCurrentFile();c=this.createFileData(z,N,x,window.location.href,c,d,g,q,m,C,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,d,g,q,m,n){n=null!=n?n:!0;var z=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=d){z=
-n?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells());var x=d.view.scale;n=Math.floor(z.x/x-d.view.translate.x);x=Math.floor(z.y/x-d.view.translate.y);z=d.background;null==m&&(d=this.getBasenames().join(";"),0<d.length&&(C=EditorUi.drawHost+"/embed.js?s="+d));c.setAttribute("x0",n);c.setAttribute("y0",x)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=q&&c.setAttribute("edit",
-q));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";q=Graph.compress(c);Graph.decompress(q)!=c&&(q=encodeURIComponent(c));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!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+
-m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+q+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+C+'">\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(c,d,g,q,m){d=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==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!=g?"<title>"+mxUtils.htmlEntities(g)+"</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(c))+'"></div>\n'+(null==m?'<script type="text/javascript" src="'+
-d+'">\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(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var d=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(d,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[c],"node",[d],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=d?this.editor.extractGraphModel(d,!0):null;null!=c&&(d=c);if(null!=d&&"mxfile"==d.nodeName&&(c=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=d;this.pages=[];for(var q=0;q<c.length;q++)null==c[q].getAttribute("id")&&c[q].setAttribute("id",q),d=new DiagramPage(c[q]),null==d.getName()&&d.setName(mxResources.get("pageWithNumber",
-[q+1])),this.pages.push(d),null!=urlParams["page-id"]&&d.getId()==urlParams["page-id"]&&(g=d);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");d={};for(q=0;q<m.length;q++)d[m[q]]=!0;var n=this.editor.graph.getModel(),z=n.getChildren(n.root);for(q=0;q<z.length;q++){var C=z[q];n.setVisible(C,d[C.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(c){var d=this.getCurrentFile();d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||
-/(\.svg)$/i.test(d)||/(\.png)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!c&&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(c,d,g,q,m,n,z,C,x,y,I,N){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename("remoteSvg"==c?
-!1:!m),p=t+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,m,null,null,null,d);this.saveData(p,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(p,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)p=t+".png";else if("jpeg"==c)p=t+".jpg";else if("remoteSvg"==c){p=t+".svg";c="svg";var K=parseInt(x);
-"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<K){var D=this.editor.graph,H=D.getGraphBounds();var J=Math.ceil(H.width*C/D.view.scale+2*K);var G=Math.ceil(H.height*C/D.view.scale+2*K)}}this.saveRequest(p,c,mxUtils.bind(this,function(V,l){try{var A=this.editor.graph.pageVisible;0==n&&(this.editor.graph.pageVisible=n);var M=this.createDownloadRequest(V,c,q,l,z,m,C,x,y,I,N,J,G);this.editor.graph.pageVisible=A;return M}catch(Q){this.handleError(Q)}}))}else{var P=null,T=mxUtils.bind(this,
-function(V){V.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});if("svg"==c){var W=this.editor.graph.background;if(z||W==mxConstants.NONE)W=null;var U=this.editor.graph.getSvg(W,null,null,null,null,q);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(V){this.spinner.stop();T(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(V))})))}else p=t+".svg",P=this.getFileData(!1,!0,null,mxUtils.bind(this,function(V){this.spinner.stop();T(V)}),q)}}catch(V){this.handleError(V)}};EditorUi.prototype.createDownloadRequest=function(c,d,g,q,m,n,z,C,x,y,I,N,t){var p=this.editor.graph,F=p.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==n?!1:"xmlpng"!=d,null,null,null,!1,"pdf"==d);var K="",D="";if(F.width*F.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-y=y?"1":"0";"pdf"==d&&(null!=I?D="&from="+I.from+"&to="+I.to:0==n&&(D="&allPages=1"));"xmlpng"==d&&(y="1",d="png");if(("xmlpng"==d||"svg"==d)&&null!=this.pages&&null!=this.currentPage)for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){K="&from="+n;break}n=p.background;"png"!=d&&"pdf"!=d&&"svg"!=d||!m?m||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;m={globalVars:p.getExportVariables()};x&&(m.grid={size:p.gridSize,steps:p.view.gridSteps,color:p.view.gridColor});Graph.translateDiagram&&
-(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+d+K+D+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+q+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=z?"&scale="+z:"")+(null!=C?"&border="+C:"")+(N&&isFinite(N)?"&w="+N:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(c,d){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,d,g){var q=
-window.location.hash,m=mxUtils.bind(this,function(z){var C=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<C.length&&(C+="\n"),C+=z);z=new LocalFile(this,"csv"!=c.format&&0<C.length?C:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return q};this.fileLoaded(z);"csv"==c.format&&this.importCsv(C,mxUtils.bind(this,function(t){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=
-null!=c.interval?parseInt(c.interval):6E4,y=null,I=mxUtils.bind(this,function(){var t=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(p){t===this.currentPage&&(200<=p.getStatus()&&300>=p.getStatus()?(this.updateDiagram(p.getText()),N()):this.handleError({message:mxResources.get("error")+" "+p.getStatus()}))}),mxUtils.bind(this,function(p){this.handleError(p)}))}),N=mxUtils.bind(this,function(){window.clearTimeout(y);
-y=window.setTimeout(I,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){N();I()}));N();I()}null!=d&&d()});if(null!=c.url&&0<c.url.length){var n=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(n,mxUtils.bind(this,function(z){m(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else m("")};EditorUi.prototype.updateDiagram=function(c){function d(G){var P=new mxCellOverlay(G.image||m.warningImage,G.tooltip,G.align,G.valign,G.offset);P.addListener(mxEvent.CLICK,function(T,
-W){q.alert(G.tooltip)});return P}var g=null,q=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,n=m.getModel();n.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=n.getCell(c.getAttribute("id"));if(null!=C){try{var x=c.getAttribute("value");if(null!=x){var y=mxUtils.parseXml(x).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))n.setValue(C,y);else for(var I=
-y.attributes,N=0;N<I.length;N++)m.setAttributeForCell(C,I[N].nodeName,0<I[N].nodeValue.length?I[N].nodeValue:null)}}catch(G){null!=window.console&&console.log("Error in value for "+C.id+": "+G)}try{var t=c.getAttribute("style");null!=t&&m.model.setStyle(C,t)}catch(G){null!=window.console&&console.log("Error in style for "+C.id+": "+G)}try{var p=c.getAttribute("icon");if(null!=p){var F=0<p.length?JSON.parse(p):null;null!=F&&F.append||m.removeCellOverlays(C);null!=F&&m.addCellOverlay(C,d(F))}}catch(G){null!=
-window.console&&console.log("Error in icon for "+C.id+": "+G)}try{var K=c.getAttribute("geometry");if(null!=K){K=JSON.parse(K);var D=m.getCellGeometry(C);if(null!=D){D=D.clone();for(key in K){var H=parseFloat(K[key]);"dx"==key?D.x+=H:"dy"==key?D.y+=H:"dw"==key?D.width+=H:"dh"==key?D.height+=H:D[key]=parseFloat(K[key])}m.model.setGeometry(C,D)}}}catch(G){null!=window.console&&console.log("Error in icon for "+C.id+": "+G)}}}else if("model"==c.nodeName){for(var J=c.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=
-J.nextSibling;null!=J&&(new mxCodec(c.firstChild)).decode(J,n)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{n.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,
-z)}return g};EditorUi.prototype.getCopyFilename=function(c,d){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var q=g.lastIndexOf(".");0<=q&&(c=g.substring(q),g=g.substring(0,q));if(d){d=g;var m=new Date;g=m.getFullYear();q=m.getMonth()+1;var n=m.getDate(),z=m.getHours(),C=m.getMinutes();m=m.getSeconds();g=d+(" "+(g+"-"+q+"-"+n+"-"+z+"-"+C+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,d){var g=this.getCurrentFile();this.fileEditable=
-this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!d&&null!=window.location.hash&&0<window.location.hash.length&&
-(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();d||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();
+EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,m=this.editor.graph,p=this;e.getFunction=function(q){if(m.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var z=p.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<z&&p.movePage(z,z-1)};if(38==q.keyCode)return function(){0<z&&p.movePage(z,0)};if(39==q.keyCode)return function(){z<p.pages.length-1&&p.movePage(z,
+z+1)};if(40==q.keyCode)return function(){z<p.pages.length-1&&p.movePage(z,p.pages.length-1)}}else if(mxEvent.isControlDown(q)||mxClient.IS_MAC&&mxEvent.isMetaDown(q)){if(37==q.keyCode)return function(){0<z&&p.selectNextPage(!1)};if(38==q.keyCode)return function(){0<z&&p.selectPage(p.pages[0])};if(39==q.keyCode)return function(){z<p.pages.length-1&&p.selectNextPage(!0)};if(40==q.keyCode)return function(){z<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=q.keyCode&&90>=q.keyCode)||
+m.isSelectionEmpty()||mxEvent.isAltDown(q)||mxEvent.isShiftDown(q)||mxEvent.isControlDown(q)||mxClient.IS_MAC&&mxEvent.isMetaDown(q)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var m=c.lastIndexOf("&lt;/mxfile&gt;");m>g&&(e=c.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var p=mxUtils.parseXml(c),q=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=q?mxUtils.getXml(q):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
+c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var p=m.length-1;0<=p;p--){var q=this.updatePageRoot(new DiagramPage(m[p]));null==q.getName()&&
+q.setName(mxResources.get("pageWithNumber",[p+1]));e.model.execute(new ChangePage(this,q,0==p?q:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(p=0;p<g.length;p++)e.model.execute(new ChangePage(this,g[p],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,m,p,q,z,y,A,x,I){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;A=null!=A?A:!0;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var E="_blank";else M=E=m;if(null==c)return"";var Q=c;if("mxfile"!=Q.nodeName.toLowerCase()){if(I){var n=c.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());
+n.appendChild(c)}else{n=Graph.zapGremlins(mxUtils.getXml(c));Q=Graph.compress(n);if(Graph.decompress(Q)!=n)return n;n=c.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,Q)}Q=c.ownerDocument.createElement("mxfile");Q.appendChild(n)}x?(Q=Q.cloneNode(!0),Q.removeAttribute("modified"),Q.removeAttribute("host"),Q.removeAttribute("agent"),Q.removeAttribute("etag"),Q.removeAttribute("userAgent"),Q.removeAttribute("version"),Q.removeAttribute("editor"),Q.removeAttribute("type")):
+(Q.removeAttribute("userAgent"),Q.removeAttribute("version"),Q.removeAttribute("editor"),Q.removeAttribute("pages"),Q.removeAttribute("type"),mxClient.IS_CHROMEAPP?Q.setAttribute("host","Chrome"):EditorUi.isElectronApp?Q.setAttribute("host","Electron"):Q.setAttribute("host",window.location.hostname),Q.setAttribute("modified",(new Date).toISOString()),Q.setAttribute("agent",navigator.appVersion),Q.setAttribute("version",EditorUi.VERSION),Q.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
+null!=c&&Q.setAttribute("type",c),1<Q.getElementsByTagName("diagram").length&&null!=this.pages&&Q.setAttribute("pages",this.pages.length));I=I?mxUtils.getPrettyXml(Q):mxUtils.getXml(Q);if(!q&&!p&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))I=this.getHtml2(mxUtils.getXml(Q),e,null!=g?g.getTitle():null,E,M);else if(q||!p&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),I=this.getEmbeddedSvg(I,e,m,null,y,A,M);return I};EditorUi.prototype.getXmlFileData=
+function(c,e,g,m){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var p=this.editor.getGraphXml(c,m);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(A){var x=A.getElementsByTagName("mxGraphModel");x=0<x.length?x[0]:null;null==x&&g?(x=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<x.length&&(x=Graph.decompress(x),null!=x&&0<x.length&&A.appendChild(mxUtils.parseXml(x).documentElement))):null==x||g?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,
+Graph.compressNode(x)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var q=this.pages[e],z=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,m);EditorUi.removeChildNodes(z);mxUtils.setTextContent(z,
+Graph.compressNode(y));delete q.needsUpdate}else m&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),
+y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,m),z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(y))));c(z)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],m=0;m<c.length;m++){var p=c.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?g.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(p)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(q){c[EditorUi.DIFF_INSERT][e].data=
+q.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var m in c[EditorUi.DIFF_UPDATE]){var p=c[EditorUi.DIFF_UPDATE][m];null!=p.name&&(p.name=this.anonymizeString(p.name));null!=p.cells&&(e=mxUtils.bind(this,function(q){var z=p.cells[q];if(null!=z){for(var y in z)null!=z[y].value&&(z[y].value="["+z[y].value.length+"]"),null!=z[y].xmlValue&&(z[y].xmlValue="["+z[y].xmlValue.length+"]"),null!=z[y].style&&(z[y].style="["+z[y].style.length+"]"),mxUtils.isEmptyObject(z[y])&&delete z[y];mxUtils.isEmptyObject(z)&&
+delete p.cells[q]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
+0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=
+e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
+this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,m,p,q,z,y,A,x,I){p=null!=p?p:!0;q=null!=q?q:!1;var M=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var E=
+null!=M.themes&&"darkTheme"==M.defaultThemeName;x=!1;if(E||null!=this.pages&&this.currentPage!=this.pages[0]){var Q=M.getGlobalVariable;M=this.createTemporaryGraph(E?M.getDefaultStylesheet():M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var n=this.pages[0];this.currentPage==n?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&null!=n.viewState&&M.setBackgroundImage(n.viewState.backgroundImage);M.getGlobalVariable=
+function(v){return"page"==v?n.getName():"pagenumber"==v?1:Q.apply(this,arguments)};document.body.appendChild(M.container);M.model.setRoot(n.root)}}z=null!=z?z:this.getXmlFileData(p,q,x,I);A=null!=A?A:this.getCurrentFile();c=this.createFileData(z,M,A,window.location.href,c,e,g,m,p,y,x);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return c};EditorUi.prototype.getHtml=function(c,e,g,m,p,q){q=null!=q?q:!0;var z=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=
+q?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var A=e.view.scale;q=Math.floor(z.x/A-e.view.translate.x);A=Math.floor(z.y/A-e.view.translate.y);z=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(y=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",q);c.setAttribute("y0",A)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=m&&c.setAttribute("edit",
+m));null!=p&&(p=p.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";m=Graph.compress(c);Graph.decompress(m)!=c&&(m=encodeURIComponent(c));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+y+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,m,p){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+
+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
+[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var m=0;m<c.length;m++)null==c[m].getAttribute("id")&&c[m].setAttribute("id",m),e=new DiagramPage(c[m]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
+[m+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");e={};for(m=0;m<p.length;m++)e[p[m]]=!0;var q=this.editor.graph.getModel(),z=q.getChildren(q.root);for(m=0;m<z.length;m++){var y=z[m];q.setVisible(y,e[y.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
+/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,m,p,q,z,y,A,x,I,M){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var E=this.getBaseFilename("remoteSvg"==c?
+!1:!p),Q=E+("xml"==c||"pdf"==c&&I?".drawio":"")+"."+c;if("xml"==c){var n=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,p,null,null,null,e);this.saveData(Q,c,n,"text/xml")}else if("html"==c)n=this.getHtml2(this.getFileData(!0),this.editor.graph,E),this.saveData(Q,c,n,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)Q=E+".png";else if("jpeg"==c)Q=E+".jpg";else if("remoteSvg"==c){Q=E+".svg";c="svg";var v=parseInt(A);
+"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<v){var D=this.editor.graph,H=D.getGraphBounds();var K=Math.ceil(H.width*y/D.view.scale+2*v);var G=Math.ceil(H.height*y/D.view.scale+2*v)}}this.saveRequest(Q,c,mxUtils.bind(this,function(X,l){try{var B=this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var L=this.createDownloadRequest(X,c,m,l,z,p,y,A,x,I,M,K,G);this.editor.graph.pageVisible=B;return L}catch(P){this.handleError(P)}}))}else{var N=null,T=mxUtils.bind(this,
+function(X){X.length<=MAX_REQUEST_SIZE?this.saveData(Q,"svg",X,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});if("svg"==c){var V=this.editor.graph.background;if(z||V==mxConstants.NONE)V=null;var U=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(U);this.editor.convertImages(U,mxUtils.bind(this,mxUtils.bind(this,function(X){this.spinner.stop();T(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(X))})))}else Q=E+".svg",N=this.getFileData(!1,!0,null,mxUtils.bind(this,function(X){this.spinner.stop();T(X)}),m)}}catch(X){this.handleError(X)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,m,p,q,z,y,A,x,I,M,E){var Q=this.editor.graph,n=Q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==q?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var v="",D="";if(n.width*n.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+x=x?"1":"0";"pdf"==e&&(null!=I?D="&from="+I.from+"&to="+I.to:0==q&&(D="&allPages=1"));"xmlpng"==e&&(x="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){v="&from="+q;break}q=Q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:Q.getExportVariables()};A&&(p.grid={size:Q.gridSize,steps:Q.view.gridSteps,color:Q.view.gridColor});Graph.translateDiagram&&
+(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+v+D+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+m+"&embedXml="+x+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=z?"&scale="+z:"")+(null!=y?"&border="+y:"")+(M&&isFinite(M)?"&w="+M:"")+(E&&isFinite(E)?"&h="+E:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var m=
+window.location.hash,p=mxUtils.bind(this,function(z){var y=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<y.length&&(y+="\n"),y+=z);z=new LocalFile(this,"csv"!=c.format&&0<y.length?y:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return m};this.fileLoaded(z);"csv"==c.format&&this.importCsv(y,mxUtils.bind(this,function(E){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var A=
+null!=c.interval?parseInt(c.interval):6E4,x=null,I=mxUtils.bind(this,function(){var E=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){E===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),M()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),M=mxUtils.bind(this,function(){window.clearTimeout(x);
+x=window.setTimeout(I,A)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){M();I()}));M();I()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var q=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(q,mxUtils.bind(this,function(z){p(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(G){var N=new mxCellOverlay(G.image||p.warningImage,G.tooltip,G.align,G.valign,G.offset);N.addListener(mxEvent.CLICK,function(T,
+V){m.alert(G.tooltip)});return N}var g=null,m=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var y=q.getCell(c.getAttribute("id"));if(null!=y){try{var A=c.getAttribute("value");if(null!=A){var x=mxUtils.parseXml(A).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))q.setValue(y,x);else for(var I=
+x.attributes,M=0;M<I.length;M++)p.setAttributeForCell(y,I[M].nodeName,0<I[M].nodeValue.length?I[M].nodeValue:null)}}catch(G){null!=window.console&&console.log("Error in value for "+y.id+": "+G)}try{var E=c.getAttribute("style");null!=E&&p.model.setStyle(y,E)}catch(G){null!=window.console&&console.log("Error in style for "+y.id+": "+G)}try{var Q=c.getAttribute("icon");if(null!=Q){var n=0<Q.length?JSON.parse(Q):null;null!=n&&n.append||p.removeCellOverlays(y);null!=n&&p.addCellOverlay(y,e(n))}}catch(G){null!=
+window.console&&console.log("Error in icon for "+y.id+": "+G)}try{var v=c.getAttribute("geometry");if(null!=v){v=JSON.parse(v);var D=p.getCellGeometry(y);if(null!=D){D=D.clone();for(key in v){var H=parseFloat(v[key]);"dx"==key?D.x+=H:"dy"==key?D.y+=H:"dw"==key?D.width+=H:"dh"==key?D.height+=H:D[key]=parseFloat(v[key])}p.model.setGeometry(y,D)}}}catch(G){null!=window.console&&console.log("Error in icon for "+y.id+": "+G)}}}else if("model"==c.nodeName){for(var K=c.firstChild;null!=K&&K.nodeType!=mxConstants.NODETYPE_ELEMENT;)K=
+K.nextSibling;null!=K&&(new mxCodec(c.firstChild)).decode(K,q)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,
+z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var m=g.lastIndexOf(".");0<=m&&(c=g.substring(m),g=g.substring(0,m));if(e){e=g;var p=new Date;g=p.getFullYear();m=p.getMonth()+1;var q=p.getDate(),z=p.getHours(),y=p.getMinutes();p=p.getSeconds();g=e+(" "+(g+"-"+m+"-"+q+"-"+z+"-"+y+"-"+p))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=
+this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&
+(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();
delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
-this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var n="1"==urlParams.sketch?"sketch":uiTheme;if(null==n)n="default";else if("sketch"==n||"min"==n)n+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
-action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+n})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=
-z;if(null!=c)try{c.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});d?c():this.handleError(z,mxResources.get("errorLoadingFile"),c,!0,null,null,
-!0)}else m();return q};EditorUi.prototype.getHashValueForPages=function(c,d){var g=0,q=new mxGraphModel,m=new mxCodec;null!=d&&(d.byteCount=0,d.attrCount=0,d.eltCount=0,d.nodeCount=0);for(var n=0;n<c.length;n++){this.updatePageRoot(c[n]);var z=c[n].node.cloneNode(!1);z.removeAttribute("name");q.root=c[n].root;var C=m.encode(q);this.editor.graph.saveViewState(c[n].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");z.appendChild(C);null!=d&&(d.eltCount+=z.getElementsByTagName("*").length,
-d.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(x,y,I,N){return!N||"mxGeometry"!=x.nodeName&&"mxPoint"!=x.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==x.nodeName&&"previous"==y?null:I:Math.round(I)},d)<<0}return g};EditorUi.prototype.hashValue=function(c,d,g){var q=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(q^=this.hashValue(c.nodeName,
-d,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var n=c.attributes[m].name,z=null!=d?d(c,n,c.attributes[m].value,!0):c.attributes[m].value;null!=z&&(q^=this.hashValue(n,d,g)+this.hashValue(z,d,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)q=(q<<5)-q+this.hashValue(c.childNodes[m],d,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);d=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)d=(d<<5)-d+c.charCodeAt(m)<<
-0;q^=d}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,d,g,q,m,n,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var d=mxUtils.createXmlDocument(),g=d.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));d.appendChild(g);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(c){var d=this.sidebar.palettes[c];if(null!=d){for(var g=0;g<d.length;g++)d[g].parentNode.removeChild(d[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var d=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:d.firstChild.nextSibling.nextSibling;g=d.lastChild;var q=g.previousSibling;d.insertBefore(g,c);d.insertBefore(q,g)};EditorUi.prototype.loadLibrary=
-function(c,d){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,q,g.documentElement.getAttribute("title"),d)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,d,g,q){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
-(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var n=null,z=mxUtils.bind(this,function(J,G){0==J.length&&c.isEditable()?(null==n&&(n=document.createElement("div"),n.className="geDropTarget",mxUtils.write(n,mxResources.get("dragElementsHere"))),G.appendChild(n)):this.addLibraryEntries(J,G)});null!=this.sidebar&&null!=d&&this.sidebar.addEntries(d);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,
-g.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),g,null!=q?q:!0,mxUtils.bind(this,function(J){z(d,J)}));this.repositionLibrary(m);var x=C.parentNode.previousSibling;q=x.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=c.title&&x.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+q);var y=document.createElement("div");y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";x.style.position="relative";var I=
-document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(J){if(!mxEvent.isConsumed(J)){var G=
-mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G();mxEvent.consume(J)}}));if(c.isEditable()){var t=this.editor.graph,p=null,F=mxUtils.bind(this,function(J){this.showLibraryDialog(c.getTitle(),C,d,c,c.getMode());mxEvent.consume(J)}),K=mxUtils.bind(this,function(J){c.setModified(!0);c.isAutosave()?(null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p),p=I.cloneNode(!1),
-p.setAttribute("src",Editor.spinImage),p.setAttribute("title",mxResources.get("saving")),p.style.cursor="default",p.style.marginRight="2px",p.style.marginTop="-2px",y.insertBefore(p,y.firstChild),x.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),d,c,c.getMode(),!0,!0,function(){null!=p&&null!=p.parentNode&&(p.parentNode.removeChild(p),x.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=I.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",
-mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(G){this.saveLibrary(c.getTitle(),d,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(x.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(G)})),x.style.paddingRight=18*y.childNodes.length+"px")}),D=mxUtils.bind(this,function(J,G,P,T){J=t.cloneCells(mxUtils.sortCells(t.model.getTopmostCells(J)));for(var W=
-0;W<J.length;W++){var U=t.getCellGeometry(J[W]);null!=U&&U.translate(-G.x,-G.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(J,G.width,G.height,T||"",!0,null,!1));J={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(J))),w:G.width,h:G.height};null!=T&&(J.title=T);d.push(J);K(P);null!=n&&null!=n.parentNode&&0<d.length&&(n.parentNode.removeChild(n),n=null)}),H=mxUtils.bind(this,function(J){if(t.isSelectionEmpty())t.getRubberband().isActive()?(t.getRubberband().execute(J),t.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var G=t.getSelectionCells(),P=t.view.getBounds(G),T=t.view.scale;P.x/=T;P.y/=T;P.width/=T;P.height/=T;P.x-=t.view.translate.x;P.y-=t.view.translate.y;D(G,P)}mxEvent.consume(J)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler.first&&(t.graphHandler.suspend(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility=
-"hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",t.panningManager.stop(),t.autoScroll=!1,mxEvent.consume(J))}),mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.panningManager&&null!=t.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,t.panningManager.stop(),t.graphHandler.reset(),t.isMouseDown=!1,t.autoScroll=!0,H(J),mxEvent.consume(J))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(J){t.isMouseDown&&null!=t.graphHandler.first&&
-(t.graphHandler.resume(),null!=t.graphHandler.hint&&(t.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",t.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(J){C.style.backgroundColor="#f1f3f4";J.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(J){C.style.cursor="";C.style.backgroundColor=
-"";0<J.dataTransfer.files.length&&this.importFiles(J.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(G,P,T,W,U,V,l,A,M){if(null!=G&&"image/"==P.substring(0,6))G="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(G),G=[new mxCell("",new mxGeometry(0,0,U,V),G)],G[0].vertex=!0,D(G,new mxRectangle(0,0,U,V),J,mxEvent.isAltDown(J)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=n&&null!=n.parentNode&&0<d.length&&
-(n.parentNode.removeChild(n),n=null);else{var Q=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var X=JSON.parse(mxUtils.getTextContent(R.documentElement));z(X,C);d=d.concat(X);K(J);this.spinner.stop();Q=!0}catch(ba){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(X=0;X<aa.length;X++){var Y=
-this.stringToCells(Editor.getDiagramNodeXml(aa[X])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);D(Y,new mxRectangle(0,0,Z.width,Z.height),J)}Q=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}Q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=n&&null!=n.parentNode&&0<d.length&&(n.parentNode.removeChild(n),n=null)});null!=M&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(M,function(R){O(R,
-"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,l)&&null!=M?this.isExternalDataComms()?this.parseFile(M,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(G,P)}}));
-J.stopPropagation();J.preventDefault()})),mxEvent.addListener(C,"dragleave",function(J){C.style.cursor="";C.style.backgroundColor="";J.stopPropagation();J.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));y.insertBefore(I,y.firstChild);mxEvent.addListener(I,"click",F);mxEvent.addListener(C,"dblclick",function(J){mxEvent.getSource(J)==C&&F(J)});q=I.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title",
-mxResources.get("add"));y.insertBefore(q,y.firstChild);mxEvent.addListener(q,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(J)})),y.insertBefore(q,y.firstChild))}x.appendChild(y);
-x.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,d){for(var g=0;g<c.length;g++){var q=c[g],m=q.data;if(null!=m){m=this.convertDataUri(m);var n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(n+="aspect=fixed;");d.appendChild(this.sidebar.createVertexTemplate(n+"image="+m,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(m=this.stringToCells(Graph.decompress(q.xml)),0<m.length&&d.appendChild(this.sidebar.createVertexTemplateFromCells(m,
-q.w,q.h,q.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=c.getMode()){var q="1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
+action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=
+z;if(null!=c)try{c.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(y){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||p():p()});e?c():this.handleError(z,mxResources.get("errorLoadingFile"),c,!0,null,null,
+!0)}else p();return m};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,m=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var q=0;q<c.length;q++){this.updatePageRoot(c[q]);var z=c[q].node.cloneNode(!1);z.removeAttribute("name");m.root=c[q].root;var y=p.encode(m);this.editor.graph.saveViewState(c[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");z.appendChild(y);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,
+e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(A,x,I,M){return!M||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=x&&"y"!=x&&"width"!=x&&"height"!=x?M&&"mxCell"==A.nodeName&&"previous"==x?null:I:Math.round(I)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var m=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(m^=this.hashValue(c.nodeName,
+e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var q=c.attributes[p].name,z=null!=e?e(c,q,c.attributes[p].value,!0):c.attributes[p].value;null!=z&&(m^=this.hashValue(q,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)m=(m<<5)-m+this.hashValue(c.childNodes[p],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<
+0;m^=e}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,m,p,q,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var m=g.previousSibling;e.insertBefore(g,c);e.insertBefore(m,g)};EditorUi.prototype.loadLibrary=
+function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,m,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,m){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
+(this.scratchpad=c);var p=this.sidebar.palettes[c.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var q=null,z=mxUtils.bind(this,function(K,G){0==K.length&&c.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),G.appendChild(q)):this.addLibraryEntries(K,G)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,
+g.lastIndexOf("."))));var y=this.sidebar.addPalette(c.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(K){z(e,K)}));this.repositionLibrary(p);var A=y.parentNode.previousSibling;m=A.getAttribute("title");null!=m&&0<m.length&&".scratchpad"!=c.title&&A.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+m);var x=document.createElement("div");x.style.position="absolute";x.style.right="0px";x.style.top="0px";x.style.padding="8px";x.style.backgroundColor="inherit";A.style.position="relative";var I=
+document.createElement("img");I.className="geAdaptiveAsset";I.setAttribute("src",Editor.crossImage);I.setAttribute("title",mxResources.get("close"));I.setAttribute("valign","absmiddle");I.setAttribute("border","0");I.style.position="relative";I.style.top="2px";I.style.width="14px";I.style.cursor="pointer";I.style.margin="0 3px";var M=null;if(".scratchpad"!=c.title||this.closableScratchpad)x.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(K){if(!mxEvent.isConsumed(K)){var G=
+mxUtils.bind(this,function(){this.closeLibrary(c)});null!=M?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G();mxEvent.consume(K)}}));if(c.isEditable()){var E=this.editor.graph,Q=null,n=mxUtils.bind(this,function(K){this.showLibraryDialog(c.getTitle(),y,e,c,c.getMode());mxEvent.consume(K)}),v=mxUtils.bind(this,function(K){c.setModified(!0);c.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=I.cloneNode(!1),
+Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",x.insertBefore(Q,x.firstChild),A.style.paddingRight=18*x.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&(Q.parentNode.removeChild(Q),A.style.paddingRight=18*x.childNodes.length+"px")})):null==M&&(M=I.cloneNode(!1),M.setAttribute("src",Editor.saveImage),M.setAttribute("title",
+mxResources.get("save")),x.insertBefore(M,x.firstChild),mxEvent.addListener(M,"click",mxUtils.bind(this,function(G){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==M||c.isModified()||(A.style.paddingRight=18*x.childNodes.length+"px",M.parentNode.removeChild(M),M=null)});mxEvent.consume(G)})),A.style.paddingRight=18*x.childNodes.length+"px")}),D=mxUtils.bind(this,function(K,G,N,T){K=E.cloneCells(mxUtils.sortCells(E.model.getTopmostCells(K)));for(var V=
+0;V<K.length;V++){var U=E.getCellGeometry(K[V]);null!=U&&U.translate(-G.x,-G.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(K,G.width,G.height,T||"",!0,null,!1));K={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(K))),w:G.width,h:G.height};null!=T&&(K.title=T);e.push(K);v(N);null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),q=null)}),H=mxUtils.bind(this,function(K){if(E.isSelectionEmpty())E.getRubberband().isActive()?(E.getRubberband().execute(K),E.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var G=E.getSelectionCells(),N=E.view.getBounds(G),T=E.view.scale;N.x/=T;N.y/=T;N.width/=T;N.height/=T;N.x-=E.view.translate.x;N.y-=E.view.translate.y;D(G,N)}mxEvent.consume(K)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler.first&&(E.graphHandler.suspend(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility=
+"hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",E.panningManager.stop(),E.autoScroll=!1,mxEvent.consume(K))}),mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.panningManager&&null!=E.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,H(K),mxEvent.consume(K))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(K){E.isMouseDown&&null!=E.graphHandler.first&&
+(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(K){y.style.backgroundColor="#f1f3f4";K.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(K){y.style.cursor="";y.style.backgroundColor=
+"";0<K.dataTransfer.files.length&&this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(G,N,T,V,U,X,l,B,L){if(null!=G&&"image/"==N.substring(0,6))G="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(G),G=[new mxCell("",new mxGeometry(0,0,U,X),G)],G[0].vertex=!0,D(G,new mxRectangle(0,0,U,X),K,mxEvent.isAltDown(K)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<e.length&&
+(q.parentNode.removeChild(q),q=null);else{var P=!1,O=mxUtils.bind(this,function(R,S){null!=R&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(R),null!=S&&0<S.length&&(R=S));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var W=JSON.parse(mxUtils.getTextContent(R.documentElement));z(W,y);e=e.concat(W);v(K);this.spinner.stop();P=!0}catch(ba){}else if("mxfile"==R.documentElement.nodeName)try{var aa=R.documentElement.getElementsByTagName("diagram");for(W=0;W<aa.length;W++){var Y=
+this.stringToCells(Editor.getDiagramNodeXml(aa[W])),Z=this.editor.graph.getBoundingBoxFromGeometry(Y);D(Y,new mxRectangle(0,0,Z.width,Z.height),K)}P=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}P||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<e.length&&(q.parentNode.removeChild(q),q=null)});null!=L&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(L,function(R){O(R,
+"text/xml")},null,l):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,l)&&null!=L?this.isExternalDataComms()?this.parseFile(L,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?O(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):O(G,N)}}));
+K.stopPropagation();K.preventDefault()})),mxEvent.addListener(y,"dragleave",function(K){y.style.cursor="";y.style.backgroundColor="";K.stopPropagation();K.preventDefault()}));I=I.cloneNode(!1);I.setAttribute("src",Editor.editImage);I.setAttribute("title",mxResources.get("edit"));x.insertBefore(I,x.firstChild);mxEvent.addListener(I,"click",n);mxEvent.addListener(y,"dblclick",function(K){mxEvent.getSource(K)==y&&n(K)});m=I.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",
+mxResources.get("add"));x.insertBefore(m,x.firstChild);mxEvent.addListener(m,"click",H);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(K){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(K)})),x.insertBefore(m,x.firstChild))}A.appendChild(x);
+A.style.paddingRight=18*x.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var m=c[g],p=m.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(q+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(q+"image="+p,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(p=this.stringToCells(Graph.decompress(m.xml)),0<p.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(p,
+m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor=
"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==
typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,
-Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,d,g,q,m,n,z){c=new ImageDialog(this,c,d,g,q,m,n,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,d){c=null!=c?c:mxUtils.bind(this,function(g,q){q||(g=new ChangePageSetup(this,null,g),
-g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,d);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,d,g,q,m){c=new LibraryDialog(this,c,d,g,q,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(n){n&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var d=k.apply(this,arguments);
-this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var d=document.createElement("a");d.className="geTitle";d.style.color="#DF6C0C";d.style.fontWeight="bold";d.style.height="100%";d.style.paddingTop="9px";d.innerHTML="<span>+</span>";var g=
-d.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(d,mxResources.get("moreShapes")+"...");mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();mxEvent.consume(q)}));c.appendChild(d);return c};EditorUi.prototype.handleError=function(c,d,g,q,m,n,z){var C=null!=this.spinner&&null!=this.spinner.pause?
-this.spinner.pause():function(){},x=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(p){}if(null!=x||null!=d){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),I=null;d=null!=d?d:mxResources.get("error");if(null!=x){null!=
-x.retry&&(y=mxResources.get("cancel"),I=function(){C();x.retry()});if(404==x.code||404==x.status||403==x.code){z=403==x.code?null!=x.message?mxUtils.htmlEntities(x.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 N=null!=m?null:null!=n?n: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!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==x.code||404==x.status)){N="#U"==N.substring(0,2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(d,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,d,g,q,m)}),
-I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function p(){H.innerText="";for(var J=0;J<F.length;J++){var G=document.createElement("option");mxUtils.write(G,F[J].displayName);G.value=J;H.appendChild(G);G=document.createElement("option");G.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(G,"<"+F[J].email+">");G.setAttribute("disabled","disabled");H.appendChild(G)}G=document.createElement("option");mxUtils.write(G,mxResources.get("addAccount"));G.value=F.length;H.appendChild(G)}var F=this.drive.getUsersList(),
-K=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");K.appendChild(D);var H=document.createElement("select");H.style.width="200px";p();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var J=H.value,G=F.length!=J;G&&this.drive.setUser(F[J]);this.drive.authorize(G,mxUtils.bind(this,function(){G||(F=this.drive.getUsersList(),p())}),mxUtils.bind(this,function(P){this.handleError(P)}),!0)}));K.appendChild(H);
-K=new CustomDialog(this,K,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(K.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=x.message?z=""==x.message&&null!=x.name?mxUtils.htmlEntities(x.name):mxUtils.htmlEntities(x.message):null!=x.response&&null!=x.response.error?z=mxUtils.htmlEntities(x.response.error):"undefined"!==typeof window.App&&(x.code==App.ERROR_TIMEOUT?
-z=mxUtils.htmlEntities(mxResources.get("timeout")):x.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof x&&0<x.length&&(z=mxUtils.htmlEntities(x)))}var t=n=null;null!=x&&null!=x.helpLink?(n=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(x.helpLink)})):null!=x&&null!=x.ownerEmail&&(n=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+n+": "+x.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+
-mxUtils.htmlEntities(x.ownerEmail))}));this.showError(d,z,y,g,I,null,null,n,t,null,null,null,q?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,d,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),d);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,d,g,q,m,n){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=d&&
-d()},function(){z();null!=g&&g()},q,m,null,null,null,null,C);this.showDialog(c.container,340,46+C,!0,n);c.init()};EditorUi.prototype.showBanner=function(c,d,g,q){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var n=document.createElement("div");n.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(n.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(n.style,"transition","all 1s ease");n.className="geBtn gePrimaryBtn";m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";n.appendChild(m);
-m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";n.appendChild(m);mxUtils.write(n,d);document.body.appendChild(n);this.bannerShowing=!0;d=document.createElement("div");d.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!q){d.appendChild(z);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));d.appendChild(C);n.style.paddingBottom="30px";n.appendChild(d)}var x=mxUtils.bind(this,function(){null!=n.parentNode&&(n.parentNode.removeChild(n),this.bannerShowing=!1,z.checked||q)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=
-mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);x()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){x()}),1E3)});mxEvent.addListener(n,"click",mxUtils.bind(this,function(I){var N=mxEvent.getSource(I);N!=z&&N!=C?(null!=g&&g(),x(),mxEvent.consume(I)):y()}));window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,d,g,q){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=d&&(c=Editor.writeGraphModelToPng(c,
-"tEXt","mxfile",encodeURIComponent(d))),0<q&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,d,g,q,m){var n="jpeg"==g?"jpg":g;q=this.getBaseFilename(q)+(null!=d?".drawio":"")+"."+n;c=this.createImageDataUri(c,d,g,m);this.saveData(q,n,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
-"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,d){c=new TextareaDialog(this,c,d,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,d,g,q,m,n){"text/xml"!=g||/(\.drawio)$/i.test(d)||/(\.xml)$/i.test(d)||/(\.svg)$/i.test(d)||
-/(\.html)$/i.test(d)||(d=d+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=q?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,d);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,d),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(d+":",c):this.openInNewWindow(c,
-g,q);else{var z=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(C?parseInt(C[2],10):!1)?!1:n}if(n||this.isOffline()){z.href=URL.createObjectURL(q?this.base64ToBlob(c,g):new Blob([c],{type:g}));n?z.download=d:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
-2E4),z.click(),z.parentNode.removeChild(z)}catch(x){}}else this.createEchoRequest(c,d,g,q,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,d,g,q,m,n){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=n?"&base64="+n:"")+(null!=d?"&filename="+encodeURIComponent(d):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,d){d=d||"";c=atob(c);for(var g=c.length,q=Math.ceil(g/1024),m=Array(q),
-n=0;n<q;++n){for(var z=1024*n,C=Math.min(z+1024,g),x=Array(C-z),y=0;z<C;++y,++z)x[y]=c[z].charCodeAt(0);m[n]=new Uint8Array(x)}return new Blob(m,{type:d})};EditorUi.prototype.saveLocalFile=function(c,d,g,q,m,n,z,C){n=null!=n?n:!1;z=null!=z?z:"vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(n);isLocalStorage&&m++;var x=4>=m?2:6<m?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(y,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,
-g,q);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var t=window.open("about:blank");null==t?mxUtils.popup(c,!0):(t.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),t.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,y,g,q,null,C):null!=y&&0<y.length&&this.pickFolder(I,mxUtils.bind(this,function(p){try{this.exportFile(c,y,g,q,I,p)}catch(F){this.handleError(F)}}))}catch(p){this.handleError(p)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,z,null,1<m,x,c,g,q);n=this.isServices(m)?m>x?390:280:160;this.showDialog(d.container,420,n,!0,!0);d.init()};EditorUi.prototype.openInNewWindow=function(c,d,g){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=d||mxClient.IS_SVG?"image/svg+xml"!=d||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+
-d+";base64,"+c+'"/></html>')):q.document.write("<html>"+c+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),q.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=
-this.tagsComponent=null;var d=c(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
+Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,m,p,q,z){c=new ImageDialog(this,c,e,g,m,p,q,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),
+g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,m,p){c=new LibraryDialog(this,c,e,g,m,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);
+this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=
+e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,m,p,q,z){var y=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(Q){}if(null!=A||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"));var x=mxResources.get("ok"),I=null;e=null!=e?e:mxResources.get("error");if(null!=A){null!=
+A.retry&&(x=mxResources.get("cancel"),I=function(){y();A.retry()});if(404==A.code||404==A.status||403==A.code){z=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var M=null!=p?null:null!=q?q:window.location.hash;if(null!=M&&("#G"==M.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+M.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==A.code||404==A.status)){M="#U"==M.substring(0,2)?M.substring(45,M.lastIndexOf("%26ex")):M.substring(2);this.showError(e,z,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+M);this.handleError(c,e,g,m,p)}),
+I,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){H.innerText="";for(var K=0;K<n.length;K++){var G=document.createElement("option");mxUtils.write(G,n[K].displayName);G.value=K;H.appendChild(G);G=document.createElement("option");G.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(G,"<"+n[K].email+">");G.setAttribute("disabled","disabled");H.appendChild(G)}G=document.createElement("option");mxUtils.write(G,mxResources.get("addAccount"));G.value=n.length;H.appendChild(G)}var n=this.drive.getUsersList(),
+v=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");v.appendChild(D);var H=document.createElement("select");H.style.width="200px";Q();mxEvent.addListener(H,"change",mxUtils.bind(this,function(){var K=H.value,G=n.length!=K;G&&this.drive.setUser(n[K]);this.drive.authorize(G,mxUtils.bind(this,function(){G||(n=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(N){this.handleError(N)}),!0)}));v.appendChild(H);
+v=new CustomDialog(this,v,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(v.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=A.message?z=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?z=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?
+z=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(z=mxUtils.htmlEntities(A)))}var E=q=null;null!=A&&null!=A.helpLink?(q=mxResources.get("help"),E=mxUtils.bind(this,function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),E=mxUtils.bind(this,function(){return this.openLink("mailto:"+
+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,z,x,g,I,null,null,q,E,null,null,null,m?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,m,p,q){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&
+e()},function(){z();null!=g&&g()},m,p,null,null,null,null,y);this.showDialog(c.container,340,46+y,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,m){var p=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var q=document.createElement("div");q.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+
+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";p=document.createElement("img");p.setAttribute("src",IMAGE_PATH+"/logo.png");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(p);
+p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";q.appendChild(p);mxUtils.write(q,e);document.body.appendChild(q);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("id","geDoNotShowAgainCheckbox");z.style.marginRight="6px";if(!m){e.appendChild(z);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));e.appendChild(y);q.style.paddingBottom="30px";q.appendChild(e)}var A=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,z.checked||m)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=
+mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(I){mxEvent.consume(I);A()}));var x=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){A()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(I){var M=mxEvent.getSource(I);M!=z&&M!=y?(null!=g&&g(),A(),mxEvent.consume(I)):x()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(x,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,m){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,
+"tEXt","mxfile",encodeURIComponent(e))),0<m&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,m,p){var q="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=e?".drawio":"")+"."+q;c=this.createImageDataUri(c,e,g,p);this.saveData(m,q,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,m,p,q){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||
+/(\.html)$/i.test(e)||(e=e+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=m?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,
+g,m);else{var z=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):!1)?!1:q}if(q||this.isOffline()){z.href=URL.createObjectURL(m?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
+2E4),z.click(),z.parentNode.removeChild(z)}catch(A){}}else this.createEchoRequest(c,e,g,m,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,m,p,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,m=Math.ceil(g/1024),p=Array(m),
+q=0;q<m;++q){for(var z=1024*q,y=Math.min(z+1024,g),A=Array(y-z),x=0;z<y;++x,++z)A[x]=c[z].charCodeAt(0);p[q]=new Uint8Array(A)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,m,p,q,z,y){q=null!=q?q:!1;z=null!=z?z:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var A=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(x,I){try{if("_blank"==I)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,
+g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var M=new EmbedDialog(this,c);this.showDialog(M.container,450,240,!0,!0);M.init()}else{var E=window.open("about:blank");null==E?mxUtils.popup(c,!0):(E.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),E.document.close())}else I==App.MODE_DEVICE||"download"==I?this.doSaveLocalFile(c,x,g,m,null,y):null!=x&&0<x.length&&this.pickFolder(I,mxUtils.bind(this,function(Q){try{this.exportFile(c,x,g,m,I,Q)}catch(n){this.handleError(n)}}))}catch(Q){this.handleError(Q)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,z,null,1<p,A,c,g,m);q=this.isServices(p)?p>A?390:280:160;this.showDialog(e.container,420,q,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),m.document.write('<html><img style="max-width:100%;" src="data:'+
+e+";base64,"+c+'"/></html>')):m.document.write("<html>"+c+"</html>"):m.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),m.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=
+this.tagsComponent=null;var e=c(mxUtils.bind(this,function(m){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
-80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var m=d.getBoundingClientRect();this.tagsDialog.style.left=m.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";m=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=m.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();d.style.display=0<q.length?"":"none"}))}e.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();e.style.display=0<m.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,
-function(q){var m=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",m);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)m.apply(this);else{this.exportDialog=document.createElement("div");var n=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=n.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";n=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=n.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var x=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
-"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",x);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(x.substring(x.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,d,g,q,m){this.isLocalFileSave()?this.saveLocalFile(g,c,q,m,d):this.saveRequest(c,d,mxUtils.bind(this,function(n,z){return this.createEchoRequest(g,n,q,m,d,z)}),g,m,q)};EditorUi.prototype.saveRequest=function(c,d,g,q,m,n,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var x=4>=C?2:6<C?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,I){if("_blank"==I||null!=y&&0<y.length){var N=g("_blank"==I?null:y,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=N&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?N.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(t){n=null!=n?n:"pdf"==d?"application/pdf":"image/"+d;if(null!=q)try{this.exportFile(q,y,n,!0,I,t)}catch(p){this.handleError(p)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,n,!0,I,t)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(p){this.spinner.stop();this.handleError(p)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<C,x,q,n,m);C=this.isServices(C)?4<C?390:280:160;this.showDialog(c.container,
-420,C,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,d,g,q,m,n){};EditorUi.prototype.pickFolder=function(c,d,g){d(null)};EditorUi.prototype.exportSvg=function(c,d,g,q,m,n,z,C,x,y,I,N,t,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var F=this.editor.graph.isSelectionEmpty();g=null!=g?g:F;var K=d?null:this.editor.graph.background;K==mxConstants.NONE&&
-(K=null);null==K&&0==d&&(K=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var D=this.editor.graph.getSvg(K,c,z,C,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!t,I,N);q&&this.editor.graph.addSvgShadow(D);var H=this.getBaseFilename()+(m?".drawio":"")+".svg";p=null!=p?p:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(P)}))});var J=mxUtils.bind(this,function(P){this.spinner.stop();m&&P.setAttribute("content",this.getFileData(!0,null,null,null,g,x,null,null,null,!1));p(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var G=mxUtils.bind(this,function(P){n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,J,this.thumbImageCache)):
-J(P)});t?this.embedFonts(D,G):(this.editor.addFontCss(D),G(D))}catch(P){this.handleError(P)}};EditorUi.prototype.addRadiobox=function(c,d,g,q,m,n,z){return this.addCheckbox(c,g,q,m,n,z,!0,d)};EditorUi.prototype.addCheckbox=function(c,d,g,q,m,n,z,C){n=null!=n?n:!0;var x=document.createElement("input");x.style.marginRight="8px";x.style.marginTop="16px";x.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();x.id=z;null!=C&&x.setAttribute("name",C);g&&(x.setAttribute("checked","checked"),
-x.defaultChecked=!0);q&&x.setAttribute("disabled","disabled");n&&(c.appendChild(x),g=document.createElement("label"),mxUtils.write(g,d),g.setAttribute("for",z),c.appendChild(g),m||mxUtils.br(c));return x};EditorUi.prototype.addEditButton=function(c,d){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var q=this.getCurrentFile(),m="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var n=document.createElement("select");
-n.style.maxWidth="200px";n.style.width="auto";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");n.appendChild(q);c.appendChild(n);mxEvent.addListener(n,"change",mxUtils.bind(this,function(){if("custom"==n.value){var z=new FilenameDialog(this,
-m,mxResources.get("ok"),function(C){null!=C?m=C:n.value="blank"},mxResources.get("url"),null,null,null,null,function(){n.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==d||d.checked)?n.removeAttribute("disabled"):n.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===n.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return n}}};
-EditorUi.prototype.addLinkSection=function(c,d){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=n&&n!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=n):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select");
-q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("openInNewWindow"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","self");mxUtils.write(m,mxResources.get("openInThisWindow"));
-q.appendChild(m);d&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(d));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var n="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(n||"none",function(x){n=x;g()});mxEvent.consume(C)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height=
-"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return n},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(c,d,g,q,m,n,z){z=null!=z?z:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!=
-d&&d!=mxConstants.NONE&&z.push("highlight="+("#"==d.charAt(0)?d.substring(1):d)),null!=m&&0<m.length&&z.push("edit="+encodeURIComponent(m)),n&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,d,g,q,m,n,z,C,x,y){x=this.createUrlParameters(c,d,g,q,m,n,x);c=this.getCurrentFile();d=!0;null!=z?g="#U"+encodeURIComponent(z):
-(c=this.getCurrentFile(),C||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),d=!1));d&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(x.push("open="+g.substring(1)),g="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,d,g,q,m,n,z,C,x,y,I,N){this.getBasenames();var t={};""!=m&&m!=mxConstants.NONE&&(t.highlight=m);"auto"!==q&&(t.target=q);y||(t.lightbox=!1);t.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(t.zoom=g/100);g=[];z&&(g.push("pages"),t.resize=!0,null!=this.pages&&null!=this.currentPage&&(t.page=mxUtils.indexOf(this.pages,
-this.currentPage)));d&&(g.push("zoom"),t.resize=!0);C&&g.push("layers");x&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),t.toolbar=g.join(" "));null!=I&&0<I.length&&(t.edit=I);null!=c?t.url=c:t.xml=this.getFileData(!0,null,null,null,null,!z);d='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(t))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(d,'<script type="text/javascript" src="'+
-(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,d,g,q){var m=document.createElement("div");m.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxResources.get("html"));n.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(n);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");n=C.cloneNode(!0);n.setAttribute("value","copy");z.appendChild(n);var x=document.createElement("span");
-mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(x);mxUtils.br(z);z.appendChild(C);x=document.createElement("span");mxUtils.write(x,mxResources.get("publicDiagramUrl"));z.appendChild(x);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(x=document.createElement("a"),x.style.paddingLeft="12px",x.style.color="gray",x.style.cursor="pointer",mxUtils.write(x,mxResources.get("share")),z.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(y.getId())})));n.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");m.appendChild(z);var I=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),!0,null,!0);mxUtils.write(m,":");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="100%";m.appendChild(t);var p=this.addCheckbox(m,mxResources.get("fit"),!0);
-z=null!=this.pages&&1<this.pages.length;var F=F=this.addCheckbox(m,mxResources.get("allPages"),z,!z),K=this.addCheckbox(m,mxResources.get("layers"),!0),D=this.addCheckbox(m,mxResources.get("tags"),!0),H=this.addCheckbox(m,mxResources.get("lightbox"),!0),J=null;z=380;if(EditorUi.enableHtmlEditOption){J=this.addEditButton(m,H);var G=J.getEditInput();G.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled");
-G.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){q(C.checked?g:null,N.checked,t.value,I.getTarget(),I.getColor(),p.checked,F.checked,K.checked,D.checked,H.checked,null!=J?J.getLink():null)}),null,c,d);this.showDialog(c.container,340,z,!0,!0);n.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,d,g,q,m,n,z,C){var x=document.createElement("div");x.style.whiteSpace=
-"nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";x.appendChild(y);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||d)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var N=document.createElement("div");N.style.whiteSpace="normal";mxUtils.write(N,mxResources.get("linkAccountRequired"));y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);x.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.appendChild(N);
-mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var t=null,p=null;if(null!=g||null!=q)c+=30,mxUtils.write(x,mxResources.get("width")+":"),t=document.createElement("input"),
-t.setAttribute("type","text"),t.style.marginRight="16px",t.style.width="50px",t.style.marginLeft="6px",t.style.marginRight="16px",t.style.marginBottom="10px",t.value="100%",x.appendChild(t),mxUtils.write(x,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=q+"px",x.appendChild(p),mxUtils.br(x);var F=this.addLinkSection(x,n);g=null!=this.pages&&1<this.pages.length;var K=null;
-if(null==I||I.constructor!=window.DriveFile||d)K=this.addCheckbox(x,mxResources.get("allPages"),g,!g);var D=this.addCheckbox(x,mxResources.get("lightbox"),!0,null,null,!n),H=this.addEditButton(x,D),J=H.getEditInput();n&&(J.style.marginLeft=D.style.marginLeft,D.style.display="none",c-=20);var G=this.addCheckbox(x,mxResources.get("layers"),!0);G.style.marginLeft=J.style.marginLeft;G.style.marginTop="8px";var P=this.addCheckbox(x,mxResources.get("tags"),!0);P.style.marginLeft=J.style.marginLeft;P.style.marginBottom=
-"16px";P.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(G.removeAttribute("disabled"),J.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});d=new CustomDialog(this,x,mxUtils.bind(this,function(){m(F.getTarget(),F.getColor(),null==K?!0:K.checked,D.checked,H.getLink(),G.checked,null!=t?t.value:null,
-null!=p?p.value:null,P.checked)}),null,mxResources.get("create"),z,C);this.showDialog(d.container,340,300+c,!0,!0);null!=t?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)):F.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,d,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(m?"10":"4")+"px";n.appendChild(z);if(m){mxUtils.write(n,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";n.appendChild(C);mxUtils.write(n,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";n.appendChild(x);mxUtils.br(n)}var y=this.addCheckbox(n,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=q?null:this.addCheckbox(n,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var N=q?null:this.addCheckbox(n,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,n,mxUtils.bind(this,function(){var t=
-parseInt(C.value)/100||1,p=parseInt(x.value)||0;g(!y.checked,null!=I?I.checked:!1,null!=N?N.checked:!1,t,p)}),null,c,d);this.showDialog(c.container,300,(m?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,d,g,q,m,n,z,C,x){z=null!=z?z:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var I=this.editor.graph,N="jpeg"==C?220:300,t=document.createElement("h3");mxUtils.write(t,c);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-y.appendChild(t);mxUtils.write(y,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%";y.appendChild(p);mxUtils.write(y,mxResources.get("borderWidth")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.value=this.lastExportBorder||
-"0";y.appendChild(F);mxUtils.br(y);var K=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var J={};for(t=0;t<c.length;t++)if(!I.isSelectionEmpty()||"selectionOnly"!=
-c[t]){var G=document.createElement("option");mxUtils.write(G,mxResources.get(c[t]));G.setAttribute("value",c[t]);H.appendChild(G);J[c[t]]=G}x?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(H),mxUtils.br(y),N+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(K.checked=!0)})):n&&(y.appendChild(D),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(K,"change",function(){K.checked?D.removeAttribute("disabled"):D.setAttribute("disabled",
-"disabled")}));I.isSelectionEmpty()?x&&(K.style.display="none",K.nextSibling.style.display="none",K.nextSibling.nextSibling.style.display="none",N-=30):(H.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(K,"change",function(){H.value=K.checked?"selectionOnly":"diagram"}));var P=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var W=this.addCheckbox(y,
-mxResources.get("shadow"),I.shadowVisible),U=null;if("png"==C||"jpeg"==C)U=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var V=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),z,null,null,"jpeg"!=C);V.style.marginBottom="16px";var l=document.createElement("input");l.style.marginBottom="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||l.setAttribute("disabled","disabled");var A=
-document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.style.marginBottom="16px";A.className="geBtn";n=document.createElement("option");n.setAttribute("value","none");mxUtils.write(n,mxResources.get("noChange"));A.appendChild(n);n=document.createElement("option");n.setAttribute("value","embedFonts");mxUtils.write(n,mxResources.get("embedFonts"));A.appendChild(n);n=document.createElement("option");n.setAttribute("value","lblToSvg");mxUtils.write(n,
-mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||A.appendChild(n);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){"lblToSvg"==A.value?(l.checked=!0,l.setAttribute("disabled","disabled"),J.page.style.display="none","page"==H.value&&(H.value="diagram"),W.checked=!1,W.setAttribute("disabled","disabled"),Q.style.display="inline-block",M.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),W.removeAttribute("disabled"),
-J.page.style.display="",Q.style.display="none",M.style.display="")}));d&&(y.appendChild(l),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(A),mxUtils.br(y),N+=60);var M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="8px";M.style.marginRight="10px";M.className="geBtn";d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));M.appendChild(d);
-d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));M.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));M.appendChild(d);var Q=document.createElement("div");mxUtils.write(Q,mxResources.get("LinksLost"));Q.style.margin="7px";Q.style.display="none";"svg"==C&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(M),y.appendChild(Q),mxUtils.br(y),
-mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=F.value;this.lastExportZoom=p.value;m(p.value,P.checked,!K.checked,W.checked,V.checked,l.checked,F.value,D.checked,!1,M.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==A.value,"lblToSvg"==A.value)}),null,g,q);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
-!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,d,g,q,m){var n=document.createElement("div");n.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=d){var C=document.createElement("h3");mxUtils.write(C,d);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(C)}var x=this.addCheckbox(n,mxResources.get("fit"),!0),y=this.addCheckbox(n,mxResources.get("shadow"),z.shadowVisible&&q,!q),I=this.addCheckbox(n,g),N=this.addCheckbox(n,mxResources.get("lightbox"),
-!0),t=this.addEditButton(n,N),p=t.getEditInput(),F=1<z.model.getChildCount(z.model.getRoot()),K=this.addCheckbox(n,mxResources.get("layers"),F,!F);K.style.marginLeft=p.style.marginLeft;K.style.marginBottom="12px";K.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(F&&K.removeAttribute("disabled"),p.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"));p.checked&&N.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled",
-"disabled")});d=new CustomDialog(this,n,mxUtils.bind(this,function(){c(x.checked,y.checked,I.checked,N.checked,t.getLink(),K.checked)}),null,mxResources.get("embed"),m);this.showDialog(d.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,d,g,q,m,n,z,C){function x(p){var F=" ",K="";q&&(F=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",K+="cursor:pointer;");c&&(K+="max-width:100%;");var D="";g&&(D=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');z('<img src="'+p+'"'+D+(""!=K?' style="'+K+'"':"")+F+"/>")}var y=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(p){var F=q?this.getFileData(!0):null;p=
-this.createImageDataUri(p,F,"png");x(p)}),null,null,null,mxUtils.bind(this,function(p){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,d,null,null,Editor.defaultBorder);else if(d=this.getFileData(!0),y.width*y.height<=MAX_AREA&&d.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+N+"&xml="+encodeURIComponent(d));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&
-299>=t.getStatus()?x("data:image/png;base64,"+t.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,d,g,q,m,n,z){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),x=C.getElementsByTagName("a");if(null!=x)for(var y=0;y<x.length;y++){var I=x[y].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==x[y].getAttribute("target")&&x[y].removeAttribute("target")}q&&
-C.setAttribute("content",this.getFileData(!0));d&&this.editor.graph.addSvgShadow(C);if(g){var N=" ",t="";q&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(n?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");c&&(t+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(p){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(p))+'"'+(""!=t?' style="'+t+'"':"")+N+"/>")}))}else t="",q&&(d=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=d?"&page="+d:"")+(m?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),c&&(c=parseInt(C.getAttribute("width")),m=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),t+="max-width:100%;max-height:"+m+"px;",C.removeAttribute("height")),""!=t&&C.setAttribute("style",t),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),z(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(c){c=
-Math.floor((new Date-c)/1E3);var d=Math.floor(c/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(c/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(c/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(c/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(c/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,d){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
-c;else if("mxfile"==c.nodeName){var q=c.getElementsByTagName("diagram");if(0<q.length){g=q[0];var m=d.getGlobalVariable;d.getGlobalVariable=function(n){return"page"==n?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==n?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}q=this.editor.graph;try{this.editor.graph=d,this.editor.setGraphXml(c)}catch(n){}finally{this.editor.graph=q}return c};EditorUi.prototype.getPngFileProperties=function(c){var d=1,g=0;if(null!=
-c){if(c.hasAttribute("scale")){var q=parseFloat(c.getAttribute("scale"));!isNaN(q)&&0<q&&(d=q)}c.hasAttribute("border")&&(q=parseInt(c.getAttribute("border")),!isNaN(q)&&0<q&&(g=q))}return{scale:d,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,d,g,q,m){try{var n=this.editor.graph,z=null!=n.themes&&"darkTheme"==n.defaultThemeName,C=null;if(null!=g&&0<g.length)n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet()),document.body.appendChild(n.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),n),C=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){n=this.createTemporaryGraph(z?n.getDefaultStylesheet():n.getStylesheet());var x=n.getGlobalVariable;n.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?n.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&n.setBackgroundImage(y.viewState.backgroundImage);n.getGlobalVariable=function(I){return"page"==I?y.getName():"pagenumber"==I?1:x.apply(this,
-arguments)};document.body.appendChild(n.container);n.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=I.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(C));c(N.substring(N.lastIndexOf(",")+1));n!=this.editor.graph&&n.container.parentNode.removeChild(n.container)}catch(t){null!=d&&d(t)}}),null,null,null,mxUtils.bind(this,function(I){null!=d&&
-d(I)}),null,null,q,null,n.shadowVisible,null,n,m,null,null,null,"diagram",null)}catch(I){null!=d&&d(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,d,g,q,m,n,z,C,x,y,I,N,t){C=null!=C?C:!0;I=null!=I?I:0;z=null!=x?x:d.background;z==mxConstants.NONE&&(z=null);n=d.getSvg(z,y,I,null,null,n,null,null,null,d.shadowVisible||N,null,t,"diagram");(d.shadowVisible||N)&&d.addSvgShadow(n,null,null,0==I);null!=c&&n.setAttribute("content",c);null!=g&&n.setAttribute("resource",g);var p=mxUtils.bind(this,function(F){F=
-(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(F);null!=m&&m(F);return F});d.mathEnabled&&this.editor.addMathCss(n);if(null!=m)this.embedFonts(n,mxUtils.bind(this,function(F){C?this.editor.convertImages(F,mxUtils.bind(this,function(K){p(K)})):p(F)}));else return p(n)};EditorUi.prototype.embedFonts=function(c,d){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),d(c)}catch(q){d(c)}}))}catch(g){d(c)}}))};EditorUi.prototype.exportImage=function(c,d,g,q,m,n,z,C,x,y,I,N,t){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var p=this.editor.graph.isSelectionEmpty();g=null!=g?g:p;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(F){this.spinner.stop();try{this.saveCanvas(F,
-m?this.getFileData(!0,null,null,null,g,C):null,x,null==this.pages||0==this.pages.length,I)}catch(K){this.handleError(K)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}),null,g,c||1,d,q,null,null,n,z,y,N,t)}catch(F){this.spinner.stop(),this.handleError(F)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,d,g,q,m,n,z){d=null!=d?d:0;g=null!=g?g:0;var C=[];try{var x=
-this.editor.graph;if(null!=c&&0<c.length){x.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var N=I.getElementsByTagName("diagram");if(1==N.length&&!n){if(I=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var t=N[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,t))}}else if(0<N.length){n=[];var p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(N[0]),q=!1,p=1);for(;p<N.length;p++){var F=N[p].getAttribute("id");N[p].removeAttribute("id");var K=this.updatePageRoot(new DiagramPage(N[p]));c[F]=N[p].getAttribute("id");var D=this.pages.length;null==K.getName()&&K.setName(mxResources.get("pageWithNumber",[D+1]));x.model.execute(new ChangePage(this,K,K,D,
-!0));n.push(K)}this.updatePageLinks(c,n)}}if(null!=I&&"mxGraphModel"===I.nodeName){C=x.importGraphModel(I,d,g,q);if(null!=C)for(p=0;p<C.length;p++)this.updatePageLinksForCell(c,C[p]);var H=x.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var J=new ChangePageSetup(this,null,H);J.ignoreColor=!0;x.model.execute(J)}}z&&this.insertHandler(C,null,null,x.defaultVertexStyle,x.defaultEdgeStyle,!1,!0)}finally{x.model.endUpdate()}}}catch(G){if(m)throw G;
-this.handleError(G)}return C};EditorUi.prototype.updatePageLinks=function(c,d){for(var g=0;g<d.length;g++)this.updatePageLinksForCell(c,d[g].root),null!=d[g].viewState&&this.updateBackgroundPageLink(c,d[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,d){try{if(null!=d&&Graph.isPageLink(d.originalSrc)){var g=c[d.originalSrc.substring(d.originalSrc.indexOf(",")+1)];null!=g&&(d.originalSrc="data:page/id,"+g)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,d){var g=document.createElement("div"),q=this.editor.graph,m=q.getLinkForCell(d);null!=m&&q.setLinkForCell(d,this.updatePageLink(c,m));if(q.isHtmlLabel(d)){g.innerHTML=q.sanitizeHtml(q.getLabel(d));for(var n=g.getElementsByTagName("a"),z=!1,C=0;C<n.length;C++)m=n[C].getAttribute("href"),null!=m&&(n[C].setAttribute("href",this.updatePageLink(c,m)),z=!0);z&&q.labelChanged(d,g.innerHTML)}for(C=0;C<q.model.getChildCount(d);C++)this.updatePageLinksForCell(c,q.model.getChildAt(d,C))};EditorUi.prototype.updatePageLink=
-function(c,d){if(Graph.isPageLink(d)){var g=c[d.substring(d.indexOf(",")+1)];d=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==d.substring(0,17))try{var q=JSON.parse(d.substring(17));if(null!=q.actions){for(var m=0;m<q.actions.length;m++){var n=q.actions[m];if(null!=n.open&&Graph.isPageLink(n.open)){var z=n.open.substring(n.open.indexOf(",")+1);g=c[z];null!=g?n.open="data:page/id,"+g:null==this.getPageById(z)&&delete n.open}}d="data:action/json,"+JSON.stringify(q)}}catch(C){}return d};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,d,g,q,m){q=null!=q?q:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(q);try{var C="UNKNOWN-VISIO",x=q.lastIndexOf(".");if(0<=x&&x<q.length)C=q.substring(x+1).toUpperCase();else{var y=q.lastIndexOf("/");0<=
-y&&y<q.length&&(q=q.substring(y+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+q,label:z?"remote":"local"})}catch(N){}if(z)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{z=new FormData;z.append("file1",c,q);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(q)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
-null!=m&&I.setRequestHeader("x-convert-custom",m);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var N=I.response;if("text/xml"==N.type){var t=new FileReader;t.onload=mxUtils.bind(this,function(p){try{d(p.target.result)}catch(F){g({message:mxResources.get("errorLoadingFile")})}});t.readAsText(N)}else this.doImportVisio(N,d,g,q)}catch(p){g(p)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(t=new FileReader,t.onload=
-function(){g({message:JSON.parse(t.result).Message})},t.readAsText(I.response))}catch(p){g({})}});I.send(z)}else try{this.doImportVisio(c,d,g,q)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.importGraphML=function(c,d,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
-var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,d,g)}catch(m){g(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(c,d,g){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var m=
-JSON.parse(c);d(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var n=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&n.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var z=0;z<m.svgThumbs.length;z++)n.push(Editor.createSvgDataUri(m.svgThumbs[z]));null!=m.thumb&&n.push(m.thumb);console.log.apply(console,n)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",q)})})})}):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generateMermaidImage=function(c,
-d,g,q){var m=this,n=function(){try{this.loadingMermaid=!1,d=null!=d?d:mxUtils.clone(EditorUi.defaultMermaidConfig),d.securityLevel="strict",d.startOnLoad=!1,Editor.isDarkMode()&&(d.theme="dark"),mermaid.mermaidAPI.initialize(d),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(z).getElementsByTagName("svg");
-if(0<C.length){var x=parseFloat(C[0].getAttribute("width")),y=parseFloat(C[0].getAttribute("height"));if(isNaN(x)||isNaN(y))try{var I=C[0].getAttribute("viewBox").split(/\s+/);x=parseFloat(I[2]);y=parseFloat(I[3])}catch(N){x=x||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(z)),x,y)}else q({message:mxResources.get("invalidInput")})}catch(N){q(N)}})}catch(z){q(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?n():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-n):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generatePlantUmlImage=function(c,d,g,q){function m(C,x,y){c1=C>>2;c2=(C&3)<<4|x>>4;c3=(x&15)<<2|y>>6;c4=y&63;r="";r+=n(c1&63);r+=n(c2&63);r+=n(c3&63);return r+=n(c4&63)}function n(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==d?PLANT_URL+"/txt/":"png"==d?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+m(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+m(C.charCodeAt(i),0,0):r+m(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=d&&(z.responseType="blob");z.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==d)g(this.response);else{var x=new FileReader;x.readAsDataURL(this.response);x.onloadend=function(y){var I=new Image;I.onload=
-function(){try{var N=I.width,t=I.height;if(0==N&&0==t){var p=x.result,F=p.indexOf(","),K=decodeURIComponent(escape(atob(p.substring(F+1)))),D=mxUtils.parseXml(K).getElementsByTagName("svg");0<D.length&&(N=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}g(x.result,N,t)}catch(H){q(H)}};I.src=x.result};x.onerror=function(y){q(y)}}else q(C)};z.onerror=function(C){q(C)};z.send()};EditorUi.prototype.insertAsPreText=function(c,d,g){var q=this.editor.graph,m=null;q.getModel().beginUpdate();
-try{m=q.insertVertex(null,null,"<pre>"+c+"</pre>",d,g,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(m,!0)}finally{q.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,d,g,q,m,n,z,C){n=null!=n?n:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(t){4==
-t.readyState&&200<=t.status&&299>=t.status&&this.editor.graph.setSelectionCells(this.insertTextAt(t.responseText,d,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var x=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,d,g,n,!0,C)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
-d,g,n,!0,C);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(y,d,g,n,!0,C);if(0<I.length)return I}catch(t){}this.loadImage(c,mxUtils.bind(this,function(t){if("data:"==c.substring(0,5))this.resizeImage(t,c,mxUtils.bind(this,function(K,D,H){x.setSelectionCell(x.insertVertex(null,null,
-"",x.snap(d),x.snap(g),D,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(K)+";"))}),z,this.maxImageSize);else{var p=Math.min(1,Math.min(this.maxImageSize/t.width,this.maxImageSize/t.height)),F=Math.round(t.width*p);t=Math.round(t.height*p);x.setSelectionCell(x.insertVertex(null,null,"",x.snap(d),x.snap(g),F,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var t=null;x.getModel().beginUpdate();try{t=x.insertVertex(x.getDefaultParent(),null,c,x.snap(d),x.snap(g),1,1,"text;"+(q?"html=1;":"")),x.updateCellSize(t),x.fireEvent(new mxEventObject("textInserted","cells",[t]))}finally{x.getModel().endUpdate()}x.setSelectionCell(t)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,d,g,n,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(t){this.editor.graph.setSelectionCells(this.importXml(t,d,g,n,null,C))}),mxUtils.bind(this,function(t){this.handleError(t)}));else{x=this.editor.graph;m=null;x.getModel().beginUpdate();try{m=x.insertVertex(x.getDefaultParent(),null,"",x.snap(d),x.snap(g),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));x.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
-"...");m.value=c;x.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=x.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&x.setLinkForCell(m,m.value);m.geometry.width+=x.gridSize;m.geometry.height+=x.gridSize}finally{x.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var d=-1;do c/=1024,d++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};
-EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var d=c.indexOf(";");0<d&&(c=c.substring(0,d)+c.substring(c.indexOf(",",d+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,d){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,d){if(c&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,C){StorageFile.listFiles(this,
-"F",z,C)});window.openBrowserFile=mxUtils.bind(this,function(z,C,x){StorageFile.getFileContent(this,z,C,x)});window.deleteBrowserFile=mxUtils.bind(this,function(z,C,x){StorageFile.deleteFile(this,z,C,x)});if(!d){var q=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(z=new Blob([z],{type:"application/octet-stream"}),
-this.importVisio(z,mxUtils.bind(this,function(x){this.importXml(x,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!d){var m=this.dialog,n=m.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=q;n.apply(m,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,d,g){var q=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(n){if(mxUtils.isEmptyObject(n.files))g();else{var z=0,C,x=!1;n.forEach(function(y,I){y=I.name.toLowerCase();"diagram/diagram.xml"==y?(x=!0,I.async("string").then(function(N){0==N.indexOf("<mxfile ")?d(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>z&&(z=y,C=I))});0<z?C.async("string").then(function(y){(new XMLHttpRequest).upload&&
-q.isRemoteFileFormat(y,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):q.parseFileData(y,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?d(I.responseText):g())}),c.name):g()}):x||g()}},function(n){g(n)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,d,g,q,m,n,z,C,x,y,I,N){y=null!=
-y?y:!0;var t=!1,p=null,F=mxUtils.bind(this,function(K){var D=null;null!=K&&"<mxlibrary"==K.substring(0,10)?this.loadLibrary(new LocalLibrary(this,K,z)):D=this.importXml(K,g,q,y,null,null!=N?mxEvent.isControlDown(N):null);null!=C&&C(D)});"image"==d.substring(0,5)?(x=!1,"image/png"==d.substring(0,9)&&(d=I?null:this.extractGraphModelFromPng(c),null!=d&&0<d.length&&(p=this.importXml(d,g,q,y,null,null!=N?mxEvent.isControlDown(N):null),x=!0)),x||(d=this.editor.graph,x=c.indexOf(";"),0<x&&(c=c.substring(0,
-x)+c.substring(c.indexOf(",",x+1))),y&&d.isGridEnabled()&&(g=d.snap(g),q=d.snap(q)),p=[d.insertVertex(null,null,"",g,q,m,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(t=!0,this.importGraphML(c,F)):null!=x&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(t=!0,this.importVisio(x,F)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(t=!0,m=mxUtils.bind(this,function(K){4==K.readyState&&(200<=K.status&&299>=K.status?F(K.responseText):null!=C&&C(null))}),null!=c?this.parseFileData(c,m,z):this.parseFile(x,m,z)):0==c.indexOf("PK")&&null!=x?(t=!0,this.importZipFile(x,F,mxUtils.bind(this,function(){p=this.insertTextAt(this.validateFileData(c),g,q,!0,null,y);C(p)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(p=this.insertTextAt(this.validateFileData(c),
-g,q,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));t||null==C||C(p);return p};EditorUi.prototype.importFiles=function(c,d,g,q,m,n,z,C,x,y,I,N,t){q=null!=q?q:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var p=null!=d&&null!=g,F=!0;d=null!=d?d:0;g=null!=g?g:0;var K=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var D=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>D){K=!0;break}var J=mxUtils.bind(this,function(){var G=
-this.editor.graph,P=G.gridSize;m=null!=m?m:mxUtils.bind(this,function(A,M,Q,O,R,S,X,aa,Y){try{return null!=A&&"<mxlibrary"==A.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,A,X)),null):this.isCompatibleString(A)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,A,X,!0)),null):this.importFile(A,M,Q,O,R,S,X,aa,Y,p,N,t)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(A){G.setSelectionCells(A)});
-if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,W=T,U=[],V=mxUtils.bind(this,function(A,M){U[A]=M;if(0==--W){this.spinner.stop();if(null!=C)C(U);else{var Q=[];G.getModel().beginUpdate();try{for(A=0;A<U.length;A++){var O=U[A]();null!=O&&(Q=Q.concat(O))}}finally{G.getModel().endUpdate()}}n(Q)}}),l=0;l<T;l++)mxUtils.bind(this,function(A){var M=c[A];if(null!=M){var Q=new FileReader;Q.onload=mxUtils.bind(this,function(O){if(null==z||z(M))if("image/"==M.type.substring(0,
-6))if("image/svg"==M.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+1))));var X=mxUtils.parseXml(S);S=X.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=N?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,
-14)?V(A,mxUtils.bind(this,function(){try{if(null!=X){var ba=X.getElementsByTagName("svg");if(0<ba.length){var ha=ba[0],ma=ha.getAttribute("width"),ia=ha.getAttribute("height");ma=null!=ma&&"%"!=ma.charAt(ma.length-1)?parseFloat(ma):NaN;ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;var qa=ha.getAttribute("viewBox");if(null==qa||0==qa.length)ha.setAttribute("viewBox","0 0 "+ma+" "+ia);else if(isNaN(ma)||isNaN(ia)){var la=qa.split(" ");3<la.length&&(ma=parseFloat(la[2]),ia=parseFloat(la[3]))}R=
-Editor.createSvgDataUri(mxUtils.getXml(ha));var Ca=Math.min(1,Math.min(q/Math.max(1,ma)),q/Math.max(1,ia)),Da=m(R,M.type,d+A*P,g+A*P,Math.max(1,Math.round(ma*Ca)),Math.max(1,Math.round(ia*Ca)),M.name);if(isNaN(ma)||isNaN(ia)){var ya=new Image;ya.onload=mxUtils.bind(this,function(){ma=Math.max(1,ya.width);ia=Math.max(1,ya.height);Da[0].geometry.width=ma;Da[0].geometry.height=ia;ha.setAttribute("viewBox","0 0 "+ma+" "+ia);R=Editor.createSvgDataUri(mxUtils.getXml(ha));var Pa=R.indexOf(";");0<Pa&&(R=
-R.substring(0,Pa)+R.substring(R.indexOf(",",Pa+1)));G.setCellStyles("image",R,[Da[0]])});ya.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return Da}}}catch(Pa){}return null})):V(A,mxUtils.bind(this,function(){return m(aa,"text/xml",d+A*P,g+A*P,0,0,M.name)}))}else V(A,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==M.type){var Y=N?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;V(A,mxUtils.bind(this,function(){return m(Y,
-"text/xml",d+A*P,g+A*P,Z.width,Z.height,M.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(ha,ma,ia){V(A,mxUtils.bind(this,function(){if(null!=
-ha&&ha.length<y){var qa=F&&this.isResampleImageSize(M.size,I)?Math.min(1,Math.min(q/ma,q/ia)):1;return m(ha,M.type,d+A*P,g+A*P,Math.round(ma*qa),Math.round(ia*qa),M.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),F,q,I,M.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,m(R,M.type,d+A*P,g+A*P,240,160,M.name,function(ba){V(A,function(){return ba})},M)});/(\.v(dx|sdx?))($|\?)/i.test(M.name)||
-/(\.vs(x|sx?))($|\?)/i.test(M.name)?m(null,M.type,d+A*P,g+A*P,240,160,M.name,function(O){V(A,function(){return O})},M):"image"==M.type.substring(0,5)||"application/pdf"==M.type?Q.readAsDataURL(M):Q.readAsText(M)}})(l)});if(K){K=[];for(H=0;H<c.length;H++)K.push(c[H]);c=K;this.confirmImageResize(function(G){F=G;J()},x)}else J()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
-[1])};EditorUi.prototype.confirmImageResize=function(c,d){d=null!=d?d:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,m=function(n,z){if(n||d)mxSettings.setResizeImages(n?z:null),mxSettings.save();g();c(z)};null==q||d?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(n){m(n,!0)},function(n){m(n,!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):m(!1,q)};EditorUi.prototype.parseFile=function(c,d,g){g=null!=g?g:c.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,d,g)});q.readAsText(c)};EditorUi.prototype.parseFileData=function(c,d,g){var q=new XMLHttpRequest;q.open("POST",
-OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){d(q)};q.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,d){d=null!=d?d:this.resampleThreshold;return c>d};EditorUi.prototype.resizeImage=function(c,d,g,q,m,n,z){m=null!=m?m:this.maxImageSize;var C=Math.max(1,c.width),
-x=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=z?z:d.length,n))try{var y=Math.max(C/m,x/m);if(1<y){var I=Math.round(C/y),N=Math.round(x/y),t=document.createElement("canvas");t.width=I;t.height=N;t.getContext("2d").drawImage(c,0,0,I,N);var p=t.toDataURL();if(p.length<d.length){var F=document.createElement("canvas");F.width=I;F.height=N;var K=F.toDataURL();p!==K&&(d=p,C=I,x=N)}}}catch(D){}g(d,C,x)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};
-EditorUi.prototype.loadImage=function(c,d,g){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;d(q)};null!=g&&(q.onerror=g);q.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
-!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,d=this.editor.graph;Graph.touchStyle&&(d.panningHandler.isPanningTrigger=function(D){var H=D.getEvent();return null==D.getState()&&
-!mxEvent.isMouseEvent(H)&&!d.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==D.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});d.cellEditor.editPlantUmlData=function(D,H,J){var G=JSON.parse(J);H=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,G.format,function(T,W,U){c.spinner.stop();d.getModel().beginUpdate();try{if("txt"==G.format)d.labelChanged(D,"<pre>"+
-T+"</pre>"),d.updateCellSize(D,!0);else{d.setCellStyles("image",c.convertDataUri(T),[D]);var V=d.model.getGeometry(D);null!=V&&(V=V.clone(),V.width=W,V.height=U,d.cellsResized([D],[V],!1))}d.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:P,format:G.format}))}finally{d.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};d.cellEditor.editMermaidData=function(D,H,J){var G=JSON.parse(J);H=new TextareaDialog(c,mxResources.get("mermaid")+
-":",G.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,G.config,function(T,W,U){c.spinner.stop();d.getModel().beginUpdate();try{d.setCellStyles("image",T,[D]);var V=d.model.getGeometry(D);null!=V&&(V=V.clone(),V.width=Math.max(V.width,W),V.height=Math.max(V.height,U),d.cellsResized([D],[V],!1));d.setAttributeForCell(D,"mermaidData",JSON.stringify({data:P,config:G.config},null,2))}finally{d.getModel().endUpdate()}},function(T){c.handleError(T)})},
-null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=d.cellEditor.startEditing;d.cellEditor.startEditing=function(D,H){try{var J=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=J)this.editPlantUmlData(D,H,J);else if(J=this.graph.getAttributeForCell(D,"mermaidData"),null!=J)this.editMermaidData(D,H,J);else{var G=d.getCellStyle(D);"1"==mxUtils.getValue(G,"metaEdit","0")?c.showDataDialog(D):g.apply(this,arguments)}}catch(P){c.handleError(P)}};d.getLinkTitle=function(D){return c.getLinkTitle(D)};
-d.customLinkClicked=function(D){var H=!1;try{c.handleCustomLink(D),H=!0}catch(J){c.handleError(J)}return H};var q=d.parseBackgroundImage;d.parseBackgroundImage=function(D){var H=q.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var m=d.setBackgroundImage;d.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=c.createImageForPageLink(D.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
-function(){d.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){d.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(D,H){D=null!=d.backgroundImage?d.backgroundImage.originalSrc:null;if(null!=D){var J=D.indexOf(",");if(0<J)for(D=D.substring(J+1),H=H.getProperty("patches"),J=0;J<H.length;J++)if(null!=H[J][EditorUi.DIFF_UPDATE]&&null!=H[J][EditorUi.DIFF_UPDATE][D]||null!=H[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[J][EditorUi.DIFF_REMOVE],
-D)){d.refreshBackgroundImage();break}}}));var n=d.getBackgroundImageObject;d.getBackgroundImageObject=function(D,H){var J=n.apply(this,arguments);if(null!=J&&null!=J.originalSrc)if(!H)J={src:J.originalSrc};else if(H&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var G=this.stylesheet,P=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";J=c.createImageForPageLink(J.originalSrc);
-this.shapeBackgroundColor=T;this.shapeForegroundColor=P;this.stylesheet=G}return J};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=
-c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var x=d.addClickHandler;d.addClickHandler=function(D,H,J){var G=H;H=function(P,T){if(null==T){var W=mxEvent.getSource(P);"a"==W.nodeName.toLowerCase()&&(T=W.getAttribute("href"))}null!=T&&d.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&d.customLinkClicked(T)&&mxEvent.consume(P);null!=G&&G(P,T)};x.call(this,D,
-H,J)};u.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(D,H,J){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,J)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,
-!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=d.getExportVariables;d.getExportVariables=function(){var D=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(D.filename=H.getTitle());D.pagecount=null!=c.pages?c.pages.length:1;D.page=null!=c.currentPage?c.currentPage.getName():"";D.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return D};var N=d.getGlobalVariable;d.getGlobalVariable=function(D){var H=c.getCurrentFile();return"filename"==
-D&&null!=H?H.getTitle():"page"==D&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==D?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==D?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var t=d.labelLinkClicked;d.labelLinkClicked=function(D,H,J){var G=H.getAttribute("href");if(null==G||!d.isCustomLink(G)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))t.apply(this,arguments);else{if(!d.isEnabled()||null!=D&&d.isCellLocked(D.cell))d.customLinkClicked(G),
-d.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var D=c.defaultFilename,H=c.getCurrentFile();null!=H&&(D=null!=H.getTitle()?H.getTitle():D);return D};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
+function(m){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);else{this.exportDialog=document.createElement("div");var q=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=q.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(y){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight=
+"140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));y.setAttribute("border","0");y.setAttribute("src",A);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,m,p){this.isLocalFileSave()?this.saveLocalFile(g,c,m,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(q,z){return this.createEchoRequest(g,q,m,p,e,z)}),g,p,m)};EditorUi.prototype.saveRequest=function(c,e,g,m,p,q,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;
+var y=this.getServiceCount(!1);isLocalStorage&&y++;var A=4>=y?2:6<y?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(x,I){if("_blank"==I||null!=x&&0<x.length){var M=g("_blank"==I?null:x,I==App.MODE_DEVICE||"download"==I||null==I||"_blank"==I?"0":"1");null!=M&&(I==App.MODE_DEVICE||"download"==I||"_blank"==I?M.simulate(document,"_blank"):this.pickFolder(I,mxUtils.bind(this,function(E){q=null!=q?q:"pdf"==e?"application/pdf":"image/"+e;if(null!=m)try{this.exportFile(m,x,q,!0,I,E)}catch(Q){this.handleError(Q)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),x,q,!0,I,E)}catch(Q){this.handleError(Q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Q){this.spinner.stop();this.handleError(Q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,z,null,1<y,A,m,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(c.container,
+420,y,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,m,p,q){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,m,p,q,z,y,A,x,I,M,E,Q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var n=this.editor.graph.isSelectionEmpty();g=null!=g?g:n;var v=e?null:this.editor.graph.background;v==mxConstants.NONE&&
+(v=null);null==v&&0==e&&(v=I?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var D=this.editor.graph.getSvg(v,c,z,y,null,g,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!E,I,M);m&&this.editor.graph.addSvgShadow(D);var H=this.getBaseFilename()+(p?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(N)}))});var K=mxUtils.bind(this,function(N){this.spinner.stop();p&&N.setAttribute("content",this.getFileData(!0,null,null,null,g,A,null,null,null,!1));Q(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var G=mxUtils.bind(this,function(N){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,K,this.thumbImageCache)):
+K(N)});E?this.embedFonts(D,G):(this.editor.addFontCss(D),G(D))}catch(N){this.handleError(N)}};EditorUi.prototype.addRadiobox=function(c,e,g,m,p,q,z){return this.addCheckbox(c,g,m,p,q,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,m,p,q,z,y){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();A.id=z;null!=y&&A.setAttribute("name",y);g&&(A.setAttribute("checked","checked"),
+A.defaultChecked=!0);m&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),p||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),p="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");
+q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));q.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");q.appendChild(m);c.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var z=new FilenameDialog(this,
+p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(z.container,300,80,!0,!1);z.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":p:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};
+EditorUi.prototype.addLinkSection=function(c,e){function g(){var y=document.createElement("div");y.style.width="100%";y.style.height="100%";y.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(y.style.border="1px solid black",y.style.backgroundColor=q):(y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(y)}mxUtils.write(c,mxResources.get("links")+":");var m=document.createElement("select");
+m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));m.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));
+m.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(e));c.appendChild(m);mxUtils.write(c,mxResources.get("borderColor")+":");var q="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(y){this.pickColor(q||"none",function(A){q=A;g()});mxEvent.consume(y)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height=
+"22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return q},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,m,p,q,z){z=null!=z?z:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||z.push("lightbox=1"),"auto"!=c&&z.push("target="+c),null!=
+e&&e!=mxConstants.NONE&&z.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&z.push("edit="+encodeURIComponent(p)),q&&z.push("layers=1"),this.editor.graph.foldingEnabled&&z.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&z.push("page-id="+this.currentPage.getId());return z};EditorUi.prototype.createLink=function(c,e,g,m,p,q,z,y,A,x){A=this.createUrlParameters(c,e,g,m,p,q,A);c=this.getCurrentFile();e=!0;null!=z?g="#U"+encodeURIComponent(z):
+(c=this.getCurrentFile(),y||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));x&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,m,p,q,z,y,A,x,I,M){this.getBasenames();var E={};""!=p&&p!=mxConstants.NONE&&(E.highlight=p);"auto"!==m&&(E.target=m);x||(E.lightbox=!1);E.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(E.zoom=g/100);g=[];z&&(g.push("pages"),E.resize=!0,null!=this.pages&&null!=this.currentPage&&(E.page=mxUtils.indexOf(this.pages,
+this.currentPage)));e&&(g.push("zoom"),E.resize=!0);y&&g.push("layers");A&&g.push("tags");0<g.length&&(x&&g.push("lightbox"),E.toolbar=g.join(" "));null!=I&&0<I.length&&(E.edit=I);null!=c?E.url=c:E.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(E))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";M(e,'<script type="text/javascript" src="'+
+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");z.appendChild(q);var A=document.createElement("span");
+mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(A);mxUtils.br(z);z.appendChild(y);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));z.appendChild(A);var x=this.getCurrentFile();null==g&&null!=x&&x.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),z.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();
+this.drive.showPermissions(x.getId())})));q.setAttribute("checked","checked");null==g&&y.setAttribute("disabled","disabled");p.appendChild(z);var I=this.addLinkSection(p),M=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value="100%";p.appendChild(E);var Q=this.addCheckbox(p,mxResources.get("fit"),!0);
+z=null!=this.pages&&1<this.pages.length;var n=n=this.addCheckbox(p,mxResources.get("allPages"),z,!z),v=this.addCheckbox(p,mxResources.get("layers"),!0),D=this.addCheckbox(p,mxResources.get("tags"),!0),H=this.addCheckbox(p,mxResources.get("lightbox"),!0),K=null;z=380;if(EditorUi.enableHtmlEditOption){K=this.addEditButton(p,H);var G=K.getEditInput();G.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled");
+G.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){m(y.checked?g:null,M.checked,E.value,I.getTarget(),I.getColor(),Q.checked,n.checked,v.checked,D.checked,H.checked,null!=K?K.getLink():null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,m,p,q,z,y){var A=document.createElement("div");A.style.whiteSpace=
+"nowrap";var x=document.createElement("h3");mxUtils.write(x,c||mxResources.get("link"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(x);var I=this.getCurrentFile();c=0;if(null==I||I.constructor!=window.DriveFile||e)z=null!=z?z:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;z=null!=z?z:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";x=document.createElement("div");x.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var M=document.createElement("div");M.style.whiteSpace="normal";mxUtils.write(M,mxResources.get("linkAccountRequired"));x.appendChild(M);M=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(I.getId())}));M.style.marginTop="12px";M.className="geBtn";x.appendChild(M);A.appendChild(x);M=document.createElement("a");M.style.paddingLeft="12px";M.style.color="gray";M.style.fontSize="11px";M.style.cursor="pointer";mxUtils.write(M,mxResources.get("check"));x.appendChild(M);
+mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(T){this.spinner.stop();T=new ErrorDialog(this,null,mxResources.get(null!=T?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(T.container,300,80,!0,!1);T.init()}))}))}var E=null,Q=null;if(null!=g||null!=m)c+=30,mxUtils.write(A,mxResources.get("width")+":"),E=document.createElement("input"),
+E.setAttribute("type","text"),E.style.marginRight="16px",E.style.width="50px",E.style.marginLeft="6px",E.style.marginRight="16px",E.style.marginBottom="10px",E.value="100%",A.appendChild(E),mxUtils.write(A,mxResources.get("height")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginBottom="10px",Q.value=m+"px",A.appendChild(Q),mxUtils.br(A);var n=this.addLinkSection(A,q);g=null!=this.pages&&1<this.pages.length;var v=null;
+if(null==I||I.constructor!=window.DriveFile||e)v=this.addCheckbox(A,mxResources.get("allPages"),g,!g);var D=this.addCheckbox(A,mxResources.get("lightbox"),!0,null,null,!q),H=this.addEditButton(A,D),K=H.getEditInput();q&&(K.style.marginLeft=D.style.marginLeft,D.style.display="none",c-=20);var G=this.addCheckbox(A,mxResources.get("layers"),!0);G.style.marginLeft=K.style.marginLeft;G.style.marginTop="8px";var N=this.addCheckbox(A,mxResources.get("tags"),!0);N.style.marginLeft=K.style.marginLeft;N.style.marginBottom=
+"16px";N.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(G.removeAttribute("disabled"),K.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&D.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,A,mxUtils.bind(this,function(){p(n.getTarget(),n.getColor(),null==v?!0:v.checked,D.checked,H.getLink(),G.checked,null!=E?E.value:null,
+null!=Q?Q.value:null,N.checked)}),null,mxResources.get("create"),z,y);this.showDialog(e.container,340,300+c,!0,!0);null!=E?(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,m,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
+(p?"10":"4")+"px";q.appendChild(z);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=
+this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var x=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),I=m?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var M=m?null:this.addCheckbox(q,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var E=
+parseInt(y.value)/100||1,Q=parseInt(A.value)||0;g(!x.checked,null!=I?I.checked:!1,null!=M?M.checked:!1,E,Q)}),null,c,e);this.showDialog(c.container,300,(p?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,m,p,q,z,y,A){z=null!=z?z:Editor.defaultIncludeDiagram;var x=document.createElement("div");x.style.whiteSpace="nowrap";var I=this.editor.graph,M="jpeg"==y?220:300,E=document.createElement("h3");mxUtils.write(E,c);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+x.appendChild(E);mxUtils.write(x,mxResources.get("zoom")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value=this.lastExportZoom||"100%";x.appendChild(Q);mxUtils.write(x,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||
+"0";x.appendChild(n);mxUtils.br(x);var v=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,I.isSelectionEmpty()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.setAttribute("type","checkbox");var H=document.createElement("select");H.style.marginTop="16px";H.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var K={};for(E=0;E<c.length;E++)if(!I.isSelectionEmpty()||"selectionOnly"!=
+c[E]){var G=document.createElement("option");mxUtils.write(G,mxResources.get(c[E]));G.setAttribute("value",c[E]);H.appendChild(G);K[c[E]]=G}A?(mxUtils.write(x,mxResources.get("size")+":"),x.appendChild(H),mxUtils.br(x),M+=26,mxEvent.addListener(H,"change",function(){"selectionOnly"==H.value&&(v.checked=!0)})):q&&(x.appendChild(D),mxUtils.write(x,mxResources.get("crop")),mxUtils.br(x),M+=30,mxEvent.addListener(v,"change",function(){v.checked?D.removeAttribute("disabled"):D.setAttribute("disabled",
+"disabled")}));I.isSelectionEmpty()?A&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",M-=30):(H.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(v,"change",function(){H.value=v.checked?"selectionOnly":"diagram"}));var N=this.addCheckbox(x,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(x,mxResources.get("dark"),!0),M+=26);var V=this.addCheckbox(x,
+mxResources.get("shadow"),I.shadowVisible),U=null;if("png"==y||"jpeg"==y)U=this.addCheckbox(x,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),M+=30;var X=this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),z,null,null,"jpeg"!=y);X.style.marginBottom="16px";var l=document.createElement("input");l.style.marginBottom="16px";l.style.marginRight="8px";l.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||l.setAttribute("disabled","disabled");var B=
+document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.style.marginBottom="16px";B.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));B.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));B.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,
+mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||B.appendChild(q);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){"lblToSvg"==B.value?(l.checked=!0,l.setAttribute("disabled","disabled"),K.page.style.display="none","page"==H.value&&(H.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),P.style.display="inline-block",L.style.display="none"):"disabled"==l.getAttribute("disabled")&&(l.checked=!1,l.removeAttribute("disabled"),V.removeAttribute("disabled"),
+K.page.style.display="",P.style.display="none",L.style.display="")}));e&&(x.appendChild(l),mxUtils.write(x,mxResources.get("embedImages")),mxUtils.br(x),mxUtils.write(x,mxResources.get("txtSettings")+":"),x.appendChild(B),mxUtils.br(x),M+=60);var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginRight="10px";L.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));L.appendChild(e);
+e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));L.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));L.appendChild(e);var P=document.createElement("div");mxUtils.write(P,mxResources.get("LinksLost"));P.style.margin="7px";P.style.display="none";"svg"==y&&(mxUtils.write(x,mxResources.get("links")+":"),x.appendChild(L),x.appendChild(P),mxUtils.br(x),
+mxUtils.br(x),M+=50);g=new CustomDialog(this,x,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=Q.value;p(Q.value,N.checked,!v.checked,V.checked,X.checked,l.checked,n.value,D.checked,!1,L.value,null!=U?U.checked:null,null!=T?T.checked:null,H.value,"embedFonts"==B.value,"lblToSvg"==B.value)}),null,g,m);this.showDialog(g.container,340,M,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",
+!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,m,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var y=document.createElement("h3");mxUtils.write(y,e);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var A=this.addCheckbox(q,mxResources.get("fit"),!0),x=this.addCheckbox(q,mxResources.get("shadow"),z.shadowVisible&&m,!m),I=this.addCheckbox(q,g),M=this.addCheckbox(q,mxResources.get("lightbox"),
+!0),E=this.addEditButton(q,M),Q=E.getEditInput(),n=1<z.model.getChildCount(z.model.getRoot()),v=this.addCheckbox(q,mxResources.get("layers"),n,!n);v.style.marginLeft=Q.style.marginLeft;v.style.marginBottom="12px";v.style.marginTop="8px";mxEvent.addListener(M,"change",function(){M.checked?(n&&v.removeAttribute("disabled"),Q.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&M.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled",
+"disabled")});e=new CustomDialog(this,q,mxUtils.bind(this,function(){c(A.checked,x.checked,I.checked,M.checked,E.getLink(),v.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,m,p,q,z,y){function A(Q){var n=" ",v="";m&&(n=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",v+="cursor:pointer;");c&&(v+="max-width:100%;");var D="";g&&(D=' width="'+Math.round(x.width)+'" height="'+Math.round(x.height)+'"');z('<img src="'+Q+'"'+D+(""!=v?' style="'+v+'"':"")+n+"/>")}var x=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var n=m?this.getFileData(!0):null;Q=
+this.createImageDataUri(Q,n,"png");A(Q)}),null,null,null,mxUtils.bind(this,function(Q){y({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),x.width*x.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var M="";g&&(M="&w="+Math.round(2*x.width)+"&h="+Math.round(2*x.height));var E=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+M+"&xml="+encodeURIComponent(e));E.send(mxUtils.bind(this,function(){200<=E.getStatus()&&
+299>=E.getStatus()?A("data:image/png;base64,"+E.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,m,p,q,z){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),A=y.getElementsByTagName("a");if(null!=A)for(var x=0;x<A.length;x++){var I=A[x].getAttribute("href");null!=I&&"#"==I.charAt(0)&&"_blank"==A[x].getAttribute("target")&&A[x].removeAttribute("target")}m&&
+y.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(y);if(g){var M=" ",E="";m&&(M="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(p?"&edit=_blank":"")+(q?"&layers=1":
+"")+"');}})(this);\"",E+="cursor:pointer;");c&&(E+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(Q){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=E?' style="'+E+'"':"")+M+"/>")}))}else E="",m&&(e=this.getSelectedPageIndex(),y.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),E+="cursor:pointer;"),c&&(c=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),E+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=E&&y.setAttribute("style",E),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),z(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(c){c=
+Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
+c;else if("mxfile"==c.nodeName){var m=c.getElementsByTagName("diagram");if(0<m.length){g=m[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(q){return"page"==q?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:p.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(q){}finally{this.editor.graph=m}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
+c){if(c.hasAttribute("scale")){var m=parseFloat(c.getAttribute("scale"));!isNaN(m)&&0<m&&(e=m)}c.hasAttribute("border")&&(m=parseInt(c.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,m,p){try{var q=this.editor.graph,z=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=g&&0<g.length)q=this.createTemporaryGraph(z?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),q),y=g;else if(z||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(z?q.getDefaultStylesheet():q.getStylesheet());var A=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var x=this.pages[0];this.currentPage==x?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=x.viewState&&null!=x.viewState&&q.setBackgroundImage(x.viewState.backgroundImage);q.getGlobalVariable=function(I){return"page"==I?x.getName():"pagenumber"==I?1:A.apply(this,
+arguments)};document.body.appendChild(q.container);q.model.setRoot(x.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var M=I.toDataURL("image/png");M=Editor.writeGraphModelToPng(M,"tEXt","mxfile",encodeURIComponent(y));c(M.substring(M.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(E){null!=e&&e(E)}}),null,null,null,mxUtils.bind(this,function(I){null!=e&&
+e(I)}),null,null,m,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(I){null!=e&&e(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,m,p,q,z,y,A,x,I,M,E){y=null!=y?y:!0;I=null!=I?I:0;z=null!=A?A:e.background;z==mxConstants.NONE&&(z=null);q=e.getSvg(z,x,I,null,null,q,null,null,null,e.shadowVisible||M,null,E,"diagram");(e.shadowVisible||M)&&e.addSvgShadow(q,null,null,0==I);null!=c&&q.setAttribute("content",c);null!=g&&q.setAttribute("resource",g);var Q=mxUtils.bind(this,function(n){n=
+(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(n);null!=p&&p(n);return n});e.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(n){y?this.editor.convertImages(n,mxUtils.bind(this,function(v){Q(v)})):Q(n)}));else return Q(q)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(m){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,m,p,q,z,y,A,x,I,M,E){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Q=this.editor.graph.isSelectionEmpty();g=null!=g?g:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(n){this.spinner.stop();try{this.saveCanvas(n,
+p?this.getFileData(!0,null,null,null,g,y):null,A,null==this.pages||0==this.pages.length,I)}catch(v){this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,g,c||1,e,m,null,null,q,z,x,M,E)}catch(n){this.spinner.stop(),this.handleError(n)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,m,p,q,z){e=null!=e?e:0;g=null!=g?g:0;var y=[];try{var A=
+this.editor.graph;if(null!=c&&0<c.length){A.model.beginUpdate();try{var x=mxUtils.parseXml(c);c={};var I=this.editor.extractGraphModel(x.documentElement,null!=this.pages);if(null!=I&&"mxfile"==I.nodeName&&null!=this.pages){var M=I.getElementsByTagName("diagram");if(1==M.length&&!q){if(I=Editor.parseDiagramNode(M[0]),null!=this.currentPage&&(c[M[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var E=M[0].getAttribute("name");null!=E&&""!=E&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,E))}}else if(0<M.length){q=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[M[0].getAttribute("id")]=this.pages[0].getId(),I=Editor.parseDiagramNode(M[0]),m=!1,Q=1);for(;Q<M.length;Q++){var n=M[Q].getAttribute("id");M[Q].removeAttribute("id");var v=this.updatePageRoot(new DiagramPage(M[Q]));c[n]=M[Q].getAttribute("id");var D=this.pages.length;null==v.getName()&&v.setName(mxResources.get("pageWithNumber",[D+1]));A.model.execute(new ChangePage(this,v,v,D,
+!0));q.push(v)}this.updatePageLinks(c,q)}}if(null!=I&&"mxGraphModel"===I.nodeName){y=A.importGraphModel(I,e,g,m);if(null!=y)for(Q=0;Q<y.length;Q++)this.updatePageLinksForCell(c,y[Q]);var H=A.parseBackgroundImage(I.getAttribute("backgroundImage"));if(null!=H&&null!=H.originalSrc){this.updateBackgroundPageLink(c,H);var K=new ChangePageSetup(this,null,H);K.ignoreColor=!0;A.model.execute(K)}}z&&this.insertHandler(y,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(G){if(p)throw G;
+this.handleError(G)}return y};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,e){var g=document.createElement("div"),m=this.editor.graph,p=m.getLinkForCell(e);null!=p&&m.setLinkForCell(e,this.updatePageLink(c,p));if(m.isHtmlLabel(e)){g.innerHTML=m.sanitizeHtml(m.getLabel(e));for(var q=g.getElementsByTagName("a"),z=!1,y=0;y<q.length;y++)p=q[y].getAttribute("href"),null!=p&&(q[y].setAttribute("href",this.updatePageLink(c,p)),z=!0);z&&m.labelChanged(e,g.innerHTML)}for(y=0;y<m.model.getChildCount(e);y++)this.updatePageLinksForCell(c,m.model.getChildAt(e,y))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var m=JSON.parse(e.substring(17));if(null!=m.actions){for(var p=0;p<m.actions.length;p++){var q=m.actions[p];if(null!=q.open&&Graph.isPageLink(q.open)){var z=q.open.substring(q.open.indexOf(",")+1);g=c[z];null!=g?q.open="data:page/id,"+g:null==this.getPageById(z)&&delete q.open}}e="data:action/json,"+JSON.stringify(m)}}catch(y){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,m,p){m=null!=m?m:c.name;g=null!=g?g:mxUtils.bind(this,function(z){this.handleError(z)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var z=this.isRemoteVisioFormat(m);try{var y="UNKNOWN-VISIO",A=m.lastIndexOf(".");if(0<=A&&A<m.length)y=m.substring(A+1).toUpperCase();else{var x=m.lastIndexOf("/");0<=
+x&&x<m.length&&(m=m.substring(x+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+m,label:z?"remote":"local"})}catch(M){}if(z)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{z=new FormData;z.append("file1",c,m);var I=new XMLHttpRequest;I.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));I.responseType="blob";this.addRemoteServiceSecurityCheck(I);
+null!=p&&I.setRequestHeader("x-convert-custom",p);I.onreadystatechange=mxUtils.bind(this,function(){if(4==I.readyState)if(200<=I.status&&299>=I.status)try{var M=I.response;if("text/xml"==M.type){var E=new FileReader;E.onload=mxUtils.bind(this,function(Q){try{e(Q.target.result)}catch(n){g({message:mxResources.get("errorLoadingFile")})}});E.readAsText(M)}else this.doImportVisio(M,e,g,m)}catch(Q){g(Q)}else try{""==I.responseType||"text"==I.responseType?g({message:I.responseText}):(E=new FileReader,E.onload=
+function(){g({message:JSON.parse(E.result).Message})},E.readAsText(I.response))}catch(Q){g({})}});I.send(z)}else try{this.doImportVisio(c,e,g,m)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(p){this.handleError(p)});
+var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(p){g(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
+this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
+JSON.parse(c);e(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&q.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var z=0;z<p.svgThumbs.length;z++)q.push(Editor.createSvgDataUri(p.svgThumbs[z]));null!=p.thumb&&q.push(p.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),g(y)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(c,
+e,g,m){var p=this,q=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(z){try{if(mxClient.IS_IE||mxClient.IS_IE11)z=z.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(z).getElementsByTagName("svg");
+if(0<y.length){var A=parseFloat(y[0].getAttribute("width")),x=parseFloat(y[0].getAttribute("height"));if(isNaN(A)||isNaN(x))try{var I=y[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(I[2]);x=parseFloat(I[3])}catch(M){A=A||100,x=x||100}g(p.convertDataUri(Editor.createSvgDataUri(z)),A,x)}else m({message:mxResources.get("invalidInput")})}catch(M){m(M)}})}catch(z){m(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,m){function p(y,A,x){c1=y>>2;c2=(y&3)<<4|A>>4;c3=(A&15)<<2|x>>6;c4=x&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(x){var I=new Image;I.onload=
+function(){try{var M=I.width,E=I.height;if(0==M&&0==E){var Q=A.result,n=Q.indexOf(","),v=decodeURIComponent(escape(atob(Q.substring(n+1)))),D=mxUtils.parseXml(v).getElementsByTagName("svg");0<D.length&&(M=parseFloat(D[0].getAttribute("width")),E=parseFloat(D[0].getAttribute("height")))}g(A.result,M,E)}catch(H){m(H)}};I.src=A.result};A.onerror=function(x){m(x)}}else m(y)};z.onerror=function(y){m(y)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var m=this.editor.graph,p=null;m.getModel().beginUpdate();
+try{p=m.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(p,!0)}finally{m.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,g,m,p,q,z,y){q=null!=q?q:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(E){4==
+E.readyState&&200<=E.status&&299>=E.status&&this.editor.graph.setSelectionCells(this.insertTextAt(E.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var A=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var x=Editor.extractGraphModelFromPdf(c);if(null!=x&&0<x.length)return this.importXml(x,e,g,q,!0,y)}if(Editor.isPngDataUrl(c)&&(x=Editor.extractGraphModelFromPng(c),null!=x&&0<x.length))return this.importXml(x,
+e,g,q,!0,y);if("data:image/svg+xml;"==c.substring(0,19))try{x=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(x=c.substring(c.indexOf(",")+1),x=window.atob&&!mxClient.IS_SF?atob(x):Base64.decode(x,!0)):x=decodeURIComponent(c.substring(c.indexOf(",")+1));var I=this.importXml(x,e,g,q,!0,y);if(0<I.length)return I}catch(E){}this.loadImage(c,mxUtils.bind(this,function(E){if("data:"==c.substring(0,5))this.resizeImage(E,c,mxUtils.bind(this,function(v,D,H){A.setSelectionCell(A.insertVertex(null,null,
+"",A.snap(e),A.snap(g),D,H,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(v)+";"))}),z,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/E.width,this.maxImageSize/E.height)),n=Math.round(E.width*Q);E=Math.round(E.height*Q);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(e),A.snap(g),n,E,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var E=null;A.getModel().beginUpdate();try{E=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(m?"html=1;":"")),A.updateCellSize(E),A.fireEvent(new mxEventObject("textInserted","cells",[E]))}finally{A.getModel().endUpdate()}A.setSelectionCell(E)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,q,null,y);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(E){this.editor.graph.setSelectionCells(this.importXml(E,e,g,q,null,y))}),mxUtils.bind(this,function(E){this.handleError(E)}));else{A=this.editor.graph;p=null;A.getModel().beginUpdate();try{p=A.insertVertex(A.getDefaultParent(),null,"",A.snap(e),A.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+"...");p.value=c;A.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var M=A.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=M.width;p.geometry.height=M.height}Graph.isLink(p.value)&&A.setLinkForCell(p,p.value);p.geometry.width+=A.gridSize;p.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
+EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,y){StorageFile.listFiles(this,
+"F",z,y)});window.openBrowserFile=mxUtils.bind(this,function(z,y,A){StorageFile.getFileContent(this,z,y,A)});window.deleteBrowserFile=mxUtils.bind(this,function(z,y,A){StorageFile.deleteFile(this,z,y,A)});if(!e){var m=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(z=new Blob([z],{type:"application/octet-stream"}),
+this.importVisio(z,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=m;q.apply(p,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var m=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(q){if(mxUtils.isEmptyObject(q.files))g();else{var z=0,y,A=!1;q.forEach(function(x,I){x=I.name.toLowerCase();"diagram/diagram.xml"==x?(A=!0,I.async("string").then(function(M){0==M.indexOf("<mxfile ")?e(M):g()})):0==x.indexOf("versions/")&&(x=parseInt(x.substr(9)),x>z&&(z=x,y=I))});0<z?y.async("string").then(function(x){(new XMLHttpRequest).upload&&
+m.isRemoteFileFormat(x,c.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(x,mxUtils.bind(this,function(I){4==I.readyState&&(200<=I.status&&299>=I.status?e(I.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(c,e,g,m,p,q,z,y,A,x,I,M){x=null!=
+x?x:!0;var E=!1,Q=null,n=mxUtils.bind(this,function(v){var D=null;null!=v&&"<mxlibrary"==v.substring(0,10)?this.loadLibrary(new LocalLibrary(this,v,z)):D=this.importXml(v,g,m,x,null,null!=M?mxEvent.isControlDown(M):null);null!=y&&y(D)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=I?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(Q=this.importXml(e,g,m,x,null,null!=M?mxEvent.isControlDown(M):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
+A)+c.substring(c.indexOf(",",A+1))),x&&e.isGridEnabled()&&(g=e.snap(g),m=e.snap(m)),Q=[e.insertVertex(null,null,"",g,m,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(E=!0,this.importGraphML(c,n)):null!=A&&null!=z&&(/(\.v(dx|sdx?))($|\?)/i.test(z)||/(\.vs(x|sx?))($|\?)/i.test(z))?(E=!0,this.importVisio(A,n)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(E=!0,p=mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?n(v.responseText):null!=y&&y(null))}),null!=c?this.parseFileData(c,p,z):this.parseFile(A,p,z)):0==c.indexOf("PK")&&null!=A?(E=!0,this.importZipFile(A,n,mxUtils.bind(this,function(){Q=this.insertTextAt(this.validateFileData(c),g,m,!0,null,x);y(Q)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(Q=this.insertTextAt(this.validateFileData(c),
+g,m,!0,null,x,null,null!=M?mxEvent.isControlDown(M):null));E||null==y||y(Q);return Q};EditorUi.prototype.importFiles=function(c,e,g,m,p,q,z,y,A,x,I,M,E){m=null!=m?m:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var Q=null!=e&&null!=g,n=!0;e=null!=e?e:0;g=null!=g?g:0;var v=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var D=I||this.resampleThreshold,H=0;H<c.length;H++)if("image/svg"!==c[H].type.substring(0,9)&&"image/"===c[H].type.substring(0,6)&&c[H].size>D){v=!0;break}var K=mxUtils.bind(this,function(){var G=
+this.editor.graph,N=G.gridSize;p=null!=p?p:mxUtils.bind(this,function(B,L,P,O,R,S,W,aa,Y){try{return null!=B&&"<mxlibrary"==B.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,B,W)),null):this.isCompatibleString(B)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,B,W,!0)),null):this.importFile(B,L,P,O,R,S,W,aa,Y,Q,M,E)}catch(Z){return this.handleError(Z),null}});q=null!=q?q:mxUtils.bind(this,function(B){G.setSelectionCells(B)});
+if(this.spinner.spin(document.body,mxResources.get("loading")))for(var T=c.length,V=T,U=[],X=mxUtils.bind(this,function(B,L){U[B]=L;if(0==--V){this.spinner.stop();if(null!=y)y(U);else{var P=[];G.getModel().beginUpdate();try{for(B=0;B<U.length;B++){var O=U[B]();null!=O&&(P=P.concat(O))}}finally{G.getModel().endUpdate()}}q(P)}}),l=0;l<T;l++)mxUtils.bind(this,function(B){var L=c[B];if(null!=L){var P=new FileReader;P.onload=mxUtils.bind(this,function(O){if(null==z||z(L))if("image/"==L.type.substring(0,
+6))if("image/svg"==L.type.substring(0,9)){var R=Graph.clipSvgDataUri(O.target.result),S=R.indexOf(",");S=decodeURIComponent(escape(atob(R.substring(S+1))));var W=mxUtils.parseXml(S);S=W.getElementsByTagName("svg");if(0<S.length){S=S[0];var aa=M?null:S.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,
+14)?X(B,mxUtils.bind(this,function(){try{if(null!=W){var ba=W.getElementsByTagName("svg");if(0<ba.length){var fa=ba[0],ja=fa.getAttribute("width"),ha=fa.getAttribute("height");ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ra=fa.getAttribute("viewBox");if(null==ra||0==ra.length)fa.setAttribute("viewBox","0 0 "+ja+" "+ha);else if(isNaN(ja)||isNaN(ha)){var ma=ra.split(" ");3<ma.length&&(ja=parseFloat(ma[2]),ha=parseFloat(ma[3]))}R=
+Editor.createSvgDataUri(mxUtils.getXml(fa));var Ga=Math.min(1,Math.min(m/Math.max(1,ja)),m/Math.max(1,ha)),Ea=p(R,L.type,e+B*N,g+B*N,Math.max(1,Math.round(ja*Ga)),Math.max(1,Math.round(ha*Ga)),L.name);if(isNaN(ja)||isNaN(ha)){var za=new Image;za.onload=mxUtils.bind(this,function(){ja=Math.max(1,za.width);ha=Math.max(1,za.height);Ea[0].geometry.width=ja;Ea[0].geometry.height=ha;fa.setAttribute("viewBox","0 0 "+ja+" "+ha);R=Editor.createSvgDataUri(mxUtils.getXml(fa));var Pa=R.indexOf(";");0<Pa&&(R=
+R.substring(0,Pa)+R.substring(R.indexOf(",",Pa+1)));G.setCellStyles("image",R,[Ea[0]])});za.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return Ea}}}catch(Pa){}return null})):X(B,mxUtils.bind(this,function(){return p(aa,"text/xml",e+B*N,g+B*N,0,0,L.name)}))}else X(B,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==L.type){var Y=M?null:this.extractGraphModelFromPng(O.target.result);if(null!=Y&&0<Y.length){var Z=new Image;Z.src=O.target.result;X(B,mxUtils.bind(this,function(){return p(Y,
+"text/xml",e+B*N,g+B*N,Z.width,Z.height,L.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(O.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,O.target.result,mxUtils.bind(this,function(fa,ja,ha){X(B,mxUtils.bind(this,function(){if(null!=
+fa&&fa.length<x){var ra=n&&this.isResampleImageSize(L.size,I)?Math.min(1,Math.min(m/ja,m/ha)):1;return p(fa,L.type,e+B*N,g+B*N,Math.round(ja*ra),Math.round(ha*ra),L.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),n,m,I,L.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=O.target.result,p(R,L.type,e+B*N,g+B*N,240,160,L.name,function(ba){X(B,function(){return ba})},L)});/(\.v(dx|sdx?))($|\?)/i.test(L.name)||
+/(\.vs(x|sx?))($|\?)/i.test(L.name)?p(null,L.type,e+B*N,g+B*N,240,160,L.name,function(O){X(B,function(){return O})},L):"image"==L.type.substring(0,5)||"application/pdf"==L.type?P.readAsDataURL(L):P.readAsText(L)}})(l)});if(v){v=[];for(H=0;H<c.length;H++)v.push(c[H]);c=v;this.confirmImageResize(function(G){n=G;K()},A)}else K()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",
+[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(q,z){if(q||e)mxSettings.setResizeImages(q?z:null),mxSettings.save();g();c(z)};null==m||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!1)},mxResources.get("resize"),mxResources.get("actualSize"),
+'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):p(!1,m)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,e,g)});m.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var m=new XMLHttpRequest;m.open("POST",
+OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){e(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,m,p,q,z){p=null!=p?p:this.maxImageSize;var y=Math.max(1,c.width),
+A=Math.max(1,c.height);if(m&&this.isResampleImageSize(null!=z?z:e.length,q))try{var x=Math.max(y/p,A/p);if(1<x){var I=Math.round(y/x),M=Math.round(A/x),E=document.createElement("canvas");E.width=I;E.height=M;E.getContext("2d").drawImage(c,0,0,I,M);var Q=E.toDataURL();if(Q.length<e.length){var n=document.createElement("canvas");n.width=I;n.height=M;var v=n.toDataURL();Q!==v&&(e=Q,y=I,A=M)}}}catch(D){}g(e,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};
+EditorUi.prototype.loadImage=function(c,e,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;e(m)};null!=g&&(m.onerror=g);m.src=c}catch(p){if(null!=g)g(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&
+!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(D){var H=D.getEvent();return null==D.getState()&&
+!mxEvent.isMouseEvent(H)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(H)&&(null==D.getState()||mxEvent.isControlDown(H)||mxEvent.isShiftDown(H))});e.cellEditor.editPlantUmlData=function(D,H,K){var G=JSON.parse(K);H=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(N,G.format,function(T,V,U){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==G.format)e.labelChanged(D,"<pre>"+
+T+"</pre>"),e.updateCellSize(D,!0);else{e.setCellStyles("image",c.convertDataUri(T),[D]);var X=e.model.getGeometry(D);null!=X&&(X=X.clone(),X.width=V,X.height=U,e.cellsResized([D],[X],!1))}e.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:N,format:G.format}))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};e.cellEditor.editMermaidData=function(D,H,K){var G=JSON.parse(K);H=new TextareaDialog(c,mxResources.get("mermaid")+
+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(N,G.config,function(T,V,U){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",T,[D]);var X=e.model.getGeometry(D);null!=X&&(X=X.clone(),X.width=Math.max(X.width,V),X.height=Math.max(X.height,U),e.cellsResized([D],[X],!1));e.setAttributeForCell(D,"mermaidData",JSON.stringify({data:N,config:G.config},null,2))}finally{e.getModel().endUpdate()}},function(T){c.handleError(T)})},
+null,null,400,220);c.showDialog(H.container,420,300,!0,!0);H.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(D,H){try{var K=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=K)this.editPlantUmlData(D,H,K);else if(K=this.graph.getAttributeForCell(D,"mermaidData"),null!=K)this.editMermaidData(D,H,K);else{var G=e.getCellStyle(D);"1"==mxUtils.getValue(G,"metaEdit","0")?c.showDataDialog(D):g.apply(this,arguments)}}catch(N){c.handleError(N)}};e.getLinkTitle=function(D){return c.getLinkTitle(D)};
+e.customLinkClicked=function(D){var H=!1;try{c.handleCustomLink(D),H=!0}catch(K){c.handleError(K)}return H};var m=e.parseBackgroundImage;e.parseBackgroundImage=function(D){var H=m.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var p=e.setBackgroundImage;e.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=c.createImageForPageLink(D.originalSrc,c.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,
+function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(D,H){D=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=D){var K=D.indexOf(",");if(0<K)for(D=D.substring(K+1),H=H.getProperty("patches"),K=0;K<H.length;K++)if(null!=H[K][EditorUi.DIFF_UPDATE]&&null!=H[K][EditorUi.DIFF_UPDATE][D]||null!=H[K][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(H[K][EditorUi.DIFF_REMOVE],
+D)){e.refreshBackgroundImage();break}}}));var q=e.getBackgroundImageObject;e.getBackgroundImageObject=function(D,H){var K=q.apply(this,arguments);if(null!=K&&null!=K.originalSrc)if(!H)K={src:K.originalSrc};else if(H&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var G=this.stylesheet,N=this.shapeForegroundColor,T=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";K=c.createImageForPageLink(K.originalSrc);
+this.shapeBackgroundColor=T;this.shapeForegroundColor=N;this.stylesheet=G}return K};var z=this.clearDefaultStyle;this.clearDefaultStyle=function(){z.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=
+c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return y.apply(this,arguments)};var A=e.addClickHandler;e.addClickHandler=function(D,H,K){var G=H;H=function(N,T){if(null==T){var V=mxEvent.getSource(N);"a"==V.nodeName.toLowerCase()&&(T=V.getAttribute("href"))}null!=T&&e.isCustomLink(T)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&e.customLinkClicked(T)&&mxEvent.consume(N);null!=G&&G(N,T)};A.call(this,D,
+H,K)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(D,H,K){c.editor.graph.isSelectionEmpty()?x.apply(this,arguments):c.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,K)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,
+!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=e.getExportVariables;e.getExportVariables=function(){var D=I.apply(this,arguments),H=c.getCurrentFile();null!=H&&(D.filename=H.getTitle());D.pagecount=null!=c.pages?c.pages.length:1;D.page=null!=c.currentPage?c.currentPage.getName():"";D.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return D};var M=e.getGlobalVariable;e.getGlobalVariable=function(D){var H=c.getCurrentFile();return"filename"==
+D&&null!=H?H.getTitle():"page"==D&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==D?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==D?null!=c.pages?c.pages.length:1:M.apply(this,arguments)};var E=e.labelLinkClicked;e.labelLinkClicked=function(D,H,K){var G=H.getAttribute("href");if(null==G||!e.isCustomLink(G)||!mxEvent.isTouchEvent(K)&&mxEvent.isPopupTrigger(K))E.apply(this,arguments);else{if(!e.isEnabled()||null!=D&&e.isCellLocked(D.cell))e.customLinkClicked(G),
+e.getRubberband().reset();mxEvent.consume(K)}};this.editor.getOrCreateFilename=function(){var D=c.defaultFilename,H=c.getCurrentFile();null!=H&&(D=null!=H.getTitle()?H.getTitle():D);return D};var Q=this.actions.get("print");Q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Q.visible=Q.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,
!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&d.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var H=d.cellEditor.text2,J=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(G){null!=J&&(J.parentNode.removeChild(J),J=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(G){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&
-(J=this.highlightElement(H));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(G){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,function(T,W,U,V,l,A){d.insertImage(T,l,A)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var P=
-G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,W)),U/Math.max(1,T));d.insertImage(decodeURIComponent(P),W*U,T*U)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):
-0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));this.isSettingsEnabled()&&(p=this.editor.graph.view,p.setUnit(mxSettings.getUnit()),p.addListener("unitChanged",function(D,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,p.unit),this.refresh());if("1"==urlParams.styledev){p=document.getElementById("geFooter");null!=p&&(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)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,H){0<this.editor.graph.getSelectionCount()?(D=this.editor.graph.getSelectionCell(),D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F=
-this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:F.apply(this,arguments)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var K=null;mxEvent.addListener(d.container,"dragleave",function(D){d.isEnabled()&&(null!=K&&(K.parentNode.removeChild(K),K=null),D.stopPropagation(),D.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,
-function(D){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&(K=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()}));mxEvent.addListener(d.container,"drop",mxUtils.bind(this,function(D){null!=K&&(K.parentNode.removeChild(K),K=null);if(d.isEnabled()){var H=mxUtils.convertPoint(d.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),J=D.dataTransfer.files,G=d.view.translate,P=d.view.scale,T=H.x/P-G.x,W=H.y/P-G.y;if(0<J.length)"1"!=
-urlParams.embed&&mxEvent.isShiftDown(D)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(D)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(W=T=0);var U=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(D,null!=this.pages);
-if(null!=H)d.setSelectionCells(this.importXml(H,T,W,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var V=D.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=d.sanitizeHtml(V);var l=null;J=H.getElementsByTagName("img");null!=J&&1==J.length?(V=J[0].getAttribute("src"),null==V&&(V=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(l=!0)):(J=H.getElementsByTagName("a"),null!=J&&1==J.length?V=J[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),
-null!=H&&1==H.length&&(V=mxUtils.getTextContent(H[0]))));var A=!0,M=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(V,T,W,!0,l,null,A,mxEvent.isControlDown(D)))});l&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Q){A=Q;M()},mxEvent.isControlDown(D)):M()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(Q){var O=Math.max(1,Q.width);Q=Math.max(1,Q.height);var R=this.maxImageSize;R=Math.min(1,
-Math.min(R/Math.max(1,O)),R/Math.max(1,Q));d.setSelectionCell(d.insertVertex(null,null,"",T,W,O*R,Q*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(Q){d.setSelectionCells(this.insertTextAt(U,T,W,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),T,W,!0))}}D.stopPropagation();D.preventDefault()}),!1)}d.enableFlowAnimation=
-!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();p=mxUtils.bind(this,function(){d.refresh();d.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",p);this.addListener("sketchModeChanged",p);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?
-mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var g=d.clipboardData||d.originalEvent.clipboardData,q=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){q=!0;break}if(!q){var n=g.items;for(index in n){var z=
-n[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(x,y,I,N,t,p){c.insertImage(x,t,p)},function(){},function(x){return"image/"==x.type.substring(0,6)},function(x){for(var y=0;y<x.length;y++)x[y]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML=
-"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var d=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
-"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(n){var z=mxEvent.getSource(n);null==d.container||!d.isEnabled()||d.isMouseDown||
-d.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=n.keyCode&&(mxClient.IS_MAC||17!=n.keyCode)&&(!mxClient.IS_MAC||91!=n.keyCode&&93!=n.keyCode)||q||(g.style.left=d.container.scrollLeft+10+"px",g.style.top=d.container.scrollTop+10+"px",d.container.appendChild(g),q=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(n){var z=n.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||224!=z&&17!=
-z&&91!=z&&93!=z||(q=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(n){if(d.isEnabled())try{mxClipboard.copy(d),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(n){if(d.isEnabled())try{mxClipboard.copy(d),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,
-"paste",mxUtils.bind(this,function(n){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=n.clipboardData&&this.pasteCells(n,g,!0,!0),mxEvent.isConsumed(n)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(n,g,!1,!0)}),0))}),!0);var m=this.isSelectionAllowed;this.isSelectionAllowed=function(n){return mxEvent.getSource(n)==g?!0:m.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,d){mxSettings.setUi(c);d=d||this.doSetCurrentTheme(c);
-this.fireEvent(new mxEventObject("currentThemeChanged"));d||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c){var d=Editor.currentTheme,g=!1;if(d!=c){if("1"==urlParams["live-ui"]){var q=function(m){return null==m||""==m||"dark"==m||"kennedy"==m};console.log("doSetCurrentTheme",d,c);c=q(c)?"default":c;d=q(d)?"default":d;"sketch"==d&&"default"==c?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display=
-"block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==d&&"sketch"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(c)}Editor.currentTheme=c}return g};EditorUi.prototype.switchTheme=function(c){this.createMenubarForTheme(c);this.switchCssForTheme(c);"sketch"==c?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==c&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=
-this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(c){"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),
-document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=function(c){"sketch"==c?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",
-null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height="22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",
-this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(c,d,g,q){var m=this.menus.get(d);c=c.addMenu(mxResources.get(d),m.funct);c.className=g;c.style.display="inline-block";c.style.boxSizing="border-box";c.style.top="6px";c.style.marginRight="6px";c.style.height=
-"30px";c.style.paddingTop="6px";c.style.paddingBottom="6px";c.style.cursor="pointer";c.setAttribute("title",mxResources.get(d));this.menus.menuCreated(m,c,"geMenuItem");null!=q&&(c.style.backgroundImage="url("+q+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.width="34px",c.innerText="");return c};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-
-241):Math.max(10,this.diagramContainer.clientWidth-248),d="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,d,240,g,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=
-new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var H=e.cellEditor.text2,K=null;null!=H&&(mxEvent.addListener(H,"dragleave",function(G){null!=K&&(K.parentNode.removeChild(K),K=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(G){null==K&&(!mxClient.IS_IE||10<document.documentMode)&&
+(K=this.highlightElement(H));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(H,"drop",mxUtils.bind(this,function(G){null!=K&&(K.parentNode.removeChild(K),K=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,0,0,this.maxImageSize,function(T,V,U,X,l,B){e.insertImage(T,l,B)},function(){},function(T){return"image/"==T.type.substring(0,6)},function(T){for(var V=0;V<T.length;V++)T[V]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var N=
+G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(T){var V=Math.max(1,T.width);T=Math.max(1,T.height);var U=this.maxImageSize;U=Math.min(1,Math.min(U/Math.max(1,V)),U/Math.max(1,T));e.insertImage(decodeURIComponent(N),V*U,T*U)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):
+0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));this.isSettingsEnabled()&&(Q=this.editor.graph.view,Q.setUnit(mxSettings.getUnit()),Q.addListener("unitChanged",function(D,H){mxSettings.setUnit(H.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
+!this.editor.editable?null:new mxDualRuler(this,Q.unit),this.refresh());if("1"==urlParams.styledev){Q=document.getElementById("geFooter");null!=Q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
+mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,H){0<this.editor.graph.getSelectionCount()?(D=this.editor.graph.getSelectionCell(),D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var n=
+this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:n.apply(this,arguments)}}Q=document.getElementById("geInfo");null!=Q&&Q.parentNode.removeChild(Q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var v=null;mxEvent.addListener(e.container,"dragleave",function(D){e.isEnabled()&&(null!=v&&(v.parentNode.removeChild(v),v=null),D.stopPropagation(),D.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,
+function(D){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(D){null!=v&&(v.parentNode.removeChild(v),v=null);if(e.isEnabled()){var H=mxUtils.convertPoint(e.container,mxEvent.getClientX(D),mxEvent.getClientY(D)),K=D.dataTransfer.files,G=e.view.translate,N=e.view.scale,T=H.x/N-G.x,V=H.y/N-G.y;if(0<K.length)"1"!=
+urlParams.embed&&mxEvent.isShiftDown(D)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(K,!0)):(mxEvent.isAltDown(D)&&(V=T=null),this.importFiles(K,T,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(V=T=0);var U=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(D,null!=this.pages);
+if(null!=H)e.setSelectionCells(this.importXml(H,T,V,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var X=D.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=e.sanitizeHtml(X);var l=null;K=H.getElementsByTagName("img");null!=K&&1==K.length?(X=K[0].getAttribute("src"),null==X&&(X=K[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)||(l=!0)):(K=H.getElementsByTagName("a"),null!=K&&1==K.length?X=K[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),
+null!=H&&1==H.length&&(X=mxUtils.getTextContent(H[0]))));var B=!0,L=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(X,T,V,!0,l,null,B,mxEvent.isControlDown(D)))});l&&null!=X&&X.length>this.resampleThreshold?this.confirmImageResize(function(P){B=P;L()},mxEvent.isControlDown(D)):L()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(P){var O=Math.max(1,P.width);P=Math.max(1,P.height);var R=this.maxImageSize;R=Math.min(1,
+Math.min(R/Math.max(1,O)),R/Math.max(1,P));e.setSelectionCell(e.insertVertex(null,null,"",T,V,O*R,P*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(P){e.setSelectionCells(this.insertTextAt(U,T,V,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),T,V,!0))}}D.stopPropagation();D.preventDefault()}),!1)}e.enableFlowAnimation=
+!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();Q=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",Q);this.addListener("sketchModeChanged",Q);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
+urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,m=!1,p=0;p<g.types.length;p++)if("text/"===
+g.types[p].substring(0,5)){m=!0;break}if(!m){var q=g.items;for(index in q){var z=q[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(A,x,I,M,E,Q){c.insertImage(A,E,Q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var x=0;x<A.length;x++)A[x]()});else{var y=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
+"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var z=mxEvent.getSource(q);
+null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||m||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",q=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=q,e.container.scrollTop=z)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(q){var z=q.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=z&&17!=z&&91!=z&&93!=z||(m=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"cut",
+mxUtils.bind(this,function(q){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(q){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=q.clipboardData&&this.pasteCells(q,g,!0,!0),!mxEvent.isConsumed(q))){var z=e.container.scrollLeft,y=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=z;e.container.scrollTop=y;
+this.pasteCells(q,g,!1,!0)}),0)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(q){return mxEvent.getSource(q)==g?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c){function e(I){return""==I||"dark"==I||"kennedy"==I||null==I}var g=Editor.currentTheme;c=e(c)?"default":c;g=e(g)?"default":g;var m=
+"sketch"==g&&"default"==c||"default"==g&&"sketch"==c;if(m&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var p=this.editor.graph.view.translate,q=p.x,z=p.y,y=mxUtils.getOffset(this.editor.graph.container),A=this.editor.graph.container.scrollLeft-y.x,x=this.editor.graph.container.scrollTop-y.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
+function(){"sketch"==g&&"default"==c?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
+"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var I=this.editor.graph.view.scale;y=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=A+y.x+(p.x-q)*I;this.editor.graph.container.scrollTop=
+x+y.y+(p.y-z)*I;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return m};EditorUi.prototype.switchTheme=function(c){this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display=
+"";"sketch"==c?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==c&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(c="default"==c||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
+this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
+(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(c){this.destroyWindows();"sketch"==c?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
+Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
+function(c){"sketch"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"sketch"==c?(null==this.sketchWrapperElt&&
+(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(c){if("sketch"==c&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var e=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));c=mxUtils.bind(this,function(){e.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=e.style.display});this.actions.get("undo").addListener("stateChanged",c);
+this.actions.get("redo").addListener("stateChanged",c);c();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(c){if("sketch"==c&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";c.appendChild(e);var g=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var m=null!=this.pages?this.pages.length:1,p=this.getPageIndex(this.currentPage);p=null!=p?p+1:1;var q=this.currentPage.getId();
+e.setAttribute("title",this.currentPage.getName()+" ("+p+"/"+m+")"+(null!=q?" ["+q+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();c.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";c.appendChild(g);mxUtils.bind(this,function(m){mxEvent.addListener(m,
+"click",mxUtils.bind(this,function(q){mxEvent.isAltDown(q)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(q)):mxEvent.isShiftDown(q)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(q))}));var p=mxUtils.bind(this,function(){m.innerText="";mxUtils.write(m,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",
+p)})(g);c.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(c){if("sketch"==c&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var e=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(e.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var m=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);m.style.paddingLeft="12px";m.style.backgroundSize="";m.style.width="26px";m.style.height="30px";m.style.opacity="0.7";var p=this.createMenu("insert",Editor.plusImage);p.style.backgroundSize="";p.style.marginBottom="4px";p.style.display="block";p.style.width="30px";p.style.height="30px";p.style.padding="4px";p.style.opacity="0.7";var q=!1,z=mxUtils.bind(this,function(){e.innerText="";if(!q){var y=function(x,I,M,E){null!=I&&x.setAttribute("title",I);x.style.cursor="pointer";x.style.margin="8px 0px";
+x.style.display="block";e.appendChild(x);null!=E&&(x.style.position="relative",x.style.overflow="visible",I=document.createElement("div"),I.style.position="absolute",I.style.fontSize="8px",I.style.left="32px",I.style.top="28px",mxUtils.write(I,E),x.appendChild(I));return x};y(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");y(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");y(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");y(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var A=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");A.geometry.setTerminalPoint(new mxPoint(0,0),!0);A.geometry.setTerminalPoint(new mxPoint(A.geometry.width,0),!1);A.geometry.points=
+[];A.geometry.relative=!0;A.edge=!0;y(this.sidebar.createEdgeTemplateFromCells([A],A.geometry.width,A.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");A=A.clone();A.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";A.geometry.width=this.editor.graph.defaultEdgeLength+20;A.geometry.setTerminalPoint(new mxPoint(0,20),!0);A.geometry.setTerminalPoint(new mxPoint(A.geometry.width,20),!1);
+y(this.sidebar.createEdgeTemplateFromCells([A],A.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));y(m,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(p)}"1"!=urlParams.embedInline&&e.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){q?(mxUtils.setPrefixedStyle(e.style,"transform","translate(0, -50%)"),e.style.padding="8px 6px 4px",e.style.width="40px",e.style.top="50%",e.style.bottom="",e.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",q=!1,z()):(e.innerText="",e.appendChild(g),mxUtils.setPrefixedStyle(e.style,"transform","translate(0, 0)"),e.style.bottom="12px",e.style.padding="0px",e.style.height="24px",e.style.width="24px",e.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",q=!0)}));this.addListener("darkModeChanged",
+z);this.addListener("sketchModeChanged",z);z();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(c){"sketch"==c?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="relative",c.style.height="21px",c.style.width="21px",c.style.right="0px",c.style.top="3px",this.sketchMenubarElt.appendChild(c))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),c=this.menubar.langIcon,null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.right=
+"14px",c.style.top="5px",document.body.appendChild(c)))};EditorUi.prototype.createMenu=function(c,e){var g=this.menus.get(c),m=this.menubar.addMenu(mxResources.get(c),g.funct);m.className="geToolbarButton";m.style.display="inline-block";m.style.cursor="pointer";m.style.height="24px";m.setAttribute("title",mxResources.get(c));this.menus.menuCreated(g,m,"geMenuItem");null!=e&&(m.style.backgroundImage="url("+e+")",m.style.backgroundPosition="center center",m.style.backgroundRepeat="no-repeat",m.style.backgroundSize=
+"100% 100%",m.style.width="24px",m.innerText="");return m};EditorUi.prototype.createMenuItem=function(c,e,g){var m=document.createElement("a");m.className="geToolbarButton";m.setAttribute("title",mxResources.get(c));m.style.backgroundImage="url("+e+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="100% 100%";m.style.display="inline-block";m.style.cursor="pointer";m.style.marginLeft="6px";m.style.width="24px";m.style.height="24px";var p=this.actions.get(c);
+null!=p&&(mxEvent.addListener(m,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()})),mxEvent.addListener(m,"click",function(q){"disabled"!=m.getAttribute("disabled")&&p.funct(q);mxEvent.consume(q)}),g||(c=function(){p.isEnabled()?(m.removeAttribute("disabled"),m.style.cursor="pointer"):(m.setAttribute("disabled","disabled"),m.style.cursor="default");m.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",
+c),c()));return m};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,e,240,g,mxUtils.bind(this,function(m){m.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
+"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
-"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }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); "+
-(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+
-(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
+(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");
-v.setAttribute("charset","UTF-8");v.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var d=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";d.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;d.view.gridColor=d.view.defaultGridColor;d.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";d.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";d.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";d.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";d.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";d.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";d.loadStylesheet();null!=this.actions.layersWindow&&
-(c=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,c&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=d.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
-d.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=d.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=d.shapeForegroundColor;Graph.prototype.defaultThemeName=d.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==v.parentNode&&document.getElementsByTagName("head")[0].appendChild(v):null!=v.parentNode&&v.parentNode.removeChild(v)}};
-EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,d){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&d&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=c){var d=function(q,m,n){null==
-q[m]&&(q[m]=n)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);d(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);d(g.defaultEdgeStyle,"edgeStyle","none");d(g.defaultEdgeStyle,"rounded","0");d(g.defaultEdgeStyle,"curved","1");d(g.defaultEdgeStyle,"jettySize","auto");
-d(g.defaultEdgeStyle,"orthogonalLoop","1");d(g.defaultEdgeStyle,"endArrow","open");d(g.defaultEdgeStyle,"endSize","14");d(g.defaultEdgeStyle,"startSize","14");c&&(d(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),d(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),d(g.defaultVertexStyle,"hachureGap","4"),d(g.defaultVertexStyle,"sketch","1"),d(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),d(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),d(g.defaultEdgeStyle,
-"sketch","1"),d(g.defaultEdgeStyle,"hachureGap","4"),d(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),d(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var d=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(d=this.getPageById(c.substring(g+1)),d=null!=d?d.getName():
-mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(d=mxResources.get("action"));return d};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var d=c.indexOf(",");if(c=this.getPageById(c.substring(d+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
-EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],
-"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,d){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=d.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,
-function(c,d){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,d){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
-mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,d){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,d){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c);null==urlParams.dark&&(mxSettings.settings.darkMode=c,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var u=document.createElement("link");u.setAttribute("rel","stylesheet");u.setAttribute("href",STYLE_PATH+"/dark.css");
+u.setAttribute("charset","UTF-8");u.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=function(c){if(Editor.darkMode!=c){var e=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";e.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;e.view.gridColor=e.view.defaultGridColor;e.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";e.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";e.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";e.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";e.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";e.loadStylesheet();null!=this.actions.layersWindow&&
+(c=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,c&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=e.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
+e.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=e.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=e.shapeForegroundColor;Graph.prototype.defaultThemeName=e.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==u.parentNode&&document.getElementsByTagName("head")[0].appendChild(u):
+null!=u.parentNode&&u.parentNode.removeChild(u)}};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),this.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(Editor.inlineFullscreen=c,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(c){if(Editor.sketchMode!=
+c){var e=function(m,p,q){null==m[p]&&(m[p]=q)},g=this.editor.graph;Editor.sketchMode=c;this.menus.defaultFontSize=c?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);e(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);e(g.defaultEdgeStyle,"edgeStyle","none");e(g.defaultEdgeStyle,"rounded","0");e(g.defaultEdgeStyle,"curved","1");e(g.defaultEdgeStyle,
+"jettySize","auto");e(g.defaultEdgeStyle,"orthogonalLoop","1");e(g.defaultEdgeStyle,"endArrow","open");e(g.defaultEdgeStyle,"endSize","14");e(g.defaultEdgeStyle,"startSize","14");c&&(e(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),e(g.defaultVertexStyle,"hachureGap","4"),e(g.defaultVertexStyle,"sketch","1"),e(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),e(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
+e(g.defaultEdgeStyle,"sketch","1"),e(g.defaultEdgeStyle,"hachureGap","4"),e(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),e(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),
+e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
+mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
+mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
+mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,d,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(q,m){try{this.spinner.stop();var n=this.createImageDataUri(q,d,"png"),z=parseInt(m.getAttribute("width")),C=parseInt(m.getAttribute("height"));this.writeImageToClipboard(n,z,C,mxUtils.bind(this,function(x){this.handleError(x)}))}catch(x){this.handleError(x)}}),null,null,null,mxUtils.bind(this,
-function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(c,d,g,q){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+d+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](q)};
-EditorUi.prototype.copyCells=function(c,d){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var q=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(q));mxUtils.setTextContent(c,encodeURIComponent(m));d?(g.removeCells(q,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var d=this.editor.graph;
-d.isSelectionEmpty()||(c=mxUtils.sortCells(d.getExportableCells(d.model.getTopmostCells(d.getSelectionCells()))),d=mxUtils.getXml(d.encodeCells(c)),navigator.clipboard.writeText(d))}return c};EditorUi.prototype.pasteXml=function(c,d,g,q){var m=this.editor.graph,n=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var z=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))n=this.importXml(c,z,z),m.setSelectionCells(n);else if(d&&1==m.getSelectionCount()){z=m.getStartEditingCell(m.getSelectionCell(),
-q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{m.model.beginUpdate();try{m.labelChanged(z,c),Graph.isLink(c)&&m.setLinkForCell(z,c)}finally{m.model.endUpdate()}}m.setSelectionCell(z)}else n=m.getInsertPoint(),m.isMouseInsertPoint()&&(z=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),n=this.insertTextAt(c,n.x+z,n.y+z,!0),m.setSelectionCells(n);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return n};EditorUi.prototype.pasteCells=function(c,d,g,q){if(!mxEvent.isConsumed(c)){var m=d,n=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),C=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var x=decodeURIComponent(z);this.isCompatibleString(x)&&(C=!0,z=x)}catch(F){}C=C?null:c.clipboardData.getData("text/html");null!=C&&0<C.length?(m=
-this.parseHtmlData(C),n="text/plain"!=m.getAttribute("data-type")):null!=z&&0<z.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,C))}z=m.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(F){var K=this.editor.graph;K.lastPasteXml==F?K.pasteCounter++:(K.lastPasteXml=F,K.pasteCounter=0);var D=
-K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(F,D,D));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(F){this.handleError(F)})),mxEvent.consume(c));else{var y=n?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText),I=!1;try{var N=y.lastIndexOf("%3E");0<=N&&N<y.length-3&&(y=y.substring(0,N+3))}catch(F){}try{z=m.getElementsByTagName("span"),(x=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(y))&&
-(this.isCompatibleString(x)||0==x.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,y=x)}catch(F){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var t=mxUtils.bind(this,function(){try{y=(new MiroImporter).importMiroJson(JSON.parse(y)),this.pasteXml(y,q,I,c)}catch(F){console.log("Miro import error:",F)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",t):t()}else this.pasteXml(y,q,I,c);try{mxEvent.consume(c)}catch(F){}}else if(!g){var p=
-this.editor.graph;p.lastPasteXml=null;p.pasteCounter=0}}catch(F){this.handleError(F)}}}d.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var d=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(q){null!=d&&(d.parentNode.removeChild(d),d=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<
-document.documentMode&&12>document.documentMode)&&(d=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(q){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files,
-!0);else{var m=this.extractGraphModelFromEvent(q);if(null==m){var n=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=n&&(10==document.documentMode||11==document.documentMode?m=n.getData("Text"):(m=null,m=0<=mxUtils.indexOf(n.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(n.types,"text/html")?n.getData("text/html"):null,null!=m&&0<m.length?(n=document.createElement("div"),n.innerHTML=this.editor.graph.sanitizeHtml(m),n=n.getElementsByTagName("img"),0<n.length&&
-(m=n[0].getAttribute("src"))):0<=mxUtils.indexOf(n.types,"text/plain")&&(m=n.getData("text/plain"))),null!=m&&(Editor.isPngDataUrl(m)?(m=Editor.extractGraphModelFromPng(m),null!=m&&0<m.length&&this.openLocalFile(m,null,!0)):this.isRemoteFileFormat(m)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(m))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(),
-null,!0)})):/^https?:\/\//.test(m)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(m):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(m)))))}else this.openLocalFile(m,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var d=0,g=0;if(null==c){var q=document.body;var m=document.documentElement;var n=(q.clientWidth||m.clientWidth)-3;q=
-Math.max(q.clientHeight||0,m.clientHeight)-3}else d=c.offsetTop,g=c.offsetLeft,n=c.clientWidth,q=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";m.style.top=d+"px";m.style.left=g+"px";m.style.width=Math.max(0,n-3)+"px";m.style.height=Math.max(0,q-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);
-return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var d=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=d){var g=new mxCodec(d.ownerDocument),q=new mxGraphModel;g.decode(d,q);d=q.getChildAt(q.getRoot(),0);for(g=0;g<q.getChildCount(d);g++)c.push(q.getChildAt(d,g))}return c};EditorUi.prototype.openFileHandle=function(c,d,g,q,m){if(null!=d&&0<d.length){!this.useCanvasForExport&&/(\.png)$/i.test(d)?d=d.substring(0,d.length-4)+".drawio":/(\.pdf)$/i.test(d)&&(d=
-d.substring(0,d.length-4)+".drawio");var n=mxUtils.bind(this,function(C){d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".drawio":d+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,C,d))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,d,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d))this.importVisio(g,
-mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,d))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?n(C.responseText):this.handleError({message:mxResources.get(413==
-C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(d)&&(d=d.substring(0,d.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,d,q)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();n(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,d,q)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(m=null,q=!0,
-c=z)}this.spinner.stop();this.openLocalFile(c,d,q,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,d){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(q){var m=new FileReader;m.onload=mxUtils.bind(this,function(n){try{this.openFileHandle(n.target.result,q.name,q,d)}catch(z){this.handleError(z)}});m.onerror=mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n);window.openFile=null});"image"!==q.type.substring(0,
-5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?m.readAsText(q):m.readAsDataURL(q)})(c[g])};EditorUi.prototype.openLocalFile=function(c,d,g,q,m){var n=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==d&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,d||this.defaultFilename,g,q,m))});if(null!=
-c&&0<c.length)null==n||!n.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,d),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=n&&n.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var d=0;d<this.pages.length;d++)this.updatePageRoot(this.pages[d]),this.addBasenamesForCell(this.pages[d].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);d=[];for(var g in c)d.push(g);return d};EditorUi.prototype.addBasenamesForCell=function(c,d){function g(z){if(null!=
-z){var C=z.lastIndexOf(".");0<C&&(z=z.substring(C+1,z.length));null==d[z]&&(d[z]=!0)}}var q=this.editor.graph,m=q.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));q.model.isEdge(c)&&(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=q.model.getChildCount(c);for(var n=0;n<m;n++)this.addBasenamesForCell(q.model.getChildAt(c,n),d)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,p){try{this.spinner.stop();var q=this.createImageDataUri(m,e,"png"),z=parseInt(p.getAttribute("width")),y=parseInt(p.getAttribute("height"));this.writeImageToClipboard(q,z,y,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,
+function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,m){var p=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](m)};
+EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),p=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(c,encodeURIComponent(p));e?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=p,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;
+e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,m){var p=this.editor.graph,q=null;p.lastPasteXml==c?p.pasteCounter++:(p.lastPasteXml=c,p.pasteCounter=0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(c))q=this.importXml(c,z,z),p.setSelectionCells(q);else if(e&&1==p.getSelectionCount()){z=p.getStartEditingCell(p.getSelectionCell(),
+m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==p.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{p.model.beginUpdate();try{p.labelChanged(z,c),Graph.isLink(c)&&p.setLinkForCell(z,c)}finally{p.model.endUpdate()}}p.setSelectionCell(z)}else q=p.getInsertPoint(),p.isMouseInsertPoint()&&(z=0,p.lastPasteXml==c&&0<p.pasteCounter&&p.pasteCounter--),q=this.insertTextAt(c,q.x+z,q.y+z,!0),p.setSelectionCells(q);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return q};EditorUi.prototype.pasteCells=function(c,e,g,m){if(!mxEvent.isConsumed(c)){var p=e,q=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),y=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var A=decodeURIComponent(z);this.isCompatibleString(A)&&(y=!0,z=A)}catch(n){}y=y?null:c.clipboardData.getData("text/html");null!=y&&0<y.length?(p=
+this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=z&&0<z.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,y))}z=p.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(n){var v=this.editor.graph;v.lastPasteXml==n?v.pasteCounter++:(v.lastPasteXml=n,v.pasteCounter=0);var D=
+v.pasteCounter*v.gridSize;v.setSelectionCells(this.importXml(n,D,D));v.scrollCellToVisible(v.getSelectionCell())}),mxUtils.bind(this,function(n){this.handleError(n)})),mxEvent.consume(c));else{var x=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText),I=!1;try{var M=x.lastIndexOf("%3E");0<=M&&M<x.length-3&&(x=x.substring(0,M+3))}catch(n){}try{z=p.getElementsByTagName("span"),(A=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(x))&&
+(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,x=A)}catch(n){}try{if(null!=x&&0<x.length){if(0==x.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var E=mxUtils.bind(this,function(){try{x=(new MiroImporter).importMiroJson(JSON.parse(x)),this.pasteXml(x,m,I,c)}catch(n){console.log("Miro import error:",n)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",E):E()}else this.pasteXml(x,m,I,c);try{mxEvent.consume(c)}catch(n){}}else if(!g){var Q=
+this.editor.graph;Q.lastPasteXml=null;Q.pasteCounter=0}}catch(n){this.handleError(n)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(m){null!=e&&(e.parentNode.removeChild(e),e=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<
+document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(m){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,
+!0);else{var p=this.extractGraphModelFromEvent(m);if(null==p){var q=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?p=q.getData("Text"):(p=null,p=0<=mxUtils.indexOf(q.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=p&&0<p.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(p),q=q.getElementsByTagName("img"),0<q.length&&
+(p=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(p=q.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(p))).send(mxUtils.bind(this,function(z){200<=z.getStatus()&&299>=z.getStatus()&&this.openLocalFile(z.getText(),
+null,!0)})):/^https?:\/\//.test(p)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(p):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(p)))))}else this.openLocalFile(p,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var m=document.body;var p=document.documentElement;var q=(m.clientWidth||p.clientWidth)-3;m=
+Math.max(m.clientHeight||0,p.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,q=c.clientWidth,m=c.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=g+"px";p.style.width=Math.max(0,q-3)+"px";p.style.height=Math.max(0,m-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);
+return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),m=new mxGraphModel;g.decode(e,m);e=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(e);g++)c.push(m.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,m,p){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=
+e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(y){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==y.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,y,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(y,e,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,
+mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(y){4==y.readyState&&(this.spinner.stop(),200<=y.status&&299>=y.status?q(y.responseText):this.handleError({message:mxResources.get(413==
+y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(y){this.spinner.stop();this.openLocalFile(y,e,m)}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(y){this.spinner.stop();q(y)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,m)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var z=Editor.extractGraphModelFromPdf(c);null!=z&&(p=null,m=!0,
+c=z)}this.spinner.stop();this.openLocalFile(c,e,m,p,null!=p?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(m){var p=new FileReader;p.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,m.name,m,e)}catch(z){this.handleError(z)}});p.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==m.type.substring(0,
+5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?p.readAsText(m):p.readAsDataURL(m)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,m,p){var q=this.getCurrentFile(),z=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var y=mxUtils.parseXml(c);null!=y&&(this.editor.setGraphXml(y.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,m,p))});if(null!=
+c&&0<c.length)null==q||!q.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?z():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,z,mxResources.get("cancel"),mxResources.get("discardChanges")):z()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(z){if(null!=
+z){var y=z.lastIndexOf(".");0<y&&(z=z.substring(y+1,z.length));null==e[z]&&(e[z]=!0)}}var m=this.editor.graph,p=m.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));m.model.isEdge(c)&&(g(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=m.model.getChildCount(c);for(var q=0;q<p;q++)this.addBasenamesForCell(m.model.getChildAt(c,q),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=
-!1;this.installMessageHandler(mxUtils.bind(this,function(d,g,q,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==d||0==d.length)d=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,d,{}));this.mode=App.MODE_EMBED;this.setFileData(d);if(m)try{var n=this.editor.graph;n.setGridEnabled(!1);n.pageVisible=!1;var z=n.model.cells,C;for(C in z){var x=z[C];null!=x&&null!=x.style&&(x.style+=";sketch=1;"+(-1==x.style.indexOf("fontFamily=")||-1<x.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=q?q:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,d){null!=c?c.getPublicUrl(d):d(null)};EditorUi.prototype.createLoadMessage=function(c){var d=this.editor.graph;return{event:c,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var q=d.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),d,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,d.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(c){var d=null,g=!1,q=!1,m=null,n=mxUtils.bind(this,function(x,y){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,n);mxEvent.addListener(window,"message",mxUtils.bind(this,function(x){if(x.source==(window.opener||window.parent)){var y=x.data,I=null,N=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
-"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var t=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[x],"data",[y])}catch(Y){y=null}try{if(null==y)return;
-if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var p=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(Y){null!=
-Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:y}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==y.action){var F=N(y.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),F,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",
-message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{p.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft",
-error:Y.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();var K=1==y.enableRecent,D=1==y.enableSearch,H=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var J=this.getCurrentUser(),G=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:y}),
-"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=J?J.id:null,K?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,D?mxUtils.bind(this,function(Y,Z,ba,ha){this.remoteInvoke("searchDiagrams",[Y,ha],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
-!1,!1,!0,!0);this.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(Y,Z,ba,ha){Y=Y||this.emptyDiagramXml;null!=y.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:ha,builtIn:!0,message:y}),"*"):(c(Y,x,Y!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
-null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
-y.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==y.action){var P=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:P,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));
-null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var T=null!=y.messageKey?mxResources.get(y.messageKey):y.message;null==y.show||y.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==
-y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var W=null!=y.xml?y.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,V=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=y.format;Z.message=y;Z.data=Y;Z.xml=W;z.postMessage(JSON.stringify(Z),"*")}),l=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==y.format&&
-(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(W)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);V(Y)}),A=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var M=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
-A){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);U.getGlobalVariable=function(qa){return"page"==qa?Z.getName():"pagenumber"==qa?1:Y.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Z.root)}if(null!=y.layerIds){var ha=U.model,ma=ha.getChildCells(ha.getRoot()),ia={};for(ba=0;ba<y.layerIds.length;ba++)ia[y.layerIds[ba]]=!0;for(ba=0;ba<ma.length;ba++)ha.setVisible(ma[ba],ia[ma[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(qa){l(qa.toDataURL("image/png"))}),
-y.width,null,y.background,mxUtils.bind(this,function(){l(null)}),null,null,y.scale,y.transparent,y.shadow,null,U,y.border,null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(g=!0,this.setFileData(W),g=!1);M()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(W))).send(mxUtils.bind(this,
-function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?V("data:image/png;base64,"+Y.getText()):l(null)}),mxUtils.bind(this,function(){l(null)}))}}else if(M=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=y.format}else if("html"==y.format)Z=this.editor.getGraphXml(),
-Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=y.background?y.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(ha){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(ha);z.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==y.format)(null==y.spin&&
-null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,y.embedImages,Z,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),
-(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(ha){y.embedImages||null==y.embedImages?this.editor.convertImages(ha,mxUtils.bind(this,function(ma){ba(mxUtils.getXml(ma))})):ba(mxUtils.getXml(ha))}));return}z.postMessage(JSON.stringify(Y),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var Q=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Q.apply(this,arguments);M()}}g=!0;this.setFileData(y.xml);
-g=!1;this.editor.graph.mathEnabled||M()}else M();return}if("load"==y.action){t=y.toSketch;q=1==y.autosave;this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var O=Editor.sketchMode;this.doSetSketchMode(y.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-y.dark&&(O=Editor.darkMode,this.doSetDarkMode(y.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var R=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+
-"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=y.maxFitScale;Y.fit(2*R);Y.maxFitScale=Z;Y.container.scrollTop-=2*R;Y.container.scrollLeft-=2*R;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);
-null!=y.title&&null!=this.buttonContainer&&(F=document.createElement("span"),mxUtils.write(F,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(F),this.embedFilenameSpan=F);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(Y){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var S=this.getCurrentFile();null!=S&&(F=N(y.xml),null!=F&&""!=
-F&&S.mergeFile(new LocalFile(this,F),function(){z.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(Y){z.postMessage(JSON.stringify({event:"merge",message:y,error:Y}),"*")}))}else"remoteInvokeReady"==y.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,x.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(Y){this.handleError(Y)}}var X=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){g=!0;try{c(Y,Z,null,t)}catch(ba){this.handleError(ba)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=X();q&&null==d&&(d=mxUtils.bind(this,function(ba,ha){ba=X();ba==m||g||(ha=this.createLoadMessage("autosave"),ha.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(ha),"*"));m=ba}),
-this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",
-d));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(Y){aa(Y,x)},mxUtils.bind(this,function(Y){this.handleError(Y)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,x)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==y||"object"!==typeof y||
-null==y.format||null==y.data&&null==y.url?(y=N(y),aa(y,x)):this.loadDescriptor(y,mxUtils.bind(this,function(Y){aa(X(),x)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;n="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(n,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(x,y,I){C.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
-href:x,target:y,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";c.style.marginRight="12px";c.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var d=document.createElement("button");d.className="geBigButton";if("1"==
-urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(d,g);d.setAttribute("title",g);mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(d)}}else mxUtils.write(d,mxResources.get("save")),d.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-c.appendChild(d),"1"==urlParams.saveAndExit&&(d=document.createElement("a"),mxUtils.write(d,mxResources.get("saveAndExit")),d.setAttribute("title",mxResources.get("saveAndExit")),d.className="geBigButton geBigStandardButton",d.style.marginLeft="6px",mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(d));"1"!=urlParams.noExitBtn&&(d=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(d,g),d.setAttribute("title",g),d.className="geBigButton geBigStandardButton",d.style.marginLeft="6px",mxEvent.addListener(d,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(d));this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),
-null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var d=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?d():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",d))};EditorUi.prototype.importCsv=function(c,d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,d)}))};EditorUi.prototype.doImportCsv=function(c,d){try{var g=c.split("\n"),
-q=[],m=[],n=[],z={};if(0<g.length){var C={},x=this.editor.graph,y=null,I=null,N=null,t=null,p=null,F=null,K=null,D="whiteSpace=wrap;html=1;",H=null,J=null,G="",P="auto",T="auto",W=!1,U=null,V=null,l=40,A=40,M=100,Q=0,O=mxUtils.bind(this,function(){null!=d?d(ua):(x.setSelectionCells(ua),x.scrollCellToVisible(x.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),R=x.getFreeInsertPoint(),S=R.x,X=R.y;R=X;var aa=null,Y="auto";
-J=null;for(var Z=[],ba=null,ha=null,ma=0;ma<g.length&&"#"==g[ma].charAt(0);){c=g[ma].replace(/\r$/,"");for(ma++;ma<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ma].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[ma].substring(1)),ma++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var qa=mxUtils.trim(c.substring(1,ia)),la=mxUtils.trim(c.substring(ia+1));"label"==qa?aa=x.sanitizeHtml(la):"labelname"==qa&&0<la.length&&"-"!=la?p=la:"labels"==qa&&0<la.length&&"-"!=la?K=JSON.parse(la):"style"==
-qa?I=la:"parentstyle"==qa?D=la:"unknownStyle"==qa&&"-"!=la?F=la:"stylename"==qa&&0<la.length&&"-"!=la?t=la:"styles"==qa&&0<la.length&&"-"!=la?N=JSON.parse(la):"vars"==qa&&0<la.length&&"-"!=la?y=JSON.parse(la):"identity"==qa&&0<la.length&&"-"!=la?H=la:"parent"==qa&&0<la.length&&"-"!=la?J=la:"namespace"==qa&&0<la.length&&"-"!=la?G=la:"width"==qa?P=la:"height"==qa?T=la:"collapsed"==qa&&"-"!=la?W="true"==la:"left"==qa&&0<la.length?U=la:"top"==qa&&0<la.length?V=la:"ignore"==qa?ha=la.split(","):"connect"==
-qa?Z.push(JSON.parse(la)):"link"==qa?ba=la:"padding"==qa?Q=parseFloat(la):"edgespacing"==qa?l=parseFloat(la):"nodespacing"==qa?A=parseFloat(la):"levelspacing"==qa?M=parseFloat(la):"layout"==qa&&(Y=la)}}}if(null==g[ma])throw Error(mxResources.get("invalidOrMissingFile"));var Ca=this.editor.csvToArray(g[ma].replace(/\r$/,""));ia=c=null;qa=[];for(la=0;la<Ca.length;la++)H==Ca[la]&&(c=la),J==Ca[la]&&(ia=la),qa.push(mxUtils.trim(Ca[la]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==aa&&(aa="%"+qa[0]+"%");if(null!=Z)for(var Da=0;Da<Z.length;Da++)null==C[Z[Da].to]&&(C[Z[Da].to]={});H=[];for(la=ma+1;la<g.length;la++){var ya=this.editor.csvToArray(g[la].replace(/\r$/,""));if(null==ya){var Pa=40<g[la].length?g[la].substring(0,40)+"...":g[la];throw Error(Pa+" ("+la+"):\n"+mxResources.get("containsValidationErrors"));}0<ya.length&&H.push(ya)}x.model.beginUpdate();try{for(la=0;la<H.length;la++){ya=H[la];var za=null,Fa=null!=c?G+ya[c]:null;g=!1;null!=Fa&&(za=x.model.getCell(Fa),
-g=null==za||0<=mxUtils.indexOf(q,za));var Ia=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");Ia.collapsed=W;Ia.vertex=!0;Ia.id=Fa;null==za||g||x.model.setCollapsed(za,W);for(var Ba=0;Ba<ya.length;Ba++)x.setAttributeForCell(Ia,qa[Ba],ya[Ba]),null==za||g||x.setAttributeForCell(za,qa[Ba],ya[Ba]);if(null!=p&&null!=K){var Ga=K[Ia.getAttribute(p)];null!=Ga&&(x.labelChanged(Ia,Ga),null==za||g||x.cellLabelChanged(za,Ga))}if(null!=t&&null!=N){var na=N[Ia.getAttribute(t)];null!=na&&(Ia.style=
-na)}x.setAttributeForCell(Ia,"placeholders","1");Ia.style=x.replacePlaceholders(Ia,Ia.style,y);null==za||g?x.fireEvent(new mxEventObject("cellsInserted","cells",[Ia])):(x.model.setStyle(za,Ia.style),0>mxUtils.indexOf(n,za)&&n.push(za),x.fireEvent(new mxEventObject("cellsInserted","cells",[za])));g=null!=za;za=Ia;if(!g)for(Da=0;Da<Z.length;Da++)C[Z[Da].to][za.getAttribute(Z[Da].to)]=za;null!=ba&&"link"!=ba&&(x.setLinkForCell(za,za.getAttribute(ba)),x.setAttributeForCell(za,ba,null));var Ea=this.editor.graph.getPreferredSizeForCell(za);
-J=null!=ia?x.model.getCell(G+ya[ia]):null;if(za.vertex){Pa=null!=J?0:S;ma=null!=J?0:X;null!=U&&null!=za.getAttribute(U)&&(za.geometry.x=Pa+parseFloat(za.getAttribute(U)));null!=V&&null!=za.getAttribute(V)&&(za.geometry.y=ma+parseFloat(za.getAttribute(V)));var wa="@"==P.charAt(0)?za.getAttribute(P.substring(1)):null;za.geometry.width=null!=wa&&"auto"!=wa?parseFloat(za.getAttribute(P.substring(1))):"auto"==P||"auto"==wa?Ea.width+Q:parseFloat(P);var La="@"==T.charAt(0)?za.getAttribute(T.substring(1)):
-null;za.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==T||"auto"==La?Ea.height+Q:parseFloat(T);R+=za.geometry.height+A}g?(null==z[Fa]&&(z[Fa]=[]),z[Fa].push(za)):(q.push(za),null!=J?(J.style=x.replacePlaceholders(J,D,y),x.addCell(za,J),m.push(J)):n.push(x.addCell(za)))}for(la=0;la<m.length;la++)wa="@"==P.charAt(0)?m[la].getAttribute(P.substring(1)):null,La="@"==T.charAt(0)?m[la].getAttribute(T.substring(1)):null,"auto"!=P&&"auto"!=wa||"auto"!=T&&"auto"!=La||x.updateGroupBounds([m[la]],
-Q,!0);var ka=n.slice(),ua=n.slice();for(Da=0;Da<Z.length;Da++){var sa=Z[Da];for(la=0;la<q.length;la++){za=q[la];var va=mxUtils.bind(this,function(Ha,Ma,Ra){var Ja=Ma.getAttribute(Ra.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Oa=0;Oa<Ja.length;Oa++){var Qa=C[Ra.to][Ja[Oa]];if(null==Qa&&null!=F){Qa=new mxCell(Ja[Oa],new mxGeometry(S,X,0,0),F);Qa.style=x.replacePlaceholders(Ma,Qa.style,y);var Na=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Na.width+Q;Qa.geometry.height=Na.height+
-Q;C[Ra.to][Ja[Oa]]=Qa;Qa.vertex=!0;Qa.id=Ja[Oa];n.push(x.addCell(Qa))}if(null!=Qa){Na=Ra.label;null!=Ra.fromlabel&&(Na=(Ma.getAttribute(Ra.fromlabel)||"")+(Na||""));null!=Ra.sourcelabel&&(Na=x.replacePlaceholders(Ma,Ra.sourcelabel,y)+(Na||""));null!=Ra.tolabel&&(Na=(Na||"")+(Qa.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(Na=(Na||"")+x.replacePlaceholders(Qa,Ra.targetlabel,y));var Sa="target"==Ra.placeholders==!Ra.invert?Qa:Ha;Sa=null!=Ra.style?x.replacePlaceholders(Sa,Ra.style,y):x.createCurrentEdgeStyle();
-Na=x.insertEdge(null,null,Na||"",Ra.invert?Qa:Ha,Ra.invert?Ha:Qa,Sa);if(null!=Ra.labels)for(Sa=0;Sa<Ra.labels.length;Sa++){var Ua=Ra.labels[Sa],Ka=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=!0;null!=Ua.placeholders&&(Ka.value=x.replacePlaceholders("target"==Ua.placeholders==!Ra.invert?Qa:Ha,Ka.value,y));if(null!=Ua.dx||null!=Ua.dy)Ka.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=
-Ua.dy?Ua.dy:0);Na.insert(Ka)}ua.push(Na);mxUtils.remove(Ra.invert?Ha:Qa,ka)}}}});va(za,za,sa);if(null!=z[za.id])for(Ba=0;Ba<z[za.id].length;Ba++)va(za,z[za.id][Ba],sa)}}if(null!=ha)for(la=0;la<q.length;la++)for(za=q[la],Ba=0;Ba<ha.length;Ba++)x.setAttributeForCell(za,mxUtils.trim(ha[Ba]),null);if(0<n.length){var ca=new mxParallelEdgeLayout(x);ca.spacing=l;ca.checkOverlap=!0;var ea=function(){0<ca.spacing&&ca.execute(x.getDefaultParent());for(var Ha=0;Ha<n.length;Ha++){var Ma=x.getCellGeometry(n[Ha]);
-Ma.x=Math.round(x.snap(Ma.x));Ma.y=Math.round(x.snap(Ma.y));"auto"==P&&(Ma.width=Math.round(x.snap(Ma.width)));"auto"==T&&(Ma.height=Math.round(x.snap(Ma.height)))}};if("["==Y.charAt(0)){var da=O;x.view.validate();this.executeLayouts(x.createLayouts(JSON.parse(Y)),function(){ea();da()});O=null}else if("circle"==Y){var fa=new mxCircleLayout(x);fa.disableEdgeStyle=!1;fa.resetEdges=!1;var ja=fa.isVertexIgnored;fa.isVertexIgnored=function(Ha){return ja.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};
-this.executeLayout(function(){fa.execute(x.getDefaultParent());ea()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&ua.length==2*n.length-1&&1==ka.length){x.view.validate();var ra=new mxCompactTreeLayout(x,"horizontaltree"==Y);ra.levelDistance=A;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(x.getDefaultParent(),0<ka.length?ka[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ka.length){x.view.validate();var oa=
-new mxHierarchicalLayout(x,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=A;oa.parallelEdgeSpacing=l;oa.interRankCellSpacing=M;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(x.getDefaultParent(),ua);x.moveCells(ua,S,X)},!0,O);O=null}else if("orgchart"==Y){x.view.validate();var Aa=new mxOrgChartLayout(x,2,M,A),xa=Aa.isVertexIgnored;Aa.isVertexIgnored=function(Ha){return xa.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){Aa.execute(x.getDefaultParent());
-ea()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&ua.length>n.length){x.view.validate();var ta=new mxFastOrganicLayout(x);ta.forceConstant=3*A;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var pa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return pa.apply(this,arguments)||0>mxUtils.indexOf(n,Ha)};this.executeLayout(function(){ta.execute(x.getDefaultParent());ea()},!0,O);O=null}}this.hideDialog()}finally{x.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
-function(c){var d="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",q;for(q in urlParams)0>mxUtils.indexOf(c,q)&&null!=urlParams[q]&&(d+=g+q+"="+urlParams[q],g="&")}else d=window.location.search;return d};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var d=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-q;for(q in urlParams)0>mxUtils.indexOf(g,q)&&(c=0==d?c+"?":c+"&",null!=urlParams[q]&&(c+=q+"="+urlParams[q],d++))}return c};EditorUi.prototype.showLinkDialog=function(c,d,g,q,m){c=new LinkDialog(this,c,d,g,!0,q,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;c&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),d=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(d);this.menus.get("viewZoom").setEnabled(d);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(d);this.actions.get("zoomIn").setEnabled(d);this.actions.get("zoomOut").setEnabled(d);
-this.actions.get("resetView").setEnabled(d);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(d);this.menus.get("view").setEnabled(d);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var B=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(c){var d=B.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){d.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){d.refresh()}));return d};var E=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var c=this.editor.graph,d=this.getCurrentFile(),g=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!=
-d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(q&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(q);
-this.actions.get("createRevision").setEnabled(q);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(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("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());d=this.actions.get("findReplace");d.setEnabled("hidden"!=this.diagramContainer.style.visibility);d.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!=
-c&&null!=c.shape&&null!=c.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(c,d,g,q,m,n,z,C){var x=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(d,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");
-else if("svg"==g)c.hideDialog(),c.saveData(d,"svg",mxUtils.getXml(x.getSvg(q,m,n)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),I=x.getGraphBounds(),N=Math.floor(I.width*m/x.view.scale),t=Math.floor(I.height*m/x.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*t<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var p={globalVars:x.getExportVariables()};C&&(p.grid={size:x.gridSize,steps:x.view.gridSteps,color:x.view.gridColor});c.saveRequest(d,g,function(F,
-K){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(K||"0")+(null!=F?"&filename="+encodeURIComponent(F):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(0<z?"&dpi="+z:"")+"&bg="+(null!=q?q:"none")+"&w="+N+"&h="+t+"&border="+n+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==q||"none"==q,!0,!1,!1,n,!0,!1,null,C,z):c.exportImage(m,!1,!0,!1,!1,n,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var c=this.editor.graph,d="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var q=c;this.currentPage!=this.pages[g]&&(q=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),q.model.setRoot(this.pages[g].root));d+=this.pages[g].getName()+" "+q.getIndexableText()+" "}else d=c.getIndexableText();this.editor.graph.setEnabled(!0);return d};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var d={},g=document.createElement("div");g.style.whiteSpace="nowrap";var q=
-document.createElement("h3");mxUtils.write(q,mxUtils.htmlEntities(c));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(q);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var n={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var C=z[c];if("R"==C.substring(0,1)){var x=JSON.parse(decodeURIComponent(C.substring(1)));
-n[x[0]]={id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerText="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<y.length;I++){var N=y[I];n[N.id]&&(d[N.id]=N);var t=this.addCheckbox(m,N.title,n[N.id]);(function(p,F){mxEvent.addListener(F,"change",function(){this.checked?d[p.id]=p:delete d[p.id]})})(N,t)}},mxUtils.bind(this,
-function(y){m.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(I)}));g.appendChild(m);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,I;for(I in d)null==n[I]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],
-null,mxUtils.bind(this,function(t){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,t,N))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[I]));for(I in n)d[I]||this.closeLibrary(new RemoteLibrary(this,null,n[I]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,
-340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var d=0;d<this.remoteInvokeQueue.length;d++)c.postMessage(this.remoteInvokeQueue[d],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var d=c.msgMarkers,g=this.remoteInvokeCallbacks[d.callbackId];if(null==g)throw Error("No callback for "+(null!=d?d.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,d,g,q,m){var n=!0,z=window.setTimeout(mxUtils.bind(this,function(){n=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(z);n&&q.apply(this,arguments)}),x=mxUtils.bind(this,function(){window.clearTimeout(z);n&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:x});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:d,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
-d){var g=mxUtils.bind(this,function(y,I){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=I?N.error={errResp:I}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var q=c.funtionName,m=this.remoteInvokableFns[q];if(null!=m&&"function"===typeof this[q]){if(m.allowedDomains){for(var n=!1,z=0;z<m.allowedDomains.length;z++)if(d=="https://"+m.allowedDomains[z]){n=!0;break}if(!n){g(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||
-(C=[]);if(m.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(y){g(null,y||"Unkown Error")}),this[q].apply(this,C);else{var x=this[q].apply(this,C);g([x])}}else g(null,"Invalid Call: "+q+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,d){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var q=g.open("database",2);q.onupgradeneeded=
-function(m){try{var n=q.result;1>m.oldVersion&&n.createObjectStore("objects",{keyPath:"key"});2>m.oldVersion&&(n.createObjectStore("files",{keyPath:"title"}),n.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=d&&d(z)}};q.onsuccess=mxUtils.bind(this,function(m){var n=q.result;this.database=n;EditorUi.migrateStorageFiles&&(StorageFile.migrate(n),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var x=!0,y=!1,I,N=0,t=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),p=mxUtils.bind(this,function(){N++;F()}),F=mxUtils.bind(this,function(){try{if(N>=I.length)t();else{var D=I[N];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(H){null==H||".scratchpad"==D&&H==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):p()}),p)}}catch(H){console.log(H)}}),K=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title,
-size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],p,p,["filesInfo","files"])}catch(H){console.log(H)}});z=mxUtils.bind(this,function(D){try{if(D.source==C.contentWindow){var H={};try{H=JSON.parse(D.data)}catch(J){}"init"==H.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||y||
-(x?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],x=!1,F()):t():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?K(H.resp[0]):p())}}catch(J){console.log(J)}});window.addEventListener("message",z)}})));c(n);n.onversionchange=function(){n.close()}});q.onerror=d;q.onblocked=function(){}}catch(m){null!=d&&d(m)}else null!=d&&d()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,d,g,q,m){this.openDatabase(mxUtils.bind(this,function(n){try{m=m||"objects";Array.isArray(m)||(m=
-[m],c=[c],d=[d]);var z=n.transaction(m,"readwrite");z.oncomplete=g;z.onerror=q;for(n=0;n<m.length;n++)z.objectStore(m[n]).put(null!=c&&null!=c[n]?{key:c[n],data:d[n]}:d[n])}catch(C){null!=q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,d,g,q){this.openDatabase(mxUtils.bind(this,function(m){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);m=m.transaction(q,"readwrite");m.oncomplete=d;m.onerror=g;for(var n=0;n<q.length;n++)m.objectStore(q[n]).delete(c[n])}),g)};EditorUi.prototype.getDatabaseItem=
-function(c,d,g,q){this.openDatabase(mxUtils.bind(this,function(m){try{q=q||"objects";var n=m.transaction([q],"readonly").objectStore(q).get(c);n.onsuccess=function(){d(n.result)};n.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,d,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var m=q.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),n=[];m.onsuccess=function(z){null==z.target.result?c(n):(n.push(z.target.result.value),
-z.target.result.continue())};m.onerror=d}catch(z){null!=d&&d(z)}}),d)};EditorUi.prototype.getDatabaseItemKeys=function(c,d,g){this.openDatabase(mxUtils.bind(this,function(q){try{g=g||"objects";var m=q.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=d}catch(n){null!=d&&d(n)}}),d)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
-this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,d){var g=this.getCurrentFile();null!=g?g.getComments(c,d):c([])};EditorUi.prototype.addComment=function(c,d,g){var q=this.getCurrentFile();null!=q?q.addComment(c,d,g):d(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
-c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,d){var g=this.getCurrentFile();return null!=g?g.newComment(c,d):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,d)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,d){var g=this.getCurrentFile();null!=
-g&&g.getRevisions?g.getRevisions(c,d):d({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,d,g,q,m,n,z,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,d,g,q,m,n,z,C)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,d)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,d,g,q,m,n,z,C,x,y,I,N,t,p,F,K){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,d,g,q,m,n,z,C,x,y,I,N,t,p,F,K)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,d,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(c,d,g,q)};EditorUi.prototype.convertImageToDataUri=function(c,d){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,d)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,d,g,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,d,g,q)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,d,g,q,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,d,g,q,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],d=0;d<localStorage.length;d++){var g=localStorage.key(d),q=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<q.length){var m=
-"<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(m||q)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var d=localStorage.getItem(c);return{title:c,data:d,isLib:"<mxlibrary>"===d.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,k,e,u,v){function B(){for(var D=y.getElementsByTagName("div"),H=0,J=0;J<D.length;J++)"none"!=D[J].style.display&&D[J].parentNode==y&&H++;I.style.display=0==H?"block":"none"}function E(D,H,J,G){function P(){H.removeChild(U);H.removeChild(V);W.style.display="block";T.style.display="block"}z={div:H,comment:D,saveCallback:J,deleteOnCancel:G};var T=H.querySelector(".geCommentTxt"),W=H.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=T.offsetHeight+"px";U.value=D.content;H.insertBefore(U,T);var V=document.createElement("div");V.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){G?(H.parentNode.removeChild(H),B()):P();z=null});l.className="geCommentEditBtn";V.appendChild(l);var A=mxUtils.button(mxResources.get("save"),function(){T.innerText="";D.content=U.value;mxUtils.write(T,D.content);P();J(D);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(A.click(),mxEvent.consume(M)):27==M.keyCode&&(l.click(),mxEvent.consume(M)))}));A.focus();A.className="geCommentEditBtn gePrimaryBtn";V.appendChild(A);H.insertBefore(V,T);W.style.display="none";T.style.display="none";U.focus()}function L(D,H){H.innerText="";D=new Date(D.modifiedDate);var J=b.timeSince(D);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo",
-[J],"{1} ago"));H.setAttribute("title",D.toLocaleDateString()+" "+D.toLocaleTimeString())}function c(D){var H=document.createElement("img");H.className="geCommentBusyImg";H.src=IMAGE_PATH+"/spin.gif";D.appendChild(H);D.busyImg=H}function d(D){D.style.border="1px solid red";D.removeChild(D.busyImg)}function g(D){D.style.border="";D.removeChild(D.busyImg)}function q(D,H,J,G,P){function T(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var aa=document.createElement("a");aa.className=
-"geCommentActionLnk";mxUtils.write(aa,O);X.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,D);Y.preventDefault();mxEvent.consume(Y)});Q.appendChild(X);S&&(X.style.display="none")}function W(){function O(X){R.push(S);if(null!=X.replies)for(var aa=0;aa<X.replies.length;aa++)S=S.nextSibling,O(X.replies[aa])}var R=[],S=V;O(D);return{pdiv:S,replies:R}}function U(O,R,S,X,aa){function Y(){c(ma);D.addReply(ha,function(ia){ha.id=ia;D.replies.push(ha);g(ma);S&&S()},function(ia){Z();d(ma);b.handleError(ia,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,aa)}function Z(){E(ha,ma,function(ia){Y()},!0)}var ba=W().pdiv,ha=b.newComment(O,b.getCurrentUser());ha.pCommentId=D.id;null==D.replies&&(D.replies=[]);var ma=q(ha,D.replies,ba,G+1);R?Z():Y()}if(P||!D.isResolved){I.style.display="none";var V=document.createElement("div");V.className="geCommentContainer";V.setAttribute("data-commentId",D.id);V.style.marginLeft=20*G+5+"px";D.isResolved&&!Editor.isDarkMode()&&(V.style.backgroundColor=
-"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=D.user.pictureUrl||Editor.userImage;l.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";l.appendChild(A);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,D.user.displayName||"");A.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
-D.id);L(D,M);A.appendChild(M);V.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,D.content||"");V.appendChild(l);D.isLocked&&(V.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";l.appendChild(Q);m||D.isLocked||0!=G&&!n||T(mxResources.get("reply"),function(){U("",!0)},D.isResolved);A=b.getCurrentUser();null==A||A.id!=D.user.id||m||D.isLocked||(T(mxResources.get("edit"),
-function(){function O(){E(D,V,function(){c(V);D.editComment(D.content,function(){g(V)},function(R){d(V);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},D.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(V);D.deleteComment(function(O){if(!0===O){O=V.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=V.querySelectorAll(".geCommentAction");for(O=
-0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(V);V.style.opacity="0.5"}else{R=W(D).replies;for(O=0;O<R.length;O++)y.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==D){H.splice(O,1);break}I.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(O){d(V);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},D.isResolved));m||D.isLocked||0!=G||T(D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
-O.target;S.innerText="";D.isResolved=!D.isResolved;mxUtils.write(S,D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=D.isResolved?"none":"",aa=W(D).replies,Y=Editor.isDarkMode()?"transparent":D.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),ha=0;ha<ba.length;ha++)ba[ha]!=S.parentNode&&(ba[ha].style.display=X);p||(aa[Z].style.display="none")}B()}D.isResolved?U(mxResources.get("reOpened")+
-": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});V.appendChild(l);null!=J?y.insertBefore(V,J.nextSibling):y.appendChild(V);for(J=0;null!=D.replies&&J<D.replies.length;J++)l=D.replies[J],l.isResolved=D.isResolved,q(l,D.replies,null,G+1,P);null!=z&&(z.comment.id==D.id?(P=D.content,D.content=z.comment.content,E(D,V,z.saveCallback,z.deleteOnCancel),D.content=P):null==z.comment.id&&z.comment.pCommentId==D.id&&(y.appendChild(z.div),E(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return V}}
-var m=!b.canComment(),n=b.canReplyToReplies(),z=null,C=document.createElement("div");C.className="geCommentsWin";C.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var x=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(x)+7+"px";C.appendChild(y);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(I,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=x;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x=document.createElement("a");x.className="geButton";if(!m){var t=x.cloneNode();t.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';t.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(t,"click",function(D){function H(){E(J,G,function(P){c(G);b.addComment(P,function(T){P.id=T;F.push(P);g(G)},function(T){d(G);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),G=q(J,F,null,0);H();D.preventDefault();mxEvent.consume(D)});N.appendChild(t)}t=x.cloneNode();t.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';t.setAttribute("title",mxResources.get("showResolved"));
-t.className="geAdaptiveAsset";var p=!1;mxEvent.addListener(t,"click",function(D){this.className=(p=!p)?"geButton geCheckedBtn":"geButton";K();D.preventDefault();mxEvent.consume(D)});N.appendChild(t);b.commentsRefreshNeeded()&&(t=x.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',t.setAttribute("title",mxResources.get("refresh")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(D){K();D.preventDefault();mxEvent.consume(D)}),N.appendChild(t));
-b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geAdaptiveAsset",mxEvent.addListener(x,"click",function(D){v();D.preventDefault();mxEvent.consume(D)}),N.appendChild(x));C.appendChild(N);var F=[],K=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var D=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns");
-z.comment.content=D.value;D.parentNode.removeChild(D);H.parentNode.removeChild(H)}catch(J){b.handleError(J)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function G(P){if(null!=P){P.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<P.length;T++)G(P[T].replies)}}
-J.sort(function(P,T){return new Date(P.modifiedDate)-new Date(T.modifiedDate)});y.innerText="";y.appendChild(I);I.style.display="block";F=J;for(J=0;J<F.length;J++)G(F[J].replies),q(F[J],F,null,0,p);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(y.appendChild(z.div),E(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(J){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-K();this.refreshComments=K;N=mxUtils.bind(this,function(){function D(T){var W=J[T.id];if(null!=W)for(L(T,W),W=0;null!=T.replies&&W<T.replies.length;W++)D(T.replies[W])}if(this.window.isVisible()){for(var H=y.querySelectorAll(".geCommentDate"),J={},G=0;G<H.length;G++){var P=H[G];J[P.getAttribute("data-commentId")]=P}for(G=0;G<F.length;G++)D(F[G])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),C,f,k,e,u,!0,!0);this.window.minimumSize=new mxRectangle(0,
-0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,e,u,v,B,E,L,c,d){var g=document.createElement("div");g.style.textAlign="center";d=null!=d?d:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=d+
-"px";q.style.lineHeight="1.2em";mxUtils.write(q,f);g.appendChild(q);null!=c&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),q.appendChild(f),g.appendChild(q));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var m=document.createElement("input");m.setAttribute("type","checkbox");v=mxUtils.button(v||mxResources.get("cancel"),function(){b.hideDialog();null!=e&&e(m.checked)});v.className="geBtn";
-null!=E&&(v.innerHTML=E+"<br>"+v.innerHTML,v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.style.width="40%");b.editor.cancelFirst&&c.appendChild(v);var n=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(m.checked)});c.appendChild(n);null!=B?(n.innerHTML=B+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-c.appendChild(v);g.appendChild(c);L?(c.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(m),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),q.appendChild(u),g.appendChild(q),mxEvent.addListener(u,"click",function(z){m.checked=!m.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){n.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
-EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,e,u){if(null!=f)for(var v=0;v<f.length;v++)null!=f[v]&&(b=this.patchPages(b,f[v],k,e,u));return b};
-EditorUi.prototype.patchPages=function(b,f,k,e,u){var v={},B=[],E={},L={},c={},d={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])v[g]=e[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(e=0;e<f[EditorUi.DIFF_REMOVE].length;e++)L[f[EditorUi.DIFF_REMOVE][e]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(e=0;e<f[EditorUi.DIFF_INSERT].length;e++)E[f[EditorUi.DIFF_INSERT][e].previous]=f[EditorUi.DIFF_INSERT][e];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])e=
-f[EditorUi.DIFF_UPDATE][g],null!=e.previous&&(d[e.previous]=g);if(null!=b){var q="";for(e=0;e<b.length;e++){var m=b[e].getId();c[m]=b[e];null!=d[q]||L[m]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][m]&&null!=f[EditorUi.DIFF_UPDATE][m].previous||(d[q]=m);q=m}}var n={},z=mxUtils.bind(this,function(x){var y=null!=x?x.getId():"";if(null!=x&&!n[y]){n[y]=!0;B.push(x);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=I&&(this.updatePageRoot(x),null!=I.name&&x.setName(I.name),
-null!=I.view&&this.patchViewState(x,I.view),null!=I.cells&&this.patchPage(x,I.cells,v[x.getId()],u),!k||null==I.cells&&null==I.view||(x.needsUpdate=!0))}x=d[y];null!=x&&(delete d[y],z(c[x]));x=E[y];null!=x&&(delete E[y],C(x))}),C=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var y=c[x.getId()];null==y?z(x):(this.patchPage(y,this.diffPages([y],[x]),v[y.getId()],u),k&&(y.needsUpdate=!0))});z();for(g in d)z(c[d[g]]),delete d[g];for(g in E)C(E[g]),
-delete E[g];return B};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(e){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
-EditorUi.prototype.createParentLookup=function(b,f){function k(c){var d=e[c];null==d&&(d={inserted:[],moved:{}},e[c]=d);return d}var e={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var v=f[EditorUi.DIFF_INSERT][u],B=null!=v.parent?v.parent:"",E=null!=v.previous?v.previous:"";k(B).inserted[E]=v}if(null!=f[EditorUi.DIFF_UPDATE])for(var L in f[EditorUi.DIFF_UPDATE])v=f[EditorUi.DIFF_UPDATE][L],null!=v.previous&&(B=v.parent,null==B&&(u=b.getCell(L),null!=u&&(u=
-b.getParent(u),null!=u&&(B=u.getId()))),null!=B&&(k(B).moved[v.previous]=L));return e};
-EditorUi.prototype.patchPage=function(b,f,k,e){var u=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),v=this.createParentLookup(u,f);u.beginUpdate();try{var B=u.updateEdgeParent,E=new mxDictionary,L=[];u.updateEdgeParent=function(C,x){!E.get(C)&&e&&(E.put(C,!0),L.push(C))};var c=v[""],d=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=d&&(g=this.getCellForJson(d));if(null==g){var q=null!=c&&null!=c.moved?c.moved[""]:null;null!=q&&(g=u.getCell(q))}null!=g&&(u.setRoot(g),
-b.root=g);this.patchCellRecursive(b,u,u.root,v,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var m=0;m<f[EditorUi.DIFF_REMOVE].length;m++){var n=u.getCell(f[EditorUi.DIFF_REMOVE][m]);null!=n&&u.remove(n)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(q in f[EditorUi.DIFF_UPDATE])this.patchCell(u,u.getCell(q),f[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(m=0;m<f[EditorUi.DIFF_INSERT].length;m++)d=f[EditorUi.DIFF_INSERT][m],
-n=u.getCell(d.id),null!=n&&(u.setTerminal(n,u.getCell(d.source),!0),u.setTerminal(n,u.getCell(d.target),!1));u.updateEdgeParent=B;if(e&&0<L.length)for(m=0;m<L.length;m++)u.contains(L[m])&&u.updateEdgeParent(L[m])}finally{u.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,k,e,u){if(null!=k){var v=e[k.getId()],B=null!=v&&null!=v.inserted?v.inserted:{};v=null!=v&&null!=v.moved?v.moved:{};for(var E=0,L=f.getChildCount(k),c="",d=0;d<L;d++){var g=f.getChildAt(k,d).getId();null==v[c]&&(null==u[EditorUi.DIFF_UPDATE]||null==u[EditorUi.DIFF_UPDATE][g]||null==u[EditorUi.DIFF_UPDATE][g].previous&&null==u[EditorUi.DIFF_UPDATE][g].parent)&&(v[c]=g);c=g}L=mxUtils.bind(this,function(q,m){var n=null!=q?q.getId():"";null!=q&&m&&(m=
-f.getCell(n),null!=m&&m!=q&&(q=null));null!=q&&(f.getChildAt(k,E)!=q&&f.add(k,q,E),this.patchCellRecursive(b,f,q,e,u),E++);return n});for(c=[null];0<c.length;)if(d=c.shift(),d=L(null!=d?d.child:null,null!=d?d.insert:!1),g=v[d],null!=g&&(delete v[d],c.push({child:f.getCell(g)})),g=B[d],null!=g&&(delete B[d],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(d in v)c.push({child:f.getCell(v[d])}),delete v[d];for(d in B)c.push({child:this.getCellForJson(B[d]),insert:!0}),delete B[d]}}};
-EditorUi.prototype.patchCell=function(b,f,k,e){if(null!=f&&null!=k){if(null==e||null==e.xmlValue&&(null==e.value||""==e.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=e&&null!=e.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
-1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var u in k)this.cellProperties[u]||(f[u]=k[u])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
-EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,e);var u=b[k].node.cloneNode(!1);u.appendChild(e);f.appendChild(u)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var e=new DiagramPage(f[b]);this.updatePageRoot(e,!0);k.push(e)}else"mxGraphModel"==b.nodeName&&(e=new DiagramPage(b.ownerDocument.createElement("diagram")),e.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(e.node,Graph.compressNode(b,!0)),k.push(e));return k};
-EditorUi.prototype.diffPages=function(b,f){var k=[],e=[],u={},v={},B={},E=null;if(null!=b&&null!=f){for(var L=0;L<f.length;L++)v[f[L].getId()]={page:f[L],prev:E},E=f[L];E=null;for(L=0;L<b.length;L++){var c=b[L].getId();f=v[c];if(null==f)e.push(c);else{var d=this.diffPage(b[L],f.page),g={};mxUtils.isEmptyObject(d)||(g.cells=d);d=this.diffViewState(b[L],f.page);mxUtils.isEmptyObject(d)||(g.view=d);if((null!=f.prev?null==E:null!=E)||null!=E&&null!=f.prev&&E.getId()!=f.prev.getId())g.previous=null!=f.prev?
-f.prev.getId():"";null!=f.page.getName()&&b[L].getName()!=f.page.getName()&&(g.name=f.page.getName());mxUtils.isEmptyObject(g)||(B[c]=g)}delete v[b[L].getId()];E=b[L]}for(c in v)f=v[c],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(B)||(u[EditorUi.DIFF_UPDATE]=B);0<e.length&&(u[EditorUi.DIFF_REMOVE]=e);0<k.length&&(u[EditorUi.DIFF_INSERT]=k)}return u};
-EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var e=b.getChildCount();f=null;for(var u=0;u<e;u++){var v=b.getChildAt(u);this.createCellLookup(v,f,k);f=v}return k};
-EditorUi.prototype.diffCellRecursive=function(b,f,k,e,u){e=null!=e?e:{};var v=k[b.getId()];delete k[b.getId()];if(null==v)u.push(b.getId());else{var B=this.diffCell(b,v.cell);if(null!=B.parent||(null!=v.prev?null==f:null!=f)||null!=f&&null!=v.prev&&f.getId()!=v.prev.getId())B.previous=null!=v.prev?v.prev.getId():"";mxUtils.isEmptyObject(B)||(e[b.getId()]=B)}v=b.getChildCount();f=null;for(B=0;B<v;B++){var E=b.getChildAt(B);this.diffCellRecursive(E,f,k,e,u);f=E}return e};
-EditorUi.prototype.diffPage=function(b,f){var k=[],e=[],u={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var v=this.diffCellRecursive(b.root,null,f,v,e),B;for(B in f)b=f[B],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(v)||(u[EditorUi.DIFF_UPDATE]=v);0<e.length&&(u[EditorUi.DIFF_REMOVE]=e);0<k.length&&(u[EditorUi.DIFF_INSERT]=k);return u};
-EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,e={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var u in this.viewStateProperties)this.diffViewStateProperty(b,k,u,e);return e};EditorUi.prototype.diffViewStateProperty=function(b,f,k,e){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(e[k]=f)};
+!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,m,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var q=this.editor.graph;q.setGridEnabled(!1);q.pageVisible=!1;var z=q.model.cells,y;for(y in z){var A=z[y];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(x){console.log(x)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=e.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(p){g.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(c){var e=null,g=!1,m=!1,p=null,q=mxUtils.bind(this,function(A,x){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var x=A.data,I=null,M=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
+"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(Z){}return Y});if("json"==urlParams.proto){var E=!1;try{x=JSON.parse(x),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[x])}catch(Y){x=null}try{if(null==x)return;
+if("dialog"==x.action){this.showError(null!=x.titleKey?mxResources.get(x.titleKey):x.title,null!=x.messageKey?mxResources.get(x.messageKey):x.message,null!=x.buttonKey?mxResources.get(x.buttonKey):x.button);null!=x.modified&&(this.editor.modified=x.modified);return}if("layout"==x.action){this.executeLayouts(this.editor.graph.createLayouts(x.layouts));return}if("prompt"==x.action){this.spinner.stop();var Q=new FilenameDialog(this,x.defaultValue||"",null!=x.okKey?mxResources.get(x.okKey):x.ok,function(Y){null!=
+Y?z.postMessage(JSON.stringify({event:"prompt",value:Y,message:x}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:x}),"*")},null!=x.titleKey?mxResources.get(x.titleKey):x.title);this.showDialog(Q.container,300,80,!0,!1);Q.init();return}if("draft"==x.action){var n=M(x.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[x.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",
+message:x}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:x}),"*")}),x.editKey?mxResources.get(x.editKey):null,x.discardKey?mxResources.get(x.discardKey):null,x.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:x}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{Q.init()}catch(Y){z.postMessage(JSON.stringify({event:"draft",
+error:Y.toString(),message:x}),"*")}return}if("template"==x.action){this.spinner.stop();var v=1==x.enableRecent,D=1==x.enableSearch,H=1==x.enableCustomTemp;if("1"==urlParams.newTempDlg&&!x.templatesOnly&&null!=x.callback){var K=this.getCurrentUser(),G=new TemplatesDialog(this,function(Y,Z,ba){Y=Y||this.emptyDiagramXml;z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:x}),
+"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=K?K.id:null,v?mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,Y,Z)}):null,D?mxUtils.bind(this,function(Y,Z,ba,fa){this.remoteInvoke("searchDiagrams",[Y,fa],null,Z,ba)}):null,mxUtils.bind(this,function(Y,Z,ba){this.remoteInvoke("getFileContent",[Y.url],null,Z,ba)}),null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,
+!1,!1,!0,!0);this.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Q=new NewDialog(this,!1,x.templatesOnly?!1:null!=x.callback,mxUtils.bind(this,function(Y,Z,ba,fa){Y=Y||this.emptyDiagramXml;null!=x.callback?z.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:Z,tempUrl:ba,libs:fa,builtIn:!0,message:x}),"*"):(c(Y,A,Y!=this.emptyDiagramXml,x.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,
+null,v?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(Y,Z){this.remoteInvoke("searchDiagrams",[Y,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,Z,ba){z.postMessage(JSON.stringify({event:"template",docUrl:Y,info:Z,name:ba}),"*")}),null,null,H?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==
+x.withoutType);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==x.action){var N=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:N,message:x}),"*");return}if("status"==x.action){null!=x.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(x.messageKey))):null!=x.message&&this.editor.setStatus(mxUtils.htmlEntities(x.message));
+null!=x.modified&&(this.editor.modified=x.modified);return}if("spinner"==x.action){var T=null!=x.messageKey?mxResources.get(x.messageKey):x.message;null==x.show||x.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==x.action){this.actions.get("exit").funct();return}if("viewport"==x.action){null!=x.viewport&&(this.embedViewport=x.viewport);return}if("snapshot"==x.action){this.sendEmbeddedSvgExport(!0);return}if("export"==x.action){if("png"==x.format||"xmlpng"==x.format){if(null==
+x.spin&&null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin)){var V=null!=x.xml?x.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var U=this.editor.graph,X=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=x.format;Z.message=x;Z.data=Y;Z.xml=V;z.postMessage(JSON.stringify(Z),"*")}),l=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==x.format&&
+(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(V)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);X(Y)}),B=x.pageId||(null!=this.pages?x.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var L=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=B){var Y=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Z,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==
+B){Z=this.updatePageRoot(this.pages[ba]);break}null==Z&&(Z=this.currentPage);U.getGlobalVariable=function(ra){return"page"==ra?Z.getName():"pagenumber"==ra?1:Y.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Z.root)}if(null!=x.layerIds){var fa=U.model,ja=fa.getChildCells(fa.getRoot()),ha={};for(ba=0;ba<x.layerIds.length;ba++)ha[x.layerIds[ba]]=!0;for(ba=0;ba<ja.length;ba++)fa.setVisible(ja[ba],ha[ja[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ra){l(ra.toDataURL("image/png"))}),
+x.width,null,x.background,mxUtils.bind(this,function(){l(null)}),null,null,x.scale,x.transparent,x.shadow,null,U,x.border,null,x.grid,x.keepTheme)});null!=x.xml&&0<x.xml.length&&(g=!0,this.setFileData(V),g=!1);L()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==x.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=x.layerIds&&0<x.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:x.layerIds})):"")+(null!=x.scale?"&scale="+x.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
+function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?X("data:image/png;base64,"+Y.getText()):l(null)}),mxUtils.bind(this,function(){l(null)}))}}else if(L=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=x;if("html2"==x.format||"html"==x.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Y.xml=mxUtils.getXml(Z);Y.data=this.getFileData(null,null,!0,null,null,null,Z);Y.format=x.format}else if("html"==x.format)Z=this.editor.getGraphXml(),
+Y.data=this.getHtml(Z,this.editor.graph),Y.xml=mxUtils.getXml(Z),Y.format=x.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=x.background?x.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var ba=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(fa);z.postMessage(JSON.stringify(Y),"*")});if("xmlsvg"==x.format)(null==x.spin&&
+null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin))&&this.getEmbeddedSvg(Y.xml,this.editor.graph,null,!0,ba,null,null,x.embedImages,Z,x.scale,x.border,x.shadow,x.keepTheme);else if(null==x.spin&&null==x.spinKey||this.spinner.spin(document.body,null!=x.spinKey?mxResources.get(x.spinKey):x.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,x.scale,x.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||x.shadow,null,x.keepTheme),
+(this.editor.graph.shadowVisible||x.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(fa){x.embedImages||null==x.embedImages?this.editor.convertImages(fa,mxUtils.bind(this,function(ja){ba(mxUtils.getXml(ja))})):ba(mxUtils.getXml(fa))}));return}z.postMessage(JSON.stringify(Y),"*")}),null!=x.xml&&0<x.xml.length){if(this.editor.graph.mathEnabled){var P=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){P.apply(this,arguments);L()}}g=!0;this.setFileData(x.xml);
+g=!1;this.editor.graph.mathEnabled||L()}else L();return}if("load"==x.action){E=x.toSketch;m=1==x.autosave;this.hideDialog();null!=x.modified&&null==urlParams.modified&&(urlParams.modified=x.modified);null!=x.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=x.saveAndExit);null!=x.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=x.noSaveBtn);if(null!=x.rough){var O=Editor.sketchMode;this.doSetSketchMode(x.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+x.dark&&(O=Editor.darkMode,this.doSetDarkMode(x.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=x.border&&(this.embedExportBorder=x.border);null!=x.background&&(this.embedExportBackground=x.background);null!=x.viewport&&(this.embedViewport=x.viewport);this.embedExitPoint=null;if(null!=x.rect){var R=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=x.rect.top+"px";this.diagramContainer.style.left=x.rect.left+
+"px";this.diagramContainer.style.height=x.rect.height+"px";this.diagramContainer.style.width=x.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";I=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.maxFitScale;Y.maxFitScale=x.maxFitScale;Y.fit(2*R);Y.maxFitScale=Z;Y.container.scrollTop-=2*R;Y.container.scrollLeft-=2*R;this.fireEvent(new mxEventObject("editInlineStart","data",[x]))})}null!=x.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=x.noExitBtn);
+null!=x.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,x.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n);try{x.libs&&this.sidebar.showEntries(x.libs)}catch(Y){}x=null!=x.xmlpng?this.extractGraphModelFromPng(x.xmlpng):null!=x.descriptor?x.descriptor:x.xml}else{if("merge"==x.action){var S=this.getCurrentFile();null!=S&&(n=M(x.xml),null!=n&&""!=
+n&&S.mergeFile(new LocalFile(this,n),function(){z.postMessage(JSON.stringify({event:"merge",message:x}),"*")},function(Y){z.postMessage(JSON.stringify({event:"merge",message:x,error:Y}),"*")}))}else"remoteInvokeReady"==x.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==x.action?this.handleRemoteInvoke(x,A.origin):"remoteInvokeResponse"==x.action?this.handleRemoteInvokeResponse(x):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(x)}),"*");return}}catch(Y){this.handleError(Y)}}var W=
+mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(Y,Z){g=!0;try{c(Y,Z,null,E)}catch(ba){this.handleError(ba)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");p=W();m&&null==e&&(e=mxUtils.bind(this,function(ba,fa){ba=W();ba==p||g||(fa=this.createLoadMessage("autosave"),fa.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(fa),"*"));p=ba}),
+this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",
+e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Y,z.postMessage(JSON.stringify(Z),"*");null!=I&&I()});null!=x&&"function"===typeof x.substring&&"data:application/vnd.visio;base64,"==x.substring(0,34)?(M="0M8R4KGxGuE"==x.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(x.substring(x.indexOf(",")+1)),function(Y){aa(Y,A)},mxUtils.bind(this,function(Y){this.handleError(Y)}),M)):null!=x&&"function"===typeof x.substring&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(x,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(x,mxUtils.bind(this,function(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&aa(Y.responseText,A)}),""):null!=x&&"function"===typeof x.substring&&this.isLucidChartData(x)?this.convertLucidChart(x,mxUtils.bind(this,function(Y){aa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==x||"object"!==typeof x||
+null==x.format||null==x.data&&null==x.url?(x=M(x),aa(x,A)):this.loadDescriptor(x,mxUtils.bind(this,function(Y){aa(W(),A)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(A,x,I){y.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
+href:A,target:x,allowOpener:I}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";c.style.position="absolute";c.style.paddingTop="2px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";c.style.marginRight="12px";c.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var e=document.createElement("button");e.className="geBigButton";if("1"==
+urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,g);e.setAttribute("title",g);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
+c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e));"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
+mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e));this.toolbar.container.appendChild(c);this.toolbar.staticElements.push(c)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),
+null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&
+(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),
+m=[],p=[],q=[],z={};if(0<g.length){var y={},A=this.editor.graph,x=null,I=null,M=null,E=null,Q=null,n=null,v=null,D="whiteSpace=wrap;html=1;",H=null,K=null,G="",N="auto",T="auto",V=!1,U=null,X=null,l=40,B=40,L=100,P=0,O=mxUtils.bind(this,function(){null!=e?e(da):(A.setSelectionCells(da),A.scrollCellToVisible(A.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),R=A.getFreeInsertPoint(),S=R.x,W=R.y;R=W;var aa=null,Y="auto";
+K=null;for(var Z=[],ba=null,fa=null,ja=0;ja<g.length&&"#"==g[ja].charAt(0);){c=g[ja].replace(/\r$/,"");for(ja++;ja<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ja].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[ja].substring(1)),ja++;if("#"!=c.charAt(1)){var ha=c.indexOf(":");if(0<ha){var ra=mxUtils.trim(c.substring(1,ha)),ma=mxUtils.trim(c.substring(ha+1));"label"==ra?aa=A.sanitizeHtml(ma):"labelname"==ra&&0<ma.length&&"-"!=ma?Q=ma:"labels"==ra&&0<ma.length&&"-"!=ma?v=JSON.parse(ma):"style"==
+ra?I=ma:"parentstyle"==ra?D=ma:"unknownStyle"==ra&&"-"!=ma?n=ma:"stylename"==ra&&0<ma.length&&"-"!=ma?E=ma:"styles"==ra&&0<ma.length&&"-"!=ma?M=JSON.parse(ma):"vars"==ra&&0<ma.length&&"-"!=ma?x=JSON.parse(ma):"identity"==ra&&0<ma.length&&"-"!=ma?H=ma:"parent"==ra&&0<ma.length&&"-"!=ma?K=ma:"namespace"==ra&&0<ma.length&&"-"!=ma?G=ma:"width"==ra?N=ma:"height"==ra?T=ma:"collapsed"==ra&&"-"!=ma?V="true"==ma:"left"==ra&&0<ma.length?U=ma:"top"==ra&&0<ma.length?X=ma:"ignore"==ra?fa=ma.split(","):"connect"==
+ra?Z.push(JSON.parse(ma)):"link"==ra?ba=ma:"padding"==ra?P=parseFloat(ma):"edgespacing"==ra?l=parseFloat(ma):"nodespacing"==ra?B=parseFloat(ma):"levelspacing"==ra?L=parseFloat(ma):"layout"==ra&&(Y=ma)}}}if(null==g[ja])throw Error(mxResources.get("invalidOrMissingFile"));var Ga=this.editor.csvToArray(g[ja].replace(/\r$/,""));ha=c=null;ra=[];for(ma=0;ma<Ga.length;ma++)H==Ga[ma]&&(c=ma),K==Ga[ma]&&(ha=ma),ra.push(mxUtils.trim(Ga[ma]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
+null==aa&&(aa="%"+ra[0]+"%");if(null!=Z)for(var Ea=0;Ea<Z.length;Ea++)null==y[Z[Ea].to]&&(y[Z[Ea].to]={});H=[];for(ma=ja+1;ma<g.length;ma++){var za=this.editor.csvToArray(g[ma].replace(/\r$/,""));if(null==za){var Pa=40<g[ma].length?g[ma].substring(0,40)+"...":g[ma];throw Error(Pa+" ("+ma+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&H.push(za)}A.model.beginUpdate();try{for(ma=0;ma<H.length;ma++){za=H[ma];var Aa=null,Fa=null!=c?G+za[c]:null;g=!1;null!=Fa&&(Aa=A.model.getCell(Fa),
+g=null==Aa||0<=mxUtils.indexOf(m,Aa));var qa=new mxCell(aa,new mxGeometry(S,R,0,0),I||"whiteSpace=wrap;html=1;");qa.collapsed=V;qa.vertex=!0;qa.id=Fa;null==Aa||g||A.model.setCollapsed(Aa,V);for(var Ba=0;Ba<za.length;Ba++)A.setAttributeForCell(qa,ra[Ba],za[Ba]),null==Aa||g||A.setAttributeForCell(Aa,ra[Ba],za[Ba]);if(null!=Q&&null!=v){var Ra=v[qa.getAttribute(Q)];null!=Ra&&(A.labelChanged(qa,Ra),null==Aa||g||A.cellLabelChanged(Aa,Ra))}if(null!=E&&null!=M){var xa=M[qa.getAttribute(E)];null!=xa&&(qa.style=
+xa)}A.setAttributeForCell(qa,"placeholders","1");qa.style=A.replacePlaceholders(qa,qa.style,x);null==Aa||g?A.fireEvent(new mxEventObject("cellsInserted","cells",[qa])):(A.model.setStyle(Aa,qa.style),0>mxUtils.indexOf(q,Aa)&&q.push(Aa),A.fireEvent(new mxEventObject("cellsInserted","cells",[Aa])));g=null!=Aa;Aa=qa;if(!g)for(Ea=0;Ea<Z.length;Ea++)y[Z[Ea].to][Aa.getAttribute(Z[Ea].to)]=Aa;null!=ba&&"link"!=ba&&(A.setLinkForCell(Aa,Aa.getAttribute(ba)),A.setAttributeForCell(Aa,ba,null));var Da=this.editor.graph.getPreferredSizeForCell(Aa);
+K=null!=ha?A.model.getCell(G+za[ha]):null;if(Aa.vertex){Pa=null!=K?0:S;ja=null!=K?0:W;null!=U&&null!=Aa.getAttribute(U)&&(Aa.geometry.x=Pa+parseFloat(Aa.getAttribute(U)));null!=X&&null!=Aa.getAttribute(X)&&(Aa.geometry.y=ja+parseFloat(Aa.getAttribute(X)));var va="@"==N.charAt(0)?Aa.getAttribute(N.substring(1)):null;Aa.geometry.width=null!=va&&"auto"!=va?parseFloat(Aa.getAttribute(N.substring(1))):"auto"==N||"auto"==va?Da.width+P:parseFloat(N);var Ka="@"==T.charAt(0)?Aa.getAttribute(T.substring(1)):
+null;Aa.geometry.height=null!=Ka&&"auto"!=Ka?parseFloat(Ka):"auto"==T||"auto"==Ka?Da.height+P:parseFloat(T);R+=Aa.geometry.height+B}g?(null==z[Fa]&&(z[Fa]=[]),z[Fa].push(Aa)):(m.push(Aa),null!=K?(K.style=A.replacePlaceholders(K,D,x),A.addCell(Aa,K),p.push(K)):q.push(A.addCell(Aa)))}for(ma=0;ma<p.length;ma++)va="@"==N.charAt(0)?p[ma].getAttribute(N.substring(1)):null,Ka="@"==T.charAt(0)?p[ma].getAttribute(T.substring(1)):null,"auto"!=N&&"auto"!=va||"auto"!=T&&"auto"!=Ka||A.updateGroupBounds([p[ma]],
+P,!0);var la=q.slice(),da=q.slice();for(Ea=0;Ea<Z.length;Ea++){var ca=Z[Ea];for(ma=0;ma<m.length;ma++){Aa=m[ma];var na=mxUtils.bind(this,function(Ha,La,Qa){var Ia=La.getAttribute(Qa.from);if(null!=Ia&&""!=Ia){Ia=Ia.split(",");for(var Na=0;Na<Ia.length;Na++){var Oa=y[Qa.to][Ia[Na]];if(null==Oa&&null!=n){Oa=new mxCell(Ia[Na],new mxGeometry(S,W,0,0),n);Oa.style=A.replacePlaceholders(La,Oa.style,x);var Ma=this.editor.graph.getPreferredSizeForCell(Oa);Oa.geometry.width=Ma.width+P;Oa.geometry.height=Ma.height+
+P;y[Qa.to][Ia[Na]]=Oa;Oa.vertex=!0;Oa.id=Ia[Na];q.push(A.addCell(Oa))}if(null!=Oa){Ma=Qa.label;null!=Qa.fromlabel&&(Ma=(La.getAttribute(Qa.fromlabel)||"")+(Ma||""));null!=Qa.sourcelabel&&(Ma=A.replacePlaceholders(La,Qa.sourcelabel,x)+(Ma||""));null!=Qa.tolabel&&(Ma=(Ma||"")+(Oa.getAttribute(Qa.tolabel)||""));null!=Qa.targetlabel&&(Ma=(Ma||"")+A.replacePlaceholders(Oa,Qa.targetlabel,x));var Sa="target"==Qa.placeholders==!Qa.invert?Oa:Ha;Sa=null!=Qa.style?A.replacePlaceholders(Sa,Qa.style,x):A.createCurrentEdgeStyle();
+Ma=A.insertEdge(null,null,Ma||"",Qa.invert?Oa:Ha,Qa.invert?Ha:Oa,Sa);if(null!=Qa.labels)for(Sa=0;Sa<Qa.labels.length;Sa++){var Ua=Qa.labels[Sa],Ja=new mxCell(Ua.label||Sa,new mxGeometry(null!=Ua.x?Ua.x:0,null!=Ua.y?Ua.y:0,0,0),"resizable=0;html=1;");Ja.vertex=!0;Ja.connectable=!1;Ja.geometry.relative=!0;null!=Ua.placeholders&&(Ja.value=A.replacePlaceholders("target"==Ua.placeholders==!Qa.invert?Oa:Ha,Ja.value,x));if(null!=Ua.dx||null!=Ua.dy)Ja.geometry.offset=new mxPoint(null!=Ua.dx?Ua.dx:0,null!=
+Ua.dy?Ua.dy:0);Ma.insert(Ja)}da.push(Ma);mxUtils.remove(Qa.invert?Ha:Oa,la)}}}});na(Aa,Aa,ca);if(null!=z[Aa.id])for(Ba=0;Ba<z[Aa.id].length;Ba++)na(Aa,z[Aa.id][Ba],ca)}}if(null!=fa)for(ma=0;ma<m.length;ma++)for(Aa=m[ma],Ba=0;Ba<fa.length;Ba++)A.setAttributeForCell(Aa,mxUtils.trim(fa[Ba]),null);if(0<q.length){var ka=new mxParallelEdgeLayout(A);ka.spacing=l;ka.checkOverlap=!0;var pa=function(){0<ka.spacing&&ka.execute(A.getDefaultParent());for(var Ha=0;Ha<q.length;Ha++){var La=A.getCellGeometry(q[Ha]);
+La.x=Math.round(A.snap(La.x));La.y=Math.round(A.snap(La.y));"auto"==N&&(La.width=Math.round(A.snap(La.width)));"auto"==T&&(La.height=Math.round(A.snap(La.height)))}};if("["==Y.charAt(0)){var ea=O;A.view.validate();this.executeLayouts(A.createLayouts(JSON.parse(Y)),function(){pa();ea()});O=null}else if("circle"==Y){var ia=new mxCircleLayout(A);ia.disableEdgeStyle=!1;ia.resetEdges=!1;var oa=ia.isVertexIgnored;ia.isVertexIgnored=function(Ha){return oa.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};
+this.executeLayout(function(){ia.execute(A.getDefaultParent());pa()},!0,O);O=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&da.length==2*q.length-1&&1==la.length){A.view.validate();var ua=new mxCompactTreeLayout(A,"horizontaltree"==Y);ua.levelDistance=B;ua.edgeRouting=!1;ua.resetEdges=!1;this.executeLayout(function(){ua.execute(A.getDefaultParent(),0<la.length?la[0]:null)},!0,O);O=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==la.length){A.view.validate();var wa=
+new mxHierarchicalLayout(A,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=B;wa.parallelEdgeSpacing=l;wa.interRankCellSpacing=L;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(A.getDefaultParent(),da);A.moveCells(da,S,W)},!0,O);O=null}else if("orgchart"==Y){A.view.validate();var Ca=new mxOrgChartLayout(A,2,L,B),ya=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return ya.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};this.executeLayout(function(){Ca.execute(A.getDefaultParent());
+pa()},!0,O);O=null}else if("organic"==Y||"auto"==Y&&da.length>q.length){A.view.validate();var ta=new mxFastOrganicLayout(A);ta.forceConstant=3*B;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var sa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return sa.apply(this,arguments)||0>mxUtils.indexOf(q,Ha)};this.executeLayout(function(){ta.execute(A.getDefaultParent());pa()},!0,O);O=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=O&&O()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
+function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(c,m)&&null!=urlParams[m]&&(e+=g+m+"="+urlParams[m],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(c=0==e?c+"?":c+"&",null!=urlParams[m]&&(c+=m+"="+urlParams[m],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,m,p){c=new LinkDialog(this,c,e,g,!0,m,p);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
+this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var C=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(c){var e=C.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var F=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=
+e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);
+this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=
+c&&null!=c.shape&&null!=c.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,m,p,q,z,y){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");
+else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(m,p,q)),"image/svg+xml");else{var x=c.getFileData(!0,null,null,null,null,!0),I=A.getGraphBounds(),M=Math.floor(I.width*p/A.view.scale),E=Math.floor(I.height*p/A.view.scale);if(x.length<=MAX_REQUEST_SIZE&&M*E<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var Q={globalVars:A.getExportVariables()};y&&(Q.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});c.saveRequest(e,g,function(n,
+v){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(v||"0")+(null!=n?"&filename="+encodeURIComponent(n):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<z?"&dpi="+z:"")+"&bg="+(null!=m?m:"none")+"&w="+M+"&h="+E+"&border="+q+"&xml="+encodeURIComponent(x))})}else"png"==g?c.exportImage(p,null==m||"none"==m,!0,!1,!1,q,!0,!1,null,y,z):c.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=c;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=
+document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(c));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var y=z[c];if("R"==y.substring(0,1)){var A=JSON.parse(decodeURIComponent(y.substring(1)));
+q[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(x){p.innerText="";if(0==x.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var I=0;I<x.length;I++){var M=x[I];q[M.id]&&(e[M.id]=M);var E=this.addCheckbox(p,M.title,q[M.id]);(function(Q,n){mxEvent.addListener(n,"change",function(){this.checked?e[Q.id]=Q:delete e[Q.id]})})(M,E)}},mxUtils.bind(this,
+function(x){p.innerText="";var I=document.createElement("div");I.style.padding="8px";I.style.textAlign="center";mxUtils.write(I,mxResources.get("error")+": ");mxUtils.write(I,null!=x&&null!=x.message?x.message:mxResources.get("unknownError"));p.appendChild(I)}));g.appendChild(p);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var x=0,I;for(I in e)null==q[I]&&(x++,mxUtils.bind(this,function(M){this.remoteInvoke("getFileContent",[M.downloadUrl],
+null,mxUtils.bind(this,function(E){x--;0==x&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,E,M))}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){x--;0==x&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[I]));for(I in q)e[I]||this.closeLibrary(new RemoteLibrary(this,null,q[I]));0==x&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,
+340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],
+"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,m,p){var q=!0,z=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
+this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(z);q&&m.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(z);q&&p.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
+e){var g=mxUtils.bind(this,function(x,I){var M={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=I?M.error={errResp:I}:null!=x&&(M.resp=x);this.remoteWin.postMessage(JSON.stringify(M),"*")});try{var m=c.funtionName,p=this.remoteInvokableFns[m];if(null!=p&&"function"===typeof this[m]){if(p.allowedDomains){for(var q=!1,z=0;z<p.allowedDomains.length;z++)if(e=="https://"+p.allowedDomains[z]){q=!0;break}if(!q){g(null,"Invalid Call: "+m+" is not allowed.");return}}var y=c.functionArgs;Array.isArray(y)||
+(y=[]);if(p.isAsync)y.push(function(){g(Array.prototype.slice.apply(arguments))}),y.push(function(x){g(null,x||"Unkown Error")}),this[m].apply(this,y);else{var A=this[m].apply(this,y);g([A])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(x){g(null,"Invalid Call: An error occurred, "+x.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=
+function(p){try{var q=m.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};m.onsuccess=mxUtils.bind(this,function(p){var q=m.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var A=!0,x=!1,I,M=0,E=mxUtils.bind(this,function(){x=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){M++;n()}),n=mxUtils.bind(this,function(){try{if(M>=I.length)E();else{var D=I[M];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(H){null==H||".scratchpad"==D&&H==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):Q()}),Q)}}catch(H){console.log(H)}}),v=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title,
+size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],Q,Q,["filesInfo","files"])}catch(H){console.log(H)}});z=mxUtils.bind(this,function(D){try{if(D.source==y.contentWindow){var H={};try{H=JSON.parse(D.data)}catch(K){}"init"==H.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=H.event||x||
+(A?null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?(I=H.resp[0],A=!1,n()):E():null!=H.resp&&0<H.resp.length&&null!=H.resp[0]?v(H.resp[0]):Q())}}catch(K){console.log(K)}});window.addEventListener("message",z)}})));c(q);q.onversionchange=function(){q.close()}});m.onerror=e;m.onblocked=function(){}}catch(p){null!=e&&e(p)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,m,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=
+[p],c=[c],e=[e]);var z=q.transaction(p,"readwrite");z.oncomplete=g;z.onerror=m;for(q=0;q<p.length;q++)z.objectStore(p[q]).put(null!=c&&null!=c[q]?{key:c[q],data:e[q]}:e[q])}catch(y){null!=m&&m(y)}}),m)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,m){this.openDatabase(mxUtils.bind(this,function(p){m=m||"objects";Array.isArray(m)||(m=[m],c=[c]);p=p.transaction(m,"readwrite");p.oncomplete=e;p.onerror=g;for(var q=0;q<m.length;q++)p.objectStore(m[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=
+function(c,e,g,m){this.openDatabase(mxUtils.bind(this,function(p){try{m=m||"objects";var q=p.transaction([m],"readonly").objectStore(m).get(c);q.onsuccess=function(){e(q.result)};q.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var p=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(z){null==z.target.result?c(q):(q.push(z.target.result.value),
+z.target.result.continue())};p.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var p=m.transaction([g],"readonly").objectStore(g).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=e}catch(q){null!=e&&e(q)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
+this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var m=this.getCurrentFile();null!=m?m.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
+c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=
+g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,m,p,q,z,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(c,e,g,m,p,q,z,y)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,m,p,q,z,y,A,x,I,M,E,Q,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,m,p,q,z,y,A,x,I,M,E,Q,n,v)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.convertImages(c,e,g,m)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,m)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
+return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,m,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,m,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var p=
+"<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(p||m)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,f,k,d,t,u){function C(){for(var D=x.getElementsByTagName("div"),H=0,K=0;K<D.length;K++)"none"!=D[K].style.display&&D[K].parentNode==x&&H++;I.style.display=0==H?"block":"none"}function F(D,H,K,G){function N(){H.removeChild(U);H.removeChild(X);V.style.display="block";T.style.display="block"}z={div:H,comment:D,saveCallback:K,deleteOnCancel:G};var T=H.querySelector(".geCommentTxt"),V=H.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=T.offsetHeight+"px";U.value=D.content;H.insertBefore(U,T);var X=document.createElement("div");X.className="geCommentEditBtns";var l=mxUtils.button(mxResources.get("cancel"),function(){G?(H.parentNode.removeChild(H),C()):N();z=null});l.className="geCommentEditBtn";X.appendChild(l);var B=mxUtils.button(mxResources.get("save"),function(){T.innerText="";D.content=U.value;mxUtils.write(T,D.content);N();K(D);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(B.click(),mxEvent.consume(L)):27==L.keyCode&&(l.click(),mxEvent.consume(L)))}));B.focus();B.className="geCommentEditBtn gePrimaryBtn";X.appendChild(B);H.insertBefore(X,T);V.style.display="none";T.style.display="none";U.focus()}function J(D,H){H.innerText="";D=new Date(D.modifiedDate);var K=b.timeSince(D);null==K&&(K=mxResources.get("lessThanAMinute"));mxUtils.write(H,mxResources.get("timeAgo",
+[K],"{1} ago"));H.setAttribute("title",D.toLocaleDateString()+" "+D.toLocaleTimeString())}function c(D){var H=document.createElement("img");H.className="geCommentBusyImg";H.src=IMAGE_PATH+"/spin.gif";D.appendChild(H);D.busyImg=H}function e(D){D.style.border="1px solid red";D.removeChild(D.busyImg)}function g(D){D.style.border="";D.removeChild(D.busyImg)}function m(D,H,K,G,N){function T(O,R,S){var W=document.createElement("li");W.className="geCommentAction";var aa=document.createElement("a");aa.className=
+"geCommentActionLnk";mxUtils.write(aa,O);W.appendChild(aa);mxEvent.addListener(aa,"click",function(Y){R(Y,D);Y.preventDefault();mxEvent.consume(Y)});P.appendChild(W);S&&(W.style.display="none")}function V(){function O(W){R.push(S);if(null!=W.replies)for(var aa=0;aa<W.replies.length;aa++)S=S.nextSibling,O(W.replies[aa])}var R=[],S=X;O(D);return{pdiv:S,replies:R}}function U(O,R,S,W,aa){function Y(){c(ja);D.addReply(fa,function(ha){fa.id=ha;D.replies.push(fa);g(ja);S&&S()},function(ha){Z();e(ja);b.handleError(ha,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},W,aa)}function Z(){F(fa,ja,function(ha){Y()},!0)}var ba=V().pdiv,fa=b.newComment(O,b.getCurrentUser());fa.pCommentId=D.id;null==D.replies&&(D.replies=[]);var ja=m(fa,D.replies,ba,G+1);R?Z():Y()}if(N||!D.isResolved){I.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",D.id);X.style.marginLeft=20*G+5+"px";D.isResolved&&!Editor.isDarkMode()&&(X.style.backgroundColor=
+"ghostWhite");var l=document.createElement("div");l.className="geCommentHeader";var B=document.createElement("img");B.className="geCommentUserImg";B.src=D.user.pictureUrl||Editor.userImage;l.appendChild(B);B=document.createElement("div");B.className="geCommentHeaderTxt";l.appendChild(B);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,D.user.displayName||"");B.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
+D.id);J(D,L);B.appendChild(L);X.appendChild(l);l=document.createElement("div");l.className="geCommentTxt";mxUtils.write(l,D.content||"");X.appendChild(l);D.isLocked&&(X.style.opacity="0.5");l=document.createElement("div");l.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";l.appendChild(P);p||D.isLocked||0!=G&&!q||T(mxResources.get("reply"),function(){U("",!0)},D.isResolved);B=b.getCurrentUser();null==B||B.id!=D.user.id||p||D.isLocked||(T(mxResources.get("edit"),
+function(){function O(){F(D,X,function(){c(X);D.editComment(D.content,function(){g(X)},function(R){e(X);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},D.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){c(X);D.deleteComment(function(O){if(!0===O){O=X.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=X.querySelectorAll(".geCommentAction");for(O=
+0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);g(X);X.style.opacity="0.5"}else{R=V(D).replies;for(O=0;O<R.length;O++)x.removeChild(R[O]);for(O=0;O<H.length;O++)if(H[O]==D){H.splice(O,1);break}I.style.display=0==x.getElementsByTagName("div").length?"block":"none"}},function(O){e(X);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},D.isResolved));p||D.isLocked||0!=G||T(D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
+O.target;S.innerText="";D.isResolved=!D.isResolved;mxUtils.write(S,D.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var W=D.isResolved?"none":"",aa=V(D).replies,Y=Editor.isDarkMode()?"transparent":D.isResolved?"ghostWhite":"white",Z=0;Z<aa.length;Z++){aa[Z].style.backgroundColor=Y;for(var ba=aa[Z].querySelectorAll(".geCommentAction"),fa=0;fa<ba.length;fa++)ba[fa]!=S.parentNode&&(ba[fa].style.display=W);Q||(aa[Z].style.display="none")}C()}D.isResolved?U(mxResources.get("reOpened")+
+": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});X.appendChild(l);null!=K?x.insertBefore(X,K.nextSibling):x.appendChild(X);for(K=0;null!=D.replies&&K<D.replies.length;K++)l=D.replies[K],l.isResolved=D.isResolved,m(l,D.replies,null,G+1,N);null!=z&&(z.comment.id==D.id?(N=D.content,D.content=z.comment.content,F(D,X,z.saveCallback,z.deleteOnCancel),D.content=N):null==z.comment.id&&z.comment.pCommentId==D.id&&(x.appendChild(z.div),F(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
+var p=!b.canComment(),q=b.canReplyToReplies(),z=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var A=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.className="geCommentsList";x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x.style.bottom=parseInt(A)+7+"px";y.appendChild(x);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(I,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=A;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A=document.createElement("a");A.className="geButton";if(!p){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(E,"click",function(D){function H(){F(K,G,function(N){c(G);b.addComment(N,function(T){N.id=T;n.push(N);g(G)},function(T){e(G);H();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var K=b.newComment("",b.getCurrentUser()),G=m(K,n,null,0);H();D.preventDefault();mxEvent.consume(D)});M.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
+E.className="geAdaptiveAsset";var Q=!1;mxEvent.addListener(E,"click",function(D){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";v();D.preventDefault();mxEvent.consume(D)});M.appendChild(E);b.commentsRefreshNeeded()&&(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),E.className="geAdaptiveAsset",mxEvent.addListener(E,"click",function(D){v();D.preventDefault();mxEvent.consume(D)}),M.appendChild(E));
+b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geAdaptiveAsset",mxEvent.addListener(A,"click",function(D){u();D.preventDefault();mxEvent.consume(D)}),M.appendChild(A));y.appendChild(M);var n=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);var D=z.div.querySelector(".geCommentEditTxtArea"),H=z.div.querySelector(".geCommentEditBtns");
+z.comment.content=D.value;D.parentNode.removeChild(D);H.parentNode.removeChild(H)}catch(K){b.handleError(K)}x.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";q=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(K){function G(N){if(null!=N){N.sort(function(V,U){return new Date(V.modifiedDate)-new Date(U.modifiedDate)});for(var T=0;T<N.length;T++)G(N[T].replies)}}
+K.sort(function(N,T){return new Date(N.modifiedDate)-new Date(T.modifiedDate)});x.innerText="";x.appendChild(I);I.style.display="block";n=K;for(K=0;K<n.length;K++)G(n[K].replies),m(n[K],n,null,0,Q);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(x.appendChild(z.div),F(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(K){x.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(K&&K.message?": "+K.message:""));this.hasError=!0})):x.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+v();this.refreshComments=v;M=mxUtils.bind(this,function(){function D(T){var V=K[T.id];if(null!=V)for(J(T,V),V=0;null!=T.replies&&V<T.replies.length;V++)D(T.replies[V])}if(this.window.isVisible()){for(var H=x.querySelectorAll(".geCommentDate"),K={},G=0;G<H.length;G++){var N=H[G];K[N.getAttribute("data-commentId")]=N}for(G=0;G<n.length;G++)D(n[G])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),y,f,k,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,
+0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,d,t,u,C,F,J,c,e){var g=document.createElement("div");g.style.textAlign="center";e=null!=e?e:44;var m=document.createElement("div");m.style.padding="6px";m.style.overflow="auto";m.style.maxHeight=e+
+"px";m.style.lineHeight="1.2em";mxUtils.write(m,f);g.appendChild(m);null!=c&&(m=document.createElement("div"),m.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",c),m.appendChild(f),g.appendChild(m));c=document.createElement("div");c.style.textAlign="center";c.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");u=mxUtils.button(u||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(p.checked)});u.className="geBtn";
+null!=F&&(u.innerHTML=F+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&c.appendChild(u);var q=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(p.checked)});c.appendChild(q);null!=C?(q.innerHTML=C+"<br>"+q.innerHTML+"<br>",q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.className="geBtn",q.style.width="40%"):q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+c.appendChild(u);g.appendChild(c);J?(c.style.marginTop="10px",m=document.createElement("p"),m.style.marginTop="20px",m.style.marginBottom="0px",m.appendChild(p),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),m.appendChild(t),g.appendChild(m),mxEvent.addListener(t,"click",function(z){p.checked=!p.checked;mxEvent.consume(z)})):c.style.marginTop="12px";this.init=function(){q.focus()};this.container=g};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,t){if(null!=f)for(var u=0;u<f.length;u++)null!=f[u]&&(b=this.patchPages(b,f[u],k,d,t));return b};
+EditorUi.prototype.patchPages=function(b,f,k,d,t){var u={},C=[],F={},J={},c={},e={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var g in d[EditorUi.DIFF_UPDATE])u[g]=d[EditorUi.DIFF_UPDATE][g];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)J[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)F[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(g in f[EditorUi.DIFF_UPDATE])d=
+f[EditorUi.DIFF_UPDATE][g],null!=d.previous&&(e[d.previous]=g);if(null!=b){var m="";for(d=0;d<b.length;d++){var p=b[d].getId();c[p]=b[d];null!=e[m]||J[p]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][p]&&null!=f[EditorUi.DIFF_UPDATE][p].previous||(e[m]=p);m=p}}var q={},z=mxUtils.bind(this,function(A){var x=null!=A?A.getId():"";if(null!=A&&!q[x]){q[x]=!0;C.push(A);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][x]:null;null!=I&&(this.updatePageRoot(A),null!=I.name&&A.setName(I.name),
+null!=I.view&&this.patchViewState(A,I.view),null!=I.cells&&this.patchPage(A,I.cells,u[A.getId()],t),!k||null==I.cells&&null==I.view||(A.needsUpdate=!0))}A=e[x];null!=A&&(delete e[x],z(c[A]));A=F[x];null!=A&&(delete F[x],y(A))}),y=mxUtils.bind(this,function(A){A=mxUtils.parseXml(A.data).documentElement;A=new DiagramPage(A);this.updatePageRoot(A);var x=c[A.getId()];null==x?z(A):(this.patchPage(x,this.diffPages([x],[A]),u[x.getId()],t),k&&(x.needsUpdate=!0))});z();for(g in e)z(c[e[g]]),delete e[g];for(g in F)y(F[g]),
+delete F[g];return C};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
+EditorUi.prototype.createParentLookup=function(b,f){function k(c){var e=d[c];null==e&&(e={inserted:[],moved:{}},d[c]=e);return e}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var u=f[EditorUi.DIFF_INSERT][t],C=null!=u.parent?u.parent:"",F=null!=u.previous?u.previous:"";k(C).inserted[F]=u}if(null!=f[EditorUi.DIFF_UPDATE])for(var J in f[EditorUi.DIFF_UPDATE])u=f[EditorUi.DIFF_UPDATE][J],null!=u.previous&&(C=u.parent,null==C&&(t=b.getCell(J),null!=t&&(t=
+b.getParent(t),null!=t&&(C=t.getId()))),null!=C&&(k(C).moved[u.previous]=J));return d};
+EditorUi.prototype.patchPage=function(b,f,k,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(t,f);t.beginUpdate();try{var C=t.updateEdgeParent,F=new mxDictionary,J=[];t.updateEdgeParent=function(y,A){!F.get(y)&&d&&(F.put(y,!0),J.push(y))};var c=u[""],e=null!=c&&null!=c.inserted?c.inserted[""]:null,g=null;null!=e&&(g=this.getCellForJson(e));if(null==g){var m=null!=c&&null!=c.moved?c.moved[""]:null;null!=m&&(g=t.getCell(m))}null!=g&&(t.setRoot(g),
+b.root=g);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var p=0;p<f[EditorUi.DIFF_REMOVE].length;p++){var q=t.getCell(f[EditorUi.DIFF_REMOVE][p]);null!=q&&t.remove(q)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(m in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(m),f[EditorUi.DIFF_UPDATE][m],null!=z?z[m]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(p=0;p<f[EditorUi.DIFF_INSERT].length;p++)e=f[EditorUi.DIFF_INSERT][p],
+q=t.getCell(e.id),null!=q&&(t.setTerminal(q,t.getCell(e.source),!0),t.setTerminal(q,t.getCell(e.target),!1));t.updateEdgeParent=C;if(d&&0<J.length)for(p=0;p<J.length;p++)t.contains(J[p])&&t.updateEdgeParent(J[p])}finally{t.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,k,d,t){if(null!=k){var u=d[k.getId()],C=null!=u&&null!=u.inserted?u.inserted:{};u=null!=u&&null!=u.moved?u.moved:{};for(var F=0,J=f.getChildCount(k),c="",e=0;e<J;e++){var g=f.getChildAt(k,e).getId();null==u[c]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][g]||null==t[EditorUi.DIFF_UPDATE][g].previous&&null==t[EditorUi.DIFF_UPDATE][g].parent)&&(u[c]=g);c=g}J=mxUtils.bind(this,function(m,p){var q=null!=m?m.getId():"";null!=m&&p&&(p=
+f.getCell(q),null!=p&&p!=m&&(m=null));null!=m&&(f.getChildAt(k,F)!=m&&f.add(k,m,F),this.patchCellRecursive(b,f,m,d,t),F++);return q});for(c=[null];0<c.length;)if(e=c.shift(),e=J(null!=e?e.child:null,null!=e?e.insert:!1),g=u[e],null!=g&&(delete u[e],c.push({child:f.getCell(g)})),g=C[e],null!=g&&(delete C[e],c.push({child:this.getCellForJson(g),insert:!0})),0==c.length){for(e in u)c.push({child:f.getCell(u[e])}),delete u[e];for(e in C)c.push({child:this.getCellForJson(C[e]),insert:!0}),delete C[e]}}};
+EditorUi.prototype.patchCell=function(b,f,k,d){if(null!=f&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
+1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var t in k)this.cellProperties[t]||(f[t]=k[t])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
+EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var t=b[k].node.cloneNode(!1);t.appendChild(d);f.appendChild(t)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);k.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),k.push(d));return k};
+EditorUi.prototype.diffPages=function(b,f){var k=[],d=[],t={},u={},C={},F=null;if(null!=b&&null!=f){for(var J=0;J<f.length;J++)u[f[J].getId()]={page:f[J],prev:F},F=f[J];F=null;for(J=0;J<b.length;J++){var c=b[J].getId();f=u[c];if(null==f)d.push(c);else{var e=this.diffPage(b[J],f.page),g={};mxUtils.isEmptyObject(e)||(g.cells=e);e=this.diffViewState(b[J],f.page);mxUtils.isEmptyObject(e)||(g.view=e);if((null!=f.prev?null==F:null!=F)||null!=F&&null!=f.prev&&F.getId()!=f.prev.getId())g.previous=null!=f.prev?
+f.prev.getId():"";null!=f.page.getName()&&b[J].getName()!=f.page.getName()&&(g.name=f.page.getName());mxUtils.isEmptyObject(g)||(C[c]=g)}delete u[b[J].getId()];F=b[J]}for(c in u)f=u[c],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(C)||(t[EditorUi.DIFF_UPDATE]=C);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k)}return t};
+EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var t=0;t<d;t++){var u=b.getChildAt(t);this.createCellLookup(u,f,k);f=u}return k};
+EditorUi.prototype.diffCellRecursive=function(b,f,k,d,t){d=null!=d?d:{};var u=k[b.getId()];delete k[b.getId()];if(null==u)t.push(b.getId());else{var C=this.diffCell(b,u.cell);if(null!=C.parent||(null!=u.prev?null==f:null!=f)||null!=f&&null!=u.prev&&f.getId()!=u.prev.getId())C.previous=null!=u.prev?u.prev.getId():"";mxUtils.isEmptyObject(C)||(d[b.getId()]=C)}u=b.getChildCount();f=null;for(C=0;C<u;C++){var F=b.getChildAt(C);this.diffCellRecursive(F,f,k,d,t);f=F}return d};
+EditorUi.prototype.diffPage=function(b,f){var k=[],d=[],t={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var u=this.diffCellRecursive(b.root,null,f,u,d),C;for(C in f)b=f[C],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(u)||(t[EditorUi.DIFF_UPDATE]=u);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k);return t};
+EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,d={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var t in this.viewStateProperties)this.diffViewStateProperty(b,k,t,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(d[k]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var e in b)this.cellProperties[e]||(f[e]=b[e]);return f};
+EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
EditorUi.prototype.getJsonForCell=function(b,f){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=f&&(k.previous=f.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&&
-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var e in b)this.cellProperties[e]||"function"===typeof b[e]||(k[e]=b[e]);return k};
-EditorUi.prototype.diffCell=function(b,f){function k(B){return null!=B&&"object"===typeof B&&"number"===typeof B.nodeType&&"string"===typeof B.nodeName&&"function"===typeof B.getAttribute}var e={};b.vertex!=f.vertex&&(e.vertex=f.vertex?1:0);b.edge!=f.edge&&(e.edge=f.edge?1:0);b.connectable!=f.connectable&&(e.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())e.parent=null!=f.parent?f.parent.getId():"";
-if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())e.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())e.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(e.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?e.xmlValue=mxUtils.getXml(f.value):e.value=null!=f.value?
-f.value:null);b.style!=f.style&&(e.style=f.style);b.visible!=f.visible&&(e.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(e.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var u=this.codec.encode(f.geometry);null!=u&&(e.geometry=mxUtils.getXml(u))}for(var v in b)this.cellProperties[v]||"function"===typeof b[v]||"function"===typeof f[v]||b[v]==f[v]||(e[v]=void 0===f[v]?null:f[v]);for(v in f)v in b||this.cellProperties[v]||"function"===typeof b[v]||"function"===
-typeof f[v]||b[v]==f[v]||(e[v]=void 0===f[v]?null:f[v]);return e};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var e=function(u,v){return null==k||k[u]!=v?!0===v?1:v:void 0};return JSON.stringify(b,e)==JSON.stringify(f,e)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(k[d]=b[d]);return k};
+EditorUi.prototype.diffCell=function(b,f){function k(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
+if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
+f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var t=this.codec.encode(f.geometry);null!=t&&(d.geometry=mxUtils.getXml(t))}for(var u in b)this.cellProperties[u]||"function"===typeof b[u]||"function"===typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);for(u in f)u in b||this.cellProperties[u]||"function"===typeof b[u]||"function"===
+typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);return d};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(t,u){return null==k||k[t]!=u?!0===u?1:u:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var f=mxSettings.getMainSettings();f.ui=b;"kennedy"==b&&(f.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
@@ -11945,7 +11973,7 @@ null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.setti
this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(f){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(f){null!=f.error&&null!=f.error.data&&4004===f.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var f=this.file.getCurrentUser(),k={a:"join"};null!=f&&(k.name=encodeURIComponent(f.displayName),k.uid=f.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(k))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++;
-this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(e){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
+this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;
DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());if(null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(b){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",
@@ -11953,115 +11981,115 @@ DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:!1};
-DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(e){mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){u=this.file.getRealtimeState();var v=mxResources.get("disconnected");this.file.invalidChecksum?v=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?v=mxResources.get("offline"):1==u&&(v=mxResources.get("online"));
-this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(v))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign=
+DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){t=this.file.getRealtimeState();var u=mxResources.get("disconnected");this.file.invalidChecksum?u=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?u=mxResources.get("offline"):1==t&&(u=mxResources.get("online"));
+this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(u))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign=
"bottom";f.style.color="#666";f.style.top="6px";f.style.right="atlas"!=uiTheme?"1"!=urlParams["live-ui"]?"90px":"70px":"50px";f.style.padding="2px";f.style.fontSize="8pt";f.style.verticalAlign="middle";f.style.textDecoration="none";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";f.style.backgroundSize="16px 16px";f.style.width="16px";f.style.height="16px";mxUtils.setOpacity(f,60);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(e){e.preventDefault()}));b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
+function(d){d.preventDefault()}));b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
this.file.isRealtimeSupported()&&(f=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=f&&null!=f.message?b+(" ("+f.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
k+")"}}};
DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var f=this.file.isRevisionHistorySupported(),k=
this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=k?' <span title="'+mxUtils.htmlEntities(k)+
-'">('+mxUtils.htmlEntities(k)+")</span>":""));k=this.ui.statusContainer.getElementsByTagName("div");0<k.length&&f&&(k[0].style.display="inline-block",f&&(k[0].style.cursor="pointer",k[0].style.textDecoration="underline",mxEvent.addListener(k[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));f=this.ui.statusContainer.getElementsByTagName("span");if(0<f.length){var e=f[0];e.style.opacity="0";mxUtils.setPrefixedStyle(e.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,100);mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
+'">('+mxUtils.htmlEntities(k)+")</span>":""));k=this.ui.statusContainer.getElementsByTagName("div");0<k.length&&f&&(k[0].style.display="inline-block",f&&(k[0].style.cursor="pointer",k[0].style.textDecoration="underline",mxEvent.addListener(k[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));f=this.ui.statusContainer.getElementsByTagName("span");if(0<f.length){var d=f[0];d.style.opacity="0";mxUtils.setPrefixedStyle(d.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(d,100);mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var f=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
f)this.lastMessageModified=f,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),e=f.getCurrentRevisionId();k==e?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),d=f.getCurrentRevisionId();k==d?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var f=this.fileChanged(mxUtils.bind(this,function(k){this.updateStatus()}),mxUtils.bind(this,function(k){this.file.handleFileError(k)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=f}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
"changes",b,f?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(u,v){return u.id<v.id?-1:u.id>v.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var e=JSON.stringify(this.receivedData[k].c);e!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
-f=e}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
-DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var e=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(e)||this.file.patch(e);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",e,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(u){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var v=this.ui.getPagesForXml(u.data);e=[this.ui.diffPages(this.ui.pages,v),this.ui.diffPages(v,this.file.ownPages)];this.file.ignorePatches(e)||this.file.patch(e);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",u,"patches",e)}null!=b&&b()}catch(B){null!=f&&f(B)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(t,u){return t.id<u.id?-1:t.id>u.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
+f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
+DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(t){try{if(this.isValidState()&&
+!this.file.inConflictState&&this.file.isRealtime()){var u=this.ui.getPagesForXml(t.data);d=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",t,"patches",d)}null!=b&&b()}catch(C){null!=f&&f(C)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var e=b[EditorUi.DIFF_UPDATE][k];if(null!=e.cells&&null!=e.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var u=f[EditorUi.DIFF_UPDATE][k];u.cells={};u.cells[EditorUi.DIFF_REMOVE]=e.cells[EditorUi.DIFF_REMOVE]}}return f};
-DrawioFileSync.prototype.patchRealtime=function(b,f,k){var e=null;if(this.file.isRealtime()){e=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var u=this.extractRemove(this.extractLocal(e)),v=(null==k?b:b.concat(k)).concat([u]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,v,!0,f);mxUtils.isEmptyObject(u)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",e,"local",
-u,"applied",v)}return e};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var t=f[EditorUi.DIFF_UPDATE][k];t.cells={};t.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
+DrawioFileSync.prototype.patchRealtime=function(b,f,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var t=this.extractRemove(this.extractLocal(d)),u=(null==k?b:b.concat(k)).concat([t]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,u,!0,f);mxUtils.isEmptyObject(t)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",d,"local",
+t,"applied",u)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,k)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,k,e,u,v){try{this.file.stats.merged++;this.lastModified=new Date;var B=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var E=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(E,this.ui.pages):null;var L=this.file.isRealtime()?this.ui.diffPages(E,this.file.ownPages):null;E=this.ui.applyPatches(E,b);var c=null==f?null:this.ui.getHashValueForPages(E);
-this.file.setShadowPages(E);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",L,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",B,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var d=this.ui.hashValue(B),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+g+"\nTo: "+d+"\nChecksum: "+f+"\nCurrent: "+c,B,"merge",
-f,c,B);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(E)]);return}null==this.patchRealtime(b,null,L)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=e&&e(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=u&&u(n);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),d=this.ui.hashValue(B),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+d+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),n);else{var q=this.file.getCurrentUser(),m=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),m,n)}}catch(z){}}};
-DrawioFileSync.prototype.fileChanged=function(b,f,k,e){var u=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",e,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(v){null!=k&&k()||(this.isValidState()?this.catchup(v,b,f,k):null!=f&&f())}),f):null!=f&&f())}),e?this.cacheReadyDelay:0);return this.notifyThread=u};
+DrawioFileSync.prototype.merge=function(b,f,k,d,t,u){try{this.file.stats.merged++;this.lastModified=new Date;var C=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var F=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(F,this.ui.pages):null;var J=this.file.isRealtime()?this.ui.diffPages(F,this.file.ownPages):null;F=this.ui.applyPatches(F,b);var c=null==f?null:this.ui.getHashValueForPages(F);
+this.file.setShadowPages(F);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",J,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",C,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=c){var e=this.ui.hashValue(C),g=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nCurrent: "+c,C,"merge",
+f,c,C);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(F)]);return}null==this.patchRealtime(b,null,J)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(q){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=t&&t(q);try{if(this.file.errorReportsEnabled)g=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(C),this.file.sendErrorReport("Error in merge","From: "+g+"\nTo: "+e+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),q);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,q)}}catch(z){}}};
+DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var t=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=k&&k()||(this.isValidState()?this.catchup(u,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=t};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,f,k,e){if(null!=b&&(null==e||!e())){var u=this.file.getCurrentRevisionId(),v=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",u,"to",v,"valid",this.isValidState());if(u==v)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var B=this.file.getDescriptorSecret(b);if(null==B||"1"==urlParams.lockdown)this.reload(f,k,e);else{var E=0,L=!1,c=mxUtils.bind(this,function(){if(null==
-e||!e())if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(f,k,e)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(u)+"&to="+encodeURIComponent(v)+(null!=B?"&secret="+encodeURIComponent(B):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(g);if(d&&
-(null==e||!e()))if(u!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var m=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",E,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var C=0;C<z.length;C++){var x=this.stringToObject(z[C]);if(x.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(x.v===
-DrawioFileSync.PROTOCOL&&null!=x.d)m=x.d.checksum,n.push(x.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",L,"temp",n,"checksum",m)}catch(y){n=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,m,b,f,k,e)):E<=this.maxCacheReadyRetries-1&&!L&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(E++,this.file.stats.cacheMiss++,window.setTimeout(c,(E+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(f,k,e))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,e){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),k,e)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),e=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(e));this.file.stats.bytesSent+=e.length;this.file.stats.msgSent++;
+DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",u,"valid",this.isValidState());if(t==u)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var C=this.file.getDescriptorSecret(b);if(null==C||"1"==urlParams.lockdown)this.reload(f,k,d);else{var F=0,J=!1,c=mxUtils.bind(this,function(){if(null==
+d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(u)+(null!=C?"&secret="+encodeURIComponent(C):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(g);if(e&&
+(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var p=null,q=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[m],"status",m.getStatus(),"cacheReadyRetryCount",F,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var z=JSON.parse(m.getText());if(null!=z&&0<z.length)for(var y=0;y<z.length;y++){var A=this.stringToObject(z[y]);if(A.v>DrawioFileSync.PROTOCOL){J=!0;q=[];break}else if(A.v===
+DrawioFileSync.PROTOCOL&&null!=A.d)p=A.d.checksum,q.push(A.d.patch);else{J=!0;q=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",J,"temp",q,"checksum",p)}catch(x){q=[],null!=window.console&&"1"==urlParams.test&&console.log(x)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,p,b,f,k,d)):F<=this.maxCacheReadyRetries-1&&!J&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(F++,this.file.stats.cacheMiss++,window.setTimeout(c,(F+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(x){null!=k&&k(x)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(c,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(t){null!=f&&f(t)}),k,d)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,f,k){var e=!0,u=window.setTimeout(mxUtils.bind(this,function(){e=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(v){window.clearTimeout(u);e&&(200<=v.getStatus()&&299>=v.getStatus()?f(v.getText()):k({code:v.getStatus(),message:"Token Error "+v.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(b,f,k){var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(u){window.clearTimeout(t);d&&(200<=u.getStatus()&&299>=u.getStatus()?f(u.getText()):k({code:u.getStatus(),message:"Token Error "+u.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,k,e,u){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var v=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),B=this.file.getDescriptorSecret(this.file.getDescriptor()),E=this.file.getDescriptorRevisionId(f),L=this.file.getCurrentRevisionId();if(null==
-B||null==u||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(v),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",L,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var d=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:d}));this.file.stats.bytesSent+=g.length;
-this.file.stats.msgSent++;var q=!0,m=window.setTimeout(mxUtils.bind(this,function(){q=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(E)+"&to="+encodeURIComponent(L)+"&msg="+encodeURIComponent(v)+(null!=B?"&secret="+encodeURIComponent(B):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=u?"&token="+encodeURIComponent(u):
-""),mxUtils.bind(this,function(n){window.clearTimeout(m);q&&(200<=n.getStatus()&&299>=n.getStatus()?null!=k&&k():e({code:n.getStatus(),message:n.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",E,"to",L,"etag",this.file.getCurrentEtag(),"checksum",d)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,f,k,d,t){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),C=this.file.getDescriptorSecret(this.file.getDescriptor()),F=this.file.getDescriptorRevisionId(f),J=this.file.getCurrentRevisionId();if(null==
+C||null==t||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(u),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",J,"etag",this.file.getCurrentEtag());else{var c=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var e=this.ui.getHashValueForPages(b),g=this.objectToString(this.createMessage({patch:c,checksum:e}));this.file.stats.bytesSent+=g.length;
+this.file.stats.msgSent++;var m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(F)+"&to="+encodeURIComponent(J)+"&msg="+encodeURIComponent(u)+(null!=C?"&secret="+encodeURIComponent(C):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(g.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(g):"")+(null!=t?"&token="+encodeURIComponent(t):
+""),mxUtils.bind(this,function(q){window.clearTimeout(p);m&&(200<=q.getStatus()&&299>=q.getStatus()?null!=k&&k():d({code:q.getStatus(),message:q.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",c,g.length,"bytes","from",F,"to",J,"etag",this.file.getCurrentEtag(),"checksum",e)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null));this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
-"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.isModified()){var u={category:"DISCARD-FILE-"+e.getHash(),action:(e.savingFile?"saving":"")+(e.savingFile&&null!=e.savingFileTime?"_"+Math.round((Date.now()-e.savingFileTime.getTime())/1E3):"")+(null!=e.saveLevel?"-sl_"+e.saveLevel:"")+"-age_"+(null!=
-e.ageStart?Math.round((Date.now()-e.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+"-open_"+(null!=e.opened?Math.round((Date.now()-e.opened.getTime())/1E3):"x")+"-save_"+(null!=e.lastSaved?Math.round((Date.now()-e.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=e.lastChanged?Math.round((Date.now()-e.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=e.sync?"client_"+e.sync.clientId:"nosync"};
-e.constructor==DriveFile&&null!=e.desc&&null!=this.drive&&(u.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType);EditorUi.logEvent(u)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+e.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
+"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var t={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
+d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"};
+d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(t.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(t)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"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(e,u,v){if("1"==urlParams.openInSameWin||navigator.standalone)v();else{var B=null;try{B=window.open(e)}catch(E){}null==B||void 0===B?this.showDialog((new PopupDialog(this,e,u,v)).container,320,140,!0,!0):null!=u&&u()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(e){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(e)});this.editor.chromeless&&
-!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(e){null!=window.console&&console.log("Plugin Error:",e,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(e){try{e(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,t,u){if("1"==urlParams.openInSameWin||navigator.standalone)u();else{var C=null;try{C=window.open(d)}catch(F){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,t,u)).container,320,140,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
-App.loadScripts=function(b,f){for(var k=b.length,e=0;e<b.length;e++)mxscript(b[e],function(){0==--k&&null!=f&&f()})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var e=mxUtils.trim(f[k]);if("MODE="==e.substring(0,5)){b=e.substring(5);break}}null!=b&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie="MODE=; expires="+f.toUTCString(),localStorage.setItem(".mode",b))}return b};
+App.loadScripts=function(b,f){for(var k=b.length,d=0;d<b.length;d++)mxscript(b[d],function(){0==--k&&null!=f&&f()})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var d=mxUtils.trim(f[k]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}null!=b&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie="MODE=; expires="+f.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var e=0;e<k.length;e++)k[e].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
-App.main=function(b,f){function k(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(d){function g(){var C=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var d=0;d<k.length;d++)k[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
+App.main=function(b,f){function k(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(e){function g(){var y=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[C,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var q=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=q){EditorUi.debug("Setting configuration",JSON.stringify(q));if(null!=q.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=m)try{var n=JSON.parse(m),z;for(z in q.merge)n[z]=q.merge[z];q=n}catch(C){window.location.hash="",alert(C)}else q=q.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(q)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash=
-"",alert(C)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=
-function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function e(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var c=parseInt(mxSettings.settings.autosaveDelay);!isNaN(c)&&0<c?(DrawioFile.prototype.autosaveDelay=c,EditorUi.debug("Setting autosaveDelay",
-c)):EditorUi.debug("Invalid autosaveDelay",c)}null!=mxSettings.settings.defaultEdgeLength&&(c=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(c)&&0<c?(Graph.prototype.defaultEdgeLength=c,EditorUi.debug("Using defaultEdgeLength",c)):EditorUi.debug("Invalid defaultEdgeLength",c))}}catch(g){null!=window.console&&console.error(g)}if(null!=Menus.prototype.defaultFonts)for(c=0;c<Menus.prototype.defaultFonts.length;c++){var d=Menus.prototype.defaultFonts[c];"string"!==typeof d&&null!=d.fontFamily&&
-null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(c,d,g,q,m){EditorUi.logError("Global: "+(null!=c?c:""),d,g,q,m,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var u=
-document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){u=document.getElementsByTagName("script");if(null!=u&&0<u.length){var v=mxUtils.getTextContent(u[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
-CryptoJS.MD5(v).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(v).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=u&&1<u.length&&(v=mxUtils.getTextContent(u[u.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(v).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(v).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(y);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[y,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(e[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var m=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=m){EditorUi.debug("Setting configuration",JSON.stringify(m));if(null!=m.merge){var p=localStorage.getItem(Editor.configurationKey);if(null!=p)try{var q=JSON.parse(p),z;for(z in m.merge)q[z]=m.merge[z];m=q}catch(y){window.location.hash="",alert(y)}else m=m.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(m)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(y){window.location.hash=
+"",alert(y)}1<e.length&&(Graph.prototype.defaultThemes["default-style2"]=e[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=e[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g))},function(e){e=document.getElementById("geStatus");null!=e&&(e.innerHTML="Error loading page. <a>Please try refreshing.</a>",e.getElementsByTagName("a")[0].onclick=
+function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var c=parseInt(mxSettings.settings.autosaveDelay);!isNaN(c)&&0<c?(DrawioFile.prototype.autosaveDelay=c,EditorUi.debug("Setting autosaveDelay",
+c)):EditorUi.debug("Invalid autosaveDelay",c)}null!=mxSettings.settings.defaultEdgeLength&&(c=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(c)&&0<c?(Graph.prototype.defaultEdgeLength=c,EditorUi.debug("Using defaultEdgeLength",c)):EditorUi.debug("Invalid defaultEdgeLength",c))}}catch(g){null!=window.console&&console.error(g)}if(null!=Menus.prototype.defaultFonts)for(c=0;c<Menus.prototype.defaultFonts.length;c++){var e=Menus.prototype.defaultFonts[c];"string"!==typeof e&&null!=e.fontFamily&&
+null!=e.fontUrl&&Graph.addFont(e.fontFamily,e.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(c,e,g,m,p){EditorUi.logError("Global: "+(null!=c?c:""),e,g,m,p,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var t=
+document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var u=mxUtils.getTextContent(t[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
+CryptoJS.MD5(u).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=t&&1<t.length&&(u=mxUtils.getTextContent(t[t.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(u).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(c){null!=window.console&&console.error(c)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
-urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){u=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var B=JSON.parse(localStorage.getItem(mxSettings.key));null!=B&&(u=B.plugins)}catch(c){}B=urlParams.p;App.initPluginCallback();null!=B&&App.loadPlugins(B.split(";"));if(null!=
-u&&0<u.length&&"0"!=urlParams.plugins)for(B=0;B<u.length;B++)try{("/"==u[B].charAt(0)&&(u[B]=PLUGINS_BASE_PATH+u[B]),App.isSameDomain(u[B]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(u[B])?null==App.pluginsLoaded[u[B]]&&(App.pluginsLoaded[u[B]]=!0,App.embedModePluginsCount++,mxscript(u[B])):null!=window.console&&console.log("Unknown plugin:",u[B]):null!=window.console&&console.log("Blocked plugin:",u[B])}catch(c){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,L=function(c){if(c.source==E)try{var d=JSON.parse(c.data);null!=d&&"configure"==
-d.action&&(mxEvent.removeListener(window,"message",L),Editor.configure(d.config),mxSettings.load(),d.colorSchemeMeta&&mxmeta("color-scheme","dark light"),e())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,c.data)}};mxEvent.addListener(window,"message",L);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(c){null!=window.console&&console.error(c)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(B=localStorage.getItem(Editor.configurationKey),null!=B))try{B=JSON.parse(B),null!=B&&(EditorUi.debug("Using local configuration",B),Editor.configure(B),mxSettings.load())}catch(c){null!=window.console&&console.error(c)}}e()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
+urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){t=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var C=JSON.parse(localStorage.getItem(mxSettings.key));null!=C&&(t=C.plugins)}catch(c){}C=urlParams.p;App.initPluginCallback();null!=C&&App.loadPlugins(C.split(";"));if(null!=
+t&&0<t.length&&"0"!=urlParams.plugins)for(C=0;C<t.length;C++)try{("/"==t[C].charAt(0)&&(t[C]=PLUGINS_BASE_PATH+t[C]),App.isSameDomain(t[C]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(t[C])?null==App.pluginsLoaded[t[C]]&&(App.pluginsLoaded[t[C]]=!0,App.embedModePluginsCount++,mxscript(t[C])):null!=window.console&&console.log("Unknown plugin:",t[C]):null!=window.console&&console.log("Blocked plugin:",t[C])}catch(c){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,J=function(c){if(c.source==F)try{var e=JSON.parse(c.data);null!=e&&"configure"==
+e.action&&(mxEvent.removeListener(window,"message",J),Editor.configure(e.config),mxSettings.load(),e.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,c.data)}};mxEvent.addListener(window,"message",J);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+mxSettings.load()}catch(c){null!=window.console&&console.error(c)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(C=localStorage.getItem(Editor.configurationKey),null!=C))try{C=JSON.parse(C),null!=C&&(EditorUi.debug("Using local configuration",C),Editor.configure(C),mxSettings.load())}catch(c){null!=window.console&&console.error(c)}}d()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=";
App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC";
App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==";
App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=";
App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var e=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[e]&&(App.pluginsLoaded[e]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(e):mxscript(e):f?mxinclude(e):mxscript(drawDevUrl+e))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(u){null!=window.console&&console.log("Error loading plugin:",
-b[k],u)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(t){null!=window.console&&console.log("Error loading plugin:",
+b[k],t)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",
mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
-this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(v){null!=window.console&&console.error(v)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var v=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,v),window.DrawGapiClientCallback=null):v()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var e=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(v){null!=window.console&&console.error(v)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=e)});e()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
-"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(v){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){v.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 v=this.getCurrentFile();v=null!=v?v.getMode():null;"1"==urlParams.extAuth||v!=App.MODE_DEVICE&&v!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
-"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var u=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var v=this.getCurrentFile();null!=v&&null!=v.sync&&(v.sync.destroy(),v.sync=null,v=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</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(v){window.clearTimeout(u)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
-"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(v){this.appIconClicked(v)})),
+this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(u){null!=window.console&&console.error(u)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var u=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,u),window.DrawGapiClientCallback=null):u()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
+this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(u){null!=window.console&&console.error(u)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
+"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(u){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){u.prompt()})})),mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var u=this.getCurrentFile();u=null!=u?u.getMode():null;"1"==urlParams.extAuth||u!=App.MODE_DEVICE&&u!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
+"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var t=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var u=this.getCurrentFile();null!=u&&null!=u.sync&&(u.sync.destroy(),u.sync=null,u=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+u+'" class="geStatusAlert">'+u+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
+(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(u){window.clearTimeout(t)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
+"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)})),
this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};
App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var f={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
@@ -12073,32 +12101,32 @@ App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try dr
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img");
k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","1 star");k.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(k);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.setAttribute("title","2 star");e.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(e);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","3 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(u);var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.setAttribute("title","4 star");v.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");v.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(v);this.bannerShowing=!0;var B=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(e,"click",mxUtils.bind(this,
-function(E){mxEvent.consume(E);B()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);B()}));mxEvent.addListener(v,"click",mxUtils.bind(this,function(E){mxEvent.consume(E);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");B()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){B()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(k);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(d);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","3 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(t);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","4 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(u);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(F){mxEvent.consume(F);C()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);C()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(F){mxEvent.consume(F);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),e=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(e)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(u){try{if(200<=u.getStatus()&&299>=u.getStatus()){var v=u.getText();if(0<v.length){var B=JSON.parse(v);null!=B&&this.handleLicense(B,
-e)}}}catch(E){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),d=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var u=t.getText();if(0<u.length){var C=JSON.parse(u);null!=C&&this.handleLicense(C,
+d)}}}catch(F){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var k=0;k<f.length;k++)f[k].id==b.id&&f.splice(k,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,f){var k=!1;try{var e=!0,u=window.setTimeout(mxUtils.bind(this,function(){e=!1;f(null)}),this.timeout),v=mxUtils.bind(this,function(K){window.clearTimeout(u);e&&f(K)});null==this.thumbImageCache&&(this.thumbImageCache={});var B=this.editor.graph,E=B.backgroundImage,L=null!=B.themes&&"darkTheme"==B.defaultThemeName;if(null!=this.pages&&(L||this.currentPage!=this.pages[0])){var c=B.getGlobalVariable;B=this.createTemporaryGraph(B.getStylesheet());B.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var d=this.pages[0];this.currentPage==d?B.setBackgroundImage(E):null!=d.viewState&&null!=d.viewState&&(E=d.viewState.backgroundImage,B.setBackgroundImage(E));B.getGlobalVariable=function(K){return"page"==K?d.getName():"pagenumber"==K?1:c.apply(this,arguments)};B.getGlobalVariable=c;document.body.appendChild(B.container);B.model.setRoot(d.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{B!=this.editor.graph&&
-null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(D){K=null}v(K)}),b,this.thumbImageCache,"#ffffff",function(){v()},null,null,null,null,null,null,B,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),q=B.getGraphBounds(),m=B.view.translate,n=B.view.scale;null!=E&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((m.x+E.x)*n,(m.y+E.y)*n,E.width*n,E.height*n)));var z=b/q.width;
-z=Math.min(1,Math.min(3*b/(4*q.height),z));var C=Math.floor(q.x),x=Math.floor(q.y);g.setAttribute("width",Math.ceil(z*(q.width+4)));g.setAttribute("height",Math.ceil(z*(q.height+4)));var y=g.getContext("2d");y.scale(z,z);y.translate(-C,-x);var I=B.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";y.save();y.fillStyle=I;y.fillRect(C,x,Math.ceil(q.width+4),Math.ceil(q.height+4));y.restore();if(null!=E){var N=new Image;N.src=E.src;y.drawImage(N,E.x*z,E.y*z,E.width*z,E.height*z)}var t=new mxJsCanvas(g),
-p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var F=new mxImageExport;F.drawShape=function(K,D){K.shape instanceof mxShape&&K.shape.checkBounds()&&(D.save(),D.translate(.5,.5),K.shape.paint(D),D.translate(-.5,-.5),D.restore())};F.drawText=function(K,D){};F.drawState(B.getView().getState(B.model.root),p);p.finish(mxUtils.bind(this,function(){try{F.drawState(B.getView().getState(B.model.root),t),B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}catch(K){g=
-null}v(g)}));k=!0}}catch(K){k=!1,null!=B&&B!=this.editor.graph&&null!=B.container.parentNode&&B.container.parentNode.removeChild(B.container)}k||window.clearTimeout(u);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var e=this.getCurrentFile();f=null!=e?e.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var u=new Date;u.setYear(u.getFullYear()+1);document.cookie="MODE="+f+"; expires="+u.toUTCString()}}catch(v){}}})();
+App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(v){window.clearTimeout(t);d&&f(v)});null==this.thumbImageCache&&(this.thumbImageCache={});var C=this.editor.graph,F=C.backgroundImage,J=null!=C.themes&&"darkTheme"==C.defaultThemeName;if(null!=this.pages&&(J||this.currentPage!=this.pages[0])){var c=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var e=this.pages[0];this.currentPage==e?C.setBackgroundImage(F):null!=e.viewState&&null!=e.viewState&&(F=e.viewState.backgroundImage,C.setBackgroundImage(F));C.getGlobalVariable=function(v){return"page"==v?e.getName():"pagenumber"==v?1:c.apply(this,arguments)};C.getGlobalVariable=c;document.body.appendChild(C.container);C.model.setRoot(e.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(v){try{C!=this.editor.graph&&
+null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(D){v=null}u(v)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,C,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var g=document.createElement("canvas"),m=C.getGraphBounds(),p=C.view.translate,q=C.view.scale;null!=F&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle((p.x+F.x)*q,(p.y+F.y)*q,F.width*q,F.height*q)));var z=b/m.width;
+z=Math.min(1,Math.min(3*b/(4*m.height),z));var y=Math.floor(m.x),A=Math.floor(m.y);g.setAttribute("width",Math.ceil(z*(m.width+4)));g.setAttribute("height",Math.ceil(z*(m.height+4)));var x=g.getContext("2d");x.scale(z,z);x.translate(-y,-A);var I=C.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";x.save();x.fillStyle=I;x.fillRect(y,A,Math.ceil(m.width+4),Math.ceil(m.height+4));x.restore();if(null!=F){var M=new Image;M.src=F.src;x.drawImage(M,F.x*z,F.y*z,F.width*z,F.height*z)}var E=new mxJsCanvas(g),
+Q=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var n=new mxImageExport;n.drawShape=function(v,D){v.shape instanceof mxShape&&v.shape.checkBounds()&&(D.save(),D.translate(.5,.5),v.shape.paint(D),D.translate(-.5,-.5),D.restore())};n.drawText=function(v,D){};n.drawState(C.getView().getState(C.model.root),Q);Q.finish(mxUtils.bind(this,function(){try{n.drawState(C.getView().getState(C.model.root),E),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(v){g=
+null}u(g)}));k=!0}}catch(v){k=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}k||window.clearTimeout(t);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
+this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(u){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),k=null!=f?f.getMode():null;k==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?null!=
f&&null!=f.meta&&null!=f.meta.webUrl?(k=f.meta.webUrl,f=encodeURIComponent(f.meta.name),k.substring(k.length-f.length,k.length)==f&&(k=k.substring(0,k.length-f.length)),this.openLink(k)):this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?null!=f&&null!=f.stat&&null!=f.stat.path_display?(k="https://www.dropbox.com/home/Apps/drawio"+f.stat.path_display,mxEvent.isShiftDown(b)||(k=k.substring(0,k.length-f.stat.name.length)),this.openLink(k)):this.openLink("https://www.dropbox.com/"):k==App.MODE_TRELLO?
this.openLink("https://trello.com/"):k==App.MODE_GITHUB?null!=f&&f.constructor==GitHubFile?this.openLink(f.meta.html_url):this.openLink("https://github.com/"):k==App.MODE_GITLAB?null!=f&&f.constructor==GitLabFile?this.openLink(f.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var f=b.indexOf("#");0<f&&(b=b.substring(0,f))}return b};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,e,u){this.spinner.stop();null==e&&(e=urlParams.title,u=!0,e=null!=e?decodeURIComponent(e):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==e.substring(e.length-4))&&(e=e.substring(0,e.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,e):new LocalFile(this,k,e,u))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,t){this.spinner.stop();null==d&&(d=urlParams.title,t=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,t))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
@@ -12106,573 +12134,576 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(v,B,E,L,c){"ResizeObserver loop limit exceeded"!=v&&(EditorUi.logError("Uncaught: "+(null!=v?v:""),B,E,L,c,null,!0),b.handleError({message:v},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(v){var B=this.getCurrentFile();EditorUi.debug("storage event",[v],[B]);null!=B&&".draft-alive-check"==v.key&&null!=v.newValue&&null!=B.draftId&&(this.draftAliveCheck=v.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(v){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(v){try{this.hideDialog();
-var B=this.getDiagramId(),E=this.getCurrentFile();null!=E&&E.getHash()==B||this.loadFile(B,!0)}catch(L){null!=document.body&&this.handleError(L,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"))}))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var v=mxUtils.bind(this,function(L){Editor.isPngDataUrl(L)&&(L=Editor.extractGraphModelFromPng(L));var c=urlParams.title;c=null!=c?decodeURIComponent(c):
-this.defaultFilename;L=new LocalFile(this,L,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(L.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(L);this.getCurrentFile().setModified(!this.editor.chromeless)}),B=window.opener||window.parent;if(B!=window){var E=urlParams.create;null!=E?v(B[decodeURIComponent(E)]):(E=urlParams.data,null!=E?v(decodeURIComponent(E)):this.installMessageHandler(mxUtils.bind(this,function(L,c){c.source==B&&v(L)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)E=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=E;else{E=!1;try{E=null!=window.opener&&null!=window.opener.openFile}catch(L){}E?this.spinner.spin(document.body,mxResources.get("loading")):(E=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=E&&0!=E.length||this.editor.isChromelessView()?null!=E&&0<E.length?this.loadFile(E,null,null,mxUtils.bind(this,
-function(){var L=decodeURIComponent(urlParams.viewbox||"");if(""!=L)try{var c=JSON.parse(L);this.editor.graph.fitWindow(c,c.border)}catch(d){console.error(d)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var e=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),u=mxUtils.bind(this,function(v){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,v,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var B=urlParams.title;B=null!=B?decodeURIComponent(B):this.defaultFilename;v=this.getServiceCount(!0);isLocalStorage&&v++;var E=4>=
-v?2:6<v?4:3;B=new CreateDialog(this,B,mxUtils.bind(this,function(L,c){if(null==c){this.hideDialog();var d=Editor.useLocalStorage;this.createFile(0<L.length?L:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=d}else this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(L,this.getFileData(!0),null,c,null,!0,g)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,E,null,null,null,this.editor.fileExtensions);this.showDialog(B.container,420,v>E?
-390:280,!0,!1,mxUtils.bind(this,function(L){L&&null==this.getCurrentFile()&&this.showSplash()}));B.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?u(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(v){u(v)},mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"),
-e)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(u,C,F,J,c){"ResizeObserver loop limit exceeded"!=u&&(EditorUi.logError("Uncaught: "+(null!=u?u:""),C,F,J,c,null,!0),b.handleError({message:u},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(u){var C=this.getCurrentFile();EditorUi.debug("storage event",[u],[C]);null!=C&&".draft-alive-check"==u.key&&null!=u.newValue&&null!=C.draftId&&(this.draftAliveCheck=u.newValue,C.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(u){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(u){try{this.hideDialog();
+var C=this.getDiagramId(),F=this.getCurrentFile();null!=F&&F.getHash()==C||this.loadFile(C,!0)}catch(J){null!=document.body&&this.handleError(J,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,
+mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var u=mxUtils.bind(this,function(J){Editor.isPngDataUrl(J)&&(J=Editor.extractGraphModelFromPng(J));var c=urlParams.title;c=null!=c?decodeURIComponent(c):
+this.defaultFilename;J=new LocalFile(this,J,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(J.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(J);this.getCurrentFile().setModified(!this.editor.chromeless)}),C=window.opener||window.parent;if(C!=window){var F=urlParams.create;null!=F?u(C[decodeURIComponent(F)]):(F=urlParams.data,null!=F?u(decodeURIComponent(F)):this.installMessageHandler(mxUtils.bind(this,function(J,c){c.source==C&&u(J)})))}}else if(null==
+this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(J){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,
+function(){var J=decodeURIComponent(urlParams.viewbox||"");if(""!=J)try{var c=JSON.parse(J);this.editor.graph.fitWindow(c,c.border)}catch(e){console.error(e)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body,
+mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),t=mxUtils.bind(this,function(u){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,u,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;u=this.getServiceCount(!0);isLocalStorage&&u++;var F=4>=
+u?2:6<u?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(J,c){if(null==c){this.hideDialog();var e=Editor.useLocalStorage;this.createFile(0<J.length?J:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=e}else this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(J,this.getFileData(!0),null,c,null,!0,g)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,u>F?
+390:280,!0,!1,mxUtils.bind(this,function(J){J&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?t(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(u){t(u)},mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"),
+d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
-f())}}catch(v){this.handleError(v)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,k){function e(){k(u)}var u=[];try{this.getDatabaseItems(mxUtils.bind(this,function(v){EditorUi.debug("App.filterDrafts",[this],"items",v);for(var B=0;B<v.length;B++)try{var E=v[B].key;if(null!=E&&".draft_"==E.substring(0,7)){var L=JSON.parse(v[B].data);null!=L&&"draft"==L.type&&L.aliveCheck!=f&&(null==b&&null==L.fileObject||null!=L.fileObject&&L.fileObject.path==b)&&(L.key=E,u.push(L))}}catch(c){}e()},e))}catch(v){e()}};
+f())}}catch(u){this.handleError(u)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,f,k){function d(){k(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(u){EditorUi.debug("App.filterDrafts",[this],"items",u);for(var C=0;C<u.length;C++)try{var F=u[C].key;if(null!=F&&".draft_"==F.substring(0,7)){var J=JSON.parse(u[C].data);null!=J&&"draft"==J.type&&J.aliveCheck!=f&&(null==b&&null==J.fileObject||null!=J.fileObject&&J.fileObject.path==b)&&(J.key=F,t.push(J))}}catch(c){}d()},d))}catch(u){d()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(e){this.hideDialog();e=""!=e?e:0;this.loadDraft(f[e].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[e].key)}))}),mxUtils.bind(this,function(e,u){e=""!=e?e:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[e].key);null!=u&&u()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container,
-640,480,!0,!1,mxUtils.bind(this,function(e){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var u=new SplashDialog(this);this.showDialog(u.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(v){v&&!mxClient.IS_CHROMEAPP&&(v=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=v)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var e=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(e.container,3>b?200:300,3<f?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,f,k){var e=null;null!=this.menus.get("language")&&(e=document.createElement("div"),e.setAttribute("title",mxResources.get("language")),e.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="right center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="19px 19px",e.style.width="19px",e.style.height="19px",mxUtils.setOpacity(e,40),e.style.position="absolute",e.style.cursor=
-"pointer",e.style.bottom="20px",e.style.right=null!=k?k:"22px",f&&(e.style.direction="rtl",e.style.textAlign="right",e.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),e.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(e,"click",mxUtils.bind(this,function(u){this.editor.graph.popupMenuHandler.hideMenu();
-var v=new mxPopupMenu(this.menus.get("language").funct);v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});var B=mxUtils.getOffset(e);v.popup(B.x,B.y+e.offsetHeight,null,u);this.setCurrentMenu(v)})),b.appendChild(e));return e};
-App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(e){this.handleError(e)});try{b.getFile().then(mxUtils.bind(this,function(e){var u=new FileReader;u.onload=mxUtils.bind(this,function(v){try{if(null!=f){var B=v.target.result;"image/png"==e.type&&(B=this.extractGraphModelFromPng(B));f(new LocalFile(this,B,e.name,null,b,e))}else this.openFileHandle(v.target.result,e.name,e,!1,b)}catch(E){k(E)}});u.onerror=k;"image"!==e.type.substring(0,5)&&"application/pdf"!==e.type||
-"image/svg"===e.type.substring(0,9)?u.readAsText(e):u.readAsDataURL(e)}),k)}catch(e){k(e)}};
-App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var e=b.lastIndexOf(".");0<e&&(k=b.substring(e+1))}for(e=0;e<this.editor.diagramFileTypes.length;e++){var u={description:mxResources.get(this.editor.diagramFileTypes[e].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[e].extension+")":""),accept:{}};u.accept[this.editor.diagramFileTypes[e].mimeType]=["."+this.editor.diagramFileTypes[e].extension];this.editor.diagramFileTypes[e].extension==k?f.splice(0,0,
-u):this.editor.diagramFileTypes[e].extension==k?f.splice(0,0,u):f.push(u)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(e){"AbortError"!=e.name&&this.handleError(e)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(e){null!=e&&e.getFile().then(mxUtils.bind(this,function(u){b(e,u)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(B){null!=B&&0<B.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(B[0])}),
-mxUtils.bind(this,function(B){"AbortError"!=B.name&&this.handleError(B)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(B,E){StorageFile.listFiles(this,"F",B,E)});window.openBrowserFile=mxUtils.bind(this,function(B,E,L){StorageFile.getFileContent(this,B,E,L)});window.deleteBrowserFile=mxUtils.bind(this,function(B,E,L){StorageFile.deleteFile(this,B,E,L)});var e=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(B,E){var L=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=E.substring(E.length-4)||(E=E.substring(0,E.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,B,E):new LocalFile(this,B,E))}),c=this.getCurrentFile();null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,L,mxResources.get("cancel"),mxResources.get("discardChanges")):L()}));var u=this.dialog,v=u.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=
-e;v.apply(u,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(B){this.handleError(B)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(u,v){if(null!=v)try{this.loadLibrary(v)}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&f.getLibrary(u,mxUtils.bind(this,function(B){this.spinner.stop();try{this.loadLibrary(B)}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(B){this.handleError(B,null!=B?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
-k.files){for(var u=0;u<k.files.length;u++)mxUtils.bind(this,function(v){var B=new FileReader;B.onload=mxUtils.bind(this,function(E){try{this.loadLibrary(new LocalLibrary(this,E.target.result,v.name))}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}});B.readAsText(v)})(k.files[u]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(u,v){StorageFile.listFiles(this,"L",u,v)});window.openBrowserFile=mxUtils.bind(this,function(u,v,B){StorageFile.getFileContent(this,u,v,B)});window.deleteBrowserFile=mxUtils.bind(this,function(u,v,B){StorageFile.deleteFile(this,u,v,B)});var e=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(u){this.hideDialog(u)}));window.openFile.setConsumer(mxUtils.bind(this,function(u,v){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,u,v):new LocalLibrary(this,u,v))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=e;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,k,e,u,v,B){try{e=null!=e?e:this.mode;u=null!=u?u:!1;v=null!=v?v:!1;var E=this.createLibraryDataFromImages(f),L=mxUtils.bind(this,function(g){this.spinner.stop();null!=B&&B();this.handleError(g,null!=g?mxResources.get("errorSavingFile"):null)});null==k&&e==App.MODE_DEVICE&&(k=new LocalLibrary(this,E,b));if(null==k)this.pickFolder(e,mxUtils.bind(this,function(g){e==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,E,g,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,this.drive.libraryMimeType):e==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,E,mxUtils.bind(this,function(q){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(q,f)}),L,g):e==App.MODE_BROWSER?(g=mxUtils.bind(this,function(){var q=new StorageLibrary(this,E,b);q.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(q,f)}),L)}),null==localStorage.getItem(b)?
-g():this.confirm(mxResources.get("replaceIt",[b]),g)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(u||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(E);var c=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);v||this.libraryLoaded(k,f);null!=B&&B()}),L)});if(b!=k.getTitle()){var d=k.getHash();k.rename(b,mxUtils.bind(this,function(g){k.constructor!=LocalLibrary&&d!=k.getHash()&&
-(mxSettings.removeCustomLibrary(d),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(d);c()}),L)}else c()}}catch(g){this.handleError(g)}};
-App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var e=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(L,c){k.invalidFileHandle=null;k.fileHandle=L;k.title=c.name;k.desc=c;this.save(c.name,e)}),null,this.createFileSystemOptions(k.getTitle()));else{var u=null!=k.getTitle()?k.getTitle():this.defaultFilename,v=!mxClient.IS_IOS||!navigator.standalone,B=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var E=4>=b?2:6<b?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(L,c,d){null!=L&&0<L.length&&(/(\.pdf)$/i.test(L)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){d.value=L.split(".").slice(0,-1).join(".");d.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?d.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==B&&c==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,q){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=q.name;
-k.desc=q;this.setMode(App.MODE_DEVICE);this.save(q.name,e)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(L)):(this.setMode(App.MODE_DEVICE),this.save(L,e)):"download"==c?(new LocalFile(this,null,L)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):B!=c?this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(L,
-this.getFileData(/(\.xml)$/i.test(L)||0>L.indexOf(".")||/(\.drawio)$/i.test(L),/(\.svg)$/i.test(L),/(\.html)$/i.test(L)),null,c,e,null==this.mode,g)})):null!=c&&this.save(L,e)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,v,null,!0,E,null,null,null,this.editor.fileExtensions,!1);this.showDialog(u.container,420,b>E?390:280,!0,!0);u.init()}else this.save(k.getTitle(),e)}};
-App.prototype.loadTemplate=function(b,f,k,e,u){var v=!1,B=b,E=null!=e?e:b,L=/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E);e=/\.png$/i.test(E)||/\.pdf$/i.test(E);this.editor.isCorsEnabledForUrl(B)||(v=e||L,B="t="+(new Date).getTime(),B=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+B+(v?"&base64=1":""));this.editor.loadUrl(B,mxUtils.bind(this,function(c){try{var d=v?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c;if(L||this.isVisioData(d))L||(E=u?this.isRemoteVisioData(d)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(d)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(g){f(g)},k,E);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,E))this.isExternalDataComms()?this.parseFileData(d,mxUtils.bind(this,function(g){4==g.readyState&&200<=g.status&&299>=g.status&&"<mxGraphModel"==g.responseText.substring(0,13)&&f(g.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
-else if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(g){f(g)}),mxUtils.bind(this,function(g){k(g)}));else{if(/(\.png)($|\?)/i.test(E)||Editor.isPngData(d))d=Editor.extractGraphModelFromPng(c);f(d)}}catch(g){k(g)}}),k,/(\.png)($|\?)/i.test(E)||/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E),null,null,v)};
+[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,t){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=t&&t()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container,
+640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var t=new SplashDialog(this);this.showDialog(t.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(u){u&&!mxClient.IS_CHROMEAPP&&(u=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=u)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,f,k){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor=
+"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){this.editor.graph.popupMenuHandler.hideMenu();
+var u=new mxPopupMenu(this.menus.get("language").funct);u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var C=mxUtils.getOffset(d);u.popup(C.x,C.y+d.offsetHeight,null,t);this.setCurrentMenu(u)})),b.appendChild(d));return d};
+App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(u){try{if(null!=f){var C=u.target.result;"image/png"==d.type&&(C=this.extractGraphModelFromPng(C));f(new LocalFile(this,C,d.name,null,b,d))}else this.openFileHandle(u.target.result,d.name,d,!1,b)}catch(F){k(F)}});t.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
+"image/svg"===d.type.substring(0,9)?t.readAsText(d):t.readAsDataURL(d)}),k)}catch(d){k(d)}};
+App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var t={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};t.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,
+t):this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,t):f.push(t)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(t){b(d,t)}),f)}),f)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
+mxUtils.bind(this,function(C){"AbortError"!=C.name&&this.handleError(C)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(C,F){StorageFile.listFiles(this,"F",C,F)});window.openBrowserFile=mxUtils.bind(this,function(C,F,J){StorageFile.getFileContent(this,C,F,J)});window.deleteBrowserFile=mxUtils.bind(this,function(C,F,J){StorageFile.deleteFile(this,C,F,J)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(C,F){var J=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=F.substring(F.length-4)||(F=F.substring(0,F.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,F):new LocalFile(this,C,F))}),c=this.getCurrentFile();null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J()}));var t=this.dialog,u=t.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
+d;u.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(t,u){if(null!=u)try{this.loadLibrary(u)}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&f.getLibrary(t,mxUtils.bind(this,function(C){this.spinner.stop();try{this.loadLibrary(C)}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
+k.files){for(var t=0;t<k.files.length;t++)mxUtils.bind(this,function(u){var C=new FileReader;C.onload=mxUtils.bind(this,function(F){try{this.loadLibrary(new LocalLibrary(this,F.target.result,u.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}});C.readAsText(u)})(k.files[t]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(t,u){StorageFile.listFiles(this,"L",t,u)});window.openBrowserFile=mxUtils.bind(this,function(t,u,C){StorageFile.getFileContent(this,t,u,C)});window.deleteBrowserFile=mxUtils.bind(this,function(t,u,C){StorageFile.deleteFile(this,t,u,C)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(t){this.hideDialog(t)}));window.openFile.setConsumer(mxUtils.bind(this,function(t,u){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,t,u):new LocalLibrary(this,t,u))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,f,k,d,t,u,C){try{d=null!=d?d:this.mode;t=null!=t?t:!1;u=null!=u?u:!1;var F=this.createLibraryDataFromImages(f),J=mxUtils.bind(this,function(g){this.spinner.stop();null!=C&&C();this.handleError(g,null!=g?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,F,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(g){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,F,g,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,F,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(m,f)}),J,g):d==App.MODE_BROWSER?(g=mxUtils.bind(this,function(){var m=new StorageLibrary(this,F,b);m.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(m,f)}),J)}),null==localStorage.getItem(b)?
+g():this.confirm(mxResources.get("replaceIt",[b]),g)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(F);var c=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(g){this.spinner.stop();this.hideDialog(!0);u||this.libraryLoaded(k,f);null!=C&&C()}),J)});if(b!=k.getTitle()){var e=k.getHash();k.rename(b,mxUtils.bind(this,function(g){k.constructor!=LocalLibrary&&e!=k.getHash()&&
+(mxSettings.removeCustomLibrary(e),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(e);c()}),J)}else c()}}catch(g){this.handleError(g)}};
+App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
+function(J,c){k.invalidFileHandle=null;k.fileHandle=J;k.title=c.name;k.desc=c;this.save(c.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var t=null!=k.getTitle()?k.getTitle():this.defaultFilename,u=!mxClient.IS_IOS||!navigator.standalone,C=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var F=4>=b?2:6<b?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(J,c,e){null!=J&&0<J.length&&(/(\.pdf)$/i.test(J)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){e.value=J.split(".").slice(0,-1).join(".");e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==C&&c==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,m){k.fileHandle=g;k.mode=App.MODE_DEVICE;k.title=m.name;
+k.desc=m;this.setMode(App.MODE_DEVICE);this.save(m.name,d)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(J)):(this.setMode(App.MODE_DEVICE),this.save(J,d)):"download"==c?(new LocalFile(this,null,J)).save():"_blank"==c?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):C!=c?this.pickFolder(c,mxUtils.bind(this,function(g){this.createFile(J,
+this.getFileData(/(\.xml)$/i.test(J)||0>J.indexOf(".")||/(\.drawio)$/i.test(J),/(\.svg)$/i.test(J),/(\.html)$/i.test(J)),null,c,d,null==this.mode,g)})):null!=c&&this.save(J,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,u,null,!0,F,null,null,null,this.editor.fileExtensions,!1);this.showDialog(t.container,420,b>F?390:280,!0,!0);t.init()}else this.save(k.getTitle(),d)}};
+App.prototype.loadTemplate=function(b,f,k,d,t){var u=!1,C=b,F=null!=d?d:b,J=/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F);d=/\.png$/i.test(F)||/\.pdf$/i.test(F);this.editor.isCorsEnabledForUrl(C)||(u=d||J,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(u?"&base64=1":""));this.editor.loadUrl(C,mxUtils.bind(this,function(c){try{var e=u?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c;if(J||this.isVisioData(e))J||(F=t?this.isRemoteVisioData(e)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(e)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(g){f(g)},k,F);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,F))this.isExternalDataComms()?this.parseFileData(e,mxUtils.bind(this,function(g){4==g.readyState&&200<=g.status&&299>=g.status&&"<mxGraphModel"==g.responseText.substring(0,13)&&f(g.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
+else if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(g){f(g)}),mxUtils.bind(this,function(g){k(g)}));else{if(/(\.png)($|\?)/i.test(F)||Editor.isPngData(e))e=Editor.extractGraphModelFromPng(c);f(e)}}catch(g){k(g)}}),k,/(\.png)($|\?)/i.test(F)||/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F),null,null,u)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,f,k,e,u,v,B,E,L){e=E?null:null!=e?e:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var c=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(g){c();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{e==App.MODE_GOOGLE&&null!=this.drive?(null==B&&null!=this.stateArg&&null!=this.stateArg.folderId&&(B=this.stateArg.folderId),
-this.drive.insertFile(b,f,B,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d)):e==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,
-!1,B):e==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d):e==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d,!1,B):e==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,v,u,L)}),d):!E&&e==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(c(),this.showSaveFilePicker(mxUtils.bind(this,
-function(g,q){var m=new LocalFile(this,f,q.name,null,g,q);m.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(m,k,v,u,L)}),d,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&d(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==e),k,v,u,L))}catch(g){c(),this.handleError(g)}}};
-App.prototype.fileCreated=function(b,f,k,e,u){var v=window.location.pathname;null!=f&&0<f.length&&(v+="?libs="+f);null!=u&&0<u.length&&(v+="?clibs="+u);v=this.getUrl(v);b.getMode()!=App.MODE_DEVICE&&(v+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var B=b.getData();B=0<B.length?this.editor.extractGraphModel(mxUtils.parseXml(B).documentElement,!0):null;var E=window.location.protocol+"//"+window.location.hostname+v,L=B,c=null;null!=B&&/\.svg$/i.test(b.getTitle())&&
-(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),L=this.decodeNodeIntoGraph(L,c));b.setData(this.createFileData(B,c,b,E));null!=c&&c.container.parentNode.removeChild(c.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var q=this.getCurrentFile();null==k&&null!=q&&(k=!q.isModified()&&null==q.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var z=[],C=u.split(";"),x=0;x<C.length;x++)z.push(decodeURIComponent(C[x]));this.loadLibraries(z)}}),n=mxUtils.bind(this,function(){k||null==q||!q.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=e&&e();null==k||k?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=e&&e(),window.openWindow(v,null,n))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(q){d();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
-App.prototype.loadFile=function(b,f,k,e,u){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var v=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var L=mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();
-window.location.hash=null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(m){null!=m?(this.fileLoaded(new StorageFile(this,m,b)),null!=e&&e()):L({message:mxResources.get("fileNotFound")})}),L)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}));else if(null!=k)this.spinner.stop(),
-this.fileLoaded(k),null!=e&&e();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=e&&e()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(m,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,m,n));null!=e&&e()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var d=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var m=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=d.substring(31,d.lastIndexOf("&ex"));this.loadFile("G"+n,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
-!this.editor.editable&&(z.getHash=function(){return"G"+n},window.location.hash="#"+z.getHash());null!=e&&e()}));return!0}return!1});!m()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",m);return!0});this.loadTemplate(d,mxUtils.bind(this,function(m){this.spinner.stop();if(null!=m&&0<m.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=d,C=d.lastIndexOf("."),x=z.lastIndexOf("/");C>x&&0<x&&(z=z.substring(x+1,C),C=d.substring(C),
-this.useCanvasForExport||".png"!=C||(C=".drawio"),".svg"===C||".xml"===C||".html"===C||".png"===C||".drawio"===C)&&(n=z+C)}m=new LocalFile(this,m,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);m.getHash=function(){return b};this.fileLoaded(m,!0)?null!=e&&e():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+App.prototype.createFile=function(b,f,k,d,t,u,C,F,J){d=F?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var c=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(g){c();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),
+this.drive.insertFile(b,f,C,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,
+!1,C):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e,!1,C):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(g){c();this.fileCreated(g,k,u,t,J)}),e):!F&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(c(),this.showSaveFilePicker(mxUtils.bind(this,
+function(g,m){var p=new LocalFile(this,f,m.name,null,g,m);p.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,k,u,t,J)}),e,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&e(g)}),this.createFileSystemOptions(b))):(c(),this.fileCreated(new LocalFile(this,f,b,null==d),k,u,t,J))}catch(g){c(),this.handleError(g)}}};
+App.prototype.fileCreated=function(b,f,k,d,t){var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=t&&0<t.length&&(u+="?clibs="+t);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var F=window.location.protocol+"//"+window.location.hostname+u,J=C,c=null;null!=C&&/\.svg$/i.test(b.getTitle())&&
+(c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),J=this.decodeNodeIntoGraph(J,c));b.setData(this.createFileData(C,c,b,F));null!=c&&c.container.parentNode.removeChild(c.container);var e=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){e();var m=this.getCurrentFile();null==k&&null!=m&&(k=!m.isModified()&&null==m.getMode());var p=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
+null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var z=[],y=t.split(";"),A=0;A<y.length;A++)z.push(decodeURIComponent(y[A]));this.loadLibraries(z)}}),q=mxUtils.bind(this,function(){k||null==m||!m.isModified()?p():this.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?q():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=d&&d(),window.openWindow(u,null,q))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(m){e();null!=m&&"AbortError"==m.name||this.handleError(m)}))}};
+App.prototype.loadFile=function(b,f,k,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var u=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var J=mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var q=this.getCurrentFile();
+window.location.hash=null!=q?q.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(p){null!=p?(this.fileLoaded(new StorageFile(this,p,b)),null!=d&&d()):J({message:mxResources.get("fileNotFound")})}),J)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=p?p.getHash():""}));else if(null!=k)this.spinner.stop(),
+this.fileLoaded(k),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var c=decodeURIComponent(b.substring(1));"<"!=c.charAt(0)&&(c=Graph.decompress(c));c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(p,q){this.spinner.stop();this.fileLoaded(new EmbedFile(this,p,q));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var e=decodeURIComponent(b.substring(1)),g=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var p=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var q=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+q,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+q},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!p()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",p);return!0});this.loadTemplate(e,mxUtils.bind(this,function(p){this.spinner.stop();if(null!=p&&0<p.length){var q=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=e,y=e.lastIndexOf("."),A=z.lastIndexOf("/");y>A&&0<A&&(z=z.substring(A+1,y),y=e.substring(y),
+this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(q=z+y)}p=new LocalFile(this,p,null!=urlParams.title?decodeURIComponent(urlParams.title):q,!0);p.getHash=function(){return b};this.fileLoaded(p,!0)?null!=d&&d():g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else g()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){g()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(c=null,"G"==b.charAt(0)?c=this.drive:"D"==b.charAt(0)?c=this.dropbox:"W"==b.charAt(0)?c=this.oneDrive:"H"==b.charAt(0)?c=this.gitHub:"A"==b.charAt(0)?c=this.gitLab:"T"==b.charAt(0)&&(c=this.trello),null==c)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(m){this.spinner.stop();this.fileLoaded(m);var n=this.getCurrentFile();null==n?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(n.getHash=function(){return q+b},window.location.hash="#"+n.getHash()):m==n&&null==m.getMode()&&
-(m=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+m+'" class="geStatusAlert">'+m+"</div>"));null!=e&&e()}),mxUtils.bind(this,function(m){null!=window.console&&null!=m&&console.log("error in loadFile:",b,m);var n=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==m||"AbortError"!=m.name?this.handleError(m,null!=m?mxResources.get("errorLoadingFile"):null,n,null,null,"#"+q+b):n()}))}}),
-B=this.getCurrentFile(),E=mxUtils.bind(this,function(){u||null==B||!B.isModified()?v():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=B&&(window.location.hash=B.getHash())}),v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?E():null==B||f?E():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,E)).container,320,140,!0,!0)};
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=p?p.getHash():""}));else{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));c.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var q=this.getCurrentFile();null==q?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(q.getHash=function(){return m+b},window.location.hash="#"+q.getHash()):p==q&&null==p.getMode()&&
+(p=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+p+'" class="geStatusAlert">'+p+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var q=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,null!=p?mxResources.get("errorLoadingFile"):null,q,null,null,"#"+m+b):q()}))}}),
+C=this.getCurrentFile(),F=mxUtils.bind(this,function(){t||null==C||!C.isModified()?u():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),u,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?F():null==C||f?F():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,F)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var e=0;e<k.length;e++)""!=k[e]&&0>mxUtils.indexOf(f,k[e])&&f.push(k[e])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,d){d||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),e=0,u=[],v=0<b.length&&"L.scratchpad"==b[0]?1:0,B=mxUtils.bind(this,function(){if(0==e){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=u[c]&&this.loadLibrary(u[c],c<=v);null!=f&&f()}});if(null!=b)for(var E=0;E<b.length;E++){var L=encodeURIComponent(decodeURIComponent(b[E]));
-mxUtils.bind(this,function(c,d){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;e++;var g=mxUtils.bind(this,function(x){u[d]=x;e--;B()}),q=mxUtils.bind(this,function(x){k(c,x);e--;B()}),m=c.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(y){".scratchpad"==x&&null==
-y&&(y=this.emptyLibraryXml);null!=y?g(new StorageLibrary(this,y,x)):q()}),q)}catch(y){q()}}),0);else if("U"==m){var n=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(x){null!=x&&0<x.length?g(new UrlLibrary(this,x,n)):q()}),function(){q()},null,!0)}else if("R"==m){m=decodeURIComponent(c.substring(1));try{m=JSON.parse(m);var z={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(x){try{g(new RemoteLibrary(this,
-x,z))}catch(y){q()}}),function(){q()})}catch(x){q()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(x){g(x)},q)}catch(x){q()}else{var C=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(C=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(C=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(C=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(C=this.dropbox):"W"==m&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(C=this.oneDrive);null!=C?C.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(x){try{g(x)}catch(y){q()}}),function(x){q()}):q(!0)}}})(L,E)}B()}};
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(f,k[d])&&f.push(k[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(c,e){e||mxSettings.removeCustomLibrary(c);delete this.loadedLibraries[c]}),d=0,t=[],u=0<b.length&&"L.scratchpad"==b[0]?1:0,C=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var c=b.length-1;0<=c;c--)null!=t[c]&&this.loadLibrary(t[c],c<=u);null!=f&&f()}});if(null!=b)for(var F=0;F<b.length;F++){var J=encodeURIComponent(decodeURIComponent(b[F]));
+mxUtils.bind(this,function(c,e){if(null!=c&&0<c.length&&null==this.loadedLibraries[c]&&null==this.sidebar.palettes[c]){this.loadedLibraries[c]=!0;d++;var g=mxUtils.bind(this,function(A){t[e]=A;d--;C()}),m=mxUtils.bind(this,function(A){k(c,A);d--;C()}),p=c.substring(0,1);if("L"==p)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var A=decodeURIComponent(c.substring(1));StorageFile.getFileContent(this,A,mxUtils.bind(this,function(x){".scratchpad"==A&&null==
+x&&(x=this.emptyLibraryXml);null!=x?g(new StorageLibrary(this,x,A)):m()}),m)}catch(x){m()}}),0);else if("U"==p){var q=decodeURIComponent(c.substring(1));this.isOffline()||this.loadTemplate(q,mxUtils.bind(this,function(A){null!=A&&0<A.length?g(new UrlLibrary(this,A,q)):m()}),function(){m()},null,!0)}else if("R"==p){p=decodeURIComponent(c.substring(1));try{p=JSON.parse(p);var z={id:p[0],title:p[1],downloadUrl:p[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(A){try{g(new RemoteLibrary(this,
+A,z))}catch(x){m()}}),function(){m()})}catch(A){m()}}else if("S"==p&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(c.substring(1)),function(A){g(A)},m)}catch(A){m()}else{var y=null;"G"==p?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==p?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==p?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==p?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==p&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(c.substring(1)),mxUtils.bind(this,function(A){try{g(A)}catch(x){m()}}),function(A){m()}):m(!0)}}})(J,F)}C()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText=
"display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",
mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=
b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,
"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,e=mxUtils.bind(this,function(u){u=u.filter(function(L){return!L.targets||-1<L.targets.indexOf(b)||null!=f&&-1<L.targets.indexOf(f)});for(var v=b+"NotifReadTS",B=isLocalStorage?parseInt(localStorage.getItem(v)):!0,E=0;E<u.length;E++)u[E].isNew=!B||u[E].timestamp>B;this.showNotification(u,v)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(u){}null==k||k.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()&&(u=JSON.parse(u.getText()),u.sort(function(v,B){return B.timestamp-v.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:u})),this.fetchingNotif=!1,e(u))}))):e(k.notifs)}};
-App.prototype.showNotification=function(b,f){function k(c){var d=document.querySelector(".geNotification-count");null!=d&&(d.innerHTML=c,d.style.display=0==c?"none":"",d=document.querySelector(".geNotification-bell"),d.style.animation=0==c?"none":"",d.className="geNotification-bell"+(0==c?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==c?"none":"")}var e=b.length;if("min"==uiTheme)for(var u=e=0;u<b.length;u++)b[u].isNew&&e++;if(0==e)null!=this.notificationBtn&&
-(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var v=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),d=0;d<c.length;d++)c[d].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
-(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");e=document.createElement("span");e.className="geNotification-count";this.notificationBtn.appendChild(e);e=document.createElement("div");e.className="geNotification-bell";e.style.opacity="min"==uiTheme?"0.5":"";u=document.createElement("span");u.className="geBell-top";e.appendChild(u);u=document.createElement("span");u.className="geBell-middle";e.appendChild(u);
-u=document.createElement("span");u.className="geBell-bottom";e.appendChild(u);u=document.createElement("span");u.className="geBell-rad";e.appendChild(u);this.notificationBtn.appendChild(e);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);u=document.createElement("div");u.className=
-"header";e=document.createElement("span");e.className="title";e.textContent=mxResources.get("notifications");u.appendChild(e);e=document.createElement("span");e.className="closeBtn";e.textContent="x";u.appendChild(e);this.notificationWin.appendChild(u);u=document.createElement("div");u.className="notifications clearfix";var B=document.createElement("div");B.setAttribute("id","geNotifList");B.style.position="relative";u.appendChild(B);this.notificationWin.appendChild(u);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var c=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=c.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=c.right-this.notificationWin.clientWidth+"px";k(0)}else v()}));mxEvent.addListener(e,"click",v)}else this.notificationBtn.style.display="";var E=0,L=document.getElementById("geNotifList");
-if(null!=L){L.innerHTML='<div class="line"></div>';for(u=0;u<b.length;u++)(function(c,d){d.isNew&&E++;var g=document.createElement("div");g.className="notification";c=c.timeSince(new Date(d.timestamp));null==c&&(c=mxResources.get("lessThanAMinute"));g.innerHTML='<div class="circle'+(d.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[c],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(d.content)+"</p>";d.link&&mxEvent.addListener(g,"click",function(){window.open(d.link,
-"notifWin")});L.appendChild(g)})(this,b[u]);k(E)}}};
-App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),u=mxUtils.bind(this,function(v){k.isModified()&&Editor.addRetryToError(v,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(v,null==v||"AbortError"!=v.name)});try{b==k.getTitle()?k.save(!0,e,
-u):k.saveAs(b,e,u)}catch(v){u(v)}}};
-App.prototype.pickFolder=function(b,f,k,e,u){k=null!=k?k:!0;var v=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(B){v();if(B.action==google.picker.Action.PICKED){var E=null;null!=B.docs&&0<B.docs.length&&"folder"==B.docs[0].type&&(E=B.docs[0].id);f(E)}}),u):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(B){v();null!=B&&null!=B.value&&0<B.value.length&&(B=OneDriveFile.prototype.getIdOf(B.value[0]),
-f(B))}),e):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(B){v();f(B)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,k,e,u,v){u==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,e?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)})):u==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,v,mxUtils.bind(this,function(B){this.spinner.stop()}),
-mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),k,e):u==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,e?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,v):u==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,v,e):u==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,v,e):u==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,e?this.base64ToBlob(b,
-k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,v):u==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))};
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(t){t=t.filter(function(J){return!J.targets||-1<J.targets.indexOf(b)||null!=f&&-1<J.targets.indexOf(f)});for(var u=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(u)):!0,F=0;F<t.length;F++)t[F].isNew=!C||t[F].timestamp>C;this.showNotification(t,u)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==k||k.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()&&(t=JSON.parse(t.getText()),t.sort(function(u,C){return C.timestamp-u.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:t})),this.fetchingNotif=!1,d(t))}))):d(k.notifs)}};
+App.prototype.showNotification=function(b,f){function k(c){var e=document.querySelector(".geNotification-count");null!=e&&(e.innerHTML=c,e.style.display=0==c?"none":"",e=document.querySelector(".geNotification-bell"),e.style.animation=0==c?"none":"",e.className="geNotification-bell"+(0==c?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==c?"none":"")}var d=b.length;if("min"==uiTheme)for(var t=d=0;t<b.length;t++)b[t].isNew&&d++;if(0==d)null!=this.notificationBtn&&
+(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var u=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),e=0;e<c.length;e++)c[e].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
+(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";t=document.createElement("span");t.className="geBell-top";d.appendChild(t);t=document.createElement("span");t.className="geBell-middle";d.appendChild(t);
+t=document.createElement("span");t.className="geBell-bottom";d.appendChild(t);t=document.createElement("span");t.className="geBell-rad";d.appendChild(t);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);t=document.createElement("div");t.className=
+"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var C=document.createElement("div");C.setAttribute("id","geNotifList");C.style.position="relative";t.appendChild(C);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,
+"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var c=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=c.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=c.right-this.notificationWin.clientWidth+"px";k(0)}else u()}));mxEvent.addListener(d,"click",u)}else this.notificationBtn.style.display="";var F=0,J=document.getElementById("geNotifList");
+if(null!=J){J.innerHTML='<div class="line"></div>';for(t=0;t<b.length;t++)(function(c,e){e.isNew&&F++;var g=document.createElement("div");g.className="notification";c=c.timeSince(new Date(e.timestamp));null==c&&(c=mxResources.get("lessThanAMinute"));g.innerHTML='<div class="circle'+(e.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[c],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(e.content)+"</p>";e.link&&mxEvent.addListener(g,"click",function(){window.open(e.link,
+"notifWin")});J.appendChild(g)})(this,b[t]);k(F)}}};
+App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),t=mxUtils.bind(this,function(u){k.isModified()&&Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(u,null==u||"AbortError"!=u.name)});try{b==k.getTitle()?k.save(!0,d,
+t):k.saveAs(b,d,t)}catch(u){t(u)}}};
+App.prototype.pickFolder=function(b,f,k,d,t){k=null!=k?k:!0;var u=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){u();if(C.action==google.picker.Action.PICKED){var F=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(F=C.docs[0].id);f(F)}}),t):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){u();null!=C&&null!=C.value&&0<C.value.length&&(C=OneDriveFile.prototype.getIdOf(C.value[0]),
+f(C))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){u();f(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,k,d,t,u){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,u,mxUtils.bind(this,function(C){this.spinner.stop()}),
+mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),k,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,u):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,u,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,u,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
+k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,u):t==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var k=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,f,k,e){var u=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(v){try{null!=k&&k(v,mxUtils.bind(this,function(){this.hideDialog();u()}))}catch(B){this.editor.setStatus(mxUtils.htmlEntities(B.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(v){null!=e&&e(v);v&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,k,e,u,v,B,E){var L=f;/\.svg$/i.test(L)||(L=L.substring(0,f.lastIndexOf("."))+e);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var d=new XMLHttpRequest;d.open("GET",b,!0);c||(d.responseType="blob");if(E)for(var g in E)d.setRequestHeader(g,E[g]);d.onload=mxUtils.bind(this,function(){if(200<=
-d.status&&299>=d.status){var m=null;c?(m=JSON.parse(d.responseText),m=this.base64ToBlob(m.content,"application/octet-stream")):m=new Blob([d.response],{type:"application/octet-stream"});this.importVisio(m,mxUtils.bind(this,function(n){u(new LocalFile(this,n,L,!0))}),v,f)}else null!=v&&v({message:mxResources.get("errorLoadingFile")})});d.onerror=v;d.send()}else{var q=mxUtils.bind(this,function(m){try{if(/\.pdf$/i.test(f)){var n=Editor.extractGraphModelFromPdf(m);null!=n&&0<n.length&&u(new LocalFile(this,
-n,L,!0))}else/\.png$/i.test(f)?(n=this.extractGraphModelFromPng(m),null!=n?u(new LocalFile(this,n,L,!0)):u(new LocalFile(this,m,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(m,b)?this.parseFileData(m,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?u(new LocalFile(this,z.responseText,L,!0)):null!=v&&v({message:mxResources.get("errorLoadingFile")}))}),f):u(new LocalFile(this,m,L,!0))}catch(z){null!=v&&v(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(m){if(200<=m.getStatus()&&299>=m.getStatus()){if(null!=u){m=JSON.parse(m.getText());var n=m.content;"base64"===m.encoding&&(n=/\.png$/i.test(f)?"data:image/png;base64,"+n:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));q(n)}}else null!=v&&v({code:App.ERROR_UNKNOWN})}),function(){null!=v&&v({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=v&&v({code:App.ERROR_TIMEOUT,retry:fn})},E):null!=B?B(b,q,v,k):this.editor.loadUrl(b,q,v,k,null,null,null,E)}};
+App.prototype.showAuthDialog=function(b,f,k,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(u){try{null!=k&&k(u,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(C){this.editor.setStatus(mxUtils.htmlEntities(C.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(u){null!=d&&d(u);u&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,f,k,d,t,u,C,F){var J=f;/\.svg$/i.test(J)||(J=J.substring(0,f.lastIndexOf("."))+d);var c=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(c=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",b,!0);c||(e.responseType="blob");if(F)for(var g in F)e.setRequestHeader(g,F[g]);e.onload=mxUtils.bind(this,function(){if(200<=
+e.status&&299>=e.status){var p=null;c?(p=JSON.parse(e.responseText),p=this.base64ToBlob(p.content,"application/octet-stream")):p=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(p,mxUtils.bind(this,function(q){t(new LocalFile(this,q,J,!0))}),u,f)}else null!=u&&u({message:mxResources.get("errorLoadingFile")})});e.onerror=u;e.send()}else{var m=mxUtils.bind(this,function(p){try{if(/\.pdf$/i.test(f)){var q=Editor.extractGraphModelFromPdf(p);null!=q&&0<q.length&&t(new LocalFile(this,
+q,J,!0))}else/\.png$/i.test(f)?(q=this.extractGraphModelFromPng(p),null!=q?t(new LocalFile(this,q,J,!0)):t(new LocalFile(this,p,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(p,b)?this.parseFileData(p,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?t(new LocalFile(this,z.responseText,J,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,p,J,!0))}catch(z){null!=u&&u(z)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);c?mxUtils.get(b,mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){if(null!=t){p=JSON.parse(p.getText());var q=p.content;"base64"===p.encoding&&(q=/\.png$/i.test(f)?"data:image/png;base64,"+q:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+q:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(q):atob(q));m(q)}}else null!=u&&u({code:App.ERROR_UNKNOWN})}),function(){null!=u&&u({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=u&&u({code:App.ERROR_TIMEOUT,retry:fn})},F):null!=C?C(b,m,u,k):this.editor.loadUrl(b,m,u,k,null,null,null,F)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
-"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(u){this.appIconClicked(u)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
-mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&(u=u.getMode(),u==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70% 70%"):u==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):u==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):u==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
+"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(t){this.appIconClicked(t)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
+mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&(t=t.getMode(),t==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70% 70%"):t==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):t==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";
-this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
-function(u){var v=this.getCurrentFile();null!=v&&v.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(u)}));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.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
+function(t){var u=this.getCurrentFile();null!=u&&u.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(t)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
this.menubar.container.style.top="34px");f="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding=
"2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(u){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(u)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
-k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
-"click",mxUtils.bind(this,function(u){var v=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:v});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(v);v||(e=this.hsplitPosition);this.hsplitPosition=v?e:0;this.toggleFormatPanel(v);this.fullscreenMode=!v;mxEvent.consume(u)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
-this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
-mxUtils.bind(this,function(u){this.actions.get("toggleDarkMode").funct();mxEvent.consume(u)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var e=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"formatPanel"});this.actions.get("formatPanel").funct();mxEvent.consume(t)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
+k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
+"click",mxUtils.bind(this,function(t){var u=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:u});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(u);u||(d=this.hsplitPosition);this.hsplitPosition=u?d:0;this.toggleFormatPanel(u);this.fullscreenMode=!u;mxEvent.consume(t)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",mxResources.get("theme")),
+this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.darkModeElement,"click",
+mxUtils.bind(this,function(t){this.actions.get("toggleDarkMode").funct();mxEvent.consume(t)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var d=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat=
-"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(u){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(u)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
+"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(t)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility=
"visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",
this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')");this.compactMode=!b};
-App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=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(f){f.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";k.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
-else{var e=!1;this.userPanel.innerText="";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.className="geDialogClose";u.style.top="8px";u.style.right="8px";mxEvent.addListener(u,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(u);if(null!=this.drive){var v=this.drive.getUsersList();if(0<v.length){var B=mxUtils.bind(this,
-function(L,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();L()}),2E3)):L()});k=mxUtils.bind(this,function(L){var c=document.createElement("tr");c.setAttribute("title","User ID: "+L.id);var d=document.createElement("td");d.setAttribute("valig","middle");d.style.height="59px";d.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50");
-g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=L.pictureUrl?L.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";d.appendChild(g);c.appendChild(d);d=document.createElement("td");d.setAttribute("valign","middle");d.style.whiteSpace="nowrap";d.style.paddingTop="4px";d.style.maxWidth="0";d.style.overflow="hidden";d.style.textOverflow="ellipsis";mxUtils.write(d,L.displayName+(L.isCurrent&&1<v.length?" ("+mxResources.get("default")+
-")":""));null!=L.email&&(mxUtils.br(d),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,L.email),d.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var q=document.createElement("i");mxUtils.write(q,mxResources.get("googleDrive"));g.appendChild(q);d.appendChild(g);c.appendChild(d);L.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(m){B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(L);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(n){this.handleError(n)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(m)})));return c});e=!0;u=document.createElement("table");u.style.borderSpacing="0";u.style.fontSize="10pt";u.style.width="100%";u.style.padding="10px";for(var E=0;E<v.length;E++)u.appendChild(k(v[E]));this.userPanel.appendChild(u);k=document.createElement("div");k.style.textAlign=
-"left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";u=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));u.className="geBtn";u.style.float="right";k.appendChild(u);u=mxUtils.button(mxResources.get("addAccount"),
-mxUtils.bind(this,function(){var L=this.drive.createAuthWin();L.blur();window.focus();B(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0,L)}),mxResources.get("closingFile")+"...")}));u.className="geBtn";u.style.margin="0px";k.appendChild(u);this.userPanel.appendChild(k)}}u=mxUtils.bind(this,function(L,c,d,g){if(null!=L){e&&this.userPanel.appendChild(document.createElement("hr"));
-e=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";var m=document.createElement("tbody"),n=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var C=document.createElement("img");C.setAttribute("width","40");C.setAttribute("height","40");C.setAttribute("border","0");C.setAttribute("src",c);C.style.marginRight="6px";z.appendChild(C)}n.appendChild(z);
-z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,L.displayName);null!=L.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,L.email),z.appendChild(c));null!=g&&(L=document.createElement("div"),L.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),L.appendChild(c),z.appendChild(L));n.appendChild(z);m.appendChild(n);
-q.appendChild(m);this.userPanel.appendChild(q);L=document.createElement("div");L.style.textAlign="center";L.style.padding="10px";L.style.whiteSpace="nowrap";null!=d&&(d=mxUtils.button(mxResources.get("signOut"),d),d.className="geBtn",L.appendChild(d));this.userPanel.appendChild(L)}});null!=this.dropbox&&u(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();
-window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&u(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
-""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&u(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&u(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==GitLabFile){var c=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):
-c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&u(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var L=this.getCurrentFile();if(null!=L&&L.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));"min"==
-uiTheme&&(u=this.getCurrentFile(),null!=u&&u.isRealtimeEnabled()&&u.isRealtimeSupported()&&(k=k.cloneNode(!1),k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",E=u.getRealtimeError(),1!=u.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=E&&null!=E.message?E.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",
-mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&
-(b=this.gitLab.getUser());null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};
+App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.gitLab&&null!=this.gitLab.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=this.createUserElement(),this.menubarContainer.appendChild(this.userElement),mxEvent.addListener(this.userElement,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";k.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);
+else{var d=!1;this.userPanel.innerText="";k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.className="geDialogClose";k.style.top="8px";k.style.right="8px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(k);if(null!=this.drive){var t=this.drive.getUsersList();if(0<t.length){var u=mxUtils.bind(this,
+function(J,c){var e=this.getCurrentFile();null!=e&&e.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();J()}),2E3)):J()});k=mxUtils.bind(this,function(J){var c=document.createElement("tr");c.setAttribute("title","User ID: "+J.id);var e=document.createElement("td");e.setAttribute("valig","middle");e.style.height="59px";e.style.width="66px";var g=document.createElement("img");g.setAttribute("width","50");
+g.setAttribute("height","50");g.setAttribute("border","0");g.setAttribute("src",null!=J.pictureUrl?J.pictureUrl:this.defaultUserPicture);g.style.borderRadius="50%";g.style.margin="4px 8px 0 8px";e.appendChild(g);c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.paddingTop="4px";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,J.displayName+(J.isCurrent&&1<t.length?" ("+mxResources.get("default")+
+")":""));null!=J.email&&(mxUtils.br(e),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,J.email),e.appendChild(g));g=document.createElement("div");g.style.marginTop="4px";var m=document.createElement("i");mxUtils.write(m,mxResources.get("googleDrive"));g.appendChild(m);e.appendChild(g);c.appendChild(e);J.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,"click",mxUtils.bind(this,function(p){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(J);
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(q){this.handleError(q)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(p)})));return c});d=!0;var C=document.createElement("table");C.style.borderSpacing="0";C.style.fontSize="10pt";C.style.width="100%";C.style.padding="10px";for(var F=0;F<t.length;F++)C.appendChild(k(t[F]));this.userPanel.appendChild(C);k=document.createElement("div");k.style.textAlign=
+"left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";C=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));C.className="geBtn";C.style.float="right";k.appendChild(C);C=mxUtils.button(mxResources.get("addAccount"),
+mxUtils.bind(this,function(){var J=this.drive.createAuthWin();J.blur();window.focus();u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0,J)}),mxResources.get("closingFile")+"...")}));C.className="geBtn";C.style.margin="0px";k.appendChild(C);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(J,c,e,g){if(null!=J){d&&this.userPanel.appendChild(document.createElement("hr"));
+d=!0;var m=document.createElement("table");m.style.borderSpacing="0";m.style.fontSize="10pt";m.style.width="100%";m.style.padding="10px";var p=document.createElement("tbody"),q=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=c){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",c);y.style.marginRight="6px";z.appendChild(y)}q.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,J.displayName);null!=J.email&&(mxUtils.br(z),c=document.createElement("small"),c.style.color="gray",mxUtils.write(c,J.email),z.appendChild(c));null!=g&&(J=document.createElement("div"),J.style.marginTop="4px",c=document.createElement("i"),mxUtils.write(c,g),J.appendChild(c),z.appendChild(J));q.appendChild(z);p.appendChild(q);
+m.appendChild(p);this.userPanel.appendChild(m);J=document.createElement("div");J.style.textAlign="center";J.style.padding="10px";J.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",J.appendChild(e));this.userPanel.appendChild(J)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();
+window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&k(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
+""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&k(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&k(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==GitLabFile){var c=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):
+c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&k(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var J=this.getCurrentFile();if(null!=J&&J.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});J.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));"min"==
+uiTheme&&(C=this.getCurrentFile(),null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&(k=document.createElement("div"),k.style.padding="10px",k.style.whiteSpace="nowrap",k.style.borderTop="1px solid rgb(224, 224, 224)",k.style.marginTop="4px",k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",F=C.getRealtimeError(),1!=C.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=F&&null!=F.message?F.message:mxResources.get("disconnected"))),
+this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?
+b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());null!=b?(EditorUi.removeChildNodes(this.userElement),this.userElement.innerText="","sketch"!=Editor.currentTheme&&560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),
+this.userElement=null);this.updateUserElementStyle();this.updateUserElementIcon()};
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var f=mxResources.get("changeUser");if("none"!=b.style.display){var k=this.getCurrentFile();if(null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()){var d=document.createElement("img");d.setAttribute("border","0");d.style.position="absolute";d.style.left="16px";d.style.top="2px";d.style.width="12px";d.style.height="12px";var t=k.getRealtimeError();k=k.getRealtimeState();f+=" ("+mxResources.get("realtimeCollaboration")+
+": ";1==k?(d.src=Editor.syncImage,f+=mxResources.get("online")):(d.src=Editor.syncProblemImage,f=null!=t&&null!=t.message?f+t.message:f+mxResources.get("disconnected"));f+=")";"sketch"==Editor.currentTheme&&(b.style.marginRight="6px",b.appendChild(d))}b.setAttribute("title",f)}}};
+App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("sketch"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.top="3px",b.style.right=""):(b.className="geItem",b.style.backgroundImage=
+"url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||"1"!=urlParams["live-ui"]?"8px":"30px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";return b};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var e=document.createElement("span");e.setAttribute("title",mxResources.get("help"));e.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
-var u=document.createElement("img");mxUtils.setOpacity(u,50);u.style.height="16px";u.style.width="16px";u.setAttribute("border","0");u.setAttribute("valign","bottom");u.setAttribute("src",Editor.helpImage);e.appendChild(u);mxEvent.addGestureListeners(e,mxUtils.bind(this,function(v){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(v)}));return e};Menus.prototype.addLinkToItem=function(k,e){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(e))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function k(t,p,F){this.ui=t;this.previousExtFonts=this.extFonts=p;this.prevCustomFonts=this.customFonts=F}f.apply(this,arguments);var e=this.editorUi,u=e.editor.graph,v=mxUtils.bind(u,u.isEnabled),B=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),E=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),L=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-e.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(t){return"file"!=t}));e.actions.addAction("new...",function(){var t=e.isOffline();if(t||"1"!=urlParams.newTempDlg||e.mode!=App.MODE_GOOGLE){var p=new NewDialog(e,t,!(e.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));e.showDialog(p.container,t?350:620,t?70:460,!0,!0,function(K){e.sidebar.hideTooltip();K&&null==e.getCurrentFile()&&e.showSplash()});
-p.init()}else{var F=function(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}};t=new TemplatesDialog(e,function(K,D,H){var J=H.libs,G=H.clibs;e.pickFolder(e.mode,function(P){e.createFile(D,K,null!=J&&0<J.length?J:null,null,function(){e.hideDialog()},null,P,null,null!=G&&0<G.length?G:null)},null==e.stateArg||null==e.stateArg.folderId)},null,null,null,"user",function(K,D,H){var J=new Date;J.setDate(J.getDate()-
-7);e.drive.listFiles(null,J,H?!0:!1,function(G){for(var P=[],T=0;T<G.items.length;T++)P.push(F(G.items[T]));K(P)},D)},function(K,D,H,J){e.drive.listFiles(K,null,J?!0:!1,function(G){for(var P=[],T=0;T<G.items.length;T++)P.push(F(G.items[T]));D(P)},H)},function(K,D,H){e.drive.getFile(K.id,function(J){D(J.data)},H)},null,null,!1,!1);e.showDialog(t.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});e.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(u.isEnabled()&&
-!u.isCellLocked(u.getDefaultParent())){var t=new NewDialog(e,null,!1,function(p){e.hideDialog();if(null!=p){var F=e.editor.graph.getFreeInsertPoint();u.setSelectionCells(e.importXml(p,Math.max(F.x,20),Math.max(F.y,20),!0,null,null,!0));u.scrollCellToVisible(u.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));e.showDialog(t.container,620,460,!0,!0,function(){e.sidebar.hideTooltip()});t.init()}})).isEnabled=v;var d=e.actions.addAction("shareCursor",
-function(){e.setShareCursorPosition(!e.isShareCursorPosition())});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.isShareCursorPosition()});d=e.actions.addAction("showRemoteCursors",function(){e.setShowRemoteCursors(!e.isShowRemoteCursors())});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.isShowRemoteCursors()});d=e.actions.addAction("points",function(){e.editor.graph.view.setUnit(mxConstants.POINTS)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==
-mxConstants.POINTS});d=e.actions.addAction("inches",function(){e.editor.graph.view.setUnit(mxConstants.INCHES)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.INCHES});d=e.actions.addAction("millimeters",function(){e.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.MILLIMETERS});d=e.actions.addAction("meters",function(){e.editor.graph.view.setUnit(mxConstants.METERS)});
-d.setToggleAction(!0);d.setSelectedCallback(function(){return e.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,["points","inches","millimeters","meters"],p)})));d=e.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=e.ruler?(e.ruler.destroy(),e.ruler=null):e.ruler=new mxDualRuler(e,e.editor.graph.view.unit);e.refresh()});d.setEnabled(e.canvasSupported&&9!=document.documentMode);
-d.setToggleAction(!0);d.setSelectedCallback(function(){return null!=e.ruler});d=e.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?e.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});d.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;d.setToggleAction(!0);d.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});d=e.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(t){e.setDarkMode(!Editor.isDarkMode());t=mxSettings.getUi();"atlas"!=t&&"min"!=t&&"sketch"!=t&&e.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return Editor.isDarkMode()});e.actions.addAction("properties...",function(){var t=new FilePropertiesDialog(e);e.showDialog(t.container,320,120,!0,!0);t.init()}).isEnabled=
-v;window.mxFreehand&&(e.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(u.isEnabled()){if(null==this.freehandWindow){var t=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(e,document.body.offsetWidth-420,102,176,t?120:84,t)}u.freehand.isDrawing()?u.freehand.stopDrawing():u.freehand.startDrawing();this.freehandWindow.window.setVisible(u.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return v()&&mxClient.IS_SVG});e.actions.put("exportXml",
-new Action(mxResources.get("formatXml")+"...",function(){var t=document.createElement("div");t.style.whiteSpace="nowrap";var p=null==e.pages||1>=e.pages.length,F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatXml"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F);var K=e.addCheckbox(t,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),D=e.addCheckbox(t,mxResources.get("compressed"),!0),H=e.addCheckbox(t,mxResources.get("allPages"),
-!p,p);H.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});t=new CustomDialog(e,t,mxUtils.bind(this,function(){e.downloadFile("xml",!D.checked,null,!K.checked,p||!H.checked)}),null,mxResources.get("export"));e.showDialog(t.container,300,200,!0,!0)}));Editor.enableExportUrl&&e.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){e.showPublishLinkDialog(mxResources.get("url"),!0,null,
-null,function(t,p,F,K,D,H,J,G,P){J=[];P&&J.push("tags=%7B%7D");t=new EmbedDialog(e,e.createLink(t,p,F,K,D,H,null,!0,J));e.showDialog(t.container,450,240,!0,!0);t.init()})}));e.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(t){e.spinner.stop();e.showHtmlDialog(mxResources.get("export"),null,t,function(p,F,K,D,H,J,G,P,T,W,U){e.createHtml(p,F,K,D,H,J,G,P,T,
-W,U,mxUtils.bind(this,function(V,l){var A=e.getBaseFilename(G);V='\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(A)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+l+"\n</body>\n</html>";e.saveData(A+(".drawio"==A.substring(A.lenth-7)?"":".drawio")+".html","html",V,"text/html")}))})})}));e.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
-!e.isOffline()&&!e.printPdfExport){var t=null==e.pages||1>=e.pages.length,p=document.createElement("div");p.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatPdf"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var K=function(){G!=this&&this.checked?(l.removeAttribute("disabled"),l.checked=!u.pageVisible):(l.setAttribute("disabled","disabled"),l.checked=!1)};F=200;var D=1,H=null;if(e.pdfPageExport&&
-!t){var J=function(){U.value=Math.max(1,Math.min(D,Math.max(parseInt(U.value),parseInt(T.value))));T.value=Math.max(1,Math.min(D,Math.min(parseInt(U.value),parseInt(T.value))))},G=e.addRadiobox(p,"pages",mxResources.get("allPages"),!0),P=e.addRadiobox(p,"pages",mxResources.get("pages")+":",!1,null,!0),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);var W=
-document.createElement("span");mxUtils.write(W,mxResources.get("to"));p.appendChild(W);var U=T.cloneNode(!0);p.appendChild(U);mxEvent.addListener(T,"focus",function(){P.checked=!0});mxEvent.addListener(U,"focus",function(){P.checked=!0});mxEvent.addListener(T,"change",J);mxEvent.addListener(U,"change",J);if(null!=e.pages&&(D=e.pages.length,null!=e.currentPage))for(J=0;J<e.pages.length;J++)if(e.currentPage==e.pages[J]){H=J+1;T.value=H;U.value=H;break}T.setAttribute("max",D);U.setAttribute("max",D);
-mxUtils.br(p);var V=e.addRadiobox(p,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=e.addCheckbox(p,mxResources.get("crop"),!1,!0),A=e.addCheckbox(p,mxResources.get("grid"),!1,!1);mxEvent.addListener(G,"change",K);mxEvent.addListener(P,"change",K);mxEvent.addListener(V,"change",K);F+=64}else V=e.addCheckbox(p,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),l=e.addCheckbox(p,mxResources.get("crop"),!u.pageVisible||!e.pdfPageExport,!e.pdfPageExport),A=e.addCheckbox(p,mxResources.get("grid"),
-!1,!1),e.pdfPageExport||mxEvent.addListener(V,"change",K);K=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==e.getServiceName();var M=null,Q=null;if(EditorUi.isElectronApp||K)Q=e.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),F+=30;K&&(M=e.addCheckbox(p,mxResources.get("transparentBackground"),!1),F+=30);p=new CustomDialog(e,p,mxUtils.bind(this,function(){var O=null;if(!t){O=parseInt(T.value);var R=parseInt(U.value);O=G.checked||O==H&&R==H?null:{from:Math.max(0,
-Math.min(D-1,O-1)),to:Math.max(0,Math.min(D-1,R-1))}}e.downloadFile("pdf",null,null,!V.checked,t?!0:!G.checked&&null==O,!l.checked,null!=M&&M.checked,null,null,A.checked,null!=Q&&Q.checked,O)}),null,mxResources.get("export"));e.showDialog(p.container,300,F,!0,!0)}else e.showDialog((new PrintDialog(e,mxResources.get("formatPdf"))).container,360,null!=e.pages&&1<e.pages.length&&(e.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));e.actions.addAction("open...",function(){e.pickFile()});
-e.actions.addAction("close",function(){function t(){null!=p&&p.removeDraft();e.fileLoaded(null)}var p=e.getCurrentFile();null!=p&&p.isModified()?e.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});e.actions.addAction("editShape...",mxUtils.bind(this,function(){u.getSelectionCells();if(1==u.getSelectionCount()){var t=u.getSelectionCell(),p=u.view.getState(t);null!=p&&null!=p.shape&&null!=p.shape.stencil&&(t=new EditShapeDialog(e,t,mxResources.get("editShape")+
-":",630,400),e.showDialog(t.container,640,480,!0,!1),t.init())}}));e.actions.addAction("revisionHistory...",function(){e.isRevisionHistorySupported()?e.spinner.spin(document.body,mxResources.get("loading"))&&e.getRevisions(mxUtils.bind(this,function(t,p){e.spinner.stop();t=new RevisionDialog(e,t,p);e.showDialog(t.container,640,480,!0,!0);t.init()}),mxUtils.bind(this,function(t){e.handleError(t)})):e.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});e.actions.addAction("createRevision",
-function(){e.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");d=e.actions.addAction("synchronize",function(){e.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(d.label=mxResources.get("refresh"));e.actions.addAction("upload...",function(){var t=e.getCurrentFile();null!=t&&(window.drawdata=e.getFileData(),t=null!=t.getTitle()?t.getTitle():e.defaultFilename,e.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
-(e.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(t),null,!0))});"undefined"!==typeof MathJax&&(d=e.actions.addAction("mathematicalTypesetting",function(){var t=new ChangePageSetup(e);t.ignoreColor=!0;t.ignoreImage=!0;t.mathEnabled=!e.isMathEnabled();u.model.execute(t)}),d.setToggleAction(!0),d.setSelectedCallback(function(){return e.isMathEnabled()}),d.isEnabled=v);isLocalStorage&&(d=e.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
-mxSettings.save()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=e.actions.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&e.editor.autosave});e.actions.addAction("editGeometry...",function(){for(var t=u.getSelectionCells(),p=[],F=0;F<t.length;F++)u.getModel().isVertex(t[F])&&p.push(t[F]);0<p.length&&(t=new EditGeometryDialog(e,p),e.showDialog(t.container,
-200,270,!0,!0),t.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;e.actions.addAction("copyStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&(q=u.copyStyle(u.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");e.actions.addAction("pasteStyle",function(){u.isEnabled()&&!u.isSelectionEmpty()&&null!=q&&u.pasteStyle(q,u.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");e.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!e.isOffline()){var t=
-new BackgroundImageDialog(e,function(p){e.setBackgroundImage(p)});e.showDialog(t.container,400,170,!0,!0);t.init()}}));e.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){e.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V,l,A){P=parseInt(t);!isNaN(P)&&0<P&&(A?e.downloadFile("remoteSvg",null,null,F,null,G,p,t,J,null,D):e.exportSvg(P/100,p,F,
-K,D,H,J,!G,!1,T,U,V,l))}),!0,null,"svg",!0)}));e.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){e.isExportToCanvas()?e.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&e.exportImage(t/100,p,F,K,D,J,!G,!1,null,W,null,U,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-e.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,K,D){e.downloadFile(p?"xmlpng":"png",null,null,t,null,null,F,K,D)}),!1,!0)}));e.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){e.isExportToCanvas()?e.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(t,p,F,K,D,H,J,G,P,T,W,U,V){t=parseInt(t);!isNaN(t)&&0<t&&e.exportImage(t/100,!1,
-F,K,!1,J,!G,!1,"jpeg",W,null,U,V)}),!0,!1,"jpeg",!0):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||e.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(t,p,F,K,D){e.downloadFile("jpeg",null,null,t,null,null,null,K,D)}),!0,!0)}));d=e.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var t=mxUtils.sortCells(u.model.getTopmostCells(u.getSelectionCells())),p=mxUtils.getXml(0==t.length?e.editor.getGraphXml():u.encodeCells(t));e.copyImage(t,p)}));d.visible=
-Editor.enableNativeCipboard&&e.isExportToCanvas()&&!mxClient.IS_SF;d=e.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){u.setShadowVisible(!u.shadowVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return u.shadowVisible});e.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?e.alert(e.editor.appName+" "+EditorUi.VERSION):e.openLink("https://www.diagrams.net/")}));
-e.actions.addAction("support...",function(){EditorUi.isElectronApp?e.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):e.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});e.actions.addAction("exportOptionsDisabled...",function(){e.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});e.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-e.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):e.openLink("shortcuts.svg")});e.actions.addAction("feedback...",function(){var t=new FeedbackDialog(e);e.showDialog(t.container,610,360,!0,!1);t.init()});e.actions.addAction("quickStart...",function(){e.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});d=e.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(e,document.body.offsetWidth-400,60,
-212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));d=e.actions.addAction("findReplace",mxUtils.bind(this,function(t,p){var F=(t=u.isEnabled()&&(null==p||!mxEvent.isShiftDown(p)))?"findReplace":"find";p=F+"Window";if(null==this[p]){var K=t?"min"==uiTheme?330:300:240;this[p]=new FindWindow(e,document.body.offsetWidth-(K+20),100,K,t?"min"==uiTheme?304:288:170,t);this[p].window.addListener("show",function(){e.fireEvent(new mxEventObject(F))});this[p].window.addListener("hide",function(){e.fireEvent(new mxEventObject(F))});
-this[p].window.setVisible(!0)}else this[p].window.setVisible(!this[p].window.isVisible())}),null,null,Editor.ctrlKey+"+F");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){var t=u.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[t]&&this[t].window.isVisible()}));e.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var t=null==e.pages||1>=e.pages.length;if(t)e.exportVisio();else{var p=document.createElement("div");p.style.whiteSpace=
-"nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("formatVsdx"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(F);var K=e.addCheckbox(p,mxResources.get("allPages"),!t,t);K.style.marginBottom="16px";t=new CustomDialog(e,p,mxUtils.bind(this,function(){e.exportVisio(!K.checked)}),null,mxResources.get("export"));e.showDialog(t.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&e.actions.addAction("configuration...",
-function(){var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginRight="4px";t.checked=mxSettings.getShowStartScreen();t.defaultChecked=t.checked;if(e.isSettingsEnabled()&&"1"==urlParams.sketch){var p=document.createElement("span");p.style["float"]="right";p.style.cursor="pointer";p.style.userSelect="none";p.style.marginTop="-4px";p.appendChild(t);mxUtils.write(p,mxResources.get("showStartScreen"));mxEvent.addListener(p,"click",function(D){mxEvent.getSource(D)!=t&&
-(t.checked=!t.checked)});header=p}var F=localStorage.getItem(Editor.configurationKey);p=[[mxResources.get("reset"),function(D,H){e.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(D)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),e.hideDialog(),e.alert(mxResources.get("restartForChangeRequired")))}catch(J){e.handleError(J)}})},"Shift+Click to Reset Settings"]];var K=e.actions.get("plugins");
-null!=K&&"1"==urlParams.sketch&&p.push([mxResources.get("plugins"),K.funct]);EditorUi.isElectronApp||p.push([mxResources.get("share"),function(D,H){if(0<H.value.length)try{var J=JSON.parse(H.value),G=window.location.protocol+"//"+window.location.host+"/"+e.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(J)),P=new EmbedDialog(e,G);e.showDialog(P.container,450,240,!0);P.init()}catch(T){e.handleError(T)}else e.handleError({message:mxResources.get("invalidInput")})}]);p=new TextareaDialog(e,mxResources.get("configuration")+
-":",null!=F?JSON.stringify(JSON.parse(F),null,2):"",function(D){if(null!=D)try{if(null!=t.parentNode&&(mxSettings.setShowStartScreen(t.checked),mxSettings.save()),D==F)e.hideDialog();else{if(0<D.length){var H=JSON.parse(D);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);e.hideDialog();e.alert(mxResources.get("restartForChangeRequired"))}}catch(J){e.handleError(J)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-p,t.parentNode);e.showDialog(p.container,620,460,!0,!1);p.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(t,p){var F=mxUtils.bind(this,function(D){var H=""==D?mxResources.get("automatic"):mxLanguageMap[D],J=null;""!=H&&(J=t.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(D);mxSettings.save();mxClient.language=D;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);e.alert(mxResources.get("restartForChangeRequired"))}),
-p),(D==mxLanguage||""==D&&null==mxLanguage)&&t.addCheckmark(J,Editor.checkmarkImage));return J});F("");t.addSeparator(p);for(var K in mxLanguageMap)F(K)})));var m=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(t){var p=m.apply(this,arguments);if(null!=p&&"1"!=urlParams.embed&&("atlas"!=uiTheme||"1"==urlParams["live-ui"])){var F=this.get("1"==urlParams["live-ui"]?"theme":"language");if(null!=F){F=p.addMenu("",F.funct);F.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
-"preferences":"language"));F.className="geAdaptiveAsset";F.style.boxSizing="border-box";F.style.width="19px";F.style.height="19px";F.style.paddingTop="2px";F.style.paddingLeft="4px";F.style.zIndex="1";F.style.position="absolute";F.style.display="block";F.style.cursor="pointer";F.style.right="20px";F.style.top="min"==uiTheme?"2px":"0px";var K=document.createElement("div");K.className="geToolbarButton";K.style.backgroundImage="url("+Editor.globeImage+")";K.style.backgroundPosition="center center";K.style.backgroundRepeat=
-"no-repeat";K.style.backgroundSize="100% 100%";K.style.filter="none";K.style.position="absolute";K.style.height="100%";K.style.width="100%";K.style.marginTop="atlas"==uiTheme?"8px":"2px";K.style.marginLeft="2px";K.style.zIndex="1";F.appendChild(K);"1"!=urlParams["live-ui"]&&mxUtils.setOpacity(F,70);"1"==urlParams.winCtrls&&(F.style.right="95px",F.style.width="19px",F.style.height="19px",F.style.webkitAppRegion="no-drag",K.style.webkitAppRegion="no-drag");"atlas"==uiTheme&&(F.style.filter="invert(100%)",
-F.style.opacity="0.85");document.body.appendChild(F);p.langIcon=F;if("1"==urlParams["live-ui"]){var D=mxUtils.bind(this,function(){K.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"});this.editorUi.addListener("darkModeChanged",D);D()}this.editorUi.switchThemeElt=F}}return p}}e.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
-e.actions.addAction("runLayout",function(){var t=new TextareaDialog(e,"Run Layouts:",JSON.stringify(e.customLayoutConfig,null,2),function(p){if(0<p.length)try{var F=JSON.parse(p);e.executeLayouts(u.createLayouts(F));e.customLayoutConfig=F;e.hideDialog()}catch(K){e.handleError(K)}},null,null,null,null,function(p,F){var K=mxUtils.button(mxResources.get("copy"),function(){try{var D=F.value;F.value=JSON.stringify(JSON.parse(D));F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():
-document.execCommand("selectAll",!1,null);document.execCommand("copy");e.alert(mxResources.get("copiedToClipboard"));F.value=D}catch(H){e.handleError(H)}});K.setAttribute("title","copy");K.className="geBtn";p.appendChild(K)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");e.showDialog(t.container,620,460,!0,!0);t.init()});d=this.get("layout");var n=d.funct;d.funct=function(t,p){n.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){var F=null,K=20,D=20,H=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=F){var l=e.editor.graph,A=new mxOrgChartLayout(l,F,K,D),M=l.getDefaultParent();1<l.model.getChildCount(l.getSelectionCell())&&(M=l.getSelectionCell());A.execute(M)}},J=document.createElement("div"),G=document.createElement("div");G.style.marginTop="6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("orgChartType")+": ");J.appendChild(G);var P=document.createElement("select");P.style.width="200px";P.style.boxSizing="border-box";
-G=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var T=0;T<G.length;T++){var W=document.createElement("option");mxUtils.write(W,G[T]);W.value=T;2==T&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){F=P.value});J.appendChild(P);G=document.createElement("div");G.style.marginTop=
-"6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("parentChildSpacing")+": ");J.appendChild(G);var U=document.createElement("input");U.type="number";U.value=K;U.style.width="200px";U.style.boxSizing="border-box";J.appendChild(U);mxEvent.addListener(U,"change",function(){K=U.value});G=document.createElement("div");G.style.marginTop="6px";G.style.display="inline-block";G.style.width="140px";mxUtils.write(G,mxResources.get("siblingSpacing")+": ");J.appendChild(G);
-var V=document.createElement("input");V.type="number";V.value=D;V.style.width="200px";V.style.boxSizing="border-box";J.appendChild(V);mxEvent.addListener(V,"change",function(){D=V.value});J=new CustomDialog(e,J,function(){null==F&&(F=2);e.loadOrgChartLayouts(H)});e.showDialog(J.container,355,140,!0,!0)},p,null,v());t.addSeparator(p);t.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var F=new mxParallelEdgeLayout(u);F.checkOverlap=!0;e.prompt(mxResources.get("spacing"),F.spacing,
-mxUtils.bind(this,function(K){F.spacing=K;e.executeLayout(function(){F.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}))}),p);t.addSeparator(p);e.menus.addMenuItem(t,"runLayout",p,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(t,p){if(!mxClient.IS_CHROMEAPP&&e.isOffline())this.addMenuItems(t,["about"],p);else{var F=t.addItem("Search:",null,null,p,null,null,!1);F.style.backgroundColor=Editor.isDarkMode()?"#505759":
-"whiteSmoke";F.style.cursor="default";var K=document.createElement("input");K.setAttribute("type","text");K.setAttribute("size","25");K.style.marginLeft="8px";mxEvent.addListener(K,"keydown",mxUtils.bind(this,function(D){var H=mxUtils.trim(K.value);13==D.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),K.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
-label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==D.keyCode&&(K.value="")}));F.firstChild.nextSibling.appendChild(K);mxEvent.addGestureListeners(K,function(D){document.activeElement!=K&&K.focus();mxEvent.consume(D)},function(D){mxEvent.consume(D)},function(D){mxEvent.consume(D)});window.setTimeout(function(){K.focus()},0);EditorUi.isElectronApp?(e.actions.addAction("website...",function(){e.openLink("https://www.diagrams.net")}),e.actions.addAction("check4Updates",
-function(){e.checkForUpdates()}),this.addMenuItems(t,"- keyboardShortcuts quickStart website support -".split(" "),p),"1"!=urlParams.disableUpdate&&this.addMenuItems(t,["check4Updates"],p),this.addMenuItems(t,["openDevTools","-","about"],p)):this.addMenuItems(t,"- keyboardShortcuts quickStart support - about".split(" "),p)}"1"==urlParams.test&&(t.addSeparator(p),this.addSubmenu("testDevelop",t,p))})));mxResources.parse("diagramLanguage=Diagram Language");e.actions.addAction("diagramLanguage...",function(){var t=
-prompt("Language Code",Graph.diagramLanguage||"");null!=t&&(Graph.diagramLanguage=0<t.length?t:null,u.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
-mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");e.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!u.isSelectionEmpty()){var t=u.cloneCells(u.getSelectionCells()),p=u.getBoundingBoxFromGeometry(t);t=u.moveCells(t,-p.x,-p.y);e.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+p.width+", "+p.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(t)))+
-"'),")}}));e.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var t=u.getGraphBounds(),p=u.view.translate,F=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",t.x/F-p.x,t.y/F-p.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;")}));e.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=e.pages&&null!=e.getCurrentFile()?e.getCurrentFile().getAnonymizedXmlForPages(e.pages):"";t=new TextareaDialog(e,"Paste Data:",t,function(p){if(0<p.length)try{var F=
-function(G){function P(R){if(null==O[R]){if(O[R]=!0,null!=U[R]){for(;0<U[R].length;){var S=U[R].pop();P(S)}delete U[R]}}else mxLog.debug(T+": Visited: "+R)}var T=G.parentNode.id,W=G.childNodes;G={};for(var U={},V=null,l={},A=0;A<W.length;A++){var M=W[A];if(null!=M.id&&0<M.id.length)if(null==G[M.id]){G[M.id]=M.id;var Q=M.getAttribute("parent");null==Q?null!=V?mxLog.debug(T+": Multiple roots: "+M.id):V=M.id:(null==U[Q]&&(U[Q]=[]),U[Q].push(M.id))}else l[M.id]=M.id}W=Object.keys(l);0<W.length?(W=T+": "+
-W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(T+": Checked");var O={};null==V?mxLog.debug(T+": No root"):(P(V),Object.keys(O).length!=Object.keys(G).length&&(mxLog.debug(T+": Invalid tree: (see console)"),console.log(T+": Invalid tree",U)))};"<"!=p.charAt(0)&&(p=Graph.decompress(p),mxLog.debug("See console for uncompressed XML"),console.log("xml",p));var K=mxUtils.parseXml(p),D=e.getPagesForNode(K.documentElement,"mxGraphModel");if(null!=D&&0<D.length)try{var H=
-e.getHashValueForPages(D);mxLog.debug("Checksum: ",H)}catch(G){mxLog.debug("Error: ",G.message)}else mxLog.debug("No pages found for checksum");var J=K.getElementsByTagName("root");for(p=0;p<J.length;p++)F(J[p]);mxLog.show()}catch(G){e.handleError(G),null!=window.console&&console.error(G)}});e.showDialog(t.container,620,460,!0,!0);t.init()}));var z=null;e.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=e.pages){var t=new TextareaDialog(e,"Diff/Sync:","",function(p){var F=e.getCurrentFile();
-if(0<p.length&&null!=F)try{var K=JSON.parse(p);F.patch([K],null,!0);e.hideDialog()}catch(D){e.handleError(D)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(p,F){z=e.getPagesForXml(e.getFileData(!0));t.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+e.getHashValueForPages(z)}],["Diff",function(p,F){try{t.textarea.value=JSON.stringify(e.diffPages(z,e.pages),null,2)}catch(K){e.handleError(K)}}]]);null==z?(z=e.getPagesForXml(e.getFileData(!0)),t.textarea.value=
-"Snapshot created "+(new Date).toLocaleString()+" Checksum "+e.getHashValueForPages(z)):t.textarea.value=JSON.stringify(e.diffPages(z,e.pages),null,2);e.showDialog(t.container,620,460,!0,!0);t.init()}else e.alert("No pages")}));e.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var t=e.getCurrentFile();console.log("editorUi",e,"file",t);if(null!=t&&t.isRealtime()){console.log("Checksum ownPages",e.getHashValueForPages(t.ownPages));console.log("Checksum theirPages",e.getHashValueForPages(t.theirPages));
-console.log("diff ownPages/theirPages",e.diffPages(t.ownPages,t.theirPages));var p=t.getShadowPages();null!=p&&(console.log("Checksum shadowPages",e.getHashValueForPages(p)),console.log("diff shadowPages/ownPages",e.diffPages(p,t.ownPages)),console.log("diff ownPages/shadowPages",e.diffPages(t.ownPages,p)),console.log("diff theirPages/shadowPages",e.diffPages(t.theirPages,p)));null!=t.sync&&null!=t.sync.snapshot&&(console.log("Checksum snapshot",e.getHashValueForPages(t.sync.snapshot)),console.log("diff ownPages/snapshot",
-e.diffPages(t.ownPages,t.sync.snapshot)),console.log("diff theirPages/snapshot",e.diffPages(t.theirPages,t.sync.snapshot)),null!=e.pages&&console.log("diff snapshot/actualPages",e.diffPages(t.sync.snapshot,e.pages)));null!=e.pages&&(console.log("diff ownPages/actualPages",e.diffPages(t.ownPages,e.pages)),console.log("diff theirPages/actualPages",e.diffPages(t.theirPages,e.pages)))}null!=t&&console.log("Shadow pages",[e.getXmlForPages(t.getShadowPages())]);null!=e.pages&&console.log("Checksum actualPages",
-e.getHashValueForPages(e.pages))}));e.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",e);var t=e.getCurrentFile();null!=t&&t.isRealtime()&&null!=t.shadowPages&&(console.log("patching actualPages to shadowPages",t.patch([e.diffPages(t.shadowPages,e.pages)])),t.ownPages=e.clonePages(e.pages),t.theirPages=e.clonePages(e.pages),t.shadowPages=e.clonePages(e.pages),null!=t.sync&&(t.sync.snapshot=e.clonePages(e.pages)))}));e.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){u.model.beginUpdate();try{var t=u.model.cells,p=0,F=[],K=[],D;for(D in t){var H=t[D],J=u.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=J&&"data:"==J.substring(0,5)&&(null==F[J]&&(F[J]=(F[J]||0)+1,p++),K.push(H))}u.setCellStyles(mxConstants.STYLE_IMAGE,null,K);console.log("Removed",p,"image(s) from",K.length,"cell(s): ",[K,F])}finally{u.model.endUpdate()}}));e.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(e,u.getModel())}));e.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var t=new mxImageExport,p=u.getGraphBounds(),F=u.view.scale,K=mxUtils.createXmlDocument(),D=K.createElement("output");K.appendChild(D);K=new mxXmlCanvas2D(D);K.translate(Math.floor((1-p.x)/F),Math.floor((1-p.y)/F));K.scale(1/F);var H=0,J=K.save;K.save=function(){H++;J.apply(this,arguments)};var G=K.restore;K.restore=function(){H--;G.apply(this,arguments)};var P=t.drawShape;t.drawShape=function(T){mxLog.debug("entering shape",T,H);P.apply(this,arguments);mxLog.debug("leaving shape",
-T,H)};t.drawState(u.getView().getState(u.model.root),K);mxLog.show();mxLog.debug(mxUtils.getXml(D));mxLog.debug("stateCounter",H)}));e.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
-p)})))}e.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!e.isOffline()?e.showDialog((new MoreShapesDialog(e,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):e.showDialog((new MoreShapesDialog(e,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});e.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(t){u.isEnabled()&&(t=new mxCell("",new mxGeometry(0,0,120,120),e.defaultCustomShapeStyle),t.vertex=!0,t=new EditShapeDialog(e,
-t,mxResources.get("editShape")+":",630,400),e.showDialog(t.container,640,480,!0,!1),t.init())})).isEnabled=v;e.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(t){e.spinner.stop();e.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",t,function(p,F,K,D,H,J,G,P,T,W,U){e.createHtml(p,F,K,D,H,J,G,P,T,W,U,mxUtils.bind(this,function(V,
-l){var A=new EmbedDialog(e,V+"\n"+l,null,null,function(){var M=window.open(),Q=M.document;if(null!=Q){"CSS1Compat"===document.compatMode&&Q.writeln("<!DOCTYPE html>");Q.writeln("<html>");Q.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Q.writeln("<body>");Q.writeln(V);var O=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;O&&Q.writeln(l);Q.writeln("</body>");Q.writeln("</html>");Q.close();if(!O){var R=M.document.createElement("div");
-R.marginLeft="26px";R.marginTop="26px";mxUtils.write(R,mxResources.get("updatingDocument"));O=M.document.createElement("img");O.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");O.style.marginLeft="6px";R.appendChild(O);M.document.body.insertBefore(R,M.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(l)[1];Q.body.appendChild(S);R.parentNode.removeChild(R)},
-20)}}else e.handleError({message:mxResources.get("errorUpdatingPreview")})});e.showDialog(A.container,450,240,!0,!0);A.init()}))})})}));e.actions.put("liveImage",new Action("Live image...",function(){var t=e.getCurrentFile();null!=t&&e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(p){e.spinner.stop();null!=p?(p=new EmbedDialog(e,'<img src="'+(t.constructor!=DriveFile?p:"https://drive.google.com/uc?id="+t.getId())+'"/>'),e.showDialog(p.container,
-450,240,!0,!0),p.init()):e.handleError({message:mxResources.get("invalidPublicUrl")})})}));e.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){e.showEmbedImageDialog(function(t,p,F,K,D,H){e.spinner.spin(document.body,mxResources.get("loading"))&&e.createEmbedImage(t,p,F,K,D,H,function(J){e.spinner.stop();J=new EmbedDialog(e,J);e.showDialog(J.container,450,240,!0,!0);J.init()},function(J){e.spinner.stop();e.handleError(J)})},mxResources.get("image"),mxResources.get("retina"),
-e.isExportToCanvas())}));e.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){e.showEmbedImageDialog(function(t,p,F,K,D,H){e.spinner.spin(document.body,mxResources.get("loading"))&&e.createEmbedSvg(t,p,F,K,D,H,function(J){e.spinner.stop();J=new EmbedDialog(e,J);e.showDialog(J.container,450,240,!0,!0);J.init()},function(J){e.spinner.stop();e.handleError(J)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-e.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var t=u.getGraphBounds();e.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(t.height/u.view.scale)+2,function(p,F,K,D,H,J,G,P,T){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(W){e.spinner.stop();var U=[];T&&U.push("tags=%7B%7D");W=new EmbedDialog(e,'<iframe frameborder="0" style="width:'+G+";height:"+P+';" src="'+e.createLink(p,F,K,D,H,J,W,null,
-U)+'"></iframe>');e.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));e.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.textAlign="center";t.style.width="100%";t.style.left="0px";var p=document.createElement("a");p.setAttribute("href","javascript:void(0);");p.setAttribute("target","_blank");p.style.cursor="pointer";mxUtils.write(p,mxResources.get("getNotionChromeExtension"));
-t.appendChild(p);mxEvent.addListener(p,"click",function(F){e.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(F)});e.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(F,K,D,H,J,G,P,T,W){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(U){e.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");U=new EmbedDialog(e,e.createLink(F,K,D,H,J,G,U,null,V,!0));
-e.showDialog(U.container,450,240,!0,!0);U.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",t)}));e.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){e.showPublishLinkDialog(null,null,null,null,function(t,p,F,K,D,H,J,G,P){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),function(T){e.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");T=new EmbedDialog(e,e.createLink(t,p,F,K,D,H,T,null,W));e.showDialog(T.container,450,240,
-!0,!0);T.init()})})}));e.actions.addAction("microsoftOffice...",function(){e.openLink("https://office.draw.io")});e.actions.addAction("googleDocs...",function(){e.openLink("http://docsaddon.draw.io")});e.actions.addAction("googleSlides...",function(){e.openLink("https://slidesaddon.draw.io")});e.actions.addAction("googleSheets...",function(){e.openLink("https://sheetsaddon.draw.io")});e.actions.addAction("googleSites...",function(){e.spinner.spin(document.body,mxResources.get("loading"))&&e.getPublicUrl(e.getCurrentFile(),
-function(t){e.spinner.stop();t=new GoogleSitesDialog(e,t);e.showDialog(t.container,420,256,!0,!0);t.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)d=e.actions.addAction("scratchpad",function(){e.toggleScratchpad()}),d.setToggleAction(!0),d.setSelectedCallback(function(){return null!=e.scratchpad}),"0"!=urlParams.plugins&&e.actions.addAction("plugins...",function(){e.showDialog((new PluginsDialog(e)).container,380,240,!0,!1)});d=e.actions.addAction("search",function(){var t=e.sidebar.isEntryVisible("search");
-e.sidebar.showPalette("search",!t);isLocalStorage&&(mxSettings.settings.search=!t,mxSettings.save())});d.label=mxResources.get("searchShapes");d.setToggleAction(!0);d.setSelectedCallback(function(){return e.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(e.actions.get("save").funct=function(t){u.isEditing()&&u.stopEditing();var p="0"!=urlParams.pages||null!=e.pages&&1<e.pages.length?e.getFileData(!0):mxUtils.getXml(e.editor.getGraphXml());if("json"==urlParams.proto){var F=e.createLoadMessage("save");
-F.xml=p;t&&(F.exit=!0);p=JSON.stringify(F)}(window.opener||window.parent).postMessage(p,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(e.editor.modified=!1,e.editor.setStatus(""));t=e.getCurrentFile();null==t||t.constructor==EmbedFile||t.constructor==LocalFile&&null==t.mode||e.saveFile()},e.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?e.sendEmbeddedSvgExport():e.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
-e.actions.addAction("exit",function(){if("1"==urlParams.embedInline)e.sendEmbeddedSvgExport();else{var t=function(){e.editor.modified=!1;var p="json"==urlParams.proto?JSON.stringify({event:"exit",modified:e.editor.modified}):"";(window.opener||window.parent).postMessage(p,"*")};e.editor.modified?e.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(t,p){e.isExportToCanvas()?(this.addMenuItems(t,
-["exportPng"],p),e.jpgSupported&&this.addMenuItems(t,["exportJpg"],p)):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPng","exportJpg"],p);this.addMenuItems(t,["exportSvg","-"],p);e.isOffline()||e.printPdfExport?this.addMenuItems(t,["exportPdf"],p):e.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["exportPdf"],p);mxClient.IS_IE||"undefined"===typeof VsdxExport&&e.isOffline()||this.addMenuItems(t,["exportVsdx"],p);this.addMenuItems(t,["-",
-"exportHtml","exportXml","exportUrl"],p);e.isOffline()||(t.addSeparator(p),this.addMenuItem(t,"export",p).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(t,p){function F(H){H.pickFile(function(J){e.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(J,function(G){var P="data:image/"==G.getData().substring(0,11)?D(G.getTitle()):"text/xml";/\.svg$/i.test(G.getTitle())&&!e.editor.isDataSvg(G.getData())&&(G.setData(Editor.createSvgDataUri(G.getData())),
-P="image/svg+xml");K(G.getData(),P,G.getTitle())},function(G){e.handleError(G,null!=G?mxResources.get("errorLoadingFile"):null)},H==e.drive)},!0)}var K=mxUtils.bind(this,function(H,J,G){var P=u.view,T=u.getGraphBounds(),W=u.snap(Math.ceil(Math.max(0,T.x/P.scale-P.translate.x)+4*u.gridSize)),U=u.snap(Math.ceil(Math.max(0,(T.y+T.height)/P.scale-P.translate.y)+4*u.gridSize));"data:image/"==H.substring(0,11)?e.loadImage(H,mxUtils.bind(this,function(V){var l=!0,A=mxUtils.bind(this,function(){e.resizeImage(V,
-H,mxUtils.bind(this,function(M,Q,O){M=l?Math.min(1,Math.min(e.maxImageSize/Q,e.maxImageSize/O)):1;e.importFile(H,J,W,U,Math.round(Q*M),Math.round(O*M),G,function(R){e.spinner.stop();u.setSelectionCells(R);u.scrollCellToVisible(u.getSelectionCell())})}),l)});H.length>e.resampleThreshold?e.confirmImageResize(function(M){l=M;A()}):A()}),mxUtils.bind(this,function(){e.handleError({message:mxResources.get("cannotOpenFile")})})):e.importFile(H,J,W,U,0,0,G,function(V){e.spinner.stop();u.setSelectionCells(V);
-u.scrollCellToVisible(u.getSelectionCell())})}),D=mxUtils.bind(this,function(H){var J="text/xml";/\.png$/i.test(H)?J="image/png":/\.jpe?g$/i.test(H)?J="image/jpg":/\.gif$/i.test(H)?J="image/gif":/\.pdf$/i.test(H)&&(J="application/pdf");return J});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){F(e.drive)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){F(e.oneDrive)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){F(e.dropbox)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){F(e.gitHub)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){F(e.gitLab)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){F(e.trello)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&
-t.addItem(mxResources.get("browser")+"...",null,function(){e.importLocalFile(!1)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.importLocalFile(!0)},p);e.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(e,"",mxResources.get("import"),function(J){if(null!=J&&0<J.length&&e.spinner.spin(document.body,mxResources.get("loading"))){var G=/(\.png)($|\?)/i.test(J)?"image/png":"text/xml";e.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(J),function(P){K(P,G,J)},function(){e.spinner.stop();e.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==G)}},mxResources.get("url"));e.showDialog(H.container,300,80,!0,!0);H.init()},p))}))).isEnabled=v;this.put("theme",new Menu(mxUtils.bind(this,function(t,p){var F="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(t,["toggleDarkMode"],p);t.addSeparator(p);
-var K=t.addItem(mxResources.get("default"),null,function(){e.setCurrentTheme("")},p);("kennedy"==F||"dark"==F||"atlas"!=F&&"min"!=F&&"sketch"!=F)&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("sketch"),null,function(){e.setCurrentTheme("sketch")},p);"sketch"==F&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("minimal"),null,function(){e.setCurrentTheme("min")},p);"min"==F&&t.addCheckmark(K,Editor.checkmarkImage);K=t.addItem(mxResources.get("atlas"),null,
-function(){e.setCurrentTheme("atlas")},p);"atlas"==F&&t.addCheckmark(K,Editor.checkmarkImage)})));d=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var t=this.editorUi.getCurrentFile();if(null!=t)if(t.constructor==LocalFile&&null!=t.fileHandle)e.showSaveFilePicker(mxUtils.bind(e,function(F,K){t.invalidFileHandle=null;t.fileHandle=F;t.title=K.name;t.desc=K;e.save(K.name)}),null,e.createFileSystemOptions(t.getTitle()));else{var p=null!=t.getTitle()?t.getTitle():this.editorUi.defaultFilename;
-p=new FilenameDialog(this.editorUi,p,mxResources.get("rename"),mxUtils.bind(this,function(F){null!=F&&0<F.length&&null!=t&&F!=t.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&t.rename(F,mxUtils.bind(this,function(K){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(K){this.editorUi.handleError(K,null!=K?mxResources.get("errorRenamingFile"):null)}))}),t.constructor==DriveFile||t.constructor==StorageFile?mxResources.get("diagramName"):null,function(F){if(null!=
-F&&0<F.length)return!0;e.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,e.editor.fileExtensions);this.editorUi.showDialog(p.container,340,96,!0,!0);p.init()}}));d.isEnabled=function(){return this.enabled&&v.apply(this,arguments)};d.visible="1"!=urlParams.embed;e.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var t=e.getCurrentFile();if(null!=t){var p=e.getCopyFilename(t);t.constructor==DriveFile?(p=new CreateDialog(e,
-p,mxUtils.bind(this,function(F,K){"_blank"==K?e.editor.editAsNew(e.getFileData(),F):("download"==K&&(K=App.MODE_GOOGLE),null!=F&&0<F.length&&(K==App.MODE_GOOGLE?e.spinner.spin(document.body,mxResources.get("saving"))&&t.saveAs(F,mxUtils.bind(this,function(D){t.desc=D;t.save(!1,mxUtils.bind(this,function(){e.spinner.stop();t.setModified(!1);t.addAllSavedStatus()}),mxUtils.bind(this,function(H){e.handleError(H)}))}),mxUtils.bind(this,function(D){e.handleError(D)})):e.createFile(F,e.getFileData(!0),
-null,K)))}),mxUtils.bind(this,function(){e.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,e.editor.fileExtensions),e.showDialog(p.container,420,380,!0,!0),p.init()):e.editor.editAsNew(this.editorUi.getFileData(!0),p)}}));e.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(t,p){e.appIconClicked(p)}));e.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var t=e.getCurrentFile();
-if(t.getMode()==App.MODE_GOOGLE||t.getMode()==App.MODE_ONEDRIVE){var p=!1;if(t.getMode()==App.MODE_GOOGLE&&null!=t.desc.parents)for(var F=0;F<t.desc.parents.length;F++)if(t.desc.parents[F].isRoot){p=!0;break}e.pickFolder(t.getMode(),mxUtils.bind(this,function(K){e.spinner.spin(document.body,mxResources.get("moving"))&&t.move(K,mxUtils.bind(this,function(D){e.spinner.stop()}),mxUtils.bind(this,function(D){e.handleError(D)}))}),null,!0,p)}}));this.put("publish",new Menu(mxUtils.bind(this,function(t,
-p){this.addMenuItems(t,["publishLink"],p)})));e.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){e.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var t=e.getCurrentFile();null!=t&&t.share()}catch(p){e.handleError(p)}}));this.put("embed",new Menu(mxUtils.bind(this,function(t,p){var F=e.getCurrentFile();null==F||F.getMode()!=App.MODE_GOOGLE&&F.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(F.getTitle())||
-this.addMenuItems(t,["liveImage","-"],p);this.addMenuItems(t,["embedImage","embedSvg","-","embedHtml"],p);navigator.standalone||e.isOffline()||this.addMenuItems(t,["embedIframe"],p);"1"==urlParams.embed||e.isOffline()||this.addMenuItems(t,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),p)})));e.addInsertItem=function(t,p,F,K){("plantUml"!=K||EditorUi.enablePlantUml&&!e.isOffline())&&t.addItem(F,null,mxUtils.bind(this,function(){if("fromText"==K||"formatSql"==K||
-"plantUml"==K||"mermaid"==K){var D=new ParseDialog(e,F,K);e.showDialog(D.container,620,420,!0,!1);e.dialog.container.style.overflow="auto"}else D=new CreateGraphDialog(e,F,K),e.showDialog(D.container,620,420,!0,!1);D.init()}),p,null,v())};var C=function(t){u.getModel().beginUpdate();try{t=u.addCell(t),u.fireEvent(new mxEventObject("cellsInserted","cells",[t]))}finally{u.getModel().endUpdate()}u.scrollCellToVisible(t);u.setSelectionCell(t);u.container.focus();u.editAfterInsert&&u.startEditing(t);window.setTimeout(function(){null!=
-e.hoverIcons&&e.hoverIcons.update(u.view.getState(t))},0);return t},x=function(t,p,F,K,D){t=new mxCell(t,new mxGeometry(0,0,p,F),K);t.vertex=!0;null==D&&(D=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([t],!0)));t.geometry.x=D.x;t.geometry.y=D.y;return C(t)};e.actions.put("insertText",new Action(mxResources.get("text"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&u.startEditingAtCell(x("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",
-null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=v;e.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&x("",120,60,"whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"D")).isEnabled=v;e.actions.put("insertNote",new Action(mxResources.get("note"),function(t){u.isEnabled()&&
-!u.isCellLocked(u.getDefaultParent())&&x("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"S")).isEnabled=v;e.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&
-x("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())},null,null,"F")).isEnabled=v;e.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(t){u.isEnabled()&&!u.isCellLocked(u.getDefaultParent())&&x("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint())})).isEnabled=v;e.actions.put("insertEdge",new Action(mxResources.get("line"),function(t){if(u.isEnabled()&&
-!u.isCellLocked(u.getDefaultParent())){var p=u.defaultEdgeLength;t=null==t||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)?null:u.getInsertPoint();null==t&&(t=u.getCenterInsertPoint(u.getBoundingBoxFromGeometry([F],!0)));var F=new mxCell("",new mxGeometry(0,0,p,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");F.geometry.setTerminalPoint(t,!0);F.geometry.setTerminalPoint(new mxPoint(t.x+F.geometry.width,t.y),!1);F.geometry.points=[];F.geometry.relative=!0;F.edge=!0;C(F)}},null,null,"C")).isEnabled=
-v;e.addInsertMenuItems=mxUtils.bind(this,function(t,p,F){for(var K=0;K<F.length;K++)"-"==F[K]?t.addSeparator(p):e.addInsertItem(t,p,mxResources.get(F[K])+"...",F[K])});this.put("insert",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),p);e.insertTemplateEnabled&&!e.isOffline()&&this.addMenuItems(t,["insertTemplate"],p);t.addSeparator(p);this.addSubmenu("insertLayout",
-t,p,mxResources.get("layout"));this.addSubmenu("insertAdvanced",t,p,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,p){e.addInsertMenuItems(t,p,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(t,p){e.addInsertMenuItems(t,p,["fromText","plantUml","mermaid","-","formatSql"]);t.addItem(mxResources.get("csv")+"...",null,function(){u.popupMenuHandler.hideMenu();
-e.showImportCsvDialog()},p,null,v());"min"==uiTheme&&this.addMenuItems(t,["-","createShape","editDiagram"],p)})));this.put("openRecent",new Menu(function(t,p){var F=e.getRecent();if(null!=F){for(var K=0;K<F.length;K++)(function(D){var H=D.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");t.addItem(D.title+" ("+mxResources.get(H)+")",null,function(){e.loadFile(D.id)},p)})(F[K]);t.addSeparator(p)}t.addItem(mxResources.get("reset"),null,function(){e.resetRecent()},p)}));this.put("openFrom",
-new Menu(function(t,p){null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){e.pickFile(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.pickFile(App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){e.pickFile(App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.pickFile(App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.pickFile(App.MODE_GITLAB)},
-p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){e.pickFile(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.pickFile(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.pickFile(App.MODE_DEVICE)},
-p);e.isOffline()||(t.addSeparator(p),t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(e,"",mxResources.get("open"),function(K){null!=K&&0<K.length&&(null==e.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(K):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(K)))},mxResources.get("url"));e.showDialog(F.container,300,80,!0,!0);F.init()},p))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=
-e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},p)})),this.put("openLibraryFrom",new Menu(function(t,p){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=e.drive?t.addItem(mxResources.get("googleDrive")+
-"...",null,function(){e.pickLibrary(App.MODE_GOOGLE)},p):B&&"function"===typeof window.DriveClient&&t.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1));null!=e.oneDrive?t.addItem(mxResources.get("oneDrive")+"...",null,function(){e.pickLibrary(App.MODE_ONEDRIVE)},p):L&&"function"===typeof window.OneDriveClient&&t.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);null!=e.dropbox?t.addItem(mxResources.get("dropbox")+
-"...",null,function(){e.pickLibrary(App.MODE_DROPBOX)},p):E&&"function"===typeof window.DropboxClient&&t.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);null!=e.gitHub&&t.addItem(mxResources.get("github")+"...",null,function(){e.pickLibrary(App.MODE_GITHUB)},p);null!=e.gitLab&&t.addItem(mxResources.get("gitlab")+"...",null,function(){e.pickLibrary(App.MODE_GITLAB)},p);null!=e.trello?t.addItem(mxResources.get("trello")+"...",
-null,function(){e.pickLibrary(App.MODE_TRELLO)},p):c&&"function"===typeof window.TrelloClient&&t.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},p,null,!1);t.addSeparator(p);isLocalStorage&&"0"!=urlParams.browser&&t.addItem(mxResources.get("browser")+"...",null,function(){e.pickLibrary(App.MODE_BROWSER)},p);"1"!=urlParams.noDevice&&t.addItem(mxResources.get("device")+"...",null,function(){e.pickLibrary(App.MODE_DEVICE)},p);e.isOffline()||(t.addSeparator(p),
-t.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(e,"",mxResources.get("open"),function(K){if(null!=K&&0<K.length&&e.spinner.spin(document.body,mxResources.get("loading"))){var D=K;e.editor.isCorsEnabledForUrl(K)||(D=PROXY_URL+"?url="+encodeURIComponent(K));mxUtils.get(D,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){e.spinner.stop();try{e.loadLibrary(new UrlLibrary(this,H.getText(),K))}catch(J){e.handleError(J,mxResources.get("errorLoadingFile"))}}else e.spinner.stop(),
-e.handleError(null,mxResources.get("errorLoadingFile"))},function(){e.spinner.stop();e.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));e.showDialog(F.container,300,80,!0,!0);F.init()},p));"1"==urlParams.confLib&&(t.addSeparator(p),t.addItem(mxResources.get("confluenceCloud")+"...",null,function(){e.showRemotelyStoredLibrary(mxResources.get("libraries"))},p))})));this.put("edit",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-d=e.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(e,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("comments"));else{var t=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(t);this.commentsWindow.refreshCommentsTime();t&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));e.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));d=this.get("viewPanels");var y=d.funct;d.funct=
-function(t,p){y.apply(this,arguments);e.menus.addMenuItems(t,["tags"],p);e.commentsSupported()&&e.menus.addMenuItems(t,["comments"],p)};this.put("view",new Menu(mxUtils.bind(this,function(t,p){this.addMenuItems(t,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(e.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(t,["-","search"],p);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=this.addMenuItem(t,"scratchpad",p);(!e.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(t,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",t,p);this.addMenuItems(t,"- scrollbars tooltips ruler - grid guides".split(" "),p);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(t,"shadowVisible",p);this.addMenuItems(t,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),p);"1"!=urlParams.sketch&&this.addMenuItems(t,
-["-","fullscreen"],p)})));if(EditorUi.isElectronApp){var I="1"==urlParams.enableSpellCheck;d=e.actions.addAction("spellCheck",function(){e.toggleSpellCheck();I=!I;e.alert(mxResources.get("restartForChangeRequired"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return I});var N="1"==urlParams.enableStoreBkp;d=e.actions.addAction("autoBkp",function(){e.toggleStoreBkp();N=!N});d.setToggleAction(!0);d.setSelectedCallback(function(){return N});e.actions.addAction("openDevTools",function(){e.openDevTools()});
-e.actions.addAction("drafts...",function(){var t=new FilenameDialog(e,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(p){p=parseInt(p);0<=p&&(EditorUi.draftSaveDelay=1E3*p,EditorUi.enableDrafts=0<p,mxSettings.setDraftSaveDelay(p),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);e.showDialog(t.container,320,80,!0,!0);t.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(t,p){"1"==urlParams.embed&&null!=urlParams.lang||
-this.addSubmenu("language",t,p);"1"!=urlParams.embed&&this.addSubmenu("theme",t,p);t.addSeparator(p);if("undefined"!==typeof MathJax){var F=this.addMenuItem(t,"mathematicalTypesetting",p);(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(t,["spellCheck","autoBkp","drafts"],p);this.addMenuItems(t,["copyConnect","collapseExpand","-"],p);"1"!=urlParams.embed&&(F=e.getCurrentFile(),
-null!=F&&F.isRealtimeEnabled()&&F.isRealtimeSupported()&&this.addMenuItems(t,["showRemoteCursors","shareCursor"],p),this.addMenuItems(t,["autosave"],p));t.addSeparator(p);!e.isOfflineApp()&&isLocalStorage&&this.addMenuItem(t,"plugins",p);this.addMenuItems(t,["-","editDiagram"],p);Graph.translateDiagram&&this.addMenuItems(t,["diagramLanguage"]);t.addSeparator(p);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(t,["showStartScreen"],p);this.addMenuItems(t,["configuration"],
-p);t.addSeparator(p);"1"==urlParams.newTempDlg&&(e.actions.addAction("templates",function(){function K(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var D=new TemplatesDialog(e,function(H){console.log(arguments)},null,null,null,"user",function(H,J,G){var P=new Date;P.setDate(P.getDate()-7);e.drive.listFiles(null,P,G?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(K(T.items[U]));H(W)},
-J)},function(H,J,G,P){e.drive.listFiles(H,null,P?!0:!1,function(T){for(var W=[],U=0;U<T.items.length;U++)W.push(K(T.items[U]));J(W)},G)},function(H,J,G){e.drive.getFile(H.id,function(P){J(P.data)},G)},null,function(H){H({Test:[]},1)},!0,!1);e.showDialog(D.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(t,"templates",p))})));this.put("file",new Menu(mxUtils.bind(this,function(t,p){if("1"==urlParams.embed)this.addSubmenu("importFrom",t,p),this.addSubmenu("exportAs",
-t,p),this.addSubmenu("embed",t,p),"1"==urlParams.libraries&&(this.addMenuItems(t,["-"],p),this.addSubmenu("newLibrary",t,p),this.addSubmenu("openLibraryFrom",t,p)),e.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p),this.addMenuItems(t,["-","pageSetup","print","-","rename"],p),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(t,["saveAndExit"],p):(this.addMenuItems(t,["save"],p),"1"==urlParams.saveAndExit&&this.addMenuItems(t,
-["saveAndExit"],p))),"1"!=urlParams.noExitBtn&&this.addMenuItems(t,["exit"],p);else{var F=this.editorUi.getCurrentFile();if(null!=F&&F.constructor==DriveFile){F.isRestricted()&&this.addMenuItems(t,["exportOptionsDisabled"],p);this.addMenuItems(t,["save","-","share"],p);var K=this.addMenuItem(t,"synchronize",p);(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize");t.addSeparator(p)}else this.addMenuItems(t,["new"],p);this.addSubmenu("openFrom",
-t,p);isLocalStorage&&this.addSubmenu("openRecent",t,p);null!=F&&F.constructor==DriveFile?this.addMenuItems(t,"new - rename makeCopy openFolder moveToFolder".split(" "),p):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==F||F.constructor==LocalFile&&null==F.fileHandle||(t.addSeparator(p),K=this.addMenuItem(t,"synchronize",p),(!e.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(t,["-","save","saveAs",
-"-"],p),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=e.getServiceName()||e.isOfflineApp()||null==F||this.addMenuItems(t,["share","-"],p),this.addMenuItems(t,["rename"],p),e.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(t,["upload"],p):(this.addMenuItems(t,["makeCopy"],p),null!=F&&F.constructor==OneDriveFile&&this.addMenuItems(t,["moveToFolder"],p)));t.addSeparator(p);this.addSubmenu("importFrom",t,p);this.addSubmenu("exportAs",t,p);
-t.addSeparator(p);this.addSubmenu("embed",t,p);this.addSubmenu("publish",t,p);t.addSeparator(p);this.addSubmenu("newLibrary",t,p);this.addSubmenu("openLibraryFrom",t,p);e.isRevisionHistorySupported()&&this.addMenuItems(t,["-","revisionHistory"],p);null!=F&&null!=e.fileNode&&"1"!=urlParams.embedInline&&(K=null!=F.getTitle()?F.getTitle():e.defaultFilename,(F.constructor==DriveFile&&null!=F.sync&&F.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(t,["-","properties"]));
-this.addMenuItems(t,["-","pageSetup"],p);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(t,["print"],p);this.addMenuItems(t,["-","close"])}})));k.prototype.execute=function(){var t=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 p=t.extFonts,F=0;null!=p&&F<p.length;F++){var K=document.getElementById("extFont_"+
-p[F].name);null!=K&&K.parentNode.removeChild(K)}t.extFonts=[];for(F=0;null!=this.previousExtFonts&&F<this.previousExtFonts.length;F++)this.ui.editor.graph.addExtFont(this.previousExtFonts[F].name,this.previousExtFonts[F].url);this.previousExtFonts=p};this.put("fontFamily",new Menu(mxUtils.bind(this,function(t,p){for(var F=mxUtils.bind(this,function(U,V,l,A,M){var Q=e.editor.graph;A=this.styleChange(t,A||U,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],null,p,function(){"1"!=urlParams["ext-fonts"]?Q.setFont(U,V):(document.execCommand("fontname",!1,U),Q.addExtFont(U,V));e.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[U,null!=V?encodeURIComponent(V):null,null]:[U],"cells",[Q.cellEditor.getEditingCell()]))},function(){Q.updateLabelElements(Q.getSelectionCells(),
-function(O){O.removeAttribute("face");O.style.fontFamily=null;"PRE"==O.nodeName&&Q.replaceElement(O,"div")});"1"==urlParams["ext-fonts"]&&Q.addExtFont(U,V)});l&&(l=document.createElement("span"),l.className="geSprite geSprite-delete",l.style.cursor="pointer",l.style.display="inline-block",A.firstChild.nextSibling.nextSibling.appendChild(l),mxEvent.addListener(l,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(O){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[U.toLowerCase()];
-for(var R=0;R<this.customFonts.length;R++)if(this.customFonts[R].name==U&&this.customFonts[R].url==V){this.customFonts.splice(R,1);e.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(R=0;R<S.length;R++)if(S[R].name==U){S.splice(R,1);break}var X=mxUtils.clone(this.customFonts);for(R=0;R<X.length;R++)if(X[R].name==U){X.splice(R,1);break}R=new k(this.editorUi,S,X);this.editorUi.editor.graph.model.execute(R)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(O)})));Graph.addFont(U,V);A.firstChild.nextSibling.style.fontFamily=U;null!=M&&A.setAttribute("title",M)}),K={},D=0;D<this.defaultFonts.length;D++){var H=this.defaultFonts[D];"string"===typeof H?F(H):null!=H.fontFamily&&null!=H.fontUrl&&(K[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,F(H.fontFamily,H.fontUrl))}t.addSeparator(p);if("1"!=urlParams["ext-fonts"]){H=function(U){var V=encodeURIComponent(U.name)+(null==U.url?"":"@"+encodeURIComponent(U.url));if(!K[V]){for(var l=
-U.name,A=0;null!=G[l.toLowerCase()];)l=U.name+" ("+ ++A+")";null==J[V]&&(P.push({name:U.name,url:U.url,label:l,title:U.url}),G[l.toLowerCase()]=U,J[V]=U)}};var J={},G={},P=[];for(D=0;D<this.customFonts.length;D++)H(this.customFonts[D]);for(var T in Graph.recentCustomFonts)H(Graph.recentCustomFonts[T]);P.sort(function(U,V){return U.label<V.label?-1:U.label>V.label?1:0});if(0<P.length){for(D=0;D<P.length;D++)F(P[D].name,P[D].url,!0,P[D].label,P[D].url);t.addSeparator(p)}t.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];e.fireEvent(new mxEventObject("customFontsChanged"))}),p);t.addSeparator(p)}else{T=this.editorUi.editor.graph.extFonts;if(null!=T&&0<T.length){H={};var W=!1;for(D=0;D<this.customFonts.length;D++)H[this.customFonts[D].name]=!0;for(D=0;D<T.length;D++)H[T[D].name]||(this.customFonts.push(T[D]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(D=
-0;D<this.customFonts.length;D++)T=this.customFonts[D].name,H=this.customFonts[D].url,F(T,H,!0),this.editorUi.editor.graph.addExtFont(T,H,!0);t.addSeparator(p);t.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var U=new k(this.editorUi,[],[]);e.editor.graph.model.execute(U)}),p);t.addSeparator(p)}}t.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var U=this.editorUi.editor.graph,V=U.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],l=
-"s",A=null;if("1"!=urlParams["ext-fonts"]&&U.isEditing()){var M=U.getSelectedEditingElement();null!=M&&(M=mxUtils.getCurrentStyle(M),null!=M&&(V=Graph.stripQuotes(M.fontFamily),A=Graph.getFontUrl(V,null),null!=A&&(Graph.isGoogleFontUrl(A)?(A=null,l="g"):l="w")))}else M=U.getView().getState(U.getSelectionCell()),null!=M&&(V=M.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(M=M.style.fontSource,null!=M&&(M=decodeURIComponent(M),Graph.isGoogleFontUrl(M)?l="g":(l="w",A=M))):(l=M.style.FType||
-l,"w"==l&&(A=this.editorUi.editor.graph.extFonts,M=null,null!=A&&(M=A.find(function(O){return O.name==V})),A=null!=M?M.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=A&&A.substring(0,PROXY_URL.length)==PROXY_URL&&(A=decodeURIComponent(A.substr((PROXY_URL+"?url=").length)));var Q=null;document.activeElement==U.cellEditor.textarea&&(Q=U.cellEditor.saveSelection());l=new FontDialog(this.editorUi,V,A,l,mxUtils.bind(this,function(O,R,S){null!=Q&&(U.cellEditor.restoreSelection(Q),Q=null);
-if(null!=O&&0<O.length)if("1"!=urlParams["ext-fonts"]&&U.isEditing())U.setFont(O,R);else{U.getModel().beginUpdate();try{U.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),U.setCellStyles("fontSource",null!=R?encodeURIComponent(R):null),U.setCellStyles("FType",null)):(U.setCellStyles(mxConstants.STYLE_FONTFAMILY,O),"s"!=S&&(U.setCellStyles("FType",S),0==R.indexOf("http://")&&(R=PROXY_URL+"?url="+encodeURIComponent(R)),this.editorUi.editor.graph.addExtFont(O,
-R)));S=!0;for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==O){S=!1;break}S&&(this.customFonts.push({name:O,url:R}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(l.container,380,Editor.enableWebFonts?250:180,!0,!0);l.init()}),p,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
+var t=document.createElement("img");mxUtils.setOpacity(t,50);t.style.height="16px";t.style.width="16px";t.setAttribute("border","0");t.setAttribute("valign","bottom");t.setAttribute("src",Editor.helpImage);d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(u){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(u)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
+Menus.prototype.init=function(){function k(n,v,D){this.ui=n;this.previousExtFonts=this.extFonts=v;this.prevCustomFonts=this.customFonts=D}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),C=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),F=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),J=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));d.actions.addAction("new...",function(){var n=d.isOffline();if(n||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var v=new NewDialog(d,n,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(v.container,n?350:620,n?70:460,!0,!0,function(H){d.sidebar.hideTooltip();H&&null==d.getCurrentFile()&&d.showSplash()});
+v.init()}else{var D=function(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}};n=new TemplatesDialog(d,function(H,K,G){var N=G.libs,T=G.clibs;d.pickFolder(d.mode,function(V){d.createFile(K,H,null!=N&&0<N.length?N:null,null,function(){d.hideDialog()},null,V,null,null!=T&&0<T.length?T:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(H,K,G){var N=new Date;N.setDate(N.getDate()-
+7);d.drive.listFiles(null,N,G?!0:!1,function(T){for(var V=[],U=0;U<T.items.length;U++)V.push(D(T.items[U]));H(V)},K)},function(H,K,G,N){d.drive.listFiles(H,null,N?!0:!1,function(T){for(var V=[],U=0;U<T.items.length;U++)V.push(D(T.items[U]));K(V)},G)},function(H,K,G){d.drive.getFile(H.id,function(N){K(N.data)},G)},null,null,!1,!1);d.showDialog(n.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){var n=new NewDialog(d,null,!1,function(v){d.hideDialog();if(null!=v){var D=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(v,Math.max(D.x,20),Math.max(D.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(n.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});n.init()}})).isEnabled=u;var e=d.actions.addAction("shareCursor",
+function(){d.setShareCursorPosition(!d.isShareCursorPosition())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShareCursorPosition()});e=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.isShowRemoteCursors()});e=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==
+mxConstants.POINTS});e=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});e=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});e=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
+e.setToggleAction(!0);e.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["points","inches","millimeters","meters"],v)})));e=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});e.setEnabled(d.canvasSupported&&9!=document.documentMode);
+e.setToggleAction(!0);e.setSelectedCallback(function(){return null!=d.ruler});e=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});e.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;e.setToggleAction(!0);e.setSelectedCallback(function(){return"1"==urlParams.embedInline?
+Editor.inlineFullscreen:null!=document.fullscreenElement});e=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(n){d.setDarkMode(!Editor.isDarkMode());n=mxSettings.getUi();"atlas"!=n&&"min"!=n&&"sketch"!=n&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return Editor.isDarkMode()});d.actions.addAction("properties...",function(){var n=new FilePropertiesDialog(d);d.showDialog(n.container,320,120,!0,!0);n.init()}).isEnabled=
+u;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(t.isEnabled()){if(null==d.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,n?120:84,n)}t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing();d.freehandWindow.window.setVisible(t.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",
+new Action(mxResources.get("formatXml")+"...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var v=null==d.pages||1>=d.pages.length,D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatXml"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(D);var H=d.addCheckbox(n,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),K=d.addCheckbox(n,mxResources.get("compressed"),!0),G=d.addCheckbox(n,mxResources.get("allPages"),
+!v,v);G.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?G.setAttribute("disabled","disabled"):G.removeAttribute("disabled")});n=new CustomDialog(d,n,mxUtils.bind(this,function(){d.downloadFile("xml",!K.checked,null,!H.checked,v||!G.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,
+null,function(n,v,D,H,K,G,N,T,V){N=[];V&&N.push("tags=%7B%7D");n=new EmbedDialog(d,d.createLink(n,v,D,H,K,G,null,!0,N));d.showDialog(n.container,450,240,!0,!0);n.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,n,function(v,D,H,K,G,N,T,V,U,X,l){d.createHtml(v,D,H,K,G,N,T,V,U,
+X,l,mxUtils.bind(this,function(B,L){var P=d.getBaseFilename(T);B='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(P)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+B+"\n"+L+"\n</body>\n</html>";d.saveData(P+(".drawio"==P.substring(P.lenth-7)?"":".drawio")+".html","html",B,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||
+!d.isOffline()&&!d.printPdfExport){var n=null==d.pages||1>=d.pages.length,v=document.createElement("div");v.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatPdf"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(D);var H=function(){T!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!t.pageVisible):(L.setAttribute("disabled","disabled"),L.checked=!1)};D=200;var K=1,G=null;if(d.pdfPageExport&&
+!n){var N=function(){l.value=Math.max(1,Math.min(K,Math.max(parseInt(l.value),parseInt(U.value))));U.value=Math.max(1,Math.min(K,Math.min(parseInt(l.value),parseInt(U.value))))},T=d.addRadiobox(v,"pages",mxResources.get("allPages"),!0),V=d.addRadiobox(v,"pages",mxResources.get("pages")+":",!1,null,!0),U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","1");U.setAttribute("type","number");U.setAttribute("min","1");U.style.width="50px";v.appendChild(U);var X=
+document.createElement("span");mxUtils.write(X,mxResources.get("to"));v.appendChild(X);var l=U.cloneNode(!0);v.appendChild(l);mxEvent.addListener(U,"focus",function(){V.checked=!0});mxEvent.addListener(l,"focus",function(){V.checked=!0});mxEvent.addListener(U,"change",N);mxEvent.addListener(l,"change",N);if(null!=d.pages&&(K=d.pages.length,null!=d.currentPage))for(N=0;N<d.pages.length;N++)if(d.currentPage==d.pages[N]){G=N+1;U.value=G;l.value=G;break}U.setAttribute("max",K);l.setAttribute("max",K);
+mxUtils.br(v);var B=d.addRadiobox(v,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(v,mxResources.get("crop"),!1,!0),P=d.addCheckbox(v,mxResources.get("grid"),!1,!1);mxEvent.addListener(T,"change",H);mxEvent.addListener(V,"change",H);mxEvent.addListener(B,"change",H);D+=64}else B=d.addCheckbox(v,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(v,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),P=d.addCheckbox(v,mxResources.get("grid"),
+!1,!1),d.pdfPageExport||mxEvent.addListener(B,"change",H);H=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var O=null,R=null;if(EditorUi.isElectronApp||H)R=d.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),D+=30;H&&(O=d.addCheckbox(v,mxResources.get("transparentBackground"),!1),D+=30);v=new CustomDialog(d,v,mxUtils.bind(this,function(){var S=null;if(!n){S=parseInt(U.value);var W=parseInt(l.value);S=T.checked||S==G&&W==G?null:{from:Math.max(0,
+Math.min(K-1,S-1)),to:Math.max(0,Math.min(K-1,W-1))}}d.downloadFile("pdf",null,null,!B.checked,n?!0:!T.checked&&null==S,!L.checked,null!=O&&O.checked,null,null,P.checked,null!=R&&R.checked,S)}),null,mxResources.get("export"));d.showDialog(v.container,300,D,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});
+d.actions.addAction("close",function(){function n(){null!=v&&v.removeDraft();d.fileLoaded(null)}var v=d.getCurrentFile();null!=v&&v.isModified()?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var n=t.getSelectionCell(),v=t.view.getState(n);null!=v&&null!=v.shape&&null!=v.shape.stencil&&(n=new EditShapeDialog(d,n,mxResources.get("editShape")+
+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(n,v){d.spinner.stop();n=new RevisionDialog(d,n,v);d.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,function(n){d.handleError(n)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",
+function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");e=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(e.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var n=d.getCurrentFile();null!=n&&(window.drawdata=d.getFileData(),n=null!=n.getTitle()?n.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+
+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&(e=d.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!d.isMathEnabled();t.model.execute(n)}),e.setToggleAction(!0),e.setSelectedCallback(function(){return d.isMathEnabled()}),e.isEnabled=u);isLocalStorage&&(e=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
+mxSettings.save()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var g=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});g.setToggleAction(!0);g.setSelectedCallback(function(){return g.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var n=t.getSelectionCells(),v=[],D=0;D<n.length;D++)t.getModel().isVertex(n[D])&&v.push(n[D]);0<v.length&&(n=new EditGeometryDialog(d,v),d.showDialog(n.container,
+200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");var m=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(m=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=m&&t.pasteStyle(m,t.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var n=
+new BackgroundImageDialog(d,function(v){d.setBackgroundImage(v)});d.showDialog(n.container,400,170,!0,!0);n.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B,L,P){V=parseInt(n);!isNaN(V)&&0<V&&(P?d.downloadFile("remoteSvg",null,null,D,null,T,v,n,N,null,K):d.exportSvg(V/100,v,D,
+H,K,G,N,!T,!1,U,l,B,L))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B){n=parseInt(n);!isNaN(n)&&0<n&&d.exportImage(n/100,v,D,H,K,N,!T,!1,null,X,null,l,B)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,D,H,K){d.downloadFile(v?"xmlpng":"png",null,null,n,null,null,D,H,K)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(n,v,D,H,K,G,N,T,V,U,X,l,B){n=parseInt(n);!isNaN(n)&&0<n&&d.exportImage(n/100,!1,
+D,H,!1,N,!T,!1,"jpeg",X,null,l,B)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(n,v,D,H,K){d.downloadFile("jpeg",null,null,n,null,null,null,H,K)}),!0,!0)}));e=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),v=mxUtils.getXml(0==n.length?d.editor.getGraphXml():t.encodeCells(n));d.copyImage(n,v)}));e.visible=
+Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;e=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));
+d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var n=new FeedbackDialog(d);d.showDialog(n.container,610,360,!0,!1);n.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});e=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,
+212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));e=d.actions.addAction("findReplace",mxUtils.bind(this,function(n,v){var D=(n=t.isEnabled()&&(null==v||!mxEvent.isShiftDown(v)))?"findReplace":"find";v=D+"Window";if(null==this[v]){var H=n?"min"==uiTheme?330:300:240;this[v]=new FindWindow(d,document.body.offsetWidth-(H+20),100,H,n?"min"==uiTheme?304:288:170,n);this[v].window.addListener("show",function(){d.fireEvent(new mxEventObject(D))});this[v].window.addListener("hide",function(){d.fireEvent(new mxEventObject(D))});
+this[v].window.setVisible(!0)}else this[v].window.setVisible(!this[v].window.isVisible())}),null,null,Editor.ctrlKey+"+F");e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){var n=t.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[n]&&this[n].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var n=null==d.pages||1>=d.pages.length;if(n)d.exportVisio();else{var v=document.createElement("div");v.style.whiteSpace=
+"nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(D);var H=d.addCheckbox(v,mxResources.get("allPages"),!n,n);H.style.marginBottom="16px";n=new CustomDialog(d,v,mxUtils.bind(this,function(){d.exportVisio(!H.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
+function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="4px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var v=document.createElement("span");v.style["float"]="right";v.style.cursor="pointer";v.style.userSelect="none";v.style.marginTop="-4px";v.appendChild(n);mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,"click",function(K){mxEvent.getSource(K)!=n&&
+(n.checked=!n.checked)});header=v}var D=localStorage.getItem(Editor.configurationKey);v=[[mxResources.get("reset"),function(K,G){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(K)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(N){d.handleError(N)}})},"Shift+Click to Reset Settings"]];var H=d.actions.get("plugins");
+null!=H&&"1"==urlParams.sketch&&v.push([mxResources.get("plugins"),H.funct]);EditorUi.isElectronApp||v.push([mxResources.get("share"),function(K,G){if(0<G.value.length)try{var N=JSON.parse(G.value),T=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),V=new EmbedDialog(d,T);d.showDialog(V.container,450,240,!0);V.init()}catch(U){d.handleError(U)}else d.handleError({message:mxResources.get("invalidInput")})}]);v=new TextareaDialog(d,mxResources.get("configuration")+
+":",null!=D?JSON.stringify(JSON.parse(D),null,2):"",function(K){if(null!=K)try{if(null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save()),K==D)d.hideDialog();else{if(0<K.length){var G=JSON.parse(K);localStorage.setItem(Editor.configurationKey,JSON.stringify(G))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(N){d.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+v,n.parentNode);d.showDialog(v.container,620,460,!0,!1);v.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(n,v){var D=mxUtils.bind(this,function(K){var G=""==K?mxResources.get("automatic"):mxLanguageMap[K],N=null;""!=G&&(N=n.addItem(G,null,mxUtils.bind(this,function(){mxSettings.setLanguage(K);mxSettings.save();mxClient.language=K;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
+v),(K==mxLanguage||""==K&&null==mxLanguage)&&n.addCheckmark(N,Editor.checkmarkImage));return N});D("");n.addSeparator(v);for(var H in mxLanguageMap)D(H)})));var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(n){var v=p.apply(this,arguments);if(null!=v&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var D=this.get("1"==urlParams["live-ui"]?"appearance":"language");if(null!=D){var H=v.addMenu("",D.funct);H.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?
+"theme":"language"));H.className="geToolbarButton geAdaptiveAsset";H.style.backgroundImage="url("+Editor.globeImage+")";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";H.style.backgroundSize="100% 100%";H.style.display="inline-block";H.style.verticalAlign="top";H.style.marginLeft="2px";H.style.cursor="pointer";H.style.zIndex="1";H.style.position="absolute";H.style.height="18px";H.style.width="18px";"atlas"==Editor.currentTheme?(H.style.filter="invert(100%)",H.style.right=
+"11px",H.style.top="10px"):(H.style.right="14px",H.style.top="5px");"1"==urlParams.winCtrls&&(H.style.right="95px",H.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(H);v.langIcon=H;"1"==urlParams["live-ui"]?(D=mxUtils.bind(this,function(){H.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.darkModeImage:Editor.lightModeImage)+"')"}),this.editorUi.addListener("darkModeChanged",D),D()):mxUtils.setOpacity(H,40);this.editorUi.switchThemeElt=
+H}}return v}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var n=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(v){if(0<v.length)try{var D=JSON.parse(v);d.executeLayouts(t.createLayouts(D));d.customLayoutConfig=D;d.hideDialog()}catch(H){d.handleError(H)}},null,null,null,null,function(v,
+D){var H=mxUtils.button(mxResources.get("copy"),function(){try{var K=D.value;D.value=JSON.stringify(JSON.parse(K));D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));D.value=K}catch(G){d.handleError(G)}});H.setAttribute("title","copy");H.className="geBtn";v.appendChild(H)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(n.container,
+620,460,!0,!0);n.init()});e=this.get("viewZoom");var q=e.funct;e.funct=mxUtils.bind(this,function(n,v){q.apply(this,arguments);"sketch"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(n,["-","outline","fullscreen"],v)});e=this.get("layout");var z=e.funct;e.funct=function(n,v){z.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var D=null,H=20,K=20,G=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=D){var L=d.editor.graph,P=new mxOrgChartLayout(L,
+D,H,K),O=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(O=L.getSelectionCell());P.execute(O)}},N=document.createElement("div"),T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,mxResources.get("orgChartType")+": ");N.appendChild(T);var V=document.createElement("select");V.style.width="200px";V.style.boxSizing="border-box";T=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
+mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var U=0;U<T.length;U++){var X=document.createElement("option");mxUtils.write(X,T[U]);X.value=U;2==U&&X.setAttribute("selected","selected");V.appendChild(X)}mxEvent.addListener(V,"change",function(){D=V.value});N.appendChild(V);T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,
+mxResources.get("parentChildSpacing")+": ");N.appendChild(T);var l=document.createElement("input");l.type="number";l.value=H;l.style.width="200px";l.style.boxSizing="border-box";N.appendChild(l);mxEvent.addListener(l,"change",function(){H=l.value});T=document.createElement("div");T.style.marginTop="6px";T.style.display="inline-block";T.style.width="140px";mxUtils.write(T,mxResources.get("siblingSpacing")+": ");N.appendChild(T);var B=document.createElement("input");B.type="number";B.value=K;B.style.width=
+"200px";B.style.boxSizing="border-box";N.appendChild(B);mxEvent.addListener(B,"change",function(){K=B.value});N=new CustomDialog(d,N,function(){null==D&&(D=2);d.loadOrgChartLayouts(G)});d.showDialog(N.container,355,140,!0,!0)},v,null,u());n.addSeparator(v);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(t);D.checkOverlap=!0;d.prompt(mxResources.get("spacing"),D.spacing,mxUtils.bind(this,function(H){D.spacing=H;d.executeLayout(function(){D.execute(t.getDefaultParent(),
+t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),v);n.addSeparator(v);d.menus.addMenuItem(n,"runLayout",v,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,v){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(n,["about"],v);else{var D=n.addItem("Search:",null,null,v,null,null,!1);D.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";D.style.cursor="default";var H=document.createElement("input");H.setAttribute("type","text");
+H.setAttribute("size","25");H.style.marginLeft="8px";mxEvent.addListener(H,"keydown",mxUtils.bind(this,function(K){var G=mxUtils.trim(H.value);13==K.keyCode&&0<G.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(G)),H.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:G}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==
+K.keyCode&&(H.value="")}));D.firstChild.nextSibling.appendChild(H);mxEvent.addGestureListeners(H,function(K){document.activeElement!=H&&H.focus();mxEvent.consume(K)},function(K){mxEvent.consume(K)},function(K){mxEvent.consume(K)});window.setTimeout(function(){H.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),
+v),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates"],v),this.addMenuItems(n,["openDevTools","-","about"],v)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),v)}"1"==urlParams.test&&(n.addSeparator(v),this.addSubmenu("testDevelop",n,v))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var n=prompt("Language Code",Graph.diagramLanguage||"");null!=n&&(Graph.diagramLanguage=0<n.length?n:null,
+t.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");
+mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!t.isSelectionEmpty()){var n=t.cloneCells(t.getSelectionCells()),v=t.getBoundingBoxFromGeometry(n);n=t.moveCells(n,-v.x,-v.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+v.width+", "+v.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(n)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var n=
+t.getGraphBounds(),v=t.view.translate,D=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",n.x/D-v.x,n.y/D-v.y,n.width/D,n.height/D,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(v){if(0<v.length)try{var D=function(T){function V(W){if(null==S[W]){if(S[W]=!0,null!=l[W]){for(;0<l[W].length;){var aa=
+l[W].pop();V(aa)}delete l[W]}}else mxLog.debug(U+": Visited: "+W)}var U=T.parentNode.id,X=T.childNodes;T={};for(var l={},B=null,L={},P=0;P<X.length;P++){var O=X[P];if(null!=O.id&&0<O.id.length)if(null==T[O.id]){T[O.id]=O.id;var R=O.getAttribute("parent");null==R?null!=B?mxLog.debug(U+": Multiple roots: "+O.id):B=O.id:(null==l[R]&&(l[R]=[]),l[R].push(O.id))}else L[O.id]=O.id}X=Object.keys(L);0<X.length?(X=U+": "+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(U+": Checked");
+var S={};null==B?mxLog.debug(U+": No root"):(V(B),Object.keys(S).length!=Object.keys(T).length&&(mxLog.debug(U+": Invalid tree: (see console)"),console.log(U+": Invalid tree",l)))};"<"!=v.charAt(0)&&(v=Graph.decompress(v),mxLog.debug("See console for uncompressed XML"),console.log("xml",v));var H=mxUtils.parseXml(v),K=d.getPagesForNode(H.documentElement,"mxGraphModel");if(null!=K&&0<K.length)try{var G=d.getHashValueForPages(K);mxLog.debug("Checksum: ",G)}catch(T){mxLog.debug("Error: ",T.message)}else mxLog.debug("No pages found for checksum");
+var N=H.getElementsByTagName("root");for(v=0;v<N.length;v++)D(N[v]);mxLog.show()}catch(T){d.handleError(T),null!=window.console&&console.error(T)}});d.showDialog(n.container,620,460,!0,!0);n.init()}));var y=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var n=new TextareaDialog(d,"Diff/Sync:","",function(v){var D=d.getCurrentFile();if(0<v.length&&null!=D)try{var H=JSON.parse(v);D.patch([H],null,!0);d.hideDialog()}catch(K){d.handleError(K)}},null,"Close",null,null,
+null,!0,null,"Patch",null,[["Snapshot",function(v,D){y=d.getPagesForXml(d.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(y)}],["Diff",function(v,D){try{n.textarea.value=JSON.stringify(d.diffPages(y,d.pages),null,2)}catch(H){d.handleError(H)}}]]);null==y?(y=d.getPagesForXml(d.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(y)):n.textarea.value=JSON.stringify(d.diffPages(y,
+d.pages),null,2);d.showDialog(n.container,620,460,!0,!0);n.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var n=d.getCurrentFile();console.log("editorUi",d,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",d.diffPages(n.ownPages,n.theirPages));var v=n.getShadowPages();null!=v&&
+(console.log("Checksum shadowPages",d.getHashValueForPages(v)),console.log("diff shadowPages/ownPages",d.diffPages(v,n.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(n.ownPages,v)),console.log("diff theirPages/shadowPages",d.diffPages(n.theirPages,v)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(n.theirPages,
+n.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(n.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(n.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(n.theirPages,d.pages)))}null!=n&&console.log("Shadow pages",[d.getXmlForPages(n.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",
+d);var n=d.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([d.diffPages(n.shadowPages,d.pages)])),n.ownPages=d.clonePages(d.pages),n.theirPages=d.clonePages(d.pages),n.shadowPages=d.clonePages(d.pages),null!=n.sync&&(n.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){t.model.beginUpdate();try{var n=t.model.cells,v=0,D=[],H=[],K;for(K in n){var G=n[K],N=t.getCurrentCellStyle(G)[mxConstants.STYLE_IMAGE];
+null!=N&&"data:"==N.substring(0,5)&&(null==D[N]&&(D[N]=(D[N]||0)+1,v++),H.push(G))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,H);console.log("Removed",v,"image(s) from",H.length,"cell(s): ",[H,D])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,v=t.getGraphBounds(),D=t.view.scale,H=mxUtils.createXmlDocument(),K=H.createElement("output");
+H.appendChild(K);H=new mxXmlCanvas2D(K);H.translate(Math.floor((1-v.x)/D),Math.floor((1-v.y)/D));H.scale(1/D);var G=0,N=H.save;H.save=function(){G++;N.apply(this,arguments)};var T=H.restore;H.restore=function(){G--;T.apply(this,arguments)};var V=n.drawShape;n.drawShape=function(U){mxLog.debug("entering shape",U,G);V.apply(this,arguments);mxLog.debug("leaving shape",U,G)};n.drawState(t.getView().getState(t.model.root),H);mxLog.show();mxLog.debug(mxUtils.getXml(K));mxLog.debug("stateCounter",G)}));
+d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),v)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?
+d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(n){t.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),
+n.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",n,function(v,D,H,K,G,N,T,V,U,X,l){d.createHtml(v,D,H,K,G,N,T,V,U,X,l,mxUtils.bind(this,function(B,L){var P=new EmbedDialog(d,B+"\n"+L,null,null,function(){var O=window.open(),R=O.document;
+if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(B);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&R.writeln(L);R.writeln("</body>");R.writeln("</html>");R.close();if(!S){var W=O.document.createElement("div");W.marginLeft="26px";W.marginTop="26px";mxUtils.write(W,mxResources.get("updatingDocument"));
+S=O.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";W.appendChild(S);O.document.body.insertBefore(W,O.document.body.firstChild);window.setTimeout(function(){var aa=document.createElement("script");aa.type="text/javascript";aa.src=/<script.*?src="(.*?)"/.exec(L)[1];R.body.appendChild(aa);W.parentNode.removeChild(W)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});
+d.showDialog(P.container,450,240,!0,!0);P.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(v){d.spinner.stop();null!=v?(v=new EmbedDialog(d,'<img src="'+(n.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+n.getId())+'"/>'),d.showDialog(v.container,450,240,!0,!0),v.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));
+d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(n,v,D,H,K,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(n,v,D,H,K,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){d.showEmbedImageDialog(function(n,v,D,H,K,G){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(n,v,D,H,K,G,function(N){d.spinner.stop();N=new EmbedDialog(d,N);d.showDialog(N.container,450,240,!0,!0);N.init()},function(N){d.spinner.stop();d.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var n=t.getGraphBounds();
+d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(n.height/t.view.scale)+2,function(v,D,H,K,G,N,T,V,U){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var l=[];U&&l.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+T+";height:"+V+';" src="'+d.createLink(v,D,H,K,G,N,X,null,l)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",
+new Action(mxResources.get("notion")+"...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var v=document.createElement("a");v.setAttribute("href","javascript:void(0);");v.setAttribute("target","_blank");v.style.cursor="pointer";mxUtils.write(v,mxResources.get("getNotionChromeExtension"));n.appendChild(v);mxEvent.addListener(v,"click",function(D){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");
+mxEvent.consume(D)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(D,H,K,G,N,T,V,U,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();var B=["border=0"];X&&B.push("tags=%7B%7D");l=new EmbedDialog(d,d.createLink(D,H,K,G,N,T,l,null,B,!0));d.showDialog(l.container,450,240,!0,!0);l.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",n)}));d.actions.put("publishLink",new Action(mxResources.get("link")+
+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(n,v,D,H,K,G,N,T,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(U){d.spinner.stop();var X=[];V&&X.push("tags=%7B%7D");U=new EmbedDialog(d,d.createLink(n,v,D,H,K,G,U,null,X));d.showDialog(U.container,450,240,!0,!0);U.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});
+d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(n){d.spinner.stop();n=new GoogleSitesDialog(d,n);d.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)e=d.actions.addAction("scratchpad",
+function(){d.toggleScratchpad()}),e.setToggleAction(!0),e.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});e=d.actions.addAction("search",function(){var n=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!n);isLocalStorage&&(mxSettings.settings.search=!n,mxSettings.save())});e.label=mxResources.get("searchShapes");e.setToggleAction(!0);e.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(d.actions.get("save").funct=function(n){t.isEditing()&&t.stopEditing();var v="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var D=d.createLoadMessage("save");D.xml=v;n&&(D.exit=!0);v=JSON.stringify(D)}(window.opener||window.parent).postMessage(v,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));n=d.getCurrentFile();null==n||n.constructor==
+EmbedFile||n.constructor==LocalFile&&null==n.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var n=function(){d.editor.modified=!1;var v="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
+"";(window.opener||window.parent).postMessage(v,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){d.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],v),d.jpgSupported&&this.addMenuItems(n,["exportJpg"],v)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],v);this.addMenuItems(n,["exportSvg",
+"-"],v);d.isOffline()||d.printPdfExport?this.addMenuItems(n,["exportPdf"],v):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],v);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(n,["exportVsdx"],v);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],v);d.isOffline()||(n.addSeparator(v),this.addMenuItem(n,"export",v).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,
+function(n,v){function D(G){G.pickFile(function(N){d.spinner.spin(document.body,mxResources.get("loading"))&&G.getFile(N,function(T){var V="data:image/"==T.getData().substring(0,11)?K(T.getTitle()):"text/xml";/\.svg$/i.test(T.getTitle())&&!d.editor.isDataSvg(T.getData())&&(T.setData(Editor.createSvgDataUri(T.getData())),V="image/svg+xml");H(T.getData(),V,T.getTitle())},function(T){d.handleError(T,null!=T?mxResources.get("errorLoadingFile"):null)},G==d.drive)},!0)}var H=mxUtils.bind(this,function(G,
+N,T){var V=t.view,U=t.getGraphBounds(),X=t.snap(Math.ceil(Math.max(0,U.x/V.scale-V.translate.x)+4*t.gridSize)),l=t.snap(Math.ceil(Math.max(0,(U.y+U.height)/V.scale-V.translate.y)+4*t.gridSize));"data:image/"==G.substring(0,11)?d.loadImage(G,mxUtils.bind(this,function(B){var L=!0,P=mxUtils.bind(this,function(){d.resizeImage(B,G,mxUtils.bind(this,function(O,R,S){O=L?Math.min(1,Math.min(d.maxImageSize/R,d.maxImageSize/S)):1;d.importFile(G,N,X,l,Math.round(R*O),Math.round(S*O),T,function(W){d.spinner.stop();
+t.setSelectionCells(W);t.scrollCellToVisible(t.getSelectionCell())})}),L)});G.length>d.resampleThreshold?d.confirmImageResize(function(O){L=O;P()}):P()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(G,N,X,l,0,0,T,function(B){d.spinner.stop();t.setSelectionCells(B);t.scrollCellToVisible(t.getSelectionCell())})}),K=mxUtils.bind(this,function(G){var N="text/xml";/\.png$/i.test(G)?N="image/png":/\.jpe?g$/i.test(G)?N="image/jpg":/\.gif$/i.test(G)?
+N="image/gif":/\.pdf$/i.test(G)&&(N="application/pdf");return N});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){D(d.drive)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){D(d.oneDrive)},v):J&&"function"===typeof window.OneDriveClient&&
+n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){D(d.dropbox)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){D(d.gitHub)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+
+"...",null,function(){D(d.gitLab)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){D(d.trello)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},
+v);d.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var G=new FilenameDialog(d,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var T=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(N),function(V){H(V,T,N)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==T)}},mxResources.get("url"));
+d.showDialog(G.container,300,80,!0,!0);G.init()},v))}))).isEnabled=u;this.put("appearance",new Menu(mxUtils.bind(this,function(n,v){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(n,["toggleDarkMode"],v);v=n.addItem(mxResources.get("simple"),null,function(){d.setCurrentTheme("sketch"==Editor.currentTheme?"":"sketch")},v);"sketch"==Editor.currentTheme&&n.addCheckmark(v,Editor.checkmarkImage)})));this.put("theme",new Menu(mxUtils.bind(this,function(n,v){var D="1"==urlParams.sketch?
+"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(n,["toggleDarkMode"],v);n.addSeparator(v);var H=n.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},v);"kennedy"!=D&&"atlas"!=D&&"dark"!=D&&"min"!=D&&"sketch"!=D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("default"),null,function(){d.setCurrentTheme("kennedy")},v);"kennedy"!=D&&"dark"!=D||n.addCheckmark(H,Editor.checkmarkImage);
+H=n.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},v);"sketch"==D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},v);"min"==D&&n.addCheckmark(H,Editor.checkmarkImage);H=n.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},v);"atlas"==D&&n.addCheckmark(H,Editor.checkmarkImage)})));e=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();
+if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(D,H){n.invalidFileHandle=null;n.fileHandle=D;n.title=H.name;n.desc=H;d.save(H.name)}),null,d.createFileSystemOptions(n.getTitle()));else{var v=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;v=new FilenameDialog(this.editorUi,v,mxResources.get("rename"),mxUtils.bind(this,function(D){null!=D&&0<D.length&&null!=n&&D!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&
+n.rename(D,mxUtils.bind(this,function(H){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(H){this.editorUi.handleError(H,null!=H?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==StorageFile?mxResources.get("diagramName"):null,function(D){if(null!=D&&0<D.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(v.container,
+340,96,!0,!0);v.init()}}));e.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};e.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(null!=n){var v=d.getCopyFilename(n);n.constructor==DriveFile?(v=new CreateDialog(d,v,mxUtils.bind(this,function(D,H){"_blank"==H?d.editor.editAsNew(d.getFileData(),D):("download"==H&&(H=App.MODE_GOOGLE),null!=D&&0<D.length&&(H==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&
+n.saveAs(D,mxUtils.bind(this,function(K){n.desc=K;n.save(!1,mxUtils.bind(this,function(){d.spinner.stop();n.setModified(!1);n.addAllSavedStatus()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),mxUtils.bind(this,function(K){d.handleError(K)})):d.createFile(D,d.getFileData(!0),null,H)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(v.container,420,380,!0,!0),
+v.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),v)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(n,v){d.appIconClicked(v)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var v=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var D=0;D<n.desc.parents.length;D++)if(n.desc.parents[D].isRoot){v=!0;break}d.pickFolder(n.getMode(),
+mxUtils.bind(this,function(H){d.spinner.spin(document.body,mxResources.get("moving"))&&n.move(H,mxUtils.bind(this,function(K){d.spinner.stop()}),mxUtils.bind(this,function(K){d.handleError(K)}))}),null,!0,v)}}));this.put("publish",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,["publishLink"],v)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var n=
+d.getCurrentFile();null!=n&&n.share()}catch(v){d.handleError(v)}}));this.put("embed",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();null==D||D.getMode()!=App.MODE_GOOGLE&&D.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(D.getTitle())||this.addMenuItems(n,["liveImage","-"],v);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],v);navigator.standalone||d.isOffline()||this.addMenuItems(n,["embedIframe"],v);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
+v)})));d.addInsertItem=function(n,v,D,H){("plantUml"!=H||EditorUi.enablePlantUml&&!d.isOffline())&&n.addItem(D,null,mxUtils.bind(this,function(){if("fromText"==H||"formatSql"==H||"plantUml"==H||"mermaid"==H){var K=new ParseDialog(d,D,H);d.showDialog(K.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else K=new CreateGraphDialog(d,D,H),d.showDialog(K.container,620,420,!0,!1);K.init()}),v,null,u())};var A=function(n){t.getModel().beginUpdate();try{n=t.addCell(n),t.fireEvent(new mxEventObject("cellsInserted",
+"cells",[n]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(n);t.setSelectionCell(n);t.container.focus();t.editAfterInsert&&t.startEditing(n);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(n))},0);return n},x=function(n,v,D,H,K){n=new mxCell(n,new mxGeometry(0,0,v,D),H);n.vertex=!0;null==K&&(K=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=K.x;n.geometry.y=K.y;return A(n)};d.actions.put("insertText",new Action(mxResources.get("text"),
+function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(x("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=u;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",
+120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"D")).isEnabled=u;d.actions.put("insertNote",new Action(mxResources.get("note"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"S")).isEnabled=u;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&x("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())},null,null,"F")).isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(n){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+x("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint())})).isEnabled=u;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(n){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var v=t.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)?null:t.getInsertPoint();null==n&&(n=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([D],!0)));var D=new mxCell("",new mxGeometry(0,0,v,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+D.geometry.setTerminalPoint(n,!0);D.geometry.setTerminalPoint(new mxPoint(n.x+D.geometry.width,n.y),!1);D.geometry.points=[];D.geometry.relative=!0;D.edge=!0;A(D)}},null,null,"C")).isEnabled=u;e=d.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){null!=d.formatWindow&&d.formatWindow.window.setVisible(!d.formatWindow.window.isVisible())}));e.shortcut=d.actions.get("formatPanel").shortcut;e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=
+d.formatWindow&&d.formatWindow.window.isVisible()}));e=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow&&d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible())}));e.shortcut=d.actions.get("formatPanel").shortcut;e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()}));d.addInsertMenuItems=mxUtils.bind(this,function(n,v,D){for(var H=0;H<D.length;H++)"-"==
+D[H]?n.addSeparator(v):d.addInsertItem(n,v,mxResources.get(D[H])+"...",D[H])});this.put("insert",new Menu(mxUtils.bind(this,function(n,v){"sketch"==Editor.currentTheme||"1"==urlParams.sketch?(d.menus.addMenuItems(n,["toggleShapes"],v),d.menus.addSubmenu("table",n,v),n.addSeparator(v),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(n,["insertTemplate"],v),d.menus.addMenuItems(n,["insertImage","insertLink","-"],v),d.menus.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),d.menus.addSubmenu("layout",
+n,v)):(this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),v),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(n,["insertTemplate"],v),n.addSeparator(v),this.addSubmenu("insertLayout",n,v,mxResources.get("layout")),this.addSubmenu("insertAdvanced",n,v,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",n,v))})));this.put("table",new Menu(mxUtils.bind(this,
+function(n,v){d.menus.addInsertTableCellItem(n,v)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){d.addInsertMenuItems(n,v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,v){d.addInsertMenuItems(n,v,["fromText","plantUml","mermaid","-","formatSql"]);n.addItem(mxResources.get("csv")+"...",null,function(){t.popupMenuHandler.hideMenu();d.showImportCsvDialog()},
+v,null,u());"min"==uiTheme&&this.addMenuItems(n,["-","createShape","editDiagram"],v)})));this.put("openRecent",new Menu(function(n,v){var D=d.getRecent();if(null!=D){for(var H=0;H<D.length;H++)(function(K){var G=K.mode;G==App.MODE_GOOGLE?G="googleDrive":G==App.MODE_ONEDRIVE&&(G="oneDrive");n.addItem(K.title+" ("+mxResources.get(G)+")",null,function(){d.loadFile(K.id)},v)})(D[H]);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},v)}));this.put("openFrom",new Menu(function(n,
+v){null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
+function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},
+v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},
+v);d.isOffline()||(n.addSeparator(v),n.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(H){null!=H&&0<H.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(H):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(H)))},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},v))}));Editor.enableCustomLibraries&&
+(this.put("newLibrary",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=
+d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},v)})),this.put("openLibraryFrom",new Menu(function(n,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+
+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},v):C&&"function"===typeof window.DriveClient&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=d.oneDrive?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},v):J&&"function"===typeof window.OneDriveClient&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=d.dropbox?n.addItem(mxResources.get("dropbox")+
+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},v):F&&"function"===typeof window.DropboxClient&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);null!=d.gitHub&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},v);null!=d.gitLab&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},v);null!=d.trello?n.addItem(mxResources.get("trello")+"...",
+null,function(){d.pickLibrary(App.MODE_TRELLO)},v):c&&"function"===typeof window.TrelloClient&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);n.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},v);d.isOffline()||(n.addSeparator(v),
+n.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(d,"",mxResources.get("open"),function(H){if(null!=H&&0<H.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var K=H;d.editor.isCorsEnabledForUrl(H)||(K=PROXY_URL+"?url="+encodeURIComponent(H));mxUtils.get(K,function(G){if(200<=G.getStatus()&&299>=G.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,G.getText(),H))}catch(N){d.handleError(N,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
+d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(D.container,300,80,!0,!0);D.init()},v));"1"==urlParams.confLib&&(n.addSeparator(v),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},v))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+e=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();
+this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));e=this.get("viewPanels");var I=e.funct;e.funct=
+function(n,v){I.apply(this,arguments);d.menus.addMenuItems(n,["tags"],v);d.commentsSupported()&&d.menus.addMenuItems(n,["comments"],v)};this.put("view",new Menu(mxUtils.bind(this,function(n,v){this.addMenuItems(n,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP){var D=this.addMenuItem(n,"scratchpad",v);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(n,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",n,v);this.addMenuItems(n,"- scrollbars tooltips ruler - grid guides".split(" "),v);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(n,"shadowVisible",v);this.addMenuItems(n,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),v);"1"!=urlParams.sketch&&this.addMenuItems(n,
+["-","fullscreen"],v)})));if(EditorUi.isElectronApp){var M="1"==urlParams.enableSpellCheck;e=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();M=!M;d.alert(mxResources.get("restartForChangeRequired"))});e.setToggleAction(!0);e.setSelectedCallback(function(){return M});var E="1"==urlParams.enableStoreBkp;e=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();E=!E});e.setToggleAction(!0);e.setSelectedCallback(function(){return E});d.actions.addAction("openDevTools",function(){d.openDevTools()});
+d.actions.addAction("drafts...",function(){var n=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(v){v=parseInt(v);0<=v&&(EditorUi.draftSaveDelay=1E3*v,EditorUi.enableDrafts=0<v,mxSettings.setDraftSaveDelay(v),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(n.container,320,80,!0,!0);n.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(n,v){var D="sketch"==
+Editor.currentTheme||"1"==urlParams.sketch;if(D||"min"==uiTheme){null==Q||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",n,v);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",n,v);d.menus.addSubmenu("units",n,v);n.addSeparator(v);D||d.menus.addMenuItems(n,["scrollbars","-","tooltips","copyConnect","collapseExpand"],v);"1"==urlParams.embedInline||D||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||d.mode==App.MODE_ATLAS||
+d.menus.addMenuItems(n,["-","showStartScreen","search","scratchpad"],v);n.addSeparator(v);D&&d.menus.addMenuItems(n,["copyConnect","collapseExpand","tooltips","-"],v);EditorUi.isElectronApp&&d.menus.addMenuItems(n,["-","spellCheck","autoBkp","drafts","-"],v);var H=d.getCurrentFile();null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()&&this.addMenuItems(n,["-","showRemoteCursors","shareCursor","-"],v);Graph.translateDiagram&&d.menus.addMenuItems(n,["diagramLanguage"],v);d.mode!=App.MODE_ATLAS&&
+d.menus.addMenuItem(n,"configuration",v);D||!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(n,"plugins",v);n.addSeparator(v)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",n,v),"1"!=urlParams.embed&&this.addSubmenu("theme",n,v),n.addSeparator(v),"undefined"!==typeof MathJax&&(D=this.addMenuItem(n,"mathematicalTypesetting",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/math-typesetting")),
+EditorUi.isElectronApp&&this.addMenuItems(n,["spellCheck","autoBkp","drafts"],v),this.addMenuItems(n,["copyConnect","collapseExpand","-"],v),"1"!=urlParams.embed&&(H=d.getCurrentFile(),null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors","shareCursor"],v),this.addMenuItems(n,["autosave"],v)),n.addSeparator(v),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,"plugins",v),this.addMenuItems(n,["-","editDiagram"],v),Graph.translateDiagram&&this.addMenuItems(n,
+["diagramLanguage"]),n.addSeparator(v),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],v),this.addMenuItems(n,["configuration"],v),n.addSeparator(v),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function K(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(d,function(N){console.log(arguments)},null,
+null,null,"user",function(N,T,V){var U=new Date;U.setDate(U.getDate()-7);d.drive.listFiles(null,U,V?!0:!1,function(X){for(var l=[],B=0;B<X.items.length;B++)l.push(K(X.items[B]));N(l)},T)},function(N,T,V,U){d.drive.listFiles(N,null,U?!0:!1,function(X){for(var l=[],B=0;B<X.items.length;B++)l.push(K(X.items[B]));T(l)},V)},function(N,T,V){d.drive.getFile(N.id,function(U){T(U.data)},V)},null,function(N){N({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
+!0)}),this.addMenuItem(n,"templates",v))})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();d.menus.addSubmenu("extras",n,v,mxResources.get("preferences"));n.addSeparator(v);var H="sketch"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(n,"new open - synchronize - save saveAs -".split(" "),v);else if("1"==urlParams.embed||d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
+d.menus.addMenuItems(n,["-","save"],v);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(n,["saveAndExit"],v),null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],v);n.addSeparator(v)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(n,["save","synchronize","-"],v):"1"!=urlParams.noFileMenu&&(H?d.menus.addSubmenu("file",n,v):(d.menus.addMenuItems(n,["new"],v),d.menus.addSubmenu("openFrom",
+n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),n.addSeparator(v),null!=D&&(D.constructor==DriveFile&&d.menus.addMenuItems(n,["share"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.constructor==LocalFile||d.menus.addMenuItems(n,["synchronize"],v)),n.addSeparator(v),d.menus.addSubmenu("save",n,v)));d.menus.addSubmenu("exportAs",n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(n,["import"],v):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",n,v);d.menus.addMenuItems(n,
+["-","findReplace"],v);d.commentsSupported()&&d.menus.addMenuItems(n,["comments","-"],v);d.menus.addMenuItems(n,["toggleFormat","layers","tags","-","pageSetup"],v);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(n,["print"],v);H||null==D||null==d.fileNode||"1"==urlParams.embedInline||(D=null!=D.getTitle()?D.getTitle():d.defaultFilename,/(\.html)$/i.test(D)||/(\.svg)$/i.test(D)||this.addMenuItems(n,["-","properties"]));n.addSeparator(v);d.menus.addSubmenu("help",
+n,v);"1"==urlParams.embed||d.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||d.mode==App.MODE_ATLAS)&&d.menus.addMenuItems(n,["-","exit"],v):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(n,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(n,v){var D=d.getCurrentFile();null!=D&&D.constructor==DriveFile?d.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],v):(d.menus.addMenuItems(n,["save","saveAs","-","rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
+"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):d.menus.addMenuItems(n,["makeCopy"],v));d.menus.addMenuItems(n,["-","autosave"],v);null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],v)})));this.put("file",new Menu(mxUtils.bind(this,function(n,v){var D="sketch"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,v),this.addSubmenu("exportAs",n,v),this.addSubmenu("embed",n,v),"1"==urlParams.libraries&&
+(this.addMenuItems(n,["-"],v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v)),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),this.addMenuItems(n,["-","pageSetup","print","-","rename"],v),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v):(this.addMenuItems(n,["save"],v),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],v))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,
+["exit"],v);else if(D){D=d.getCurrentFile();d.menus.addMenuItems(n,["new"],v);d.menus.addSubmenu("openFrom",n,v);isLocalStorage&&this.addSubmenu("openRecent",n,v);n.addSeparator(v);d.menus.addMenuItems(n,["-","save"],v);null!=D&&D.constructor==DriveFile||d.menus.addMenuItems(n,["saveAs"],v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||d.menus.addMenuItems(n,["synchronize"],v);null!=D&&D.constructor==DriveFile?d.menus.addMenuItems(n,"- rename makeCopy - moveToFolder openFolder".split(" "),
+v):(d.menus.addMenuItems(n,["-","rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):d.menus.addMenuItems(n,["makeCopy"],v));null!=D&&D.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],v);if(null!=D){if(null!=d.fileNode&&"1"!=urlParams.embedInline){var H=null!=D.getTitle()?D.getTitle():d.defaultFilename;(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&
+this.addMenuItems(n,["properties"],v)}D.constructor==DriveFile&&d.menus.addMenuItems(n,["share"],v)}d.menus.addMenuItems(n,["-","autosave"],v)}else D=this.editorUi.getCurrentFile(),null!=D&&D.constructor==DriveFile?(D.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],v),this.addMenuItems(n,["save","-","share"],v),H=this.addMenuItem(n,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize"),n.addSeparator(v)):
+this.addMenuItems(n,["new"],v),this.addSubmenu("openFrom",n,v),isLocalStorage&&this.addSubmenu("openRecent",n,v),null!=D&&D.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),v):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||(n.addSeparator(v),H=this.addMenuItem(n,"synchronize",v),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/synchronize")),
+this.addMenuItems(n,["-","save","saveAs","-"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==D||this.addMenuItems(n,["share","-"],v),this.addMenuItems(n,["rename"],v),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],v):(this.addMenuItems(n,["makeCopy"],v),null!=D&&D.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],v))),n.addSeparator(v),this.addSubmenu("importFrom",
+n,v),this.addSubmenu("exportAs",n,v),n.addSeparator(v),this.addSubmenu("embed",n,v),this.addSubmenu("publish",n,v),n.addSeparator(v),this.addSubmenu("newLibrary",n,v),this.addSubmenu("openLibraryFrom",n,v),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],v),null!=D&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(H=null!=D.getTitle()?D.getTitle():d.defaultFilename,(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(H)&&!/(\.svg)$/i.test(H))&&
+this.addMenuItems(n,["-","properties"])),this.addMenuItems(n,["-","pageSetup"],v),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],v),this.addMenuItems(n,["-","close"])})));k.prototype.execute=function(){var n=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var v=n.extFonts,D=0;null!=v&&D<v.length;D++){var H=
+document.getElementById("extFont_"+v[D].name);null!=H&&H.parentNode.removeChild(H)}n.extFonts=[];for(D=0;null!=this.previousExtFonts&&D<this.previousExtFonts.length;D++)this.ui.editor.graph.addExtFont(this.previousExtFonts[D].name,this.previousExtFonts[D].url);this.previousExtFonts=v};this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,v){for(var D=mxUtils.bind(this,function(l,B,L,P,O){var R=d.editor.graph;P=this.styleChange(n,P||l,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
+"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[l,null!=B?encodeURIComponent(B):null,null]:[l],null,v,function(){"1"!=urlParams["ext-fonts"]?R.setFont(l,B):(document.execCommand("fontname",!1,l),R.addExtFont(l,B));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[l,null!=B?encodeURIComponent(B):null,null]:[l],"cells",
+[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&R.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(l,B)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",P.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
+function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[l.toLowerCase()];for(var W=0;W<this.customFonts.length;W++)if(this.customFonts[W].name==l&&this.customFonts[W].url==B){this.customFonts.splice(W,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var aa=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=aa&&0<aa.length)for(W=0;W<aa.length;W++)if(aa[W].name==l){aa.splice(W,1);break}var Y=mxUtils.clone(this.customFonts);for(W=0;W<Y.length;W++)if(Y[W].name==
+l){Y.splice(W,1);break}W=new k(this.editorUi,aa,Y);this.editorUi.editor.graph.model.execute(W)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(l,B);P.firstChild.nextSibling.style.fontFamily=l;null!=O&&P.setAttribute("title",O)}),H={},K=0;K<this.defaultFonts.length;K++){var G=this.defaultFonts[K];"string"===typeof G?D(G):null!=G.fontFamily&&null!=G.fontUrl&&(H[encodeURIComponent(G.fontFamily)+"@"+encodeURIComponent(G.fontUrl)]=!0,D(G.fontFamily,G.fontUrl))}n.addSeparator(v);if("1"!=
+urlParams["ext-fonts"]){G=function(l){var B=encodeURIComponent(l.name)+(null==l.url?"":"@"+encodeURIComponent(l.url));if(!H[B]){for(var L=l.name,P=0;null!=T[L.toLowerCase()];)L=l.name+" ("+ ++P+")";null==N[B]&&(V.push({name:l.name,url:l.url,label:L,title:l.url}),T[L.toLowerCase()]=l,N[B]=l)}};var N={},T={},V=[];for(K=0;K<this.customFonts.length;K++)G(this.customFonts[K]);for(var U in Graph.recentCustomFonts)G(Graph.recentCustomFonts[U]);V.sort(function(l,B){return l.label<B.label?-1:l.label>B.label?
+1:0});if(0<V.length){for(K=0;K<V.length;K++)D(V[K].name,V[K].url,!0,V[K].label,V[K].url);n.addSeparator(v)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),v);n.addSeparator(v)}else{U=this.editorUi.editor.graph.extFonts;if(null!=U&&0<U.length){G={};var X=!1;for(K=0;K<this.customFonts.length;K++)G[this.customFonts[K].name]=!0;for(K=0;K<U.length;K++)G[U[K].name]||(this.customFonts.push(U[K]),
+X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(K=0;K<this.customFonts.length;K++)U=this.customFonts[K].name,G=this.customFonts[K].url,D(U,G,!0),this.editorUi.editor.graph.addExtFont(U,G,!0);n.addSeparator(v);n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var l=new k(this.editorUi,[],[]);d.editor.graph.model.execute(l)}),v);n.addSeparator(v)}}n.addItem(mxResources.get("custom")+"...",null,
+mxUtils.bind(this,function(){var l=this.editorUi.editor.graph,B=l.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",P=null;if("1"!=urlParams["ext-fonts"]&&l.isEditing()){var O=l.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(B=Graph.stripQuotes(O.fontFamily),P=Graph.getFontUrl(B,null),null!=P&&(Graph.isGoogleFontUrl(P)?(P=null,L="g"):L="w")))}else O=l.getView().getState(l.getSelectionCell()),null!=O&&(B=O.style[mxConstants.STYLE_FONTFAMILY]||
+B,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?L="g":(L="w",P=O))):(L=O.style.FType||L,"w"==L&&(P=this.editorUi.editor.graph.extFonts,O=null,null!=P&&(O=P.find(function(S){return S.name==B})),P=null!=O?O.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=P&&P.substring(0,PROXY_URL.length)==PROXY_URL&&(P=decodeURIComponent(P.substr((PROXY_URL+"?url=").length)));var R=null;document.activeElement==l.cellEditor.textarea&&(R=
+l.cellEditor.saveSelection());L=new FontDialog(this.editorUi,B,P,L,mxUtils.bind(this,function(S,W,aa){null!=R&&(l.cellEditor.restoreSelection(R),R=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&l.isEditing())l.setFont(S,W);else{l.getModel().beginUpdate();try{l.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(l.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),l.setCellStyles("fontSource",null!=W?encodeURIComponent(W):null),l.setCellStyles("FType",null)):(l.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+S),"s"!=aa&&(l.setCellStyles("FType",aa),0==W.indexOf("http://")&&(W=PROXY_URL+"?url="+encodeURIComponent(W)),this.editorUi.editor.graph.addExtFont(S,W)));aa=!0;for(var Y=0;Y<this.customFonts.length;Y++)if(this.customFonts[Y].name==S){aa=!1;break}aa&&(this.customFonts.push({name:S,url:W}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{l.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);
+L.init()}),v,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,f,k){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=k&&(f.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,e=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,e);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,d=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,d);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,f,k,e,u){SelectPage.call(this,b,k);this.relatedPage=f;this.index=e;this.previousIndex=null;this.noSelect=u}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,f,k,d,t){SelectPage.call(this,b,k);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=t}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){f=k;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var k=0;k<f.length;k++)if(f[k].getId()==b)return f[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,k){var e=b.indexOf(","),u=null;0<e&&(e=this.getPageById(b.substring(e+1)),null!=e&&e!=f&&(u=this.getImageForPage(e,f,k),u.originalSrc=b));null==u&&(u={originalSrc:b});return u};
-EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var e=k.getGlobalVariable,u=this.createTemporaryGraph(k.getStylesheet());u.defaultPageBackgroundColor=k.defaultPageBackgroundColor;u.shapeBackgroundColor=k.shapeBackgroundColor;u.shapeForegroundColor=k.shapeForegroundColor;var v=this.getPageIndex(null!=f?f:this.currentPage);u.getGlobalVariable=function(E){return"pagenumber"==E?v+1:"page"==E&&null!=f?f.getName():e.apply(this,arguments)};document.body.appendChild(u.container);
-this.updatePageRoot(b);u.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=u.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var B=u.getGraphBounds();document.body.removeChild(u.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),B.width,B.height,B.x,B.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var u=
-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";u!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,e=mxUtils.bind(this,function(){this.updateTabContainer();var u=this.currentPage;null!=u&&u!=k&&(null==u.viewState||null==u.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+u.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+u.viewState.scrollTop),k=u);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(u,
-v){u=v.getProperty("edit").changes;for(v=0;v<u.length;v++)if(u[v]instanceof SelectPage||u[v]instanceof RenamePage||u[v]instanceof MovePage||u[v]instanceof mxRootChange){e();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var e=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(e.setViewState(f),this.editor.updateGraphComponents(),e.view.revalidate(),e.sizeDidChange()),e.container.scrollLeft=e.view.translate.x*e.view.scale+f.scrollLeft,e.container.scrollTop=e.view.translate.y*e.view.scale+f.scrollTop,e.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),e=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),v=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),E=b.getAttribute("extFonts");if(E)try{E=E.split("|").map(function(L){L=L.split("^");return{name:L[0],url:L[1]}})}catch(L){console.log("ExtFonts format error: "+L.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=v&&0<v.length?v:null,backgroundImage:B,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(e)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,e,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:E||[]}};
-Graph.prototype.saveViewState=function(b,f,k,e){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),e=this.getBackgroundImageObject(b.backgroundImage,e),null!=e&&f.setAttribute("backgroundImage",
-JSON.stringify(e)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(u){return u.name+"^"+u.url}).join("|"))};
+EditorUi.prototype.createImageForPageLink=function(b,f,k){var d=b.indexOf(","),t=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(t=this.getImageForPage(d,f,k),t.originalSrc=b));null==t&&(t={originalSrc:b});return t};
+EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,t=this.createTemporaryGraph(k.getStylesheet());t.defaultPageBackgroundColor=k.defaultPageBackgroundColor;t.shapeBackgroundColor=k.shapeBackgroundColor;t.shapeForegroundColor=k.shapeForegroundColor;var u=this.getPageIndex(null!=f?f:this.currentPage);t.getGlobalVariable=function(F){return"pagenumber"==F?u+1:"page"==F&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(t.container);
+this.updatePageRoot(b);t.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=t.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var C=t.getGraphBounds();document.body.removeChild(t.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),C.width,C.height,C.x,C.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var t=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";t!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var t=this.currentPage;null!=t&&t!=k&&(null==t.viewState||null==t.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+t.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+t.viewState.scrollTop),k=t);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,
+u){t=u.getProperty("edit").changes;for(u=0;u<t.length;u++)if(t[u]instanceof SelectPage||t[u]instanceof RenamePage||t[u]instanceof MovePage||t[u]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),u=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(J){J=J.split("^");return{name:J[0],url:J[1]}})}catch(J){console.log("ExtFonts format error: "+J.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=u&&0<u.length?u:null,backgroundImage:C,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,d,t),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:F||[]}};
+Graph.prototype.saveViewState=function(b,f,k,d){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
+JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(t){return t.name+"^"+t.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var e=document.getElementById("extFont_"+k[f].name);null!=e&&e.parentNode.removeChild(e)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var d=document.getElementById("extFont_"+k[f].name);null!=d&&d.parentNode.removeChild(d)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var e="extFont_"+b;if(null==document.getElementById(e))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,e);else{document.getElementsByTagName("head");var u=document.createElement("style");u.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));u.setAttribute("id",e);document.getElementsByTagName("head")[0].appendChild(u)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;e=!0;for(u=0;u<k.length;u++)if(k[u].name==b){e=!1;break}e&&this.extFonts.push({name:b,url:f})}}};
+Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var t=document.createElement("style");t.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));t.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(t)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(t=0;t<k.length;t++)if(k[t].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}};
EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var k=Editor.extractParserError(f);if(k)throw Error(k);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),k=new mxCodec(f.ownerDocument),b.root=k.decode(f).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(f))throw Error(k);null!=f&&(b.graphModelNode=
f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var e=this.editor.graph.model.createUndoableEdit();e.ignoreEdit=!0;var u=new SelectPage(this,b,k);u.execute();e.add(u);e.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",e))}}catch(v){this.handleError(v)}};
+EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var t=new SelectPage(this,b,k);t.execute();d.add(t);d.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(u){this.handleError(u)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var k=this.pages[f].getName();null!=k&&0<k.length&&(b[k]=k)}f=this.pages.length;do k=mxResources.get("pageWithNumber",[++f]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var e=this.currentPage;e==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,e=this.pages[k]):1>=this.pages.length&&(e=this.insertPage(),f.model.execute(new RenamePage(this,e,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,e))}finally{f.model.endUpdate()}}}catch(u){this.handleError(u)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var e=this.editor.graph;if(e.isEnabled()){e.isEditing()&&e.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var v={},B=e.createCellLookup([e.model.root]);k=new DiagramPage(u);k.root=e.cloneCell(e.model.root,null,v);var E=new mxGraphModel;E.prefix=Editor.guid()+"-";E.setRoot(k.root);e.updateCustomLinks(e.createCellMapping(v,B),[k.root]);k.viewState=b==this.currentPage?e.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(L){this.handleError(L)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
+EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(t){this.handleError(t)}return b};
+EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var u={},C=d.createCellLookup([d.model.root]);k=new DiagramPage(t);k.root=d.cloneCell(d.model.root,null,u);var F=new mxGraphModel;F.prefix=Editor.guid()+"-";F.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(u,C),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(J){this.handleError(J)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
EditorUi.prototype.clonePages=function(b){for(var f=[],k=0;k<b.length;k++)f.push(this.clonePage(b[k]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,e=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),u=null,v=0;v<this.pages.length;v++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),u=c):mxEvent.consume(g)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(g){u=null;g.stopPropagation();
-g.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(g){null!=u&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(g){null!=u&&c!=u&&this.movePage(u,c);g.stopPropagation();g.preventDefault()}));f.appendChild(d)})(v,this.createTabForPage(this.pages[v],e,this.pages[v]!=this.currentPage,v+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);e=this.createPageMenuTab();this.tabContainer.appendChild(e);
-e=null;this.isPageInsertTabVisible()&&(e=this.createPageInsertTab(),this.tabContainer.appendChild(e));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=e&&(e.style.position="absolute",e.style.right="0px",f.style.marginRight="30px");var B=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");B.style.position="absolute";B.style.right=this.editor.chromeless?"29px":"55px";B.style.fontSize="13pt";this.tabContainer.appendChild(B);var E=this.createControlTab(4,"&nbsp;&#10095;");E.style.position="absolute";
-E.style.right=this.editor.chromeless?"0px":"29px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var L=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=L+"px";mxEvent.addListener(B,"click",mxUtils.bind(this,function(c){f.scrollLeft-=Math.max(20,L-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}));mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E,
-f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(E,"click",mxUtils.bind(this,function(c){f.scrollLeft+=Math.max(20,L-20);mxUtils.setOpacity(B,0<f.scrollLeft?100:50);mxUtils.setOpacity(E,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
+1),t=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(c,e){this.pages[c]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),t=c):mxEvent.consume(g)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(g){t=null;g.stopPropagation();
+g.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(g){null!=t&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(g){null!=t&&c!=t&&this.movePage(t,c);g.stopPropagation();g.preventDefault()}));f.appendChild(e)})(u,this.createTabForPage(this.pages[u],d,this.pages[u]!=this.currentPage,u+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
+d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var C=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");C.style.position="absolute";C.style.right=this.editor.chromeless?"29px":"55px";C.style.fontSize="13pt";this.tabContainer.appendChild(C);var F=this.createControlTab(4,"&nbsp;&#10095;");F.style.position="absolute";
+F.style.right=this.editor.chromeless?"0px":"29px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var J=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=J+"px";mxEvent.addListener(C,"click",mxUtils.bind(this,function(c){f.scrollLeft-=Math.max(20,J-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}));mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,
+f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(F,"click",mxUtils.bind(this,function(c){f.scrollLeft+=Math.max(20,J-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(F,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(c)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor=
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(k){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return f};
EditorUi.prototype.createControlTab=function(b,f,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=f;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.editor.graph.popupMenuHandler.hideMenu();
-var u=new mxPopupMenu(mxUtils.bind(this,function(E,L){var c=mxUtils.bind(this,function(){for(var m=0;m<this.pages.length;m++)mxUtils.bind(this,function(n){var z=E.addItem(this.getShortPageName(this.pages[n]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[n])}),L),C=this.pages[n].getId();z.setAttribute("title",this.pages[n].getName()+" ("+(n+1)+"/"+this.pages.length+")"+(null!=C?" ["+C+"]":""));this.pages[n]==this.currentPage&&E.addCheckmark(z,Editor.checkmarkImage)})(m)}),d=mxUtils.bind(this,
-function(){E.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),L)});f||c();if(this.editor.graph.isEnabled()){f||(E.addSeparator(L),d());var g=this.currentPage;if(null!=g){E.addSeparator(L);var q=this.getShortPageName(g);E.addItem(mxResources.get("removeIt",[q]),null,mxUtils.bind(this,function(){this.removePage(g)}),L);E.addItem(mxResources.get("renameIt",[q]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),L);f||E.addSeparator(L);E.addItem(mxResources.get("duplicateIt",
-[q]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),L)}}f&&(E.addSeparator(L),d(),E.addSeparator(L),c())}));u.div.className+=" geMenubarMenu";u.smartSeparators=!0;u.showDisabled=!0;u.autoExpand=!0;u.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(u,arguments);u.destroy()});var v=mxEvent.getClientX(e),B=mxEvent.getClientY(e);u.popup(v,B,null,e);this.setCurrentMenu(u);mxEvent.consume(e)}));return b};
+EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
+var t=new mxPopupMenu(mxUtils.bind(this,function(F,J){var c=mxUtils.bind(this,function(){for(var p=0;p<this.pages.length;p++)mxUtils.bind(this,function(q){var z=F.addItem(this.getShortPageName(this.pages[q]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[q])}),J),y=this.pages[q].getId();z.setAttribute("title",this.pages[q].getName()+" ("+(q+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[q]==this.currentPage&&F.addCheckmark(z,Editor.checkmarkImage)})(p)}),e=mxUtils.bind(this,
+function(){F.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),J)});f||c();if(this.editor.graph.isEnabled()){f||(F.addSeparator(J),e());var g=this.currentPage;if(null!=g){F.addSeparator(J);var m=this.getShortPageName(g);F.addItem(mxResources.get("removeIt",[m]),null,mxUtils.bind(this,function(){this.removePage(g)}),J);F.addItem(mxResources.get("renameIt",[m]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),J);f||F.addSeparator(J);F.addItem(mxResources.get("duplicateIt",
+[m]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),J)}}f&&(F.addSeparator(J),e(),F.addSeparator(J),c())}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var u=mxEvent.getClientX(d),C=mxEvent.getClientY(d);t.popup(u,C,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,f,k,e){k=this.createTab(k);var u=b.getName()||mxResources.get("untitled"),v=b.getId();k.setAttribute("title",u+(null!=v?" ("+v+")":"")+" ["+e+"]");mxUtils.write(k,u);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(v){this.renamePage(b);mxEvent.consume(v)}));var e=!1,u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(v){e=null!=this.currentMenu;u=b==this.currentPage;k.isMouseDown||u||this.selectPage(b)}),null,mxUtils.bind(this,function(v){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(v)&&u||mxEvent.isPopupTrigger(v))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(v)||!e){var B=new mxPopupMenu(this.createPageMenu(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);this.resetCurrentMenu();B.destroy()});var E=mxEvent.getClientX(v),L=mxEvent.getClientY(v);B.popup(E,L,null,v);this.setCurrentMenu(B,f)}mxEvent.consume(v)}}))};
-EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var e=this.getCurrentFile();if(null!=e&&e.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var u=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));u+=(0==u.length?"?":"&")+"page-id="+b.getId();null!=f&&(u+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+u+"#"+e.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,e){var u=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),e);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),e);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),e);null!=this.getLinkForPage(b)&&(k.addSeparator(e),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(v,B,E,L,c,d){v=this.createUrlParameters(v,B,E,L,c,d);E||v.push("hide-pages=1");u.isSelectionEmpty()||(E=u.getBoundingBox(u.getSelectionCells()),B=u.view.translate,c=u.view.scale,E.width/=c,E.height/=c,E.x=E.x/c-B.x,E.y=E.y/c-B.y,v.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}))));
-L=new EmbedDialog(this,this.getLinkForPage(b,v,L));this.showDialog(L.container,450,240,!0,!0);L.init()}))})));k.addSeparator(e);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),e);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(e),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),e))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){f=e.oldIndex;e.oldIndex=e.newIndex;e.newIndex=f;return e};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,e){e.ui=f.ui;return k};b.afterDecode=function(f,k,e){f=e.previous;e.previous=e.name;e.name=f;return e};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,e){e.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(e.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&e.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(u,v){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?v:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root,
-e));return e};b.beforeDecode=function(f,k,e){e.ui=f.ui;e.relatedPage=e.ui.getPageById(k.getAttribute("relatedPage"));if(null==e.relatedPage){var u=k.ownerDocument.createElement("diagram");u.setAttribute("id",k.getAttribute("relatedPage"));u.setAttribute("name",k.getAttribute("name"));e.relatedPage=new DiagramPage(u);u=k.getAttribute("viewState");null!=u&&(e.relatedPage.viewState=JSON.parse(u),k.removeAttribute("viewState"));k=k.cloneNode(!0);u=k.firstChild;if(null!=u)for(e.relatedPage.root=f.decodeCell(u,
-!1),e=u.nextSibling,u.parentNode.removeChild(u),u=e;null!=u;){e=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var v=u.getAttribute("id");null==f.lookup(v)&&f.decodeCell(u)}u.parentNode.removeChild(u);u=e}}return k};b.afterDecode=function(f,k,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(e,u,v,B,E){u=null!=u?u:!1;null==v&&(v=this.getFoldableCells(this.getSelectionCells(),e));this.stopEditing();this.model.beginUpdate();try{for(var L=v.slice(),c=0;c<v.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(v[c]),"treeFolding","0")&&this.foldTreeCell(e,v[c]);v=L;v=b.apply(this,arguments)}finally{this.model.endUpdate()}return v};Graph.prototype.foldTreeCell=
-function(e,u){this.model.beginUpdate();try{var v=[];this.traverse(u,!0,mxUtils.bind(this,function(E,L){var c=null!=L&&this.isTreeEdge(L);c&&v.push(L);E==u||null!=L&&!c||v.push(E);return(null==L||c)&&(E==u||!this.model.isCollapsed(E))}));this.model.setCollapsed(u,e);for(var B=0;B<v.length;B++)this.model.setVisible(v[B],!e)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(e){return!this.isEdgeIgnored(e)};Graph.prototype.getTreeEdges=function(e,u,v,B,E,L){return this.model.filterCells(this.getEdges(e,
-u,v,B,E,L),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(e,u){return this.getTreeEdges(e,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(e,u){return this.getTreeEdges(e,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function e(G){return z.isVertex(G)&&v(G)}function u(G){var P=
-!1;null!=G&&(P="1"==n.getCurrentCellStyle(G).treeMoving);return P}function v(G){var P=!1;null!=G&&(G=z.getParent(G),P=n.view.getState(G),P="tree"==(null!=P?P.style:n.getCellStyle(G)).containerType);return P}function B(G){var P=!1;null!=G&&(G=z.getParent(G),P=n.view.getState(G),n.view.getState(G),P=null!=(null!=P?P.style:n.getCellStyle(G)).childLayout);return P}function E(G){G=n.view.getState(G);if(null!=G){var P=n.getIncomingTreeEdges(G.cell);if(0<P.length&&(P=n.view.getState(P[0]),null!=P&&(P=P.absolutePoints,
-null!=P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==G.y&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==G.y+G.height&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>G.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function L(G,P){P=null!=P?P:!0;n.model.beginUpdate();try{var T=n.model.getParent(G),W=n.getIncomingTreeEdges(G),U=n.cloneCells([W[0],G]);n.model.setTerminal(U[0],n.model.getTerminal(W[0],
-!0),!0);var V=E(G),l=T.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=P?G.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=P?G.geometry.height+10:-U[1].geometry.height-10;n.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var A=n.view.getState(G),M=n.view.scale;if(null!=A){var Q=mxRectangle.fromRectangle(A);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(P?G.geometry.width+10:-U[1].geometry.width-10)*M:Q.y+=(P?
-G.geometry.height+10:-U[1].geometry.height-10)*M;var O=n.getOutgoingTreeEdges(n.model.getTerminal(W[0],!0));if(null!=O){for(var R=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,S=l=W=0;S<O.length;S++){var X=n.model.getTerminal(O[S],!1);if(V==E(X)){var aa=n.view.getState(X);X!=G&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY())&&mxUtils.intersects(Q,aa)&&(W=10+Math.max(W,(Math.min(Q.x+Q.width,aa.x+aa.width)-Math.max(Q.x,aa.x))/M),l=10+Math.max(l,
-(Math.min(Q.y+Q.height,aa.y+aa.height)-Math.max(Q.y,aa.y))/M))}}R?l=0:W=0;for(S=0;S<O.length;S++)if(X=n.model.getTerminal(O[S],!1),V==E(X)&&(aa=n.view.getState(X),X!=G&&null!=aa&&(R&&P!=aa.getCenterX()<A.getCenterX()||!R&&P!=aa.getCenterY()<A.getCenterY()))){var Y=[];n.traverse(aa.cell,!0,function(Z,ba){var ha=null!=ba&&n.isTreeEdge(ba);ha&&Y.push(ba);(null==ba||ha)&&Y.push(Z);return null==ba||ha});n.moveCells(Y,(P?1:-1)*W,(P?1:-1)*l)}}}return n.addCells(U,T)}finally{n.model.endUpdate()}}function c(G){n.model.beginUpdate();
-try{var P=E(G),T=n.getIncomingTreeEdges(G),W=n.cloneCells([T[0],G]);n.model.setTerminal(T[0],W[1],!1);n.model.setTerminal(W[0],W[1],!0);n.model.setTerminal(W[0],G,!1);var U=n.model.getParent(G),V=U.geometry,l=[];n.view.currentRoot!=U&&(W[1].geometry.x-=V.x,W[1].geometry.y-=V.y);n.traverse(G,!0,function(Q,O){var R=null!=O&&n.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(Q);return null==O||R});var A=G.geometry.width+40,M=G.geometry.height+40;P==mxConstants.DIRECTION_SOUTH?A=0:P==mxConstants.DIRECTION_NORTH?
-(A=0,M=-M):P==mxConstants.DIRECTION_WEST?(A=-A,M=0):P==mxConstants.DIRECTION_EAST&&(M=0);n.moveCells(l,A,M);return n.addCells(W,U)}finally{n.model.endUpdate()}}function d(G,P){n.model.beginUpdate();try{var T=n.model.getParent(G),W=n.getIncomingTreeEdges(G),U=E(G);0==W.length&&(W=[n.createEdge(T,null,"",null,null,n.createCurrentEdgeStyle())],U=P);var V=n.cloneCells([W[0],G]);n.model.setTerminal(V[0],G,!0);if(null==n.model.getTerminal(V[0],!1)){n.model.setTerminal(V[0],V[1],!1);var l=n.getCellStyle(V[1]).newEdgeStyle;
-if(null!=l)try{var A=JSON.parse(l),M;for(M in A)n.setCellStyles(M,A[M],[V[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==A[M]&&n.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(aa){}}W=n.getOutgoingTreeEdges(G);var Q=T.geometry;P=[];n.view.currentRoot==T&&(Q=new mxRectangle);for(l=0;l<W.length;l++){var O=n.model.getTerminal(W[l],!1);null!=O&&P.push(O)}var R=n.view.getBounds(P),S=n.view.translate,X=n.view.scale;U==mxConstants.DIRECTION_SOUTH?
-(V[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x-Q.x+10,V[1].geometry.y+=V[1].geometry.height-Q.y+40):U==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-V[1].geometry.width)/2:(R.x+R.width)/X-S.x+-Q.x+10,V[1].geometry.y-=V[1].geometry.height+Q.y+40):(V[1].geometry.x=U==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+Q.x+40):V[1].geometry.x+(V[1].geometry.width-Q.x+40),V[1].geometry.y=null==R?G.geometry.y+
-(G.geometry.height-V[1].geometry.height)/2:(R.y+R.height)/X-S.y+-Q.y+10);return n.addCells(V,T)}finally{n.model.endUpdate()}}function g(G,P,T){G=n.getOutgoingTreeEdges(G);T=n.view.getState(T);var W=[];if(null!=T&&null!=G){for(var U=0;U<G.length;U++){var V=n.view.getState(n.model.getTerminal(G[U],!1));null!=V&&(!P&&Math.min(V.x+V.width,T.x+T.width)>=Math.max(V.x,T.x)||P&&Math.min(V.y+V.height,T.y+T.height)>=Math.max(V.y,T.y))&&W.push(V)}W.sort(function(l,A){return P?l.x+l.width-A.x-A.width:l.y+l.height-
-A.y-A.height})}return W}function q(G,P){var T=E(G),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==W&&T!=P?m.actions.get("selectParent").funct():T==P?(P=n.getOutgoingTreeEdges(G),null!=P&&0<P.length&&n.setSelectionCell(n.model.getTerminal(P[0],!1))):(T=n.getIncomingTreeEdges(G),null!=T&&0<T.length&&(W=g(n.model.getTerminal(T[0],!0),W,G),G=n.view.getState(G),null!=G&&(G=mxUtils.indexOf(W,G),0<=G&&(G+=P==mxConstants.DIRECTION_NORTH||
-P==mxConstants.DIRECTION_WEST?-1:1,0<=G&&G<=W.length-1&&n.setSelectionCell(W[G].cell)))))}var m=this,n=m.editor.graph,z=n.getModel(),C=m.menus.createPopupMenu;m.menus.createPopupMenu=function(G,P,T){C.apply(this,arguments);if(1==n.getSelectionCount()){P=n.getSelectionCell();var W=n.getOutgoingTreeEdges(P);G.addSeparator();0<W.length&&(e(n.getSelectionCell())&&this.addMenuItems(G,["selectChildren"],null,T),this.addMenuItems(G,["selectDescendants"],null,T));e(n.getSelectionCell())?(G.addSeparator(),
-0<n.getIncomingTreeEdges(P).length&&this.addMenuItems(G,["selectSiblings","selectParent"],null,T)):0<n.model.getEdgeCount(P)&&this.addMenuItems(G,["selectConnections"],null,T)}};m.actions.addAction("selectChildren",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getOutgoingTreeEdges(G);if(null!=G){for(var P=[],T=0;T<G.length;T++)P.push(n.model.getTerminal(G[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+X");m.actions.addAction("selectSiblings",function(){if(n.isEnabled()&&
-1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getIncomingTreeEdges(G);if(null!=G&&0<G.length&&(G=n.getOutgoingTreeEdges(n.model.getTerminal(G[0],!0)),null!=G)){for(var P=[],T=0;T<G.length;T++)P.push(n.model.getTerminal(G[T],!1));n.setSelectionCells(P)}}},null,null,"Alt+Shift+S");m.actions.addAction("selectParent",function(){if(n.isEnabled()&&1==n.getSelectionCount()){var G=n.getSelectionCell();G=n.getIncomingTreeEdges(G);null!=G&&0<G.length&&n.setSelectionCell(n.model.getTerminal(G[0],
-!0))}},null,null,"Alt+Shift+P");m.actions.addAction("selectDescendants",function(G,P){G=n.getSelectionCell();if(n.isEnabled()&&n.model.isVertex(G)){if(null!=P&&mxEvent.isAltDown(P))n.setSelectionCells(n.model.getTreeEdges(G,null==P||!mxEvent.isShiftDown(P),null==P||!mxEvent.isControlDown(P)));else{var T=[];n.traverse(G,!0,function(W,U){var V=null!=U&&n.isTreeEdge(U);V&&T.push(U);null!=U&&!V||null!=P&&mxEvent.isShiftDown(P)||T.push(W);return null==U||V})}n.setSelectionCells(T)}},null,null,"Alt+Shift+D");
-var x=n.removeCells;n.removeCells=function(G,P){P=null!=P?P:!0;null==G&&(G=this.getDeletableCells(this.getSelectionCells()));P&&(G=this.getDeletableCells(this.addAllEdges(G)));for(var T=[],W=0;W<G.length;W++){var U=G[W];z.isEdge(U)&&v(U)&&(T.push(U),U=z.getTerminal(U,!1));if(e(U)){var V=[];n.traverse(U,!0,function(l,A){var M=null!=A&&n.isTreeEdge(A);M&&V.push(A);(null==A||M)&&V.push(l);return null==A||M});0<V.length&&(T=T.concat(V),U=n.getIncomingTreeEdges(G[W]),G=G.concat(U))}else null!=U&&T.push(G[W])}G=
-T;return x.apply(this,arguments)};m.hoverIcons.getStateAt=function(G,P,T){return e(G.cell)?null:this.graph.view.getState(this.graph.getCellAt(P,T))};var y=n.duplicateCells;n.duplicateCells=function(G,P){G=null!=G?G:this.getSelectionCells();for(var T=G.slice(0),W=0;W<T.length;W++){var U=n.view.getState(T[W]);if(null!=U&&e(U.cell)){var V=n.getIncomingTreeEdges(U.cell);for(U=0;U<V.length;U++)mxUtils.remove(V[U],G)}}this.model.beginUpdate();try{var l=y.call(this,G,P);if(l.length==G.length)for(W=0;W<G.length;W++)if(e(G[W])){var A=
-n.getIncomingTreeEdges(l[W]);V=n.getIncomingTreeEdges(G[W]);if(0==A.length&&0<V.length){var M=this.cloneCell(V[0]);this.addEdge(M,n.getDefaultParent(),this.model.getTerminal(V[0],!0),l[W])}}}finally{this.model.endUpdate()}return l};var I=n.moveCells;n.moveCells=function(G,P,T,W,U,V,l){var A=null;this.model.beginUpdate();try{var M=U,Q=this.getCurrentCellStyle(U);if(null!=G&&e(U)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var O=0;O<G.length;O++)if(e(G[O])||n.model.isEdge(G[O])&&null==n.model.getTerminal(G[O],
-!0)){U=n.model.getParent(G[O]);break}if(null!=M&&U!=M&&null!=this.view.getState(G[0])){var R=n.getIncomingTreeEdges(G[0]);if(0<R.length){var S=n.view.getState(n.model.getTerminal(R[0],!0));if(null!=S){var X=n.view.getState(M);null!=X&&(P=(X.getCenterX()-S.getCenterX())/n.view.scale,T=(X.getCenterY()-S.getCenterY())/n.view.scale)}}}}A=I.apply(this,arguments);if(null!=A&&null!=G&&A.length==G.length)for(O=0;O<A.length;O++)if(this.model.isEdge(A[O]))e(M)&&0>mxUtils.indexOf(A,this.model.getTerminal(A[O],
-!0))&&this.model.setTerminal(A[O],M,!0);else if(e(G[O])&&(R=n.getIncomingTreeEdges(G[O]),0<R.length))if(!W)e(M)&&0>mxUtils.indexOf(G,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],M,!0);else if(0==n.getIncomingTreeEdges(A[O]).length){Q=M;if(null==Q||Q==n.model.getParent(G[O]))Q=n.model.getTerminal(R[0],!0);W=this.cloneCell(R[0]);this.addEdge(W,n.getDefaultParent(),Q,A[O])}}finally{this.model.endUpdate()}return A};if(null!=m.sidebar){var N=m.sidebar.dropAndConnect;m.sidebar.dropAndConnect=
-function(G,P,T,W){var U=n.model,V=null;U.beginUpdate();try{if(V=N.apply(this,arguments),e(G))for(var l=0;l<V.length;l++)if(U.isEdge(V[l])&&null==U.getTerminal(V[l],!0)){U.setTerminal(V[l],G,!0);var A=n.getCellGeometry(V[l]);A.points=null;null!=A.getTerminalPoint(!0)&&A.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return V}}var t={88:m.actions.get("selectChildren"),84:m.actions.get("selectSubtree"),80:m.actions.get("selectParent"),83:m.actions.get("selectSiblings")},p=m.onKeyDown;m.onKeyDown=function(G){try{if(n.isEnabled()&&
-!n.isEditing()&&e(n.getSelectionCell())&&1==n.getSelectionCount()){var P=null;0<n.getIncomingTreeEdges(n.getSelectionCell()).length&&(9==G.which?P=mxEvent.isShiftDown(G)?c(n.getSelectionCell()):d(n.getSelectionCell()):13==G.which&&(P=L(n.getSelectionCell(),!mxEvent.isShiftDown(G))));if(null!=P&&0<P.length)1==P.length&&n.model.isEdge(P[0])?n.setSelectionCell(n.model.getTerminal(P[0],!1)):n.setSelectionCell(P[P.length-1]),null!=m.hoverIcons&&m.hoverIcons.update(n.view.getState(n.getSelectionCell())),
-n.startEditingAtCell(n.getSelectionCell()),mxEvent.consume(G);else if(mxEvent.isAltDown(G)&&mxEvent.isShiftDown(G)){var T=t[G.keyCode];null!=T&&(T.funct(G),mxEvent.consume(G))}else 37==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(G)):38==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(G)):39==G.keyCode?(q(n.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(G)):40==G.keyCode&&(q(n.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(G))}}catch(W){m.handleError(W)}mxEvent.isConsumed(G)||p.apply(this,arguments)};var F=n.connectVertex;n.connectVertex=function(G,P,T,W,U,V,l){var A=n.getIncomingTreeEdges(G);if(e(G)){var M=E(G),Q=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,O=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;return M==P||0==A.length?d(G,P):Q==O?c(G):L(G,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};n.getSubtree=function(G){var P=
-[G];!u(G)&&!e(G)||B(G)||n.traverse(G,!0,function(T,W){var U=null!=W&&n.isTreeEdge(W);U&&0>mxUtils.indexOf(P,W)&&P.push(W);(null==W||U)&&0>mxUtils.indexOf(P,T)&&P.push(T);return null==W||U});return P};var K=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){K.apply(this,arguments);(u(this.state.cell)||e(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+EditorUi.prototype.createTabForPage=function(b,f,k,d){k=this.createTab(k);var t=b.getName()||mxResources.get("untitled"),u=b.getId();k.setAttribute("title",t+(null!=u?" ("+u+")":"")+" ["+d+"]");mxUtils.write(k,t);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(u){this.renamePage(b);mxEvent.consume(u)}));var d=!1,t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(u){d=null!=this.currentMenu;t=b==this.currentPage;k.isMouseDown||t||this.selectPage(b)}),null,mxUtils.bind(this,function(u){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(u)&&t||mxEvent.isPopupTrigger(u))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!d){var C=new mxPopupMenu(this.createPageMenu(b));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);this.resetCurrentMenu();C.destroy()});var F=mxEvent.getClientX(u),J=mxEvent.getClientY(u);C.popup(F,J,null,u);this.setCurrentMenu(C,f)}mxEvent.consume(u)}}))};
+EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var t=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));t+=(0==t.length?"?":"&")+"page-id="+b.getId();null!=f&&(t+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+t+"#"+d.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,d){var t=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(u,C,F,J,c,e){u=this.createUrlParameters(u,C,F,J,c,e);F||u.push("hide-pages=1");t.isSelectionEmpty()||(F=t.getBoundingBox(t.getSelectionCells()),C=t.view.translate,c=t.view.scale,F.width/=c,F.height/=c,F.x=F.x/c-C.x,F.y=F.y/c-C.y,u.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(F.x),y:Math.round(F.y),width:Math.round(F.width),height:Math.round(F.height),border:100}))));
+J=new EmbedDialog(this,this.getLinkForPage(b,u,J));this.showDialog(J.container,450,240,!0,!0);J.init()}))})));k.addSeparator(d);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(d),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
+!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(t,u){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?u:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root,
+d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var t=k.ownerDocument.createElement("diagram");t.setAttribute("id",k.getAttribute("relatedPage"));t.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=k.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),k.removeAttribute("viewState"));k=k.cloneNode(!0);t=k.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,
+!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var u=t.getAttribute("id");null==f.lookup(u)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,u,C,F){t=null!=t?t:!1;null==u&&(u=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var J=u.slice(),c=0;c<u.length;c++)"1"==mxUtils.getValue(this.getCurrentCellStyle(u[c]),"treeFolding","0")&&this.foldTreeCell(d,u[c]);u=J;u=b.apply(this,arguments)}finally{this.model.endUpdate()}return u};Graph.prototype.foldTreeCell=
+function(d,t){this.model.beginUpdate();try{var u=[];this.traverse(t,!0,mxUtils.bind(this,function(F,J){var c=null!=J&&this.isTreeEdge(J);c&&u.push(J);F==t||null!=J&&!c||u.push(F);return(null==J||c)&&(F==t||!this.model.isCollapsed(F))}));this.model.setCollapsed(t,d);for(var C=0;C<u.length;C++)this.model.setVisible(u[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,u,C,F,J){return this.model.filterCells(this.getEdges(d,
+t,u,C,F,J),mxUtils.bind(this,function(c){return this.isTreeEdge(c)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(G){return z.isVertex(G)&&u(G)}function t(G){var N=
+!1;null!=G&&(N="1"==q.getCurrentCellStyle(G).treeMoving);return N}function u(G){var N=!1;null!=G&&(G=z.getParent(G),N=q.view.getState(G),N="tree"==(null!=N?N.style:q.getCellStyle(G)).containerType);return N}function C(G){var N=!1;null!=G&&(G=z.getParent(G),N=q.view.getState(G),q.view.getState(G),N=null!=(null!=N?N.style:q.getCellStyle(G)).childLayout);return N}function F(G){G=q.view.getState(G);if(null!=G){var N=q.getIncomingTreeEdges(G.cell);if(0<N.length&&(N=q.view.getState(N[0]),null!=N&&(N=N.absolutePoints,
+null!=N&&0<N.length&&(N=N[N.length-1],null!=N)))){if(N.y==G.y&&Math.abs(N.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_SOUTH;if(N.y==G.y+G.height&&Math.abs(N.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_NORTH;if(N.x>G.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function J(G,N){N=null!=N?N:!0;q.model.beginUpdate();try{var T=q.model.getParent(G),V=q.getIncomingTreeEdges(G),U=q.cloneCells([V[0],G]);q.model.setTerminal(U[0],q.model.getTerminal(V[0],
+!0),!0);var X=F(G),l=T.geometry;X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=N?G.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=N?G.geometry.height+10:-U[1].geometry.height-10;q.view.currentRoot!=T&&(U[1].geometry.x-=l.x,U[1].geometry.y-=l.y);var B=q.view.getState(G),L=q.view.scale;if(null!=B){var P=mxRectangle.fromRectangle(B);X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?P.x+=(N?G.geometry.width+10:-U[1].geometry.width-10)*L:P.y+=(N?
+G.geometry.height+10:-U[1].geometry.height-10)*L;var O=q.getOutgoingTreeEdges(q.model.getTerminal(V[0],!0));if(null!=O){for(var R=X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH,S=l=V=0;S<O.length;S++){var W=q.model.getTerminal(O[S],!1);if(X==F(W)){var aa=q.view.getState(W);W!=G&&null!=aa&&(R&&N!=aa.getCenterX()<B.getCenterX()||!R&&N!=aa.getCenterY()<B.getCenterY())&&mxUtils.intersects(P,aa)&&(V=10+Math.max(V,(Math.min(P.x+P.width,aa.x+aa.width)-Math.max(P.x,aa.x))/L),l=10+Math.max(l,
+(Math.min(P.y+P.height,aa.y+aa.height)-Math.max(P.y,aa.y))/L))}}R?l=0:V=0;for(S=0;S<O.length;S++)if(W=q.model.getTerminal(O[S],!1),X==F(W)&&(aa=q.view.getState(W),W!=G&&null!=aa&&(R&&N!=aa.getCenterX()<B.getCenterX()||!R&&N!=aa.getCenterY()<B.getCenterY()))){var Y=[];q.traverse(aa.cell,!0,function(Z,ba){var fa=null!=ba&&q.isTreeEdge(ba);fa&&Y.push(ba);(null==ba||fa)&&Y.push(Z);return null==ba||fa});q.moveCells(Y,(N?1:-1)*V,(N?1:-1)*l)}}}return q.addCells(U,T)}finally{q.model.endUpdate()}}function c(G){q.model.beginUpdate();
+try{var N=F(G),T=q.getIncomingTreeEdges(G),V=q.cloneCells([T[0],G]);q.model.setTerminal(T[0],V[1],!1);q.model.setTerminal(V[0],V[1],!0);q.model.setTerminal(V[0],G,!1);var U=q.model.getParent(G),X=U.geometry,l=[];q.view.currentRoot!=U&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);q.traverse(G,!0,function(P,O){var R=null!=O&&q.isTreeEdge(O);R&&l.push(O);(null==O||R)&&l.push(P);return null==O||R});var B=G.geometry.width+40,L=G.geometry.height+40;N==mxConstants.DIRECTION_SOUTH?B=0:N==mxConstants.DIRECTION_NORTH?
+(B=0,L=-L):N==mxConstants.DIRECTION_WEST?(B=-B,L=0):N==mxConstants.DIRECTION_EAST&&(L=0);q.moveCells(l,B,L);return q.addCells(V,U)}finally{q.model.endUpdate()}}function e(G,N){q.model.beginUpdate();try{var T=q.model.getParent(G),V=q.getIncomingTreeEdges(G),U=F(G);0==V.length&&(V=[q.createEdge(T,null,"",null,null,q.createCurrentEdgeStyle())],U=N);var X=q.cloneCells([V[0],G]);q.model.setTerminal(X[0],G,!0);if(null==q.model.getTerminal(X[0],!1)){q.model.setTerminal(X[0],X[1],!1);var l=q.getCellStyle(X[1]).newEdgeStyle;
+if(null!=l)try{var B=JSON.parse(l),L;for(L in B)q.setCellStyles(L,B[L],[X[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==B[L]&&q.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[X[0]])}catch(aa){}}V=q.getOutgoingTreeEdges(G);var P=T.geometry;N=[];q.view.currentRoot==T&&(P=new mxRectangle);for(l=0;l<V.length;l++){var O=q.model.getTerminal(V[l],!1);null!=O&&N.push(O)}var R=q.view.getBounds(N),S=q.view.translate,W=q.view.scale;U==mxConstants.DIRECTION_SOUTH?
+(X[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-X[1].geometry.width)/2:(R.x+R.width)/W-S.x-P.x+10,X[1].geometry.y+=X[1].geometry.height-P.y+40):U==mxConstants.DIRECTION_NORTH?(X[1].geometry.x=null==R?G.geometry.x+(G.geometry.width-X[1].geometry.width)/2:(R.x+R.width)/W-S.x+-P.x+10,X[1].geometry.y-=X[1].geometry.height+P.y+40):(X[1].geometry.x=U==mxConstants.DIRECTION_WEST?X[1].geometry.x-(X[1].geometry.width+P.x+40):X[1].geometry.x+(X[1].geometry.width-P.x+40),X[1].geometry.y=null==R?G.geometry.y+
+(G.geometry.height-X[1].geometry.height)/2:(R.y+R.height)/W-S.y+-P.y+10);return q.addCells(X,T)}finally{q.model.endUpdate()}}function g(G,N,T){G=q.getOutgoingTreeEdges(G);T=q.view.getState(T);var V=[];if(null!=T&&null!=G){for(var U=0;U<G.length;U++){var X=q.view.getState(q.model.getTerminal(G[U],!1));null!=X&&(!N&&Math.min(X.x+X.width,T.x+T.width)>=Math.max(X.x,T.x)||N&&Math.min(X.y+X.height,T.y+T.height)>=Math.max(X.y,T.y))&&V.push(X)}V.sort(function(l,B){return N?l.x+l.width-B.x-B.width:l.y+l.height-
+B.y-B.height})}return V}function m(G,N){var T=F(G),V=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==V&&T!=N?p.actions.get("selectParent").funct():T==N?(N=q.getOutgoingTreeEdges(G),null!=N&&0<N.length&&q.setSelectionCell(q.model.getTerminal(N[0],!1))):(T=q.getIncomingTreeEdges(G),null!=T&&0<T.length&&(V=g(q.model.getTerminal(T[0],!0),V,G),G=q.view.getState(G),null!=G&&(G=mxUtils.indexOf(V,G),0<=G&&(G+=N==mxConstants.DIRECTION_NORTH||
+N==mxConstants.DIRECTION_WEST?-1:1,0<=G&&G<=V.length-1&&q.setSelectionCell(V[G].cell)))))}var p=this,q=p.editor.graph,z=q.getModel(),y=p.menus.createPopupMenu;p.menus.createPopupMenu=function(G,N,T){y.apply(this,arguments);if(1==q.getSelectionCount()){N=q.getSelectionCell();var V=q.getOutgoingTreeEdges(N);G.addSeparator();0<V.length&&(d(q.getSelectionCell())&&this.addMenuItems(G,["selectChildren"],null,T),this.addMenuItems(G,["selectDescendants"],null,T));d(q.getSelectionCell())?(G.addSeparator(),
+0<q.getIncomingTreeEdges(N).length&&this.addMenuItems(G,["selectSiblings","selectParent"],null,T)):0<q.model.getEdgeCount(N)&&this.addMenuItems(G,["selectConnections"],null,T)}};p.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getOutgoingTreeEdges(G);if(null!=G){for(var N=[],T=0;T<G.length;T++)N.push(q.model.getTerminal(G[T],!1));q.setSelectionCells(N)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&
+1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getIncomingTreeEdges(G);if(null!=G&&0<G.length&&(G=q.getOutgoingTreeEdges(q.model.getTerminal(G[0],!0)),null!=G)){for(var N=[],T=0;T<G.length;T++)N.push(q.model.getTerminal(G[T],!1));q.setSelectionCells(N)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var G=q.getSelectionCell();G=q.getIncomingTreeEdges(G);null!=G&&0<G.length&&q.setSelectionCell(q.model.getTerminal(G[0],
+!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(G,N){G=q.getSelectionCell();if(q.isEnabled()&&q.model.isVertex(G)){if(null!=N&&mxEvent.isAltDown(N))q.setSelectionCells(q.model.getTreeEdges(G,null==N||!mxEvent.isShiftDown(N),null==N||!mxEvent.isControlDown(N)));else{var T=[];q.traverse(G,!0,function(V,U){var X=null!=U&&q.isTreeEdge(U);X&&T.push(U);null!=U&&!X||null!=N&&mxEvent.isShiftDown(N)||T.push(V);return null==U||X})}q.setSelectionCells(T)}},null,null,"Alt+Shift+D");
+var A=q.removeCells;q.removeCells=function(G,N){N=null!=N?N:!0;null==G&&(G=this.getDeletableCells(this.getSelectionCells()));N&&(G=this.getDeletableCells(this.addAllEdges(G)));for(var T=[],V=0;V<G.length;V++){var U=G[V];z.isEdge(U)&&u(U)&&(T.push(U),U=z.getTerminal(U,!1));if(d(U)){var X=[];q.traverse(U,!0,function(l,B){var L=null!=B&&q.isTreeEdge(B);L&&X.push(B);(null==B||L)&&X.push(l);return null==B||L});0<X.length&&(T=T.concat(X),U=q.getIncomingTreeEdges(G[V]),G=G.concat(U))}else null!=U&&T.push(G[V])}G=
+T;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(G,N,T){return d(G.cell)?null:this.graph.view.getState(this.graph.getCellAt(N,T))};var x=q.duplicateCells;q.duplicateCells=function(G,N){G=null!=G?G:this.getSelectionCells();for(var T=G.slice(0),V=0;V<T.length;V++){var U=q.view.getState(T[V]);if(null!=U&&d(U.cell)){var X=q.getIncomingTreeEdges(U.cell);for(U=0;U<X.length;U++)mxUtils.remove(X[U],G)}}this.model.beginUpdate();try{var l=x.call(this,G,N);if(l.length==G.length)for(V=0;V<G.length;V++)if(d(G[V])){var B=
+q.getIncomingTreeEdges(l[V]);X=q.getIncomingTreeEdges(G[V]);if(0==B.length&&0<X.length){var L=this.cloneCell(X[0]);this.addEdge(L,q.getDefaultParent(),this.model.getTerminal(X[0],!0),l[V])}}}finally{this.model.endUpdate()}return l};var I=q.moveCells;q.moveCells=function(G,N,T,V,U,X,l){var B=null;this.model.beginUpdate();try{var L=U,P=this.getCurrentCellStyle(U);if(null!=G&&d(U)&&"1"==mxUtils.getValue(P,"treeFolding","0")){for(var O=0;O<G.length;O++)if(d(G[O])||q.model.isEdge(G[O])&&null==q.model.getTerminal(G[O],
+!0)){U=q.model.getParent(G[O]);break}if(null!=L&&U!=L&&null!=this.view.getState(G[0])){var R=q.getIncomingTreeEdges(G[0]);if(0<R.length){var S=q.view.getState(q.model.getTerminal(R[0],!0));if(null!=S){var W=q.view.getState(L);null!=W&&(N=(W.getCenterX()-S.getCenterX())/q.view.scale,T=(W.getCenterY()-S.getCenterY())/q.view.scale)}}}}B=I.apply(this,arguments);if(null!=B&&null!=G&&B.length==G.length)for(O=0;O<B.length;O++)if(this.model.isEdge(B[O]))d(L)&&0>mxUtils.indexOf(B,this.model.getTerminal(B[O],
+!0))&&this.model.setTerminal(B[O],L,!0);else if(d(G[O])&&(R=q.getIncomingTreeEdges(G[O]),0<R.length))if(!V)d(L)&&0>mxUtils.indexOf(G,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],L,!0);else if(0==q.getIncomingTreeEdges(B[O]).length){P=L;if(null==P||P==q.model.getParent(G[O]))P=q.model.getTerminal(R[0],!0);V=this.cloneCell(R[0]);this.addEdge(V,q.getDefaultParent(),P,B[O])}}finally{this.model.endUpdate()}return B};if(null!=p.sidebar){var M=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=
+function(G,N,T,V){var U=q.model,X=null;U.beginUpdate();try{if(X=M.apply(this,arguments),d(G))for(var l=0;l<X.length;l++)if(U.isEdge(X[l])&&null==U.getTerminal(X[l],!0)){U.setTerminal(X[l],G,!0);var B=q.getCellGeometry(X[l]);B.points=null;null!=B.getTerminalPoint(!0)&&B.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return X}}var E={88:p.actions.get("selectChildren"),84:p.actions.get("selectSubtree"),80:p.actions.get("selectParent"),83:p.actions.get("selectSiblings")},Q=p.onKeyDown;p.onKeyDown=function(G){try{if(q.isEnabled()&&
+!q.isEditing()&&d(q.getSelectionCell())&&1==q.getSelectionCount()){var N=null;0<q.getIncomingTreeEdges(q.getSelectionCell()).length&&(9==G.which?N=mxEvent.isShiftDown(G)?c(q.getSelectionCell()):e(q.getSelectionCell()):13==G.which&&(N=J(q.getSelectionCell(),!mxEvent.isShiftDown(G))));if(null!=N&&0<N.length)1==N.length&&q.model.isEdge(N[0])?q.setSelectionCell(q.model.getTerminal(N[0],!1)):q.setSelectionCell(N[N.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(q.view.getState(q.getSelectionCell())),
+q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(G);else if(mxEvent.isAltDown(G)&&mxEvent.isShiftDown(G)){var T=E[G.keyCode];null!=T&&(T.funct(G),mxEvent.consume(G))}else 37==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(G)):38==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(G)):39==G.keyCode?(m(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(G)):40==G.keyCode&&(m(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(G))}}catch(V){p.handleError(V)}mxEvent.isConsumed(G)||Q.apply(this,arguments)};var n=q.connectVertex;q.connectVertex=function(G,N,T,V,U,X,l){var B=q.getIncomingTreeEdges(G);if(d(G)){var L=F(G),P=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,O=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;return L==N||0==B.length?e(G,N):P==O?c(G):J(G,N!=mxConstants.DIRECTION_NORTH&&N!=mxConstants.DIRECTION_WEST)}return n.apply(this,arguments)};q.getSubtree=function(G){var N=
+[G];!t(G)&&!d(G)||C(G)||q.traverse(G,!0,function(T,V){var U=null!=V&&q.isTreeEdge(V);U&&0>mxUtils.indexOf(N,V)&&N.push(V);(null==V||U)&&0>mxUtils.indexOf(N,T)&&N.push(T);return null==V||U});return N};var v=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){v.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(G){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(G);
-this.graph.isMouseDown=!0;m.hoverIcons.reset();mxEvent.consume(G)})))};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(G){H.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=G?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(G,P){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var e=k.apply(this,arguments),u=this.graph;return e.concat([this.addEntry("tree container",
-function(){var v=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");v.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 E=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);v.insert(L);v.insert(B);v.insert(E);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var v=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-v.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 E=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};');
-E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-c.vertex=!0;var 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("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var 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);g.insertEdge(q,!1);var m=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};');
-m.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);m.insertEdge(n,!1);v.insert(L);v.insert(d);v.insert(q);v.insert(n);v.insert(B);v.insert(E);v.insert(c);v.insert(g);v.insert(m);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var v=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;');v.vertex=!0;return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var v=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};');
-v.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;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var v=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};');
-v.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;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree orgchart organization division",function(){var v=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-v.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"};');u.setAttributeForCell(B,"treeRoot","1");B.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 L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");L.geometry.relative=!0;L.edge=!0;B.insertEdge(L,!0);E.insertEdge(L,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var 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);v.insert(L);v.insert(d);v.insert(B);v.insert(E);v.insert(c);return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree root",function(){var v=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"};');u.setAttributeForCell(v,"treeRoot",
-"1");v.vertex=!0;return sb.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree division",function(){var v=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"};');v.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;v.insertEdge(B,!1);return sb.createVertexTemplateFromCells([v,B],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree sub sections",function(){var v=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");v.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;v.insertEdge(B,!1);var E=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");E.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");L.geometry.setTerminalPoint(new mxPoint(110,-40),!0);L.geometry.relative=
-!0;L.edge=!0;E.insertEdge(L,!1);return sb.createVertexTemplateFromCells([B,L,v,E],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(x,y){if(EditorUi.windowed){var I=x.editor.graph;I.popupMenuHandler.hideMenu();if(null==x.formatWindow){y="1"==urlParams.sketch?Math.max(10,x.diagramContainer.clientWidth-241):Math.max(10,x.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;I="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,I.container.clientHeight-10);x.formatWindow=new WrapperWindow(x,mxResources.get("format"),y,N,240,I,
-function(t){x.createFormat(t).init()});x.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){x.formatWindow.window.fit()}));x.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else x.formatWindow.window.setVisible(null!=y?y:!x.formatWindow.window.isVisible())}else null==x.formatElt&&(x.formatElt=x.createSidebarContainer(),x.createFormat(x.formatElt).init(),x.formatElt.style.border="none",x.formatElt.style.width="240px",x.formatElt.style.borderLeft="1px solid gray",
-x.formatElt.style.right="0px"),I=x.diagramContainer.parentNode,null!=x.formatElt.parentNode?(x.formatElt.parentNode.removeChild(x.formatElt),I.style.right="0px"):(I.parentNode.appendChild(x.formatElt),I.style.right=x.formatElt.style.width)}function f(x,y){function I(F,K){var D=x.menus.get(F);F=p.addMenu(K,mxUtils.bind(this,function(){D.funct.apply(this,arguments)}));F.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;";
-F.className="geTitle";y.appendChild(F);return F}var N=document.createElement("div");N.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;";N.className="geTitle";var t=document.createElement("span");t.style.fontSize="18px";t.style.marginRight="5px";t.innerHTML="+";N.appendChild(t);mxUtils.write(N,mxResources.get("moreShapes"));y.appendChild(N);mxEvent.addListener(N,"click",function(){x.actions.get("shapes").funct()});
-var p=new Menubar(x,y);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=x.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("newLibrary")),N.appendChild(t),
-y.appendChild(N),mxEvent.addListener(N,"click",x.actions.get("newLibrary").funct),N=document.createElement("div"),N.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;",N.className="geTitle",t=document.createElement("span"),t.style.cssText="position:relative;top:6px;",mxUtils.write(t,mxResources.get("openLibrary")),N.appendChild(t),y.appendChild(N),mxEvent.addListener(N,
-"click",x.actions.get("openLibrary").funct)):(N=I("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=I("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");y.appendChild(x.sidebar.container);y.style.overflow="hidden"}
-function k(x,y){if(EditorUi.windowed){var I=x.editor.graph;I.popupMenuHandler.hideMenu();if(null==x.sidebarWindow){y=Math.min(I.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(I.container.clientHeight-40,650);x.sidebarWindow=new WrapperWindow(x,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(I.container.clientHeight-N)/2):56,y-6,N-6,function(t){f(x,t)});x.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){x.sidebarWindow.window.fit()}));x.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);x.sidebarWindow.window.setVisible(!0);isLocalStorage&&x.getLocalData("sidebar",function(t){x.sidebar.showEntries(t,null,!0)});x.restoreLibraries()}else x.sidebarWindow.window.setVisible(null!=y?y:!x.sidebarWindow.window.isVisible())}else null==x.sidebarElt&&(x.sidebarElt=x.createSidebarContainer(),f(x,x.sidebarElt),x.sidebarElt.style.border="none",x.sidebarElt.style.width="210px",
-x.sidebarElt.style.borderRight="1px solid gray"),I=x.diagramContainer.parentNode,null!=x.sidebarElt.parentNode?(x.sidebarElt.parentNode.removeChild(x.sidebarElt),I.style.left="0px"):(I.parentNode.appendChild(x.sidebarElt),I.style.left=x.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=0;try{e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(x){}Editor.checkmarkImage=
+this.graph.isMouseDown=!0;p.hoverIcons.reset();mxEvent.consume(G)})))};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(G){H.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=G?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(G,N){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
+function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var C=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var F=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!1);u.insert(J);u.insert(C);u.insert(F);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
+u.vertex=!0;var C=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');C.vertex=!0;var F=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!1);var c=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;C.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");m.geometry.relative=!0;m.edge=!0;C.insertEdge(m,!0);g.insertEdge(m,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+p.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge=!0;C.insertEdge(q,!0);p.insertEdge(q,!1);u.insert(J);u.insert(e);u.insert(m);u.insert(q);u.insert(C);u.insert(F);u.insert(c);u.insert(g);u.insert(p);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",
+new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var u=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+u.vertex=!0;var C=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var F=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");J.geometry.relative=!0;J.edge=!0;C.insertEdge(J,!0);F.insertEdge(J,!1);var c=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+e.geometry.relative=!0;e.edge=!0;C.insertEdge(e,!0);c.insertEdge(e,!1);u.insert(J);u.insert(e);u.insert(C);u.insert(F);u.insert(c);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(u,"treeRoot",
+"1");u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);return sb.createVertexTemplateFromCells([u,C],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=!0;C.edge=!0;u.insertEdge(C,!1);var F=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");F.vertex=!0;var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");J.geometry.setTerminalPoint(new mxPoint(110,-40),!0);J.geometry.relative=
+!0;J.edge=!0;F.insertEdge(J,!1);return sb.createVertexTemplateFromCells([C,J,u,F],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(y,A){if(EditorUi.windowed){var x=y.editor.graph;x.popupMenuHandler.hideMenu();if(null==y.formatWindow){A="1"==urlParams.sketch?Math.max(10,y.diagramContainer.clientWidth-241):Math.max(10,y.diagramContainer.clientWidth-248);var I="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;x="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,x.container.clientHeight-10);y.formatWindow=new WrapperWindow(y,mxResources.get("format"),A,I,240,x,
+function(M){y.createFormat(M).init()});y.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){y.formatWindow.window.fit()}));y.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else y.formatWindow.window.setVisible(null!=A?A:!y.formatWindow.window.isVisible())}else null==y.formatElt&&(y.formatElt=y.createSidebarContainer(),y.createFormat(y.formatElt).init(),y.formatElt.style.border="none",y.formatElt.style.width="240px",y.formatElt.style.borderLeft="1px solid gray",
+y.formatElt.style.right="0px"),x=y.diagramContainer.parentNode,null!=y.formatElt.parentNode?(y.formatElt.parentNode.removeChild(y.formatElt),x.style.right="0px"):(x.parentNode.appendChild(y.formatElt),x.style.right=y.formatElt.style.width)}function f(y,A){function x(Q,n){var v=y.menus.get(Q);Q=E.addMenu(n,mxUtils.bind(this,function(){v.funct.apply(this,arguments)}));Q.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+Q.className="geTitle";A.appendChild(Q);return Q}var I=document.createElement("div");I.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";I.className="geTitle";var M=document.createElement("span");M.style.fontSize="18px";M.style.marginRight="5px";M.innerHTML="+";I.appendChild(M);mxUtils.write(I,mxResources.get("moreShapes"));A.appendChild(I);mxEvent.addListener(I,"click",function(){y.actions.get("shapes").funct()});
+var E=new Menubar(y,A);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?I.style.bottom="0":null!=y.actions.get("newLibrary")?(I=document.createElement("div"),I.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("newLibrary")),I.appendChild(M),
+A.appendChild(I),mxEvent.addListener(I,"click",y.actions.get("newLibrary").funct),I=document.createElement("div"),I.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",I.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("openLibrary")),I.appendChild(M),A.appendChild(I),mxEvent.addListener(I,
+"click",y.actions.get("openLibrary").funct)):(I=x("newLibrary",mxResources.get("newLibrary")),I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="0",I=x("openLibraryFrom",mxResources.get("openLibraryFrom")),I.style.borderLeft="1px solid lightgray",I.style.boxSizing="border-box",I.style.paddingRight="6px",I.style.paddingLeft="6px",I.style.height="32px",I.style.left="50%");A.appendChild(y.sidebar.container);A.style.overflow="hidden"}
+function k(y,A){if(EditorUi.windowed){var x=y.editor.graph;x.popupMenuHandler.hideMenu();if(null==y.sidebarWindow){A=Math.min(x.container.clientWidth-10,218);var I="1"==urlParams.embedInline?650:Math.min(x.container.clientHeight-40,650);y.sidebarWindow=new WrapperWindow(y,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(x.container.clientHeight-I)/2):56,A-6,I-6,function(M){f(y,M)});y.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){y.sidebarWindow.window.fit()}));y.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);y.sidebarWindow.window.setVisible(!0);isLocalStorage&&y.getLocalData("sidebar",function(M){y.sidebar.showEntries(M,null,!0)});y.restoreLibraries()}else y.sidebarWindow.window.setVisible(null!=A?A:!y.sidebarWindow.window.isVisible())}else null==y.sidebarElt&&(y.sidebarElt=y.createSidebarContainer(),f(y,y.sidebarElt),y.sidebarElt.style.border="none",y.sidebarElt.style.width="210px",
+y.sidebarElt.style.borderRight="1px solid gray"),x=y.diagramContainer.parentNode,null!=y.sidebarElt.parentNode?(y.sidebarElt.parentNode.removeChild(y.sidebarElt),x.style.left="0px"):(x.parentNode.appendChild(y.sidebarElt),x.style.left=y.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(y){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");u.apply(this,arguments)};var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var B=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(x,y){null!=y.shortcut&&900>e&&!mxClient.IS_IOS?x.firstChild.nextSibling.setAttribute("title",y.shortcut):B.apply(this,arguments)};var E=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){E.apply(this,arguments);if(null!=this.userElement){var x=this.userElement;x.style.cssText="position:relative;cursor:pointer;display:"+x.style.display;x.className="geToolbarButton";
-x.innerText="";x.style.backgroundImage="url("+Editor.userImage+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="24px 24px";x.style.height="24px";x.style.width="24px";var y=mxResources.get("changeUser");if("none"!=x.style.display){x.style.display="inline-block";var I=this.getCurrentFile();if(null!=I&&I.isRealtimeEnabled()&&I.isRealtimeSupported()){var N=document.createElement("img");N.setAttribute("border","0");N.style.position="absolute";
-N.style.left="18px";N.style.top="2px";N.style.width="12px";N.style.height="12px";var t=I.getRealtimeError();I=I.getRealtimeState();y+=" ("+mxResources.get("realtimeCollaboration");1==I?(N.src=Editor.syncImage,y+=mxResources.get("online")):(N.src=Editor.syncProblemImage,y=null!=t&&null!=t.message?y+t.message:y+mxResources.get("disconnected"));x.style.marginRight="6px";x.appendChild(N);y+=")"}}x.setAttribute("title",y)}};var L=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){L.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var x=document.createElement("div");x.style.display="inline-block";x.style.position="relative";x.style.marginTop="6px";x.style.marginRight="4px";var y=document.createElement("a");y.className="geMenuItem gePrimaryBtn";y.style.marginLeft="8px";y.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var I="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(y,I);y.setAttribute("title",I);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));x.appendChild(y)}}else mxUtils.write(y,mxResources.get("save")),y.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),x.appendChild(y),
-"1"==urlParams.saveAndExit&&(y=document.createElement("a"),mxUtils.write(y,mxResources.get("saveAndExit")),y.setAttribute("title",mxResources.get("saveAndExit")),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),x.appendChild(y));"1"!=urlParams.noExitBtn&&(y=document.createElement("a"),I="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(y,
-I),y.setAttribute("title",I),y.className="geMenuItem",y.style.marginLeft="6px",y.style.padding="6px",mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),x.appendChild(y));this.buttonContainer.appendChild(x);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var c=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(x,y){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,
-x)){var I=mxUtils.getOffset(this.editorUi.picker);I.x+=this.editorUi.picker.offsetWidth+4;I.y+=x.offsetTop-y.height/2+16;return I}var N=c.apply(this,arguments);I=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=I.x-16;N.y+=I.y;return N};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(x,y,I){var N=this.editorUi.editor.graph;x.smartSeparators=!0;d.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(x.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(x,
-["-","lockUnlock"],null,I)):1==N.getSelectionCount()?(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(x,N.isCellCollapsed(y)?["expand"]:["collapse"],null,I),this.addMenuItems(x,["collapsible","-","lockUnlock","enterGroup"],null,I),x.addSeparator(),this.addSubmenu("layout",x)):N.isSelectionEmpty()&&N.isEnabled()?(x.addSeparator(),this.addMenuItems(x,["editData"],null,I),x.addSeparator(),this.addSubmenu("layout",x),this.addSubmenu("insert",x),this.addMenuItems(x,["-","exitGroup"],null,I)):
-N.isEnabled()&&this.addMenuItems(x,["-","lockUnlock"],null,I)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(x,y,I){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(x,["copyAsImage"],null,I)};EditorUi.prototype.toggleFormatPanel=function(x){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=x?x:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var q=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.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);q.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(x){m.apply(this,arguments);if(x){var y=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=y&&
-null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=y||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var n=Menus.prototype.init;Menus.prototype.init=function(){n.apply(this,arguments);var x=this.editorUi,y=x.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(D){x.setPagesVisible(!Editor.pagesVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return Editor.pagesVisible});x.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(x)},null,null,Editor.ctrlKey+"+Shift+K"));y=x.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(x)}));y.shortcut=x.actions.get("formatPanel").shortcut;y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-x.formatWindow&&x.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!x.isOffline()&&x.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var D=new ParseDialog(x,mxResources.get("plantUml")+"...","plantUml");x.showDialog(D.container,620,420,!0,!1);D.init()}));x.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(x,mxResources.get("mermaid")+"...","mermaid");x.showDialog(D.container,620,420,!0,!1);D.init()}));var I=
-this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,H){var J=this.editorUi.editor.graph,G=J.getSelectionCell();I.call(this,D,G,null,H);this.addMenuItems(D,["editTooltip"],H);J.model.isVertex(G)&&this.addMenuItems(D,["editGeometry"],H);this.addMenuItems(D,["-","edit"],H)})));this.addPopupMenuCellEditItems=function(D,H,J,G){D.addSeparator();this.addSubmenu("editCell",D,G,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile();
-x.menus.addMenuItems(D,["new"],H);x.menus.addSubmenu("openFrom",D,H);isLocalStorage&&this.addSubmenu("openRecent",D,H);D.addSeparator(H);x.menus.addMenuItems(D,["-","save"],H);null!=J&&J.constructor==DriveFile||x.menus.addMenuItems(D,["saveAs"],H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||J.constructor==LocalFile&&null==J.fileHandle||x.menus.addMenuItems(D,["synchronize"],H);null!=J&&J.constructor==DriveFile?x.menus.addMenuItems(D,"- rename makeCopy - moveToFolder openFolder".split(" "),H):(x.menus.addMenuItems(D,
-["-","rename"],H),x.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(D,["upload"],H):x.menus.addMenuItems(D,["makeCopy"],H));null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["-","revisionHistory"],H);if(null!=J){if(null!=x.fileNode&&"1"!=urlParams.embedInline){var G=null!=J.getTitle()?J.getTitle():x.defaultFilename;(J.constructor==DriveFile&&null!=J.sync&&J.sync.isConnected()||!/(\.html)$/i.test(G)&&!/(\.svg)$/i.test(G))&&this.addMenuItems(D,
-["properties"],H)}J.constructor==DriveFile&&x.menus.addMenuItems(D,["share"],H)}x.menus.addMenuItems(D,["-","autosave"],H)})));this.put("diagram",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile();x.menus.addSubmenu("extras",D,H,mxResources.get("preferences"));D.addSeparator(H);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)x.menus.addMenuItems(D,"new open - synchronize - save saveAs -".split(" "),H);else if("1"==urlParams.embed||x.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&
-"1"!=urlParams.embedInline&&x.menus.addMenuItems(D,["-","save"],H);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||x.mode==App.MODE_ATLAS)x.menus.addMenuItems(D,["saveAndExit"],H),null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["revisionHistory"],H);D.addSeparator(H)}else x.mode==App.MODE_ATLAS?x.menus.addMenuItems(D,["save","synchronize","-"],H):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(x.menus.addMenuItems(D,["new"],H),x.menus.addSubmenu("openFrom",
-D,H),isLocalStorage&&this.addSubmenu("openRecent",D,H),D.addSeparator(H),null!=J&&(J.constructor==DriveFile&&x.menus.addMenuItems(D,["share"],H),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||J.constructor==LocalFile||x.menus.addMenuItems(D,["synchronize"],H)),D.addSeparator(H),x.menus.addSubmenu("save",D,H)):x.menus.addSubmenu("file",D,H));x.menus.addSubmenu("exportAs",D,H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?x.menus.addMenuItems(D,["import"],H):"1"!=urlParams.noFileMenu&&x.menus.addSubmenu("importFrom",
-D,H);x.menus.addMenuItems(D,["-","findReplace"],H);x.commentsSupported()&&x.menus.addMenuItems(D,["comments","-"],H);x.menus.addMenuItems(D,["toggleFormat","layers","tags","-","pageSetup"],H);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||x.menus.addMenuItems(D,["print"],H);"1"!=urlParams.sketch&&null!=J&&null!=x.fileNode&&"1"!=urlParams.embedInline&&(J=null!=J.getTitle()?J.getTitle():x.defaultFilename,/(\.html)$/i.test(J)||/(\.svg)$/i.test(J)||this.addMenuItems(D,["-","properties"]));
-D.addSeparator(H);x.menus.addSubmenu("help",D,H);"1"==urlParams.embed||x.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||x.mode==App.MODE_ATLAS)&&x.menus.addMenuItems(D,["-","exit"],H):"1"!=urlParams.noFileMenu&&x.menus.addMenuItems(D,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(D,H){var J=x.getCurrentFile();null!=J&&J.constructor==DriveFile?x.menus.addMenuItems(D,["save","makeCopy","-","rename","moveToFolder"],H):(x.menus.addMenuItems(D,["save","saveAs","-","rename"],H),
-x.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(D,["upload"],H):x.menus.addMenuItems(D,["makeCopy"],H));x.menus.addMenuItems(D,["-","autosave"],H);null!=J&&J.isRevisionHistorySupported()&&x.menus.addMenuItems(D,["-","revisionHistory"],H)})));var N=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(D,H){N.funct(D,H);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||x.menus.addMenuItems(D,["publishLink"],H);x.mode!=App.MODE_ATLAS&&
-"1"!=urlParams.extAuth&&(D.addSeparator(H),x.menus.addSubmenu("embed",D,H))})));var t=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(D,H){x.menus.addInsertTableCellItem(D,H)})));var p=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(D,H){p.funct(D,H);this.addMenuItems(D,["-","ruler","-","pageScale"],H)})));this.put("extras",new Menu(mxUtils.bind(this,function(D,H){null==t||"1"==urlParams.embed&&null!=urlParams.lang||x.menus.addSubmenu("language",D,
-H);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&x.mode!=App.MODE_ATLAS&&x.menus.addSubmenu("theme",D,H);x.menus.addSubmenu("units",D,H);D.addSeparator(H);"1"!=urlParams.sketch&&x.menus.addMenuItems(D,["scrollbars","-","tooltips","copyConnect","collapseExpand"],H);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&x.mode!=App.MODE_ATLAS&&x.menus.addMenuItems(D,["-","showStartScreen","search","scratchpad"],H);D.addSeparator(H);"1"==urlParams.sketch&&
-x.menus.addMenuItems(D,["copyConnect","collapseExpand","tooltips","-"],H);EditorUi.isElectronApp&&x.menus.addMenuItems(D,["-","spellCheck","autoBkp","drafts","-"],H);var J=x.getCurrentFile();null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(D,["-","showRemoteCursors","shareCursor","-"],H);Graph.translateDiagram&&x.menus.addMenuItems(D,["diagramLanguage"],H);x.mode!=App.MODE_ATLAS&&x.menus.addMenuItem(D,"configuration",H);"1"!=urlParams.sketch&&!x.isOfflineApp()&&isLocalStorage&&
-x.mode!=App.MODE_ATLAS&&x.menus.addMenuItem(D,"plugins",H);D.addSeparator(H)})));mxUtils.bind(this,function(){var D=this.get("insert"),H=D.funct;D.funct=function(J,G){"1"==urlParams.sketch?(x.menus.addMenuItems(J,["toggleShapes"],G),x.menus.addSubmenu("table",J,G),J.addSeparator(G),x.insertTemplateEnabled&&!x.isOffline()&&x.menus.addMenuItems(J,["insertTemplate"],G),x.menus.addMenuItems(J,["insertImage","insertLink","-"],G),x.menus.addSubmenu("insertAdvanced",J,G,mxResources.get("advanced")),x.menus.addSubmenu("layout",
-J,G)):(H.apply(this,arguments),x.menus.addSubmenu("table",J,G))}})();var F="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),K=function(D,H,J,G){D.addItem(J,null,mxUtils.bind(this,function(){var P=new CreateGraphDialog(x,J,G);x.showDialog(P.container,620,420,!0,!1);P.init()}),H)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,H){for(var J=0;J<F.length;J++)"-"==F[J]?D.addSeparator(H):K(D,H,mxResources.get(F[J])+"...",F[J])})))};EditorUi.prototype.installFormatToolbar=
-function(x){var y=this.editor.graph,I=document.createElement("div");I.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";y.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,t){0<y.getSelectionCount()?(x.appendChild(I),I.innerHTML="Selected: "+y.getSelectionCount()):null!=I.parentNode&&I.parentNode.removeChild(I)}))};var z=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!z&&null!=this.formatWindow){z=!0;var x=this.formatWindow.window.toggleMinimized,y=240;this.formatWindow.window.toggleMinimized=function(){x.apply(this,arguments);this.minimized?(y=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+y-140+"px"):(this.div.style.width=y+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-y+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function x(ca,ea,da){var fa=p.menus.get(ca),ja=H.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){fa.funct.apply(this,arguments)}),D);ja.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ja.style.display="inline-block";ja.style.boxSizing=
-"border-box";ja.style.top="6px";ja.style.marginRight="6px";ja.style.height="30px";ja.style.paddingTop="6px";ja.style.paddingBottom="6px";ja.style.cursor="pointer";ja.setAttribute("title",mxResources.get(ca));p.menus.menuCreated(fa,ja,"geMenuItem");null!=da?(ja.style.backgroundImage="url("+da+")",ja.style.backgroundPosition="center center",ja.style.backgroundRepeat="no-repeat",ja.style.backgroundSize="24px 24px",ja.style.width="34px",ja.innerText=""):ea||(ja.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",ja.style.backgroundPosition="right 6px center",ja.style.backgroundRepeat="no-repeat",ja.style.paddingRight="22px");return ja}function y(ca,ea,da,fa,ja,ra){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding="6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow=
-"none",oa.style.padding="6px",oa.style.margin="0px");null!=p.statusContainer?K.insertBefore(oa,p.statusContainer):K.appendChild(oa);null!=ra?(oa.style.backgroundImage="url("+ra+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ca);mxEvent.addListener(oa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Aa){Aa.preventDefault()}));mxEvent.addListener(oa,"click",function(Aa){"disabled"!=
-oa.getAttribute("disabled")&&ea(Aa);mxEvent.consume(Aa)});null==da&&(oa.style.marginRight="4px");null!=fa&&oa.setAttribute("title",fa);null!=ja&&(ca=function(){ja.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ja.addListener("stateChanged",ca),F.addListener("enabledChanged",ca),ca());return oa}function I(ca,ea,da){da=document.createElement("div");da.className="geMenuItem";da.style.display="inline-block";da.style.verticalAlign=
-"top";da.style.marginRight="6px";da.style.padding="0 4px 0 4px";da.style.height="30px";da.style.position="relative";da.style.top="0px";"1"==urlParams.sketch&&(da.style.boxShadow="none");for(var fa=0;fa<ca.length;fa++)null!=ca[fa]&&("1"==urlParams.sketch&&(ca[fa].style.padding="10px 8px",ca[fa].style.width="30px"),ca[fa].style.margin="0px",ca[fa].style.boxShadow="none",da.appendChild(ca[fa]));null!=ea&&mxUtils.setOpacity(da,ea);null!=p.statusContainer&&"1"!=urlParams.sketch?K.insertBefore(da,p.statusContainer):
-K.appendChild(da);return da}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(A.style.left=58>l.offsetTop-l.offsetHeight/2?"70px":"10px");else{for(var ca=K.firstChild;null!=ca;){var ea=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=ea}D=K.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>e||"1"==urlParams.sketch;var da=null;ca||(da=x("diagram"));ea=ca?x("diagram",null,Editor.menuImage):
-null;null!=ea&&(da=ea);I([da,y(mxResources.get("shapes"),p.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),p.actions.get("image"),ca?Editor.shapesImage:null),y(mxResources.get("format"),p.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+p.actions.get("formatPanel").shortcut+")",p.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);var fa=x("insert",!0,ca?U:null);I([fa,y(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"),
-p.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=e&&(I([ya,Pa],60),520<=e&&I([Ea,640<=e?y("",qa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",qa,Editor.zoomInImage):null,640<=e?y("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",la,Editor.zoomOutImage):null],60))}null!=da&&(mxEvent.disableContextMenu(da),mxEvent.addGestureListeners(da,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)||
-mxEvent.isPopupTrigger(ja))&&p.appIconClicked(ja)}),null,null));ea=p.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==La&&(fa=H.addMenu("",ea.funct),fa.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition="center center",fa.style.backgroundRepeat=
-"no-repeat",fa.style.backgroundSize="22px 22px",fa.style.position="absolute",fa.style.height="24px",fa.style.width="24px",fa.style.zIndex="1",fa.style.right="8px",fa.style.cursor="pointer",fa.style.top="12px",K.appendChild(fa),La=fa,"1"==urlParams["live-ui"]&&(ea=mxUtils.bind(this,function(){fa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),p.addListener("darkModeChanged",ea),ea())),p.buttonContainer.style.paddingRight="34px"):(p.buttonContainer.style.paddingRight=
-"4px",null!=La&&(La.parentNode.removeChild(La),La=null))}C.apply(this,arguments);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(t);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
-0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var p=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==p.embedViewport)mxUtils.fit(this.div);
-else{var ca=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),da=p.embedViewport.x+p.embedViewport.width,fa=parseInt(this.div.offsetTop),ja=parseInt(this.div.offsetHeight),ra=p.embedViewport.y+p.embedViewport.height;this.div.style.left=Math.max(p.embedViewport.x,Math.min(ca,da-ea))+"px";this.div.style.top=Math.max(p.embedViewport.y,Math.min(fa,ra-ja))+"px";this.div.style.height=Math.min(p.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(p.embedViewport.width,
-parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>e||708>t)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));p=this;var F=p.editor.graph;
-p.toolbar=this.createToolbar(p.createDiv("geToolbar"));p.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var D=null,H=new Menubar(p,K);p.statusContainer=p.createStatusContainer();p.statusContainer.style.position="relative";p.statusContainer.style.maxWidth="";p.statusContainer.style.marginTop="7px";p.statusContainer.style.marginLeft="6px";p.statusContainer.style.color="gray";p.statusContainer.style.cursor="default";var J=p.hideCurrentMenu;
-p.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var G=p.descriptorChanged;p.descriptorChanged=function(){G.apply(this,arguments);var ca=p.getCurrentFile();if(null!=ca&&null!=ca.getTitle()){var ea=ca.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);K.setAttribute("title",ca.getTitle()+(null!=ea?" ("+ea+")":""))}else K.removeAttribute("title")};p.setStatusText(p.editor.getStatus());
-K.appendChild(p.statusContainer);p.buttonContainer=document.createElement("div");p.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";K.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=document.createElement("div");p.tabContainer.className="geTabContainer";p.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-t=p.diagramContainer.parentNode;var P=document.createElement("div");P.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";p.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){P.style.top="20px";p.titlebar=document.createElement("div");p.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var T=document.createElement("div");
-T.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";p.titlebar.appendChild(T);t.appendChild(p.titlebar)}T=p.menus.get("viewZoom");var W=T.funct;T.funct=function(ca,ea){W.apply(this,arguments);p.menus.addMenuItems(ca,["-","outline","fullscreen"],ea)};var U="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,l="1"==urlParams.sketch?
-document.createElement("div"):null,A="1"==urlParams.sketch?document.createElement("div"):null,M=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)A.style.left="10px",A.style.top="10px",l.style.left="10px",l.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",p.diagramContainer.setAttribute("data-bounds",p.diagramContainer.style.top+" "+p.diagramContainer.style.left+" "+p.diagramContainer.style.width+" "+p.diagramContainer.style.height),p.diagramContainer.style.top="0px",
-p.diagramContainer.style.left="0px",p.diagramContainer.style.bottom="0px",p.diagramContainer.style.right="0px",p.diagramContainer.style.width="",p.diagramContainer.style.height="";else{var ca=p.diagramContainer.getAttribute("data-bounds");if(null!=ca){p.diagramContainer.style.background="transparent";p.diagramContainer.removeAttribute("data-bounds");var ea=F.getGraphBounds();ca=ca.split(" ");p.diagramContainer.style.top=ca[0];p.diagramContainer.style.left=ca[1];p.diagramContainer.style.width=ea.width+
-50+"px";p.diagramContainer.style.height=ea.height+46+"px";p.diagramContainer.style.bottom="";p.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:p.diagramContainer.getBoundingClientRect()}),"*");p.refresh()}A.style.left=p.diagramContainer.offsetLeft+"px";A.style.top=p.diagramContainer.offsetTop-A.offsetHeight-4+"px";l.style.display="";l.style.left=p.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=p.diagramContainer.offsetTop+
-"px";V.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=A.style.top;V.style.right="";p.bottomResizer.style.left=p.diagramContainer.offsetLeft+(p.diagramContainer.offsetWidth-p.bottomResizer.offsetWidth)/2+"px";p.bottomResizer.style.top=p.diagramContainer.offsetTop+p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight/2-1+"px";p.rightResizer.style.left=p.diagramContainer.offsetLeft+p.diagramContainer.offsetWidth-p.rightResizer.offsetWidth/
-2-1+"px";p.rightResizer.style.top=p.diagramContainer.offsetTop+(p.diagramContainer.offsetHeight-p.bottomResizer.offsetHeight)/2+"px"}p.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";p.rightResizer.style.visibility=p.bottomResizer.style.visibility;K.style.display="none";A.style.visibility="";V.style.visibility=""}),Q=p.actions.get("fullscreen"),O=y("",Q.funct,null,mxResources.get(""),Q,Editor.fullscreenImage),R=mxUtils.bind(this,function(){O.style.backgroundImage="url("+(Editor.inlineFullscreen?
-Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";M()});Q=mxUtils.bind(this,function(){b(p,!0);p.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y);R()});p.addListener("inlineFullscreenChanged",R);p.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&p.addListener("darkModeChanged",
-Q);p.addListener("editInlineStop",mxUtils.bind(this,function(ca){p.diagramContainer.style.width="10px";p.diagramContainer.style.height="10px";p.diagramContainer.style.border="";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}));if(null!=p.hoverIcons){var S=p.hoverIcons.update;p.hoverIcons.update=function(){F.freehand.isDrawing()||S.apply(this,arguments)}}if(null!=F.freehand){var X=F.freehand.createStyle;
-F.freehand.createStyle=function(ca){return X.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){l.className="geToolbarContainer";V.className="geToolbarContainer";A.className="geToolbarContainer";K.className="geToolbarContainer";p.picker=l;var aa=!1;"1"!=urlParams.embed&&"atlassian"!=p.getServiceName()&&(mxEvent.addListener(K,"mouseenter",function(){p.statusContainer.style.display="inline-block"}),mxEvent.addListener(K,"mouseleave",function(){aa||(p.statusContainer.style.display="none")}));
-var Y=mxUtils.bind(this,function(ca){null!=p.notificationBtn&&(null!=ca?p.notificationBtn.setAttribute("title",ca):p.notificationBtn.removeAttribute("title"))});if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var Z=x("theme",null,Editor.darkModeImage);null!=Z&&(Z.style.position="relative",Z.style.backgroundPosition="top center",Z.style.backgroundSize="22px 22px",Z.style.width="24px",Z.style.height="28px",Z.style.top="4px",K.appendChild(Z),Q=mxUtils.bind(this,function(){Z.style.backgroundImage=
-"url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),p.addListener("darkModeChanged",Q),Q())}K.style.visibility=20>K.clientWidth?"hidden":"";p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=p.getServiceName())if(p.statusContainer.style.display="inline-block",aa=!0,1==p.statusContainer.children.length&&""==p.editor.getStatus())K.style.visibility="hidden";else{if(0==p.statusContainer.children.length||
-1==p.statusContainer.children.length&&"function"===typeof p.statusContainer.firstChild.getAttribute&&null==p.statusContainer.firstChild.getAttribute("class")){var ca=null!=p.statusContainer.firstChild&&"function"===typeof p.statusContainer.firstChild.getAttribute?p.statusContainer.firstChild.getAttribute("title"):p.editor.getStatus();Y(ca);var ea=p.getCurrentFile();ea=null!=ea?ea.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(ea)+"..."?(p.statusContainer.innerHTML='<img title="'+
-mxUtils.htmlEntities(mxResources.get(ea))+'..."src="'+Editor.tailSpin+'">',p.statusContainer.style.display="inline-block",aa=!0):6<p.buttonContainer.clientWidth&&(p.statusContainer.style.display="none",aa=!1)}else p.statusContainer.style.display="inline-block",Y(null),aa=!0;K.style.visibility=20>K.clientWidth&&!aa?"hidden":""}}));na=x("diagram",null,Editor.menuImage);na.style.boxShadow="none";na.style.padding="6px";na.style.margin="0px";A.appendChild(na);mxEvent.disableContextMenu(na);mxEvent.addGestureListeners(na,
-mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);p.statusContainer.style.position="";p.statusContainer.style.display="none";p.statusContainer.style.margin="0px";p.statusContainer.style.padding="6px 0px";p.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";p.statusContainer.style.display="inline-block";p.statusContainer.style.textOverflow="ellipsis";
-p.buttonContainer.style.display="inline-block";p.buttonContainer.style.position="relative";p.buttonContainer.style.paddingRight="0px";p.buttonContainer.style.top="0px";var ba=document.createElement("a");ba.style.padding="0px";ba.style.boxShadow="none";ba.className="geMenuItem";ba.style.display="inline-block";ba.style.width="40px";ba.style.height="12px";ba.style.marginBottom="-2px";ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ba.style.backgroundPosition="top center";ba.style.backgroundRepeat=
-"no-repeat";ba.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){l.innerText="";if(!ha){var ca=function(ea,da,fa,ja){null!=da&&ea.setAttribute("title",da);ea.style.cursor=null!=fa?fa:"default";ea.style.margin="2px 0px";l.appendChild(ea);mxUtils.br(l);null!=ja&&(ea.style.position="relative",ea.style.overflow="visible",da=document.createElement("div"),da.style.position="absolute",da.style.left="34px",da.style.top="28px",da.style.fontSize="8px",mxUtils.write(da,ja),ea.appendChild(da));
-return ea};ca(p.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ca(p.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ca(p.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ca(p.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,F.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,0),!1);ea.geometry.points=[];ea.geometry.relative=!0;ea.edge=!0;ca(p.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ea.geometry.width=F.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,20),!1);ca(p.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,da,fa,ja){ea=y("",ea.funct,null,da,ea,fa);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return ca(ea,null,"pointer",ja)})(p.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");na=x("insert",null,Editor.plusImage);na.style.boxShadow="none";na.style.opacity="0.7";na.style.padding="6px";na.style.margin="0px";na.style.height="34px";na.style.width="37px";ca(na,null,"pointer")}"1"!=urlParams.embedInline&&l.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){ha?(mxUtils.setPrefixedStyle(l.style,"transform","translate(0, -50%)"),l.style.padding="8px 6px 4px",l.style.top="50%",l.style.bottom="",l.style.height="",ba.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),ha=!1,ma()):(l.innerText="",l.appendChild(ba),mxUtils.setPrefixedStyle(l.style,"transform","translate(0, 0)"),l.style.top="",l.style.bottom="12px",l.style.padding="0px",l.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",ha=!0)}));ma();p.addListener("darkModeChanged",
-ma);p.addListener("sketchModeChanged",ma)}else p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));if(null!=T){var ia=function(ca){if(mxEvent.isAltDown(ca))p.hideCurrentMenu(),p.actions.get("customZoom").funct(),mxEvent.consume(ca);else if("geItem"!=mxEvent.getSource(ca).className||mxEvent.isShiftDown(ca))p.hideCurrentMenu(),p.actions.get("smartFit").funct(),mxEvent.consume(ca)},qa=p.actions.get("zoomIn"),la=p.actions.get("zoomOut");Q=p.actions.get("resetView");
-var Ca=p.actions.get("undo"),Da=p.actions.get("redo"),ya=y("",Ca.funct,null,mxResources.get("undo")+" ("+Ca.shortcut+")",Ca,Editor.undoImage),Pa=y("",Da.funct,null,mxResources.get("redo")+" ("+Da.shortcut+")",Da,Editor.redoImage);if(null!=V){Q=function(){Ga.style.display=null!=p.pages&&("0"!=urlParams.pages||1<p.pages.length||Editor.pagesVisible)?"inline-block":"none"};var za=function(){Ga.innerText="";if(null!=p.currentPage){mxUtils.write(Ga,p.currentPage.getName());var ca=null!=p.pages?p.pages.length:
-1,ea=p.getPageIndex(p.currentPage);ea=null!=ea?ea+1:1;var da=p.currentPage.getId();Ga.setAttribute("title",p.currentPage.getName()+" ("+ea+"/"+ca+")"+(null!=da?" ["+da+"]":""))}},Fa=p.actions.get("delete"),Ia=y("",Fa.funct,null,mxResources.get("delete"),Fa,Editor.trashImage);Ia.style.opacity="0.1";A.appendChild(Ia);Fa.addListener("stateChanged",function(){Ia.style.opacity=Fa.enabled?"":"0.1"});var Ba=function(){ya.style.display=0<p.editor.undoManager.history.length||F.isEditing()?"inline-block":"none";
-Pa.style.display=ya.style.display;ya.style.opacity=Ca.enabled?"":"0.1";Pa.style.opacity=Da.enabled?"":"0.1"};A.appendChild(ya);A.appendChild(Pa);Ca.addListener("stateChanged",Ba);Da.addListener("stateChanged",Ba);Ba();var Ga=this.createPageMenuTab(!1,!0);Ga.style.display="none";Ga.style.position="";Ga.style.marginLeft="";Ga.style.top="";Ga.style.left="";Ga.style.height="100%";Ga.style.lineHeight="";Ga.style.borderStyle="none";Ga.style.padding="3px 0";Ga.style.margin="0px";Ga.style.background="";Ga.style.border=
-"";Ga.style.boxShadow="none";Ga.style.verticalAlign="top";Ga.style.width="auto";Ga.style.maxWidth="160px";Ga.style.position="relative";Ga.style.padding="6px";Ga.style.textOverflow="ellipsis";Ga.style.opacity="0.8";V.appendChild(Ga);p.editor.addListener("pagesPatched",za);p.editor.addListener("pageSelected",za);p.editor.addListener("pageRenamed",za);p.editor.addListener("fileLoaded",za);za();p.addListener("fileDescriptorChanged",Q);p.addListener("pagesVisibleChanged",Q);p.editor.addListener("pagesPatched",
-Q);Q();Q=y("",la.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",la,Editor.zoomOutImage);V.appendChild(Q);var na=H.addMenu("100%",T.funct);na.setAttribute("title",mxResources.get("zoom"));na.innerHTML="100%";na.style.display="inline-block";na.style.color="inherit";na.style.cursor="pointer";na.style.textAlign="center";na.style.whiteSpace="nowrap";na.style.paddingRight="10px";na.style.textDecoration="none";na.style.verticalAlign="top";na.style.padding="6px 0";na.style.fontSize=
-"14px";na.style.width="40px";na.style.opacity="0.4";V.appendChild(na);T=y("",qa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",qa,Editor.zoomInImage);V.appendChild(T);"1"==urlParams.embedInline?(V.appendChild(O),T=p.actions.get("exit"),V.appendChild(y("",T.funct,null,mxResources.get("exit"),T,Editor.closeImage))):O.parentNode.removeChild(O);p.tabContainer.style.visibility="hidden";K.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-A.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";P.appendChild(A);P.appendChild(V);l.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(l.style.touchAction="none");P.appendChild(l);window.setTimeout(function(){mxUtils.setPrefixedStyle(l.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(P)}else{var Ea=y("",ia,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";na=H.addMenu("100%",
-T.funct);na.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");na.style.whiteSpace="nowrap";na.style.paddingRight="10px";na.style.textDecoration="none";na.style.textDecoration="none";na.style.overflow="hidden";na.style.visibility="hidden";na.style.textAlign="center";na.style.cursor="pointer";na.style.height=parseInt(p.tabContainerHeight)-1+"px";na.style.lineHeight=parseInt(p.tabContainerHeight)+1+"px";na.style.position="absolute";na.style.display="block";na.style.fontSize="12px";na.style.width=
-"59px";na.style.right="0px";na.style.bottom="0px";na.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";na.style.backgroundPosition="right 6px center";na.style.backgroundRepeat="no-repeat";P.appendChild(na)}(function(ca){mxEvent.addListener(ca,"click",ia);var ea=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*p.editor.graph.view.scale)+"%")});p.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);p.editor.addListener("resetGraphView",ea);p.editor.addListener("pageSelected",
-ea)})(na);var wa=p.setGraphEnabled;p.setGraphEnabled=function(){wa.apply(this,arguments);null!=this.tabContainer&&(na.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}P.appendChild(K);P.appendChild(p.diagramContainer);t.appendChild(P);p.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&P.appendChild(p.tabContainer);
-var La=null;N();mxEvent.addListener(window,"resize",function(){N();null!=p.sidebarWindow&&p.sidebarWindow.window.fit();null!=p.formatWindow&&p.formatWindow.window.fit();null!=p.actions.outlineWindow&&p.actions.outlineWindow.window.fit();null!=p.actions.layersWindow&&p.actions.layersWindow.window.fit();null!=p.menus.tagsWindow&&p.menus.tagsWindow.window.fit();null!=p.menus.findWindow&&p.menus.findWindow.window.fit();null!=p.menus.findReplaceWindow&&p.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";l.style.transform="";mxEvent.addGestureListeners(p.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==p.diagramContainer.parentNode&&(p.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),p.sendEmbeddedSvgExport())});t=document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor=
-"row-resize";p.diagramContainer.parentNode.appendChild(t);p.bottomResizer=t;var ka=null,ua=null,sa=null,va=null;mxEvent.addGestureListeners(t,function(ca){va=parseInt(p.diagramContainer.style.height);ua=mxEvent.getClientY(ca);F.popupMenuHandler.hideMenu();mxEvent.consume(ca)});t=t.cloneNode(!1);t.style.cursor="col-resize";p.diagramContainer.parentNode.appendChild(t);p.rightResizer=t;mxEvent.addGestureListeners(t,function(ca){sa=parseInt(p.diagramContainer.style.width);ka=mxEvent.getClientX(ca);F.popupMenuHandler.hideMenu();
-mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ea=!1;null!=ka&&(p.diagramContainer.style.width=Math.max(20,sa+mxEvent.getClientX(ca)-ka)+"px",ea=!0);null!=ua&&(p.diagramContainer.style.height=Math.max(20,va+mxEvent.getClientY(ca)-ua)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:p.diagramContainer.getBoundingClientRect()}),"*"),M(),p.refresh())},function(ca){null==ka&&null==
-ua||mxEvent.consume(ca);ua=ka=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";p.bottomResizer.style.visibility="hidden";p.rightResizer.style.visibility="hidden";A.style.visibility="hidden";V.style.visibility="hidden";l.style.display="none"}"1"==urlParams.prefetchFonts&&p.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(e,u,v,B){var E=u.y,L=u.x,c=!1,d=!1;if(null!=this.states&&null!=e&&null!=u){var g=this,q=new mxCellState,m=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);q.x=e.x+L;q.y=e.y+E;q.width=e.width;q.height=e.height;for(var z=[],C=[],x=0;x<this.states.length;x++){var y=this.states[x];y instanceof mxCellState&&(B||!this.graph.isCellSelected(y.cell))&&((q.x>=y.x&&q.x<=y.x+y.width||y.x>=q.x&&y.x<=q.x+q.width)&&(q.y>
-y.y+y.height+4||q.y+q.height+4<y.y)?z.push(y):(q.y>=y.y&&q.y<=y.y+y.height||y.y>=q.y&&y.y<=q.y+q.height)&&(q.x>y.x+y.width+4||q.x+q.width+4<y.x)&&C.push(y))}var I=0,N=0,t=y=0,p=0,F=0,K=0,D=0,H=5*m;if(1<z.length){z.push(q);z.sort(function(T,W){return T.y-W.y});var J=!1;x=q==z[0];m=q==z[z.length-1];if(!x&&!m)for(x=1;x<z.length-1;x++)if(q==z[x]){m=z[x-1];x=z[x+1];y=N=t=(x.y-m.y-m.height-q.height)/2;break}for(x=0;x<z.length-1;x++){m=z[x];var G=z[x+1],P=q==m||q==G;G=G.y-m.y-m.height;J|=q==m;if(0==N&&0==
-I)N=G,I=1;else if(Math.abs(N-G)<=(P||1==x&&J?n:0))I+=1;else if(1<I&&J){z=z.slice(0,x+1);break}else if(3<=z.length-x&&!J)I=0,y=N=0!=t?t:0,z.splice(0,0==x?1:x),x=-1;else break;0!=y||P||(N=y=G)}3==z.length&&z[1]==q&&(y=0)}if(1<C.length){C.push(q);C.sort(function(T,W){return T.x-W.x});J=!1;x=q==C[0];m=q==C[C.length-1];if(!x&&!m)for(x=1;x<C.length-1;x++)if(q==C[x]){m=C[x-1];x=C[x+1];K=F=D=(x.x-m.x-m.width-q.width)/2;break}for(x=0;x<C.length-1;x++){m=C[x];G=C[x+1];P=q==m||q==G;G=G.x-m.x-m.width;J|=q==m;
-if(0==F&&0==p)F=G,p=1;else if(Math.abs(F-G)<=(P||1==x&&J?n:0))p+=1;else if(1<p&&J){C=C.slice(0,x+1);break}else if(3<=C.length-x&&!J)p=0,K=F=0!=D?D:0,C.splice(0,0==x?1:x),x=-1;else break;0!=K||P||(F=K=G)}3==C.length&&C[1]==q&&(K=0)}n=function(T,W,U,V){var l=[];if(V){V=H;var A=0}else V=0,A=H;l.push(new mxPoint(T.x-V,T.y-A));l.push(new mxPoint(T.x+V,T.y+A));l.push(T);l.push(W);l.push(new mxPoint(W.x-V,W.y-A));l.push(new mxPoint(W.x+V,W.y+A));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};F=function(T,W){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(W&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<p&&p==C.length-1){p=[];D=g.guidesArrHor;c=[];L=0;x=C[0]==q?1:0;J=C[x].y+C[x].height;if(0<K)for(x=0;x<C.length-1;x++)m=
-C[x],G=C[x+1],q==m?(L=G.x-m.width-K,c.push(new mxPoint(L+m.width+H,J)),c.push(new mxPoint(G.x-H,J))):q==G?(c.push(new mxPoint(m.x+m.width+H,J)),L=m.x+m.width+K,c.push(new mxPoint(L-H,J))):(c.push(new mxPoint(m.x+m.width+H,J)),c.push(new mxPoint(G.x-H,J)));else m=C[0],x=C[2],L=m.x+m.width+(x.x-m.x-m.width-q.width)/2,c.push(new mxPoint(m.x+m.width+H,J)),c.push(new mxPoint(L-H,J)),c.push(new mxPoint(L+q.width+H,J)),c.push(new mxPoint(x.x-H,J));for(x=0;x<c.length;x+=2)C=c[x],K=c[x+1],C=n(C,K,null!=D?
-D[x/2]:null),C.node.style.visibility="visible",C.redraw(),p.push(C);for(x=c.length/2;null!=D&&x<D.length;x++)D[x].destroy();g.guidesArrHor=p;L-=e.x;c=!0}else F(!0);if(1<I&&I==z.length-1){p=[];D=g.guidesArrVer;d=[];E=0;x=z[0]==q?1:0;I=z[x].x+z[x].width;if(0<y)for(x=0;x<z.length-1;x++)m=z[x],G=z[x+1],q==m?(E=G.y-m.height-y,d.push(new mxPoint(I,E+m.height+H)),d.push(new mxPoint(I,G.y-H))):q==G?(d.push(new mxPoint(I,m.y+m.height+H)),E=m.y+m.height+y,d.push(new mxPoint(I,E-H))):(d.push(new mxPoint(I,m.y+
-m.height+H)),d.push(new mxPoint(I,G.y-H)));else m=z[0],x=z[2],E=m.y+m.height+(x.y-m.y-m.height-q.height)/2,d.push(new mxPoint(I,m.y+m.height+H)),d.push(new mxPoint(I,E-H)),d.push(new mxPoint(I,E+q.height+H)),d.push(new mxPoint(I,x.y-H));for(x=0;x<d.length;x+=2)C=d[x],K=d[x+1],C=n(C,K,null!=D?D[x/2]:null,!0),C.node.style.visibility="visible",C.redraw(),p.push(C);for(x=d.length/2;null!=D&&x<D.length;x++)D[x].destroy();g.guidesArrVer=p;E-=e.y;d=!0}else F(!1,!0)}if(c||d)return q=new mxPoint(L,E),z=b.call(this,
-e,q,v,B),c&&!d?q.y=z.y:d&&!c&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;F(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(e){f.call(this,e);var u=this.guidesArrVer,v=this.guidesArrHor;if(null!=u)for(var B=0;B<u.length;B++)u[B].node.style.visibility=e?"visible":"hidden";if(null!=
-v)for(B=0;B<v.length;B++)v[B].node.style.visibility=e?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var e=this.guidesArrVer,u=this.guidesArrHor;if(null!=e){for(var v=0;v<e.length;v++)e[v].destroy();this.guidesArrVer=null}if(null!=u){for(v=0;v<u.length;v++)u[v].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,e){function u(){var I=b.diagramContainer;g.style.top=I.offsetTop-L+"px";g.style.left=I.offsetLeft-L+"px";g.style.width=(k?0:I.offsetWidth)+L+"px";g.style.height=(k?I.offsetHeight:0)+L+"px"}function v(I,N,t){if(null!=B)return I;var p;return function(){var F=this,K=arguments,D=t&&!p;clearTimeout(p);p=setTimeout(function(){p=null;t||I.apply(F,K)},N);D&&I.apply(F,K)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-E=window.cancelAnimationFrame||window.mozCancelAnimationFrame,L=this.RULER_THICKNESS,c=this;this.unit=f;var d=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){d=Editor.isDarkMode()?
-{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=d.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+d.strokeClr;g.style.borderLeft="0.5px solid "+d.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh=
-function(I){c.editorUiRefresh.apply(b,arguments);u()};u();var q=document.createElement("canvas");q.width=g.offsetWidth;q.height=g.offsetHeight;g.style.overflow="hidden";q.style.position="relative";g.appendChild(q);var m=q.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=g;this.canvas=q;var z=function(I,N,t,p,F){I=Math.round(I);N=Math.round(N);t=Math.round(t);p=Math.round(p);m.beginPath();m.moveTo(I+.5,N+.5);m.lineTo(t+.5,p+.5);m.stroke();F&&(k?(m.save(),m.translate(I,N),
-m.rotate(-Math.PI/2),m.fillText(F,0,0),m.restore()):m.fillText(F,I,N))},C=function(){m.clearRect(0,0,q.width,q.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=d.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var I=n.view.scale,N=n.view.getBackgroundPageBounds(),t=n.view.translate,p=n.pageVisible;t=p?L+(k?N.y-n.container.scrollTop:N.x-n.container.scrollLeft):L+(k?t.y*I-n.container.scrollTop:t.x*I-n.container.scrollLeft);var F=0;p&&(F=n.getPageLayout(),F=k?F.y*n.pageFormat.height:
-F.x*n.pageFormat.width);var K;switch(c.unit){case mxConstants.POINTS:var D=K=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:K=10;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:K=20;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:K=.5>=I||4<=I?8:16,D=mxConstants.PIXELS_PER_INCH/K,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var J=D;2<=I?J=D/(2*Math.floor(I/2)):.5>=I&&(J=D*Math.floor(1/I/2)*(c.unit==
-mxConstants.MILLIMETERS?2:1));D=null;N=p?Math.min(t+(k?N.height:N.width),k?q.height:q.width):k?q.height:q.width;if(p)if(m.fillStyle=d.outBkgClr,k){var G=t-L;0<G&&m.fillRect(0,L,L,G);N<q.height&&m.fillRect(0,N,L,q.height)}else G=t-L,0<G&&m.fillRect(L,0,G,L),N<q.width&&m.fillRect(N,0,q.width,L);m.fillStyle=d.fontClr;for(p=p?t:t%(J*I);p<=N;p+=J*I)if(G=Math.round((p-t)/I/J),!(p<L||G==D)){D=G;var P=null;0==G%K&&(P=c.formatText(F+G*J)+"");k?z(L-H[Math.abs(G)%K],p,L,p,P):z(p,L-H[Math.abs(G)%K],p,L,P)}m.lineWidth=
-1;z(k?0:L,k?L:0,L,L);m.fillStyle=d.cornerClr;m.fillRect(0,0,L,L)},x=-1,y=function(){null!=B?(null!=E&&E(x),x=B(C)):C()};this.drawRuler=y;this.sizeListener=f=v(function(){var I=n.container;k?(I=I.offsetHeight+L,q.height!=I&&(q.height=I,g.style.height=I+"px",y())):(I=I.offsetWidth+L,q.width!=I&&(q.width=I,g.style.width=I+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=e=v(function(){var I=k?n.container.scrollTop:n.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,y())},10);
-this.unitListener=function(I,N){c.setUnit(N.getProperty("unit"))};n.addListener(mxEvent.SIZE,f);n.container.addEventListener("scroll",e);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){d=I;g.style.background=d.bkgClr;C()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,N,t,p){if(k&&4<I.height||
-!k&&4<I.width){if(null!=c.guidePart)try{m.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),m.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),m.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(V){}var F=c.origGuideMove.apply(this,arguments);try{m.lineWidth=.5;m.strokeStyle=d.guideClr;m.setLineDash([2]);if(k){var K=I.y+F.y+L-this.graph.container.scrollTop;var D=0;var H=K+I.height/2;var J=L/2;var G=K+I.height;var P=0;var T=m.getImageData(D,K-1,L,
-3);z(D,K,L,K);K--;var W=m.getImageData(J,H-1,L,3);z(J,H,L,H);H--;var U=m.getImageData(P,G-1,L,3);z(P,G,L,G);G--}else K=0,D=I.x+F.x+L-this.graph.container.scrollLeft,H=L/2,J=D+I.width/2,G=0,P=D+I.width,T=m.getImageData(D-1,K,3,L),z(D,K,D,L),D--,W=m.getImageData(J-1,H,3,L),z(J,H,J,L),J--,U=m.getImageData(P-1,G,3,L),z(P,G,P,L),P--;if(null==c.guidePart||c.guidePart.x1!=D||c.guidePart.y1!=K)c.guidePart={imgData1:T,x1:D,y1:K,imgData2:W,x2:J,y2:H,imgData3:U,x3:P,y3:G}}catch(V){}}else F=c.origGuideMove.apply(this,
-arguments);return F};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=c.origGuideDestroy.apply(this,arguments);if(null!=c.guidePart)try{m.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),m.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),m.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3),c.guidePart=null}catch(N){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var C=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(y,A){null!=A.shortcut&&900>d&&!mxClient.IS_IOS?y.firstChild.nextSibling.setAttribute("title",A.shortcut):C.apply(this,arguments)};var F=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){F.apply(this,arguments);if(null!=this.userElement){var y=this.userElement;y.style.cssText="position:relative;cursor:pointer;display:"+y.style.display;y.className="geToolbarButton";
+y.innerText="";y.style.backgroundImage="url("+Editor.userImage+")";y.style.backgroundPosition="center center";y.style.backgroundRepeat="no-repeat";y.style.backgroundSize="24px 24px";y.style.height="24px";y.style.width="24px";var A=mxResources.get("changeUser");if("none"!=y.style.display){y.style.display="inline-block";var x=this.getCurrentFile();if(null!=x&&x.isRealtimeEnabled()&&x.isRealtimeSupported()){var I=document.createElement("img");I.setAttribute("border","0");I.style.position="absolute";
+I.style.left="18px";I.style.top="2px";I.style.width="12px";I.style.height="12px";var M=x.getRealtimeError();x=x.getRealtimeState();A+=" ("+mxResources.get("realtimeCollaboration")+": ";1==x?(I.src=Editor.syncImage,A+=mxResources.get("online")):(I.src=Editor.syncProblemImage,A=null!=M&&null!=M.message?A+M.message:A+mxResources.get("disconnected"));y.style.marginRight="6px";y.appendChild(I);A+=")"}}y.setAttribute("title",A)}};var J=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){J.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var y=document.createElement("div");y.style.display="inline-block";y.style.position="relative";y.style.marginTop="6px";y.style.marginRight="4px";var A=document.createElement("a");A.className="geMenuItem gePrimaryBtn";A.style.marginLeft="8px";A.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var x="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(A,x);A.setAttribute("title",x);mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));y.appendChild(A)}}else mxUtils.write(A,mxResources.get("save")),A.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),y.appendChild(A),
+"1"==urlParams.saveAndExit&&(A=document.createElement("a"),mxUtils.write(A,mxResources.get("saveAndExit")),A.setAttribute("title",mxResources.get("saveAndExit")),A.className="geMenuItem",A.style.marginLeft="6px",A.style.padding="6px",mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),y.appendChild(A));"1"!=urlParams.noExitBtn&&(A=document.createElement("a"),x="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(A,
+x),A.setAttribute("title",x),A.className="geMenuItem",A.style.marginLeft="6px",A.style.padding="6px",mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),y.appendChild(A));this.buttonContainer.appendChild(y);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var c=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(y,A,x){var I=this.editorUi.editor.graph;y.smartSeparators=!0;c.apply(this,arguments);
+"1"==urlParams.sketch?I.isEnabled()&&(y.addSeparator(),1==I.getSelectionCount()&&this.addMenuItems(y,["-","lockUnlock"],null,x)):1==I.getSelectionCount()?(I.isCellFoldable(I.getSelectionCell())&&this.addMenuItems(y,I.isCellCollapsed(A)?["expand"]:["collapse"],null,x),this.addMenuItems(y,["collapsible","-","lockUnlock","enterGroup"],null,x),y.addSeparator(),this.addSubmenu("layout",y)):I.isSelectionEmpty()&&I.isEnabled()?(y.addSeparator(),this.addMenuItems(y,["editData"],null,x),y.addSeparator(),this.addSubmenu("layout",
+y),this.addSubmenu("insert",y),this.addMenuItems(y,["-","exitGroup"],null,x)):I.isEnabled()&&this.addMenuItems(y,["-","lockUnlock"],null,x)};var e=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(y,A,x){e.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(y,["copyAsImage"],null,x)};EditorUi.prototype.toggleFormatPanel=function(y){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=y?y:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(y){m.apply(this,arguments);if(y){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=A&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null!=this.formatWindow&&(1E3<=A||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var y=this.editorUi,A=y.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(n){y.setPagesVisible(!Editor.pagesVisible)}));
+A.setToggleAction(!0);A.setSelectedCallback(function(){return Editor.pagesVisible});y.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(y)},null,null,Editor.ctrlKey+"+Shift+K"));A=y.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(y)}));A.shortcut=y.actions.get("formatPanel").shortcut;A.setToggleAction(!0);A.setSelectedCallback(mxUtils.bind(this,function(){return null!=y.formatWindow&&y.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
+!y.isOffline()&&y.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var n=new ParseDialog(y,mxResources.get("plantUml")+"...","plantUml");y.showDialog(n.container,620,420,!0,!1);n.init()}));y.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var n=new ParseDialog(y,mxResources.get("mermaid")+"...","mermaid");y.showDialog(n.container,620,420,!0,!1);n.init()}));var x=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
+function(n,v){var D=this.editorUi.editor.graph,H=D.getSelectionCell();x.call(this,n,H,null,v);this.addMenuItems(n,["editTooltip"],v);D.model.isVertex(H)&&this.addMenuItems(n,["editGeometry"],v);this.addMenuItems(n,["-","edit"],v)})));this.addPopupMenuCellEditItems=function(n,v,D,H){n.addSeparator();this.addSubmenu("editCell",n,H,mxResources.get("edit"))};var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(n,v){I.funct(n,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+y.menus.addMenuItems(n,["publishLink"],v);y.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(n.addSeparator(v),y.menus.addSubmenu("embed",n,v))})));var M=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(n,v){M.funct(n,v);this.addMenuItems(n,["-","ruler","-","pageScale"],v)})));var E="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),Q=function(n,v,D,H){n.addItem(D,null,mxUtils.bind(this,function(){var K=new CreateGraphDialog(y,D,
+H);y.showDialog(K.container,620,420,!0,!1);K.init()}),v)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,v){for(var D=0;D<E.length;D++)"-"==E[D]?n.addSeparator(v):Q(n,v,mxResources.get(E[D])+"...",E[D])})))};EditorUi.prototype.installFormatToolbar=function(y){var A=this.editor.graph,x=document.createElement("div");x.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+A.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,M){0<A.getSelectionCount()?(y.appendChild(x),x.innerHTML="Selected: "+A.getSelectionCount()):null!=x.parentNode&&x.parentNode.removeChild(x)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;var y=this.formatWindow.window.toggleMinimized,A=240;this.formatWindow.window.toggleMinimized=function(){y.apply(this,arguments);this.minimized?(A=parseInt(this.div.style.width),this.div.style.width=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+A-140+"px"):(this.div.style.width=A+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-A+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(x){mxEvent.getSource(x)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var z=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function y(da,ca,na){var ka=E.menus.get(da),pa=D.addMenu(mxResources.get(da),mxUtils.bind(this,function(){ka.funct.apply(this,arguments)}),v);pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing="border-box";pa.style.top="6px";pa.style.marginRight="6px";pa.style.height="30px";pa.style.paddingTop="6px";pa.style.paddingBottom="6px";pa.style.cursor="pointer";pa.setAttribute("title",mxResources.get(da));E.menus.menuCreated(ka,
+pa,"geMenuItem");null!=na?(pa.style.backgroundImage="url("+na+")",pa.style.backgroundPosition="center center",pa.style.backgroundRepeat="no-repeat",pa.style.backgroundSize="24px 24px",pa.style.width="34px",pa.innerText=""):ca||(pa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",pa.style.backgroundPosition="right 6px center",pa.style.backgroundRepeat="no-repeat",pa.style.paddingRight="22px");return pa}function A(da,ca,na,ka,pa,ea){var ia=document.createElement("a");ia.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position="relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=E.statusContainer?n.insertBefore(ia,E.statusContainer):n.appendChild(ia);null!=ea?(ia.style.backgroundImage="url("+ea+")",ia.style.backgroundPosition=
+"center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,da);mxEvent.addListener(ia,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(oa){oa.preventDefault()}));mxEvent.addListener(ia,"click",function(oa){"disabled"!=ia.getAttribute("disabled")&&ca(oa);mxEvent.consume(oa)});null==na&&(ia.style.marginRight="4px");null!=ka&&ia.setAttribute("title",ka);null!=pa&&(da=function(){pa.isEnabled()?(ia.removeAttribute("disabled"),
+ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},pa.addListener("stateChanged",da),Q.addListener("enabledChanged",da),da());return ia}function x(da,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");
+for(var ka=0;ka<da.length;ka++)null!=da[ka]&&("1"==urlParams.sketch&&(da[ka].style.padding="10px 8px",da[ka].style.width="30px"),da[ka].style.margin="0px",da[ka].style.boxShadow="none",na.appendChild(da[ka]));null!=ca&&mxUtils.setOpacity(na,ca);null!=E.statusContainer&&"1"!=urlParams.sketch?n.insertBefore(na,E.statusContainer):n.appendChild(na);return na}function I(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(X.style.left=58>U.offsetTop-U.offsetHeight/2?"70px":"10px");else{for(var da=n.firstChild;null!=
+da;){var ca=da.nextSibling;"geMenuItem"!=da.className&&"geItem"!=da.className||da.parentNode.removeChild(da);da=ca}v=n.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;da=1E3>d||"1"==urlParams.sketch;var na=null;da||(na=y("diagram"));ca=da?y("diagram",null,Editor.menuImage):null;null!=ca&&(na=ca);x([na,A(mxResources.get("shapes"),E.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),E.actions.get("image"),da?Editor.shapesImage:null),A(mxResources.get("format"),
+E.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+E.actions.get("formatPanel").shortcut+")",E.actions.get("image"),da?Editor.formatImage:null)],da?60:null);ca=y("insert",!0,da?T:null);x([ca,A(mxResources.get("delete"),E.actions.get("delete").funct,null,mxResources.get("delete"),E.actions.get("delete"),da?Editor.trashImage:null)],da?60:null);411<=d&&(x([ma,Ga],60),520<=d&&x([Ba,640<=d?A("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ba,Editor.zoomInImage):
+null,640<=d?A("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",fa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&E.appIconClicked(ka)}),null,null));ca=E.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.embed&&
+"1"!=urlParams.sketch?(null==xa&&(ca=D.addMenu("",ca.funct),ca.setAttribute("title","language"),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="22px 22px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="12px",n.appendChild(ca),xa=ca),E.buttonContainer.style.paddingRight=
+"34px"):(E.buttonContainer.style.paddingRight="4px",null!=xa&&(xa.parentNode.removeChild(xa),xa=null))}z.apply(this,arguments);var M=document.createElement("div");M.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";M.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(M);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
+null==E.embedViewport)mxUtils.fit(this.div);else{var da=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=E.embedViewport.x+E.embedViewport.width,ka=parseInt(this.div.offsetTop),pa=parseInt(this.div.offsetHeight),ea=E.embedViewport.y+E.embedViewport.height;this.div.style.left=Math.max(E.embedViewport.x,Math.min(da,na-ca))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(ka,ea-pa))+"px";this.div.style.height=Math.min(E.embedViewport.height,parseInt(this.div.style.height))+
+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),M=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>M)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));
+E=this;var Q=E.editor.graph;E.toolbar=this.createToolbar(E.createDiv("geToolbar"));E.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.className="geMenubarContainer";var v=null,D=new Menubar(E,n);E.statusContainer=E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft="6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor=
+"default";var H=E.hideCurrentMenu;E.hideCurrentMenu=function(){H.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var K=E.descriptorChanged;E.descriptorChanged=function(){K.apply(this,arguments);var da=E.getCurrentFile();if(null!=da&&null!=da.getTitle()){var ca=da.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);n.setAttribute("title",da.getTitle()+(null!=ca?" ("+ca+")":""))}else n.removeAttribute("title")};
+E.setStatusText(E.editor.getStatus());n.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(E.buttonContainer);E.menubarContainer=E.buttonContainer;E.tabContainer=document.createElement("div");E.tabContainer.className="geTabContainer";E.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
+M=E.diagramContainer.parentNode;var G=document.createElement("div");G.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";E.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){G.style.top="20px";E.titlebar=document.createElement("div");E.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var N=document.createElement("div");
+N.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";E.titlebar.appendChild(N);M.appendChild(E.titlebar)}var T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,U="1"==urlParams.sketch?document.createElement("div"):null,X="1"==urlParams.sketch?document.createElement("div"):null,l=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)X.style.left=
+"10px",X.style.top="10px",U.style.left="10px",U.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",E.diagramContainer.setAttribute("data-bounds",E.diagramContainer.style.top+" "+E.diagramContainer.style.left+" "+E.diagramContainer.style.width+" "+E.diagramContainer.style.height),E.diagramContainer.style.top="0px",E.diagramContainer.style.left="0px",E.diagramContainer.style.bottom="0px",E.diagramContainer.style.right="0px",E.diagramContainer.style.width="",E.diagramContainer.style.height=
+"";else{var da=E.diagramContainer.getAttribute("data-bounds");if(null!=da){E.diagramContainer.style.background="transparent";E.diagramContainer.removeAttribute("data-bounds");var ca=Q.getGraphBounds();da=da.split(" ");E.diagramContainer.style.top=da[0];E.diagramContainer.style.left=da[1];E.diagramContainer.style.width=ca.width+50+"px";E.diagramContainer.style.height=ca.height+46+"px";E.diagramContainer.style.bottom="";E.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:E.diagramContainer.getBoundingClientRect()}),"*");E.refresh()}X.style.left=E.diagramContainer.offsetLeft+"px";X.style.top=E.diagramContainer.offsetTop-X.offsetHeight-4+"px";U.style.display="";U.style.left=E.diagramContainer.offsetLeft-U.offsetWidth-4+"px";U.style.top=E.diagramContainer.offsetTop+"px";V.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=X.style.top;V.style.right="";E.bottomResizer.style.left=E.diagramContainer.offsetLeft+(E.diagramContainer.offsetWidth-
+E.bottomResizer.offsetWidth)/2+"px";E.bottomResizer.style.top=E.diagramContainer.offsetTop+E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight/2-1+"px";E.rightResizer.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-E.rightResizer.offsetWidth/2-1+"px";E.rightResizer.style.top=E.diagramContainer.offsetTop+(E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight)/2+"px"}E.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";E.rightResizer.style.visibility=
+E.bottomResizer.style.visibility;n.style.display="none";X.style.visibility="";V.style.visibility=""});N=E.actions.get("fullscreen");var B=A("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),L=mxUtils.bind(this,function(){B.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";l()});N=mxUtils.bind(this,function(){b(E,
+!0);E.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+da.width+4,da.y);L()});E.addListener("inlineFullscreenChanged",L);E.addListener("editInlineStart",N);"1"==urlParams.embedInline&&E.addListener("darkModeChanged",N);E.addListener("editInlineStop",mxUtils.bind(this,function(da){E.diagramContainer.style.width="10px";E.diagramContainer.style.height="10px";E.diagramContainer.style.border="";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility=
+"hidden";X.style.visibility="hidden";V.style.visibility="hidden";U.style.display="none"}));if(null!=E.hoverIcons){var P=E.hoverIcons.update;E.hoverIcons.update=function(){Q.freehand.isDrawing()||P.apply(this,arguments)}}if(null!=Q.freehand){var O=Q.freehand.createStyle;Q.freehand.createStyle=function(da){return O.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){U.className="geToolbarContainer";V.className="geToolbarContainer";X.className="geToolbarContainer";n.className="geToolbarContainer";
+E.picker=U;E.sketchPickerMenuElt=U;var R=!1;"1"!=urlParams.embed&&"atlassian"!=E.getServiceName()&&(mxEvent.addListener(n,"mouseenter",function(){E.statusContainer.style.display="inline-block"}),mxEvent.addListener(n,"mouseleave",function(){R||(E.statusContainer.style.display="none")}));var S=mxUtils.bind(this,function(da){null!=E.notificationBtn&&(null!=da?E.notificationBtn.setAttribute("title",da):E.notificationBtn.removeAttribute("title"))});n.style.visibility=20>n.clientWidth?"hidden":"";E.editor.addListener("statusChanged",
+mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=E.getServiceName())if(E.statusContainer.style.display="inline-block",R=!0,1==E.statusContainer.children.length&&""==E.editor.getStatus())n.style.visibility="hidden";else{if(0==E.statusContainer.children.length||1==E.statusContainer.children.length&&"function"===typeof E.statusContainer.firstChild.getAttribute&&null==E.statusContainer.firstChild.getAttribute("class")){var da=null!=E.statusContainer.firstChild&&
+"function"===typeof E.statusContainer.firstChild.getAttribute?E.statusContainer.firstChild.getAttribute("title"):E.editor.getStatus();S(da);var ca=E.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;da==mxResources.get(ca)+"..."?(E.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',E.statusContainer.style.display="inline-block",R=!0):6<E.buttonContainer.clientWidth&&(E.statusContainer.style.display=
+"none",R=!1)}else E.statusContainer.style.display="inline-block",S(null),R=!0;n.style.visibility=20>n.clientWidth&&!R?"hidden":""}}));qa=y("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";X.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(da){(mxEvent.isShiftDown(da)||mxEvent.isAltDown(da)||mxEvent.isMetaDown(da)||mxEvent.isControlDown(da)||mxEvent.isPopupTrigger(da))&&this.appIconClicked(da)}),
+null,null);E.statusContainer.style.position="";E.statusContainer.style.display="none";E.statusContainer.style.margin="0px";E.statusContainer.style.padding="6px 0px";E.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";E.statusContainer.style.display="inline-block";E.statusContainer.style.textOverflow="ellipsis";E.buttonContainer.style.display="inline-block";E.buttonContainer.style.position="relative";E.buttonContainer.style.paddingRight="0px";E.buttonContainer.style.top="0px";var W=document.createElement("a");
+W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var aa=!1,Y=mxUtils.bind(this,function(){U.innerText="";if(!aa){var da=function(ca,na,ka,pa){null!=na&&ca.setAttribute("title",na);ca.style.cursor=
+null!=ka?ka:"default";ca.style.margin="2px 0px";U.appendChild(ca);mxUtils.br(U);null!=pa&&(ca.style.position="relative",ca.style.overflow="visible",na=document.createElement("div"),na.style.position="absolute",na.style.left="34px",na.style.top="28px",na.style.fontSize="8px",mxUtils.write(na,pa),ca.appendChild(na));return ca};da(E.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+
+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");da(E.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");da(E.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");da(E.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ca=new mxCell("",new mxGeometry(0,0,Q.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ca.geometry.setTerminalPoint(new mxPoint(0,0),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
+0),!1);ca.geometry.points=[];ca.geometry.relative=!0;ca.edge=!0;da(E.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,ca.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ca=ca.clone();ca.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ca.geometry.width=Q.defaultEdgeLength+20;ca.geometry.setTerminalPoint(new mxPoint(0,20),!0);ca.geometry.setTerminalPoint(new mxPoint(ca.geometry.width,
+20),!1);da(E.sidebar.createEdgeTemplateFromCells([ca],ca.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ca,na,ka,pa){ca=A("",ca.funct,null,na,ca,ka);ca.style.width="40px";ca.style.height="34px";ca.style.opacity="0.7";return da(ca,null,"pointer",pa)})(E.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");qa=y("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";
+qa.style.margin="0px";qa.style.height="34px";qa.style.width="37px";da(qa,null,"pointer")}"1"!=urlParams.embedInline&&U.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){aa?(mxUtils.setPrefixedStyle(U.style,"transform","translate(0, -50%)"),U.style.padding="8px 6px 4px",U.style.top="50%",U.style.bottom="",U.style.height="",W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),aa=!1,
+Y()):(U.innerText="",U.appendChild(W),mxUtils.setPrefixedStyle(U.style,"transform","translate(0, 0)"),U.style.top="",U.style.bottom="12px",U.style.padding="0px",U.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",aa=!0)}));Y();E.addListener("darkModeChanged",Y);E.addListener("sketchModeChanged",Y)}else E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus())}));
+N=E.menus.get("viewZoom");if(null!=N){var Z=function(da){if(mxEvent.isAltDown(da))E.hideCurrentMenu(),E.actions.get("customZoom").funct(),mxEvent.consume(da);else if("geItem"!=mxEvent.getSource(da).className||mxEvent.isShiftDown(da))E.hideCurrentMenu(),E.actions.get("smartFit").funct(),mxEvent.consume(da)},ba=E.actions.get("zoomIn"),fa=E.actions.get("zoomOut"),ja=E.actions.get("resetView"),ha=E.actions.get("undo"),ra=E.actions.get("redo"),ma=A("",ha.funct,null,mxResources.get("undo")+" ("+ha.shortcut+
+")",ha,Editor.undoImage),Ga=A("",ra.funct,null,mxResources.get("redo")+" ("+ra.shortcut+")",ra,Editor.redoImage);if(null!=V){ja=function(){Fa.style.display=null!=E.pages&&("0"!=urlParams.pages||1<E.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ea=function(){Fa.innerText="";if(null!=E.currentPage){mxUtils.write(Fa,E.currentPage.getName());var da=null!=E.pages?E.pages.length:1,ca=E.getPageIndex(E.currentPage);ca=null!=ca?ca+1:1;var na=E.currentPage.getId();Fa.setAttribute("title",E.currentPage.getName()+
+" ("+ca+"/"+da+")"+(null!=na?" ["+na+"]":""))}},za=E.actions.get("delete"),Pa=A("",za.funct,null,mxResources.get("delete"),za,Editor.trashImage);Pa.style.opacity="0.3";X.appendChild(Pa);za.addListener("stateChanged",function(){Pa.style.opacity=za.enabled?"":"0.3"});var Aa=function(){ma.style.display=0<E.editor.undoManager.history.length||Q.isEditing()?"inline-block":"none";Ga.style.display=ma.style.display;ma.style.opacity=ha.enabled?"":"0.3";Ga.style.opacity=ra.enabled?"":"0.3"};X.appendChild(ma);
+X.appendChild(Ga);ha.addListener("stateChanged",Aa);ra.addListener("stateChanged",Aa);Aa();var Fa=this.createPageMenuTab(!1,!0);Fa.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";V.appendChild(Fa);E.editor.addListener("pagesPatched",Ea);E.editor.addListener("pageSelected",Ea);E.editor.addListener("pageRenamed",Ea);E.editor.addListener("fileLoaded",Ea);Ea();E.addListener("fileDescriptorChanged",ja);E.addListener("pagesVisibleChanged",
+ja);E.editor.addListener("pagesPatched",ja);ja();ja=A("",fa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",fa,Editor.zoomOutImage);V.appendChild(ja);var qa=D.addMenu("100%",N.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign=
+"top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";V.appendChild(qa);N=A("",ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ba,Editor.zoomInImage);V.appendChild(N);"1"==urlParams.embedInline?(V.appendChild(B),N=E.actions.get("exit"),V.appendChild(A("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):B.parentNode.removeChild(B);E.tabContainer.style.visibility="hidden";n.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+X.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";G.appendChild(X);G.appendChild(V);U.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(U.style.touchAction="none");G.appendChild(U);window.setTimeout(function(){mxUtils.setPrefixedStyle(U.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(G)}else{var Ba=A("",Z,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ja,Editor.zoomFitImage);n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=D.addMenu("100%",
+N.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(E.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(E.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width=
+"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";G.appendChild(qa)}(function(da){mxEvent.addListener(da,"click",Z);var ca=mxUtils.bind(this,function(){da.innerText="";mxUtils.write(da,Math.round(100*E.editor.graph.view.scale)+"%")});E.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);E.editor.addListener("resetGraphView",ca);E.editor.addListener("pageSelected",
+ca)})(qa);var Ra=E.setGraphEnabled;E.setGraphEnabled=function(){Ra.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}G.appendChild(n);G.appendChild(E.diagramContainer);M.appendChild(G);E.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&G.appendChild(E.tabContainer);
+var xa=null;I();mxEvent.addListener(window,"resize",function(){I();null!=E.sidebarWindow&&E.sidebarWindow.window.fit();null!=E.formatWindow&&E.formatWindow.window.fit();null!=E.actions.outlineWindow&&E.actions.outlineWindow.window.fit();null!=E.actions.layersWindow&&E.actions.layersWindow.window.fit();null!=E.menus.tagsWindow&&E.menus.tagsWindow.window.fit();null!=E.menus.findWindow&&E.menus.findWindow.window.fit();null!=E.menus.findReplaceWindow&&E.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";U.style.transform="";mxEvent.addGestureListeners(E.diagramContainer.parentNode,function(da){mxEvent.getSource(da)==E.diagramContainer.parentNode&&(E.embedExitPoint=new mxPoint(mxEvent.getClientX(da),mxEvent.getClientY(da)),E.sendEmbeddedSvgExport())});M=document.createElement("div");M.style.position="absolute";M.style.width="10px";M.style.height="10px";M.style.borderRadius="5px";M.style.border="1px solid gray";M.style.background="#ffffff";M.style.cursor=
+"row-resize";E.diagramContainer.parentNode.appendChild(M);E.bottomResizer=M;var Da=null,va=null,Ka=null,la=null;mxEvent.addGestureListeners(M,function(da){la=parseInt(E.diagramContainer.style.height);va=mxEvent.getClientY(da);Q.popupMenuHandler.hideMenu();mxEvent.consume(da)});M=M.cloneNode(!1);M.style.cursor="col-resize";E.diagramContainer.parentNode.appendChild(M);E.rightResizer=M;mxEvent.addGestureListeners(M,function(da){Ka=parseInt(E.diagramContainer.style.width);Da=mxEvent.getClientX(da);Q.popupMenuHandler.hideMenu();
+mxEvent.consume(da)});mxEvent.addGestureListeners(document.body,null,function(da){var ca=!1;null!=Da&&(E.diagramContainer.style.width=Math.max(20,Ka+mxEvent.getClientX(da)-Da)+"px",ca=!0);null!=va&&(E.diagramContainer.style.height=Math.max(20,la+mxEvent.getClientY(da)-va)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:E.diagramContainer.getBoundingClientRect()}),"*"),l(),E.refresh())},function(da){null==Da&&null==
+va||mxEvent.consume(da);va=Da=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";X.style.visibility="hidden";V.style.visibility="hidden";U.style.display="none"}"1"==urlParams.prefetchFonts&&E.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,C){var F=t.y,J=t.x,c=!1,e=!1;if(null!=this.states&&null!=d&&null!=t){var g=this,m=new mxCellState,p=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);m.x=d.x+J;m.y=d.y+F;m.width=d.width;m.height=d.height;for(var z=[],y=[],A=0;A<this.states.length;A++){var x=this.states[A];x instanceof mxCellState&&(C||!this.graph.isCellSelected(x.cell))&&((m.x>=x.x&&m.x<=x.x+x.width||x.x>=m.x&&x.x<=m.x+m.width)&&(m.y>
+x.y+x.height+4||m.y+m.height+4<x.y)?z.push(x):(m.y>=x.y&&m.y<=x.y+x.height||x.y>=m.y&&x.y<=m.y+m.height)&&(m.x>x.x+x.width+4||m.x+m.width+4<x.x)&&y.push(x))}var I=0,M=0,E=x=0,Q=0,n=0,v=0,D=0,H=5*p;if(1<z.length){z.push(m);z.sort(function(T,V){return T.y-V.y});var K=!1;A=m==z[0];p=m==z[z.length-1];if(!A&&!p)for(A=1;A<z.length-1;A++)if(m==z[A]){p=z[A-1];A=z[A+1];x=M=E=(A.y-p.y-p.height-m.height)/2;break}for(A=0;A<z.length-1;A++){p=z[A];var G=z[A+1],N=m==p||m==G;G=G.y-p.y-p.height;K|=m==p;if(0==M&&0==
+I)M=G,I=1;else if(Math.abs(M-G)<=(N||1==A&&K?q:0))I+=1;else if(1<I&&K){z=z.slice(0,A+1);break}else if(3<=z.length-A&&!K)I=0,x=M=0!=E?E:0,z.splice(0,0==A?1:A),A=-1;else break;0!=x||N||(M=x=G)}3==z.length&&z[1]==m&&(x=0)}if(1<y.length){y.push(m);y.sort(function(T,V){return T.x-V.x});K=!1;A=m==y[0];p=m==y[y.length-1];if(!A&&!p)for(A=1;A<y.length-1;A++)if(m==y[A]){p=y[A-1];A=y[A+1];v=n=D=(A.x-p.x-p.width-m.width)/2;break}for(A=0;A<y.length-1;A++){p=y[A];G=y[A+1];N=m==p||m==G;G=G.x-p.x-p.width;K|=m==p;
+if(0==n&&0==Q)n=G,Q=1;else if(Math.abs(n-G)<=(N||1==A&&K?q:0))Q+=1;else if(1<Q&&K){y=y.slice(0,A+1);break}else if(3<=y.length-A&&!K)Q=0,v=n=0!=D?D:0,y.splice(0,0==A?1:A),A=-1;else break;0!=v||N||(n=v=G)}3==y.length&&y[1]==m&&(v=0)}q=function(T,V,U,X){var l=[];if(X){X=H;var B=0}else X=0,B=H;l.push(new mxPoint(T.x-X,T.y-B));l.push(new mxPoint(T.x+X,T.y+B));l.push(T);l.push(V);l.push(new mxPoint(V.x-X,V.y-B));l.push(new mxPoint(V.x+X,V.y+B));if(null!=U)return U.points=l,U;T=new mxPolyline(l,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);T.dialect=mxConstants.DIALECT_SVG;T.pointerEvents=!1;T.init(g.graph.getView().getOverlayPane());return T};n=function(T,V){if(T&&null!=g.guidesArrHor)for(T=0;T<g.guidesArrHor.length;T++)g.guidesArrHor[T].node.style.visibility="hidden";if(V&&null!=g.guidesArrVer)for(T=0;T<g.guidesArrVer.length;T++)g.guidesArrVer[T].node.style.visibility="hidden"};if(1<Q&&Q==y.length-1){Q=[];D=g.guidesArrHor;c=[];J=0;A=y[0]==m?1:0;K=y[A].y+y[A].height;if(0<v)for(A=0;A<y.length-1;A++)p=
+y[A],G=y[A+1],m==p?(J=G.x-p.width-v,c.push(new mxPoint(J+p.width+H,K)),c.push(new mxPoint(G.x-H,K))):m==G?(c.push(new mxPoint(p.x+p.width+H,K)),J=p.x+p.width+v,c.push(new mxPoint(J-H,K))):(c.push(new mxPoint(p.x+p.width+H,K)),c.push(new mxPoint(G.x-H,K)));else p=y[0],A=y[2],J=p.x+p.width+(A.x-p.x-p.width-m.width)/2,c.push(new mxPoint(p.x+p.width+H,K)),c.push(new mxPoint(J-H,K)),c.push(new mxPoint(J+m.width+H,K)),c.push(new mxPoint(A.x-H,K));for(A=0;A<c.length;A+=2)y=c[A],v=c[A+1],y=q(y,v,null!=D?
+D[A/2]:null),y.node.style.visibility="visible",y.redraw(),Q.push(y);for(A=c.length/2;null!=D&&A<D.length;A++)D[A].destroy();g.guidesArrHor=Q;J-=d.x;c=!0}else n(!0);if(1<I&&I==z.length-1){Q=[];D=g.guidesArrVer;e=[];F=0;A=z[0]==m?1:0;I=z[A].x+z[A].width;if(0<x)for(A=0;A<z.length-1;A++)p=z[A],G=z[A+1],m==p?(F=G.y-p.height-x,e.push(new mxPoint(I,F+p.height+H)),e.push(new mxPoint(I,G.y-H))):m==G?(e.push(new mxPoint(I,p.y+p.height+H)),F=p.y+p.height+x,e.push(new mxPoint(I,F-H))):(e.push(new mxPoint(I,p.y+
+p.height+H)),e.push(new mxPoint(I,G.y-H)));else p=z[0],A=z[2],F=p.y+p.height+(A.y-p.y-p.height-m.height)/2,e.push(new mxPoint(I,p.y+p.height+H)),e.push(new mxPoint(I,F-H)),e.push(new mxPoint(I,F+m.height+H)),e.push(new mxPoint(I,A.y-H));for(A=0;A<e.length;A+=2)y=e[A],v=e[A+1],y=q(y,v,null!=D?D[A/2]:null,!0),y.node.style.visibility="visible",y.redraw(),Q.push(y);for(A=e.length/2;null!=D&&A<D.length;A++)D[A].destroy();g.guidesArrVer=Q;F-=d.y;e=!0}else n(!1,!0)}if(c||e)return m=new mxPoint(J,F),z=b.call(this,
+d,m,u,C),c&&!e?m.y=z.y:e&&!c&&(m.x=z.x),z.y!=m.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=m.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),m;n(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var C=0;C<t.length;C++)t[C].node.style.visibility=d?"visible":"hidden";if(null!=
+u)for(C=0;C<u.length;C++)u[C].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function t(){var I=b.diagramContainer;g.style.top=I.offsetTop-J+"px";g.style.left=I.offsetLeft-J+"px";g.style.width=(k?0:I.offsetWidth)+J+"px";g.style.height=(k?I.offsetHeight:0)+J+"px"}function u(I,M,E){if(null!=C)return I;var Q;return function(){var n=this,v=arguments,D=E&&!Q;clearTimeout(Q);Q=setTimeout(function(){Q=null;E||I.apply(n,v)},M);D&&I.apply(n,v)}}var C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+F=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,c=this;this.unit=f;var e=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},g=document.createElement("div");g.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){e=Editor.isDarkMode()?
+{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};g.style.background=e.bkgClr;g.style[k?"borderRight":"borderBottom"]="0.5px solid "+e.strokeClr;g.style.borderLeft="0.5px solid "+e.strokeClr});this.updateStyle();document.body.appendChild(g);mxEvent.disableContextMenu(g);this.editorUiRefresh=b.refresh;b.refresh=
+function(I){c.editorUiRefresh.apply(b,arguments);t()};t();var m=document.createElement("canvas");m.width=g.offsetWidth;m.height=g.offsetHeight;g.style.overflow="hidden";m.style.position="relative";g.appendChild(m);var p=m.getContext("2d");this.ui=b;var q=b.editor.graph;this.graph=q;this.container=g;this.canvas=m;var z=function(I,M,E,Q,n){I=Math.round(I);M=Math.round(M);E=Math.round(E);Q=Math.round(Q);p.beginPath();p.moveTo(I+.5,M+.5);p.lineTo(E+.5,Q+.5);p.stroke();n&&(k?(p.save(),p.translate(I,M),
+p.rotate(-Math.PI/2),p.fillText(n,0,0),p.restore()):p.fillText(n,I,M))},y=function(){p.clearRect(0,0,m.width,m.height);p.beginPath();p.lineWidth=.7;p.strokeStyle=e.strokeClr;p.setLineDash([]);p.font="9px Arial";p.textAlign="center";var I=q.view.scale,M=q.view.getBackgroundPageBounds(),E=q.view.translate,Q=q.pageVisible;E=Q?J+(k?M.y-q.container.scrollTop:M.x-q.container.scrollLeft):J+(k?E.y*I-q.container.scrollTop:E.x*I-q.container.scrollLeft);var n=0;Q&&(n=q.getPageLayout(),n=k?n.y*q.pageFormat.height:
+n.x*q.pageFormat.width);var v;switch(c.unit){case mxConstants.POINTS:var D=v=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:v=10;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:v=20;D=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:v=.5>=I||4<=I?8:16,D=mxConstants.PIXELS_PER_INCH/v,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var K=D;2<=I?K=D/(2*Math.floor(I/2)):.5>=I&&(K=D*Math.floor(1/I/2)*(c.unit==
+mxConstants.MILLIMETERS?2:1));D=null;M=Q?Math.min(E+(k?M.height:M.width),k?m.height:m.width):k?m.height:m.width;if(Q)if(p.fillStyle=e.outBkgClr,k){var G=E-J;0<G&&p.fillRect(0,J,J,G);M<m.height&&p.fillRect(0,M,J,m.height)}else G=E-J,0<G&&p.fillRect(J,0,G,J),M<m.width&&p.fillRect(M,0,m.width,J);p.fillStyle=e.fontClr;for(Q=Q?E:E%(K*I);Q<=M;Q+=K*I)if(G=Math.round((Q-E)/I/K),!(Q<J||G==D)){D=G;var N=null;0==G%v&&(N=c.formatText(n+G*K)+"");k?z(J-H[Math.abs(G)%v],Q,J,Q,N):z(Q,J-H[Math.abs(G)%v],Q,J,N)}p.lineWidth=
+1;z(k?0:J,k?J:0,J,J);p.fillStyle=e.cornerClr;p.fillRect(0,0,J,J)},A=-1,x=function(){null!=C?(null!=F&&F(A),A=C(y)):y()};this.drawRuler=x;this.sizeListener=f=u(function(){var I=q.container;k?(I=I.offsetHeight+J,m.height!=I&&(m.height=I,g.style.height=I+"px",x())):(I=I.offsetWidth+J,m.width!=I&&(m.width=I,g.style.width=I+"px",x()))},10);this.pageListener=function(){x()};this.scrollListener=d=u(function(){var I=k?q.container.scrollTop:q.container.scrollLeft;c.lastScroll!=I&&(c.lastScroll=I,x())},10);
+this.unitListener=function(I,M){c.setUnit(M.getProperty("unit"))};q.addListener(mxEvent.SIZE,f);q.container.addEventListener("scroll",d);q.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){e=I;g.style.background=e.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,M,E,Q){if(k&&4<I.height||
+!k&&4<I.width){if(null!=c.guidePart)try{p.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),p.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),p.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3)}catch(X){}var n=c.origGuideMove.apply(this,arguments);try{p.lineWidth=.5;p.strokeStyle=e.guideClr;p.setLineDash([2]);if(k){var v=I.y+n.y+J-this.graph.container.scrollTop;var D=0;var H=v+I.height/2;var K=J/2;var G=v+I.height;var N=0;var T=p.getImageData(D,v-1,J,
+3);z(D,v,J,v);v--;var V=p.getImageData(K,H-1,J,3);z(K,H,J,H);H--;var U=p.getImageData(N,G-1,J,3);z(N,G,J,G);G--}else v=0,D=I.x+n.x+J-this.graph.container.scrollLeft,H=J/2,K=D+I.width/2,G=0,N=D+I.width,T=p.getImageData(D-1,v,3,J),z(D,v,D,J),D--,V=p.getImageData(K-1,H,3,J),z(K,H,K,J),K--,U=p.getImageData(N-1,G,3,J),z(N,G,N,J),N--;if(null==c.guidePart||c.guidePart.x1!=D||c.guidePart.y1!=v)c.guidePart={imgData1:T,x1:D,y1:v,imgData2:V,x2:K,y2:H,imgData3:U,x3:N,y3:G}}catch(X){}}else n=c.origGuideMove.apply(this,
+arguments);return n};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=c.origGuideDestroy.apply(this,arguments);if(null!=c.guidePart)try{p.putImageData(c.guidePart.imgData1,c.guidePart.x1,c.guidePart.y1),p.putImageData(c.guidePart.imgData2,c.guidePart.x2,c.guidePart.y2),p.putImageData(c.guidePart.imgData3,c.guidePart.x3,c.guidePart.y3),c.guidePart=null}catch(M){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(e){var u=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,
-function(v){u=null!=b.currentMenu;mxEvent.consume(v)}),null,mxUtils.bind(this,function(v){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(v)||mxEvent.isPopupTrigger(v))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(v)||!u){var B=new mxPopupMenu(mxUtils.bind(this,function(c,d){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],d)}));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.resetCurrentMenu();B.destroy()});var E=mxEvent.getClientX(v),L=mxEvent.getClientY(v);B.popup(E,L,null,v);b.setCurrentMenu(B,e)}mxEvent.consume(v)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,e=null,u=[],v,B=[],E,L=!1,c=!0,d=!0,g=!0,q=!0,m=[],n=!1,z=!0,C=!1,x={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(H){L=H};this.setAutoClose=function(H){c=H};this.setAutoInsert=
-function(H){d=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){q=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){C=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){y=H};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(H){x.size=H};this.getBrushSize=function(){return x.size};var I=function(H){n=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);
-b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return n};var N=mxUtils.bind(this,function(H){if(e){var J=E.length,G=z&&0<B.length&&null!=E&&2>E.length;G||B.push.apply(B,E);E=[];B.push(null);u.push(e);e=null;(G||d)&&this.stopDrawing();d&&2<=J&&this.startDrawing();mxEvent.consume(H)}}),t=new mxCell;t.edge=!0;var p=function(){var H=b.getCurrentCellStyle(t);H=mxUtils.getValue(b.currentVertexStyle,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var J=";fillColor=none;";y&&(J=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+J};this.stopDrawing=function(){if(0<u.length){if(y){for(var H=[],J=0;J<B.length;J++)null!=B[J]&&H.push([B[J].x,B[J].y]);H=PerfectFreehand.getStroke(H,x);B=[];for(J=0;J<H.length;J++)B.push({x:H[J][0],y:H[J][1]});B.push(null)}H=B[0].x;var G=B[0].x,P=
-B[0].y,T=B[0].y;for(J=1;J<B.length;J++)null!=B[J]&&(H=Math.max(H,B[J].x),G=Math.min(G,B[J].x),P=Math.max(P,B[J].y),T=Math.min(T,B[J].y));H-=G;P-=T;if(0<H&&0<P){var W=100/H,U=100/P;B.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-G)*W;Q.y=(Q.y-T)*U;return Q});var V='<shape strokewidth="inherit"><foreground>',l=0;for(J=0;J<B.length;J++){var A=B[J];if(null==A){A=!1;l=B[l];var M=B[J-1];!L&&c&&(A=l.x-M.x,M=l.y-M.y,A=Math.sqrt(A*A+M*M)<=b.tolerance);if(L||A)V+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+
-'"/>';V+="</path>"+(q||L||A?"<fillstroke/>":"<stroke/>");l=J+1}else V=J==l?V+('<path><move x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>'):V+('<line x="'+A.x.toFixed(2)+'" y="'+A.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;l=b.view.translate;J=new mxCell("",new mxGeometry(G/V-l.x,T/V-l.y,H/V,P/V),J);J.vertex=1;b.model.beginUpdate();try{J=b.addCell(J),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}C&&b.setSelectionCells([J])}}for(J=0;J<u.length;J++)u[J].parentNode.removeChild(u[J]);e=null;u=[];B=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,J){H=J.getProperty("eventName");J=J.getProperty("event");H==mxEvent.MOUSE_MOVE&&n&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,J){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(H=J.getEvent(),n&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var P=p();e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("fill",y?P:"none");e.setAttribute("stroke",P);e.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(P=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-P=P.split(" ").map(function(T){return parseFloat(T)*G}).join(" "),e.setAttribute("stroke-dasharray",P));m=[];H=F(H);K(H);v="M"+H.x+" "+H.y;B.push(H);E=[];e.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],x):v);f.appendChild(e);J.consume()}}),mouseMove:mxUtils.bind(this,function(H,J){if(e&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=J.getEvent();H=F(H);K(H);var G=D(0);if(G)if(B.push(G),y){var P=[];for(G=0;G<B.length;G++)P.push([B[G].x,B[G].y]);E=[];for(var T=2;T<m.length;T+=
-2)G=D(T),P.push([G.x,G.y]),E.push(G);e.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(P,x))}else{v+=" L"+G.x+" "+G.y;P="";E=[];for(T=2;T<m.length;T+=2)G=D(T),P+=" L"+G.x+" "+G.y,E.push(G);e.setAttribute("d",v+P)}g&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-G.x,H.y-G.y)).grow(20)));J.consume()}}),mouseUp:mxUtils.bind(this,function(H,J){e&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N(J.getEvent()),J.consume())})});var F=function(H){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(H),mxEvent.getClientY(H))},K=function(H){for(m.push(H);m.length>k;)m.shift()},D=function(H){var J=m.length;if(1===J%2||J>=k){var G=0,P=0,T,W=0;for(T=H;T<J;T++)W++,H=m[T],G+=H.x,P+=H.y;return{x:G/W,y:P/W}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,e,u){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=e;this.locale=u};DrawioComment=function(b,f,k,e,u,v,B){this.file=b;this.id=f;this.content=k;this.modifiedDate=e;this.createdDate=u;this.isResolved=v;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,e,u){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
+function(u){t=null!=b.currentMenu;mxEvent.consume(u)}),null,mxUtils.bind(this,function(u){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(u)||mxEvent.isPopupTrigger(u))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!t){var C=new mxPopupMenu(mxUtils.bind(this,function(c,e){b.menus.addMenuItems(c,["points","inches","millimeters","meters"],e)}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=
+!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var F=mxEvent.getClientX(u),J=mxEvent.getClientY(u);C.popup(F,J,null,u);b.setCurrentMenu(C,d)}mxEvent.consume(u)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,C=[],F,J=!1,c=!0,e=!0,g=!0,m=!0,p=[],q=!1,z=!1,y=!1,A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},x=!0;this.setClosedPath=function(H){J=H};this.setAutoClose=function(H){c=H};this.setAutoInsert=
+function(H){e=H};this.setAutoScroll=function(H){g=H};this.setOpenFill=function(H){m=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){k=H};this.setPerfectFreehandMode=function(H){x=H};this.isPerfectFreehandMode=function(){return x};this.setBrushSize=function(H){A.size=H};this.getBrushSize=function(){return A.size};var I=function(H){q=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);
+b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){I(!0)};this.isDrawing=function(){return q};var M=mxUtils.bind(this,function(H){if(d){var K=F.length,G=z&&0<C.length&&null!=F&&2>F.length;G||C.push.apply(C,F);F=[];C.push(null);t.push(d);d=null;(G||e)&&this.stopDrawing();e&&(!G||2<=K)&&this.startDrawing();mxEvent.consume(H)}}),E=new mxCell;E.edge=!0;var Q=function(){var H=b.getCurrentCellStyle(E);H=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var K=";fillColor=none;";x&&(K=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+K};this.stopDrawing=function(){if(0<t.length){if(x){for(var H=[],K=0;K<C.length;K++)null!=C[K]&&H.push([C[K].x,C[K].y]);H=PerfectFreehand.getStroke(H,A);C=[];for(K=0;K<H.length;K++)C.push({x:H[K][0],y:H[K][1]});C.push(null)}H=C[0].x;var G=C[0].x,N=
+C[0].y,T=C[0].y;for(K=1;K<C.length;K++)null!=C[K]&&(H=Math.max(H,C[K].x),G=Math.min(G,C[K].x),N=Math.max(N,C[K].y),T=Math.min(T,C[K].y));H-=G;N-=T;if(0<H&&0<N){var V=100/H,U=100/N;C.map(function(P){if(null==P)return P;P.x=(P.x-G)*V;P.y=(P.y-T)*U;return P});var X='<shape strokewidth="inherit"><foreground>',l=0;for(K=0;K<C.length;K++){var B=C[K];if(null==B){B=!1;l=C[l];var L=C[K-1];!J&&c&&(B=l.x-L.x,L=l.y-L.y,B=Math.sqrt(B*B+L*L)<=b.tolerance);if(J||B)X+='<line x="'+l.x.toFixed(2)+'" y="'+l.y.toFixed(2)+
+'"/>';X+="</path>"+(m||J||B?"<fillstroke/>":"<stroke/>");l=K+1}else X=K==l?X+('<path><move x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>'):X+('<line x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>')}X+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=this.createStyle("stencil("+Graph.compress(X)+")");X=b.view.scale;l=b.view.translate;K=new mxCell("",new mxGeometry(G/X-l.x,T/X-l.y,H/X,N/X),K);K.vertex=1;b.model.beginUpdate();try{K=b.addCell(K),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[K])),b.fireEvent(new mxEventObject("freehandInserted","cell",K))}finally{b.model.endUpdate()}y&&b.setSelectionCells([K])}}for(K=0;K<t.length;K++)t[K].parentNode.removeChild(t[K]);d=null;t=[];C=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,K){H=K.getProperty("eventName");K=K.getProperty("event");H==mxEvent.MOUSE_MOVE&&q&&(null!=K.sourceState&&K.sourceState.setCursor("crosshair"),K.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,K){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(H=K.getEvent(),q&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var G=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);G=Math.max(1,G*b.view.scale);var N=Q();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",x?N:"none");d.setAttribute("stroke",N);d.setAttribute("stroke-width",G);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(N=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+N=N.split(" ").map(function(T){return parseFloat(T)*G}).join(" "),d.setAttribute("stroke-dasharray",N));p=[];H=n(H);v(H);u="M"+H.x+" "+H.y;C.push(H);F=[];d.setAttribute("d",x?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],A):u);f.appendChild(d);K.consume()}}),mouseMove:mxUtils.bind(this,function(H,K){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=K.getEvent();H=n(H);v(H);var G=D(0);if(G)if(C.push(G),x){var N=[];for(G=0;G<C.length;G++)N.push([C[G].x,C[G].y]);F=[];for(var T=2;T<p.length;T+=
+2)G=D(T),N.push([G.x,G.y]),F.push(G);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(N,A))}else{u+=" L"+G.x+" "+G.y;N="";F=[];for(T=2;T<p.length;T+=2)G=D(T),N+=" L"+G.x+" "+G.y,F.push(G);d.setAttribute("d",u+N)}g&&(G=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-G.x,H.y-G.y)).grow(20)));K.consume()}}),mouseUp:mxUtils.bind(this,function(H,K){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M(K.getEvent()),K.consume())})});var n=function(H){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(H),mxEvent.getClientY(H))},v=function(H){for(p.push(H);p.length>k;)p.shift()},D=function(H){var K=p.length;if(1===K%2||K>=k){var G=0,N=0,T,V=0;for(T=H;T<K;T++)V++,H=p[T],G+=H.x,N+=H.y;return{x:G/V,y:N/V}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,d,t){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,k,d,t,u,C){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,t){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
diff --git a/src/main/webapp/js/math-print.js b/src/main/webapp/js/math-print.js
index b7a06f4d..74881af9 100644
--- a/src/main/webapp/js/math-print.js
+++ b/src/main/webapp/js/math-print.js
@@ -10,7 +10,7 @@
{
load: [(window.opener.urlParams['math-output'] == 'html') ?
'output/chtml' : 'output/svg', 'input/tex',
- 'input/asciimath']
+ 'input/asciimath', 'ui/safe']
},
startup:
{
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 236fe501..608b6531 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2006,104 +2006,104 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,K,P,d,f){var g=P?57:0,x=k,y=m,u=P?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=J+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";D+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var W=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;W.style.width=k+"px";W.style.height=m+"px";W.style.left=D+"px";W.style.top=G+"px";W.style.zIndex=this.zIndex;W.appendChild(e);document.body.appendChild(W);!K&&e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Z=d();
-null!=Z&&(x=k=Z.w,y=m=Z.h)}Z=mxUtils.getDocumentSize();J=Z.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Z.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(y,J-u);Z=this.getPosition(D,G,k,m);D=Z.x;G=Z.y;W.style.left=D+"px";W.style.top=G+"px";W.style.width=k+"px";W.style.height=m+"px";!K&&
-e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=W;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
+null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
+e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,K,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
+var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var u=F.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=F.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var W=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,W-=H.y*J.height):
-u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,W,u);u.open();y&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-K.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");K.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
-K.style.paddingTop="20px";K.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&K.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst||
-K.appendChild(P);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(P){K.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
+t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
+L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
+"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
+L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
+L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(y.setAttribute("src",J.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");F.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");
-mxUtils.write(K,mxResources.get("background")+":");F.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});F.appendChild(K);p.appendChild(F);F=document.createElement("tr");
-K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");F.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(y,"click",H);k();K.appendChild(y);K.appendChild(x);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,P.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn";
-K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);F.appendChild(K);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Z,N,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Z=!1;for(N=0;N<u.length;N++)qa=u[N],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,Z=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,Z=F.checked=!0));Z?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),K.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px";
+var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
+mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
+"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
+L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
+"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
+b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
+L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
+"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];y[J.key]=J;var D=document.createElement("option");D.setAttribute("value",
-J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var W=k,T=function(Z,N){Z=y[K.value];null!=Z.format?(g.value=Z.format.width/100,x.value=Z.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");Z=parseFloat(g.value);if(isNaN(Z)||0>=Z)g.value=k.width/100;Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=k.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&F.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));N&&G||Z.width==W.width&&Z.height==W.height||(W=Z,null!=m&&m(W))};mxEvent.addListener(e,"click",function(Z){p.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(d,"click",function(Z){F.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);mxEvent.addListener(p,
-"change",T);mxEvent.addListener(K,"change",function(Z){G="custom"==K.value;T(Z,!0)});T();return{set:function(Z){k=Z;C(null,null,!0)},get:function(){return W},widthInput:g,heightInput:x}};
+"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
+D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
+Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
+mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,K,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),u=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D=
-document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))P&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var W=y.parentNode;if(null!=W){var T=null;mxEvent.addListener(W,"dragleave",
-function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(W,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=D,T.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(W,"drop",mxUtils.bind(this,function(Z){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
-G.click());Z.stopPropagation();Z.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==F)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+
-":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=F&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(F),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan=
-2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(W){13==W.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f);
-H.appendChild(J);u.appendChild(H);y.appendChild(u);this.container=y};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
+document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
+function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
+H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
+":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
+2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
+G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
C();return m};
FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,K=0;K<k.length;K++){var P=k[K].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=K;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var K=b.createSidebarContainer();F(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,K=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=K,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var P=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-K=y.width;P=y.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(F=F&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(P/u.height)-1:0,J=F?Math.ceil(K/u.width)-1:0,D=y.x+K,G=y.y+P;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(W){if(null!=W){for(var T=W==this.horizontalPageBreaks?H:J,Z=0;Z<=T;Z++){var N=W==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(Z+1)*u.height)),new mxPoint(Math.round(D),Math.round(y.y+(Z+1)*u.height))]:[new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(G))];null!=W[Z]?(W[Z].points=N,W[Z].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),W[Z]=N)}for(Z=T;Z<W.length;Z++)W[Z].destroy();W.splice(T,W.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,K,P){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(K,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),K=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,K,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,K,P){var d=this.graph.model.getParent(F);if(K){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var K=this.graph.getModel(),P=K.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(K.isVertex(P)||K.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=K.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var X=C.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,ka=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ca.x+ja.x)*ka,(ca.y+ja.y)*ka,ja.width*ka,ja.height*ka))}return X};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(X,ja){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(X){return!mxEvent.isPopupTrigger(X.getEvent())});this.actions=new Actions(this);this.menus=
+F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
+F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
+" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
+L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
+Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
+F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
+k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
+this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
+(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(X){try{m.getModel().isEdge(X)?d=!1:P=!1;var ja=m.getCellStyle(X,!1),ca=[],ka=[],q;for(q in ja)ca.push(ja[q]),ka.push(q);m.getModel().isEdge(X)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ca,"cells",[X]));m.getModel().isEdge(X)?d=!0:P=!0}catch(E){this.handleError(E)}};
-this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize",
-"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(X,ja,ca,ka,q,E,Q){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;ca=null!=ca?ca:m.getModel();if(Q){Q=[];for(var Y=0;Y<X.length;Y++)Q=Q.concat(ca.getDescendants(X[Y]));X=Q}ca.beginUpdate();
-try{for(Y=0;Y<X.length;Y++){var R=X[Y];if(ja)var ba=["fontSize","fontFamily","fontColor"];else{var ea=ca.getStyle(R),ra=null!=ea?ea.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var la=ra[ta],pa=la.indexOf("=");if(0<=pa){var xa=la.substring(0,pa),Ca=mxUtils.indexOf(ba,xa);0<=Ca&&ba.splice(Ca,1);for(Q=0;Q<x.length;Q++){var Ia=x[Q];if(0<=mxUtils.indexOf(Ia,xa))for(var Aa=0;Aa<Ia.length;Aa++){var La=mxUtils.indexOf(ba,Ia[Aa]);0<=La&&ba.splice(La,1)}}}}}var Da=ca.isEdge(R);Q=Da?q:ka;var Sa=
-ca.getStyle(R);for(ta=0;ta<ba.length;ta++){xa=ba[ta];var Ra=Q[xa];null!=Ra&&"edgeStyle"!=xa&&("shape"!=xa||Da)&&(!Da||E||0>mxUtils.indexOf(K,xa))&&(Sa=mxUtils.setStyle(Sa,xa,Ra))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));ca.setStyle(R,Sa)}}finally{ca.endUpdate()}return X};m.addListener("cellsInserted",function(X,ja){y(ja.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(X,ja){y(ja.getProperty("cells"),!0)});
-this.insertHandler=y;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(X){null==X&&(X=window.event);return m.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown=
-u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ja=mxEvent.getSource(X);if("A"==ja.nodeName)for(;null!=ja;){if("geHint"==ja.className)return!0;ja=ja.parentNode}}return u(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(X){var ja=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ja.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ja.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ja){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){32!=X.which||m.isEditing()?
-mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(X)!=m.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(X){return G.apply(this,
-arguments)||J||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var W=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(X){return W.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var T=m.isZoomWheelEvent;
-m.isZoomWheelEvent=function(){return J||T.apply(this,arguments)};var Z=!1,N=null,qa=null,oa=null,S=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=m.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ja=[];null!=X;){var ca=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ja.push(X));X=ca}X=this.toolbar.fontMenu;ca=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]);
-this.toolbar.fontMenu=N;this.toolbar.sizeMenu=qa}Z=m.cellEditor.isContentEditing();N=X;qa=ca;oa=ja}}),fa=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);S();if(m.cellEditor.isContentEditing()){var X=!1,ja=function(){X||(X=!0,window.setTimeout(function(){var ca=m.getSelectedEditingElement();null!=ca&&(ca=mxUtils.getCurrentStyle(ca),null!=ca&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(ca.fontFamily)),fa.toolbar.setFontSize(parseInt(ca.fontSize))));
-X=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ja);mxEvent.addListener(m.cellEditor.textarea,"touchend",ja);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ja);mxEvent.addListener(m.cellEditor.textarea,"keyup",ja);ja()}};var M=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(X,ja){try{M.apply(this,arguments),S()}catch(ca){fa.handleError(ca)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(X){}var aa=
-m.fireMouseEvent;m.fireMouseEvent=function(X,ja,ca){X==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ja,ca){this.menus.createPopupMenu(X,ja,ca)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(X,ja){var ca=[ja.getProperty("cell")];ja.getProperty("terminalInserted")&&(ca.push(ja.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(m.view.getState(ca[ca.length-1]))},0));y(ca)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ja){var ca=ja.getProperty("cells"),ka=X=!1;if(0<ca.length)for(var q=0;q<ca.length&&(X=m.getModel().isVertex(ca[q])||X,!(ka=m.getModel().isEdge(ca[q])||ka)||!X);q++);else ka=X=!0;X=X&&!P;ka=ka&&!d;ca=ja.getProperty("keys");
-ja=ja.getProperty("values");for(q=0;q<ca.length;q++){var E=0<=mxUtils.indexOf(f,ca[q]);if("strokeColor"!=ca[q]||null!=ja[q]&&"none"!=ja[q])if(0<=mxUtils.indexOf(F,ca[q]))ka||0<=mxUtils.indexOf(g,ca[q])?null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]:X&&0<=mxUtils.indexOf(p,ca[q])&&(null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=ja[q]);else if(0<=mxUtils.indexOf(p,ca[q])){if(X||E)null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=
-ja[q];if(ka||E||0<=mxUtils.indexOf(g,ca[q]))null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
+L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
+function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
+["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
+Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
+var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
+t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
+e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
+0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
+!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
+var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
+la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
+"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
+m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
+function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
+ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
+ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=m.currentVertexStyle.fontFamily||"Helvetica",
-ja=String(m.currentVertexStyle.fontSize||"12"),ca=m.getView().getState(m.getSelectionCell());null!=ca&&(X=ca.style[mxConstants.STYLE_FONTFAMILY]||X,ja=ca.style[mxConstants.STYLE_FONTSIZE]||ja,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ja)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(X,ja){X=ja.getProperty("cells");ja=ja.getProperty("parent");null!=ja&&
-m.getModel().isLayer(ja)&&!m.isCellVisible(ja)&&null!=X&&0<X.length&&m.getModel().setVisible(ja,!0)});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);
-this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
-function(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(K,P){var d=p;p+=P;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
+ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
+!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
+this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2111,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),K=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&P!=K||(K=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,u){var H=b.getCompositeParent(P.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell=
-H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,y,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,W,T){T(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))},
-function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,y,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K)}))}};
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
+G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
+d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
+function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,K){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u);
-f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
+EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
+f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2142,45 +2142,45 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var K={},P=p.createCellLookup(F),d=p.cloneCells(F,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(u.offset=null,u.relative=!1,u.x=y.x/y.view.scale-y.view.translate.x,u.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*ka.width),this.scale*(this.translate.y+ca.y*ka.height),this.scale*ca.width*
-ka.width,this.scale*ca.height*ka.height)};b.getPreferredPageSize=function(ca,ka,q){ca=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,ca.width*ka.width,ca.height*ka.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(ca,ka,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,
-ba=b.view.scale,ea=mxRectangle.fromRectangle(Q);ea.x=ea.x/ba-R.x;ea.y=ea.y/ba-R.y;ea.width/=ba;ea.height/=ba;R=b.container.scrollTop;var ra=b.container.scrollLeft,ta=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ta+=3;var la=b.container.offsetWidth-ta;ta=b.container.offsetHeight-ta;ca=ca?Math.max(.3,Math.min(ka||1,la/ea.width)):ba;ka=(la-ca*ea.width)/2/ca;var pa=0==this.lightboxVerticalDivider?0:(ta-ca*ea.height)/this.lightboxVerticalDivider/ca;Y&&(ka=Math.max(ka,
-0),pa=Math.max(pa,0));if(Y||Q.width<la||Q.height<ta)b.view.scaleAndTranslate(ca,Math.floor(ka-ea.x),Math.floor(pa-ea.y)),b.container.scrollTop=R*ca/ba,b.container.scrollLeft=ra*ca/ba;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/ba),Math.floor(Q.y+E/ba))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ca){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ca){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
+this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
+da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
+if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var ca=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ca?parseInt(ca["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(ca,ka,
-q){F++;var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",ca);null!=q&&E.setAttribute("title",q);ca=document.createElement("img");ca.setAttribute("border","0");ca.setAttribute("src",ka);ca.style.width="36px";ca.style.filter="invert(100%)";E.appendChild(ca);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var K=Graph.sanitizeLink(C.backBtn.url);null!=K&&p(mxUtils.bind(this,function(ca){window.location.href=
-K;mxEvent.consume(ca)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(ca){this.actions.get("previousPage").funct();mxEvent.consume(ca)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(ca){this.actions.get("nextPage").funct();mxEvent.consume(ca)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(ca){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,u=null,H=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),ca||200)}),J=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=p(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=D.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){D.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,
-function(ca){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ca)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var W=this.lightboxToolbarActions[x];W.elem=p(W.fn,W.icon,W.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(ca){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(ca)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(ca){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(ca)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(ca){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(ca))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(ca){mxEvent.isTouchEvent(ca)||(mxEvent.isShiftDown(ca)||J(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ca){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ca)?H():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ca){mxEvent.isShiftDown(ca)?H():
-J(100);mxEvent.consume(ca)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||J(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(ca,ka){},mouseUp:function(ca,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-
-b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&Math.abs(this.startX-ka.getGraphX())<Z&&Math.abs(this.startY-ka.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?H():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var N=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var ca=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=
-ca.x-(this.x0||0)*ka.width;this.translate.y=ca.y-(this.y0||0)*ka.height}N.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var ca=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ka.x+ca.width*q.width),Q=Math.ceil(2*ka.y+ca.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ka.x-ca.x*q.width;ka=
-ka.y-ca.y*q.height;this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ka?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=ca.x,this.view.y0=ca.y,ca=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ka),b.container.scrollLeft+=Math.round((E-ca)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var oa=b.view.getBackgroundPane(),S=b.view.getDrawPane();
-b.cumulativeZoomFactor=1;var fa=null,ia=null,M=null,aa=null,X=null,ja=function(ca){null!=fa&&window.clearTimeout(fa);0<=ca&&window.setTimeout(function(){if(!b.isMouseDown||aa)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),S.style.transformOrigin=
-"",oa.style.transformOrigin="",mxClient.IS_SF?(S.style.transform="scale(1)",oa.style.transform="scale(1)",window.setTimeout(function(){S.style.transform="";oa.style.transform=""},0)):(S.style.transform="",oa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=ia&&(Q=b.container.offsetWidth/2-ia.x+q.x,Y=b.container.offsetHeight/
-2-ia.y+q.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=M&&(Q+=ka.x-M.x,Y+=ka.y-M.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=X&&S.setAttribute("filter",X);b.cumulativeZoomFactor=1;X=aa=ia=M=fa=null}),null!=ca?ca:b.isFastZoomEnabled()?k.wheelZoomDelay:
-k.lazyZoomDelay)},0)};b.lazyZoom=function(ca,ka,q,E){E=null!=E?E:this.zoomFactor;(ka=ka||!b.scrollbars)&&(ia=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));ca?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?
-this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==X&&""!=S.getAttribute("filter")&&(X=S.getAttribute("filter"),S.removeAttribute("filter")),M=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ca=ka||null==
-ia?b.container.scrollLeft+b.container.clientWidth/2:ia.x+b.container.scrollLeft-b.container.offsetLeft,E=ka||null==ia?b.container.scrollTop+b.container.clientHeight/2:ia.y+b.container.scrollTop-b.container.offsetTop,S.style.transformOrigin=ca+"px "+E+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",oa.style.transformOrigin=ca+"px "+E+"px",oa.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(ca=b.view.backgroundPageShape.node,
-mxUtils.setPrefixedStyle(ca.style,"transform-origin",(ka||null==ia?b.container.clientWidth/2+b.container.scrollLeft-ca.offsetLeft+"px":ia.x+b.container.scrollLeft-ca.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==ia?b.container.clientHeight/2+b.container.scrollTop-ca.offsetTop+"px":ia.y+b.container.scrollTop-ca.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ca.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity=
-"0",null!=k.hoverIcons&&k.hoverIcons.reset());ja(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(ca){null!=fa&&window.clearTimeout(fa)},null,function(ca){1!=b.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(b.container,"scroll",function(ca){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ca,ka,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&
-!q&&b.isScrollWheelEvent(ca))q=b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(ca)?b.view.setTranslate(q.x+(ka?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ka?E:-E));else if(q||b.isZoomWheelEvent(ca))for(var Y=mxEvent.getSource(ca);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),ia=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),aa=q,q=b.zoomFactor,E=null,ca.ctrlKey&&null!=ca.deltaY&&40>Math.abs(ca.deltaY)&&Math.round(ca.deltaY)!=
-ca.deltaY?q=1+Math.abs(ca.deltaY)/20*(q-1):null!=ca.movementY&&"pointermove"==ca.type&&(q=1+Math.max(1,Math.abs(ca.movementY))/20*(q-1),E=-1),b.lazyZoom(ka,null,E,q),mxEvent.consume(ca),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(ca){b.cumulativeZoomFactor=ca.scale;b.lazyZoom(0<ca.scale,!0);mxEvent.consume(ca)}};
-EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
+var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
+L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
+"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ia.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
+p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
+mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
+0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
+this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ra.style.transformOrigin=
+"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
+b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
+"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
+b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
+1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
@@ -2196,7 +2196,7 @@ b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Ma
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
@@ -2206,19 +2206,20 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,K){p.apply(this,arguments);m()};m()};
+this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
-e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
-this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
+var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
+this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
+k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
+m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
+b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2229,19 +2230,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);K!=f()&&(P=!0,d=null)}}function p(g){C(g);F=K=null}var F=null,K=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));K=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
+mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,K,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,K,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,K,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,K,P,d);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=F.lastIndexOf("%3E");
-0<=K&&K<F.length-3&&(F=F.substring(0,K+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
+0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2257,13 +2258,13 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(y){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H],
-J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
-g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=G.first){var W=G.roundLength(G.currentDx/D),T=G.roundLength(G.currentDy/D);G.moveCells(G.cells,W,T);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),K[g.keyCode],
+EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
+D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
+g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
+89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,u){var H=this.actions.get(y);null!=H&&(y=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):u?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
+function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
@@ -2274,41 +2275,41 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var P=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=K;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,K=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var X=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=X)if(this.model.isEdge(X.cell))if(F=new mxPoint(M.getGraphX(),M.getGraphY()),f=this.isCellSelected(X.cell),P=X,K=M,null!=X.text&&
-null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,M.getGraphX(),M.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ja=this.selectionCellsHandler.getHandler(X.cell);null!=ja&&null!=ja.bends&&0<ja.bends.length&&(d=ja.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(ja=this.selectionCellsHandler.getHandler(X.cell),null==ja||null==ja.getHandleForEvent(M))){var ca=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ka=mxEvent.isTouchEvent(M.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ja=ka+2;ca.grow(ka);if(this.isTableCell(X.cell)&&!this.isCellSelected(X.cell)&&!(mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()-ja)&&mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()-ja))){var q=this.model.getParent(X.cell);ja=this.model.getParent(q);if(!this.isCellSelected(ja)){ka*=aa;var E=2*ka;if(this.model.getChildAt(ja,
-0)!=q&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y-ka,X.width,E))||this.model.getChildAt(q,0)!=X.cell&&mxUtils.intersects(ca,new mxRectangle(X.x-ka,X.y,E,X.height))||mxUtils.intersects(ca,new mxRectangle(X.x,X.y+X.height-ka,X.width,E))||mxUtils.intersects(ca,new mxRectangle(X.x+X.width-ka,X.y,E,X.height)))q=this.selectionCellsHandler.isHandled(ja),this.selectCellForEvent(ja,M.getEvent()),ja=this.selectionCellsHandler.getHandler(ja),null!=ja&&(ka=ja.getHandleForEvent(M),null!=ka&&(ja.start(M.getGraphX(),
-M.getGraphY(),ka),ja.blockDelayedSelection=!q,M.consume()))}}for(;!M.isConsumed()&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&(ja=this.getActualStartSize(X.cell),(0<ja.x||0<ja.width)&&mxUtils.intersects(ca,new mxRectangle(X.x+(ja.x-ja.width-1)*aa+(0==ja.x?X.width:0),X.y,1,X.height))||(0<ja.y||0<ja.height)&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y+(ja.y-ja.height-1)*aa+(0==ja.y?X.height:0),X.width,1)))&&(this.selectCellForEvent(X.cell,
-M.getEvent()),ja=this.selectionCellsHandler.getHandler(X.cell),null!=ja&&(ka=mxEvent.CUSTOM_HANDLE-ja.customHandles.length+1,ja.start(M.getGraphX(),M.getGraphY(),ka),M.consume())),X=this.view.getState(this.model.getParent(X.cell))}}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var X in M)if(null!=M[X].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ja=
-this.tolerance;if(null!=F&&null!=P&&null!=K){if(X=P,Math.abs(F.x-aa.getGraphX())>ja||Math.abs(F.y-aa.getGraphY())>ja){var ca=this.selectionCellsHandler.getHandler(X.cell);null==ca&&this.model.isEdge(X.cell)&&(ca=this.createHandler(X));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){M=ca.getHandleForEvent(K);var ka=this.view.getEdgeStyle(X);ja=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(M=d);if(ja&&0!=M&&M!=ca.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!ja||null==X.visibleSourceState&&
-null==X.visibleTargetState||(this.graphHandler.reset(),aa.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=X.visibleSourceState||M==ca.bends.length-1||null!=X.visibleTargetState)ja||M==mxEvent.LABEL_HANDLE||(ja=X.absolutePoints,null!=ja&&(null==ka&&null==M||ka==mxEdgeStyle.OrthConnector)&&(M=d,null==M&&(M=new mxRectangle(F.x,F.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,ja[0].x,ja[0].y)?M=0:mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y)?M=ca.bends.length-
-1:null!=ka&&(2==ja.length||3==ja.length&&(0==Math.round(ja[0].x-ja[1].x)&&0==Math.round(ja[1].x-ja[2].x)||0==Math.round(ja[0].y-ja[1].y)&&0==Math.round(ja[1].y-ja[2].y)))?M=2:(M=mxUtils.findNearestSegment(X,F.x,F.y),M=null==ka?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ca.start(aa.getGraphX(),aa.getGraphX(),M),aa.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(X.cell)||(this.selectionCellsHandler.handlers.put(X.cell,
-ca),this.selectCellForEvent(X.cell,aa.getEvent())):this.isCellSelected(X.cell)||ca.destroy());f=!1;F=K=P=d=null}}else if(X=aa.getState(),null!=X&&this.isCellEditable(X.cell)){ca=null;if(this.model.isEdge(X.cell)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),ja=X.absolutePoints,null!=ja)if(null!=X.text&&null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,aa.getGraphX(),aa.getGraphY()))ca="move";else if(mxUtils.contains(M,ja[0].x,
-ja[0].y)||mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y))ca="pointer";else if(null!=X.visibleSourceState||null!=X.visibleTargetState)M=this.view.getEdgeStyle(X),ca="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(X)&&(aa=mxUtils.findNearestSegment(X,aa.getGraphX(),aa.getGraphY()),aa<ja.length-1&&0<=aa&&(ca=0==Math.round(ja[aa].x-ja[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ja=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(),
-aa.getGraphY());M.grow(ja);if(this.isTableCell(X.cell)&&(aa=this.model.getParent(X.cell),ja=this.model.getParent(aa),!this.isCellSelected(ja)))if(mxUtils.intersects(M,new mxRectangle(X.x,X.y-2,X.width,4))&&this.model.getChildAt(ja,0)!=aa||mxUtils.intersects(M,new mxRectangle(X.x,X.y+X.height-2,X.width,4)))ca="row-resize";else if(mxUtils.intersects(M,new mxRectangle(X.x-2,X.y,4,X.height))&&this.model.getChildAt(aa,0)!=X.cell||mxUtils.intersects(M,new mxRectangle(X.x+X.width-2,X.y,4,X.height)))ca="col-resize";
-for(aa=X;null==ca&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ja=this.getActualStartSize(aa.cell),ka=this.view.scale,(0<ja.x||0<ja.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(ja.x-ja.width-1)*ka+(0==ja.x?aa.width*ka:0),aa.y,1,aa.height))?ca="col-resize":(0<ja.y||0<ja.height)&&mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(ja.y-ja.height-1)*ka+(0==ja.y?aa.height:0),aa.width,1))&&(ca="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=
-ca&&X.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(M,aa){d=F=K=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(aa=1!=M.style.html?mxUtils.htmlEntities(aa,!1):M.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);
-this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(M,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=g.apply(this,arguments);
-if(this.graph.pageVisible){var aa=[],X=this.graph.pageFormat,ja=this.graph.pageScale,ca=X.width*ja;X=X.height*ja;ja=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*ca+ja.x)*ka,(q.y*X+ja.y)*ka,ca*ka,X*ka));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*ca+ja.x)*ka,((q.y+E)*X+ja.y)*ka,ca*ka,X*ka));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(M,aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=x.apply(this,arguments),X=new mxDictionary,ja=[],ca=0;ca<aa.length;ca++){var ka=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[ca])&&
-this.graph.isCellSelected(aa[ca])?this.graph.model.getParent(aa[ca]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[ca])&&this.graph.isCellSelected(aa[ca])?aa[ca]:this.graph.getCompositeParent(aa[ca]);null==ka||X.get(ka)||(X.put(ka,!0),ja.push(ka))}return ja};var y=this.graphHandler.start;this.graphHandler.start=function(M,aa,X,ja){var ca=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ca=!0:M=this.graph.model.getParent(M));ca||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||
-(M=this.graph.getCompositeParent(M));y.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;D.apply(this,arguments);M!=this.currentState?(H=(new Date).getTime(),
-J=0):J=(new Date).getTime()-H};var G=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var W=this.isToggleEvent;this.isToggleEvent=function(M){return W.apply(this,arguments)||!mxClient.IS_CHROMEOS&&
-mxEvent.isShiftDown(M)};var T=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(M){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=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=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var X=aa?M.sourceState.cell:M.getCell();null!=X&&(X=this.getClickableLinkForCell(X),null!=X&&(this.isCustomLink(X)?
-this.customLinkClicked(X):this.openLink(X)));this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};
-this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(M,aa){var X=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x,
-M.y,M.width,M.height,null,null,X,function(ja){return"1"==mxUtils.getValue(ja.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(X=0;X<M.length;X++)this.selectCellForEvent(M[X],aa);else this.selectCellsForEvent(M,aa);return M};var S=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,X){return this.graph.isCellSelected(M)?!1:S.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),
-"locked","0"))return!0;M=this.model.getParent(M)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),fa=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var X=aa.getProperty("cell");null==X?(M=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(M),mxEvent.getClientY(M)),u.start(M.x,M.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(X)&&this.removeSelectionCell(X);fa=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var X=M.view.graph;return aa&&(X.isCellSelected(M.cell)||X.isTableRow(M.cell)&&X.selectionCellsHandler.isHandled(X.model.getParent(M.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ia.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,
+Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
+return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
+null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
+0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
+N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
+N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
+this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
+(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
+3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
+aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
+1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
+(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
+this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
+mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=
+!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
+[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
+N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
+this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
+arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
+this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
+function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&
+(this.container.style.cursor=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
+this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
+function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
+null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
+N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
+mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
+this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2327,33 +2328,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),K=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(K)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,K=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
+g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var K=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,K){F=null!=F?F:!0;K=null!=K?K:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||K&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var K={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,K,0==P)}return K};Graph.prototype.mergeStyle=function(F,K,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==K[f]&&P?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(F,K){K=this.getCellStyle(F);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),K=this.getCellStyle(F),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(K=0;K<this.model.getChildCount(F);K++){var P=this.model.getChildAt(F,K);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,K,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,K)};Graph.prototype.updateCellStyles=function(F,K){this.model.beginUpdate();try{for(var P=0;P<K.length;P++)if(this.model.isVertex(K[P])||this.model.isEdge(K[P])){var d=this.getCellStyle(K[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[K[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
-(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,K,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,K,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),u=this.getScaledCellAt(F,K,y,d,f,g);if(null!=u)return u;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(u=this.view.getState(y),null!=u&&(null==g||!g(u,F,K))&&this.intersects(u,F,K)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var K=this.getCellGeometry(F);null!=K&&K.relative;)F=this.getModel().getParent(F),K=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var K=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var K=this.model.getParent(F);if(!this.model.isVertex(K))break;F=K}return F};Graph.prototype.filterSelectionCells=function(F){var K=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<K.length;d++)F(K[d])||
-P.push(K[d]);K=P}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var K=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*K-P.x,(F.y+2*P.y)*K-P.y,F.width*K,F.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+K.x)*P,(F.y+K.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var K=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,K=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=K,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
+"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
+mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
+function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
+0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
+Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
+null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
+!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
+new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
+P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
+if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
+"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
+F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2367,10 +2368,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,K){if(null!=b.shape){var P=[k[0]];K=F/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(F,m);F()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2380,28 +2381,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",P=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),y=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:u,ss:F(u),l:F(K,3),L:F(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1,
-D.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function K(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
+I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));K();null!=b&&b(F)});K()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)F=b.id;else if(0>K.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(K+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(K)?null!=P.getAttribute(K)?P.getAttribute(K):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(K));null==F&&null!=k&&(F=k[K])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
+mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
+null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(K,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
+Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==y||p[H]==this.model.getParent(b)))y=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],W=u;u=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==u&&P){this.model.beginUpdate();try{if(null==W&&D){var Z=this.getAbsoluteParent(null!=T?T:b);Z=P?b:this.getCompositeParent(Z);W=null!=T?T:this.duplicateCells([Z],
-!1)[0];null!=T&&this.addCells([W],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(W);null!=N&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=N.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-N.width/2:f.x+N.width/2),N.x=f.x-N.width/2,N.y=f.y-N.height/2);null!=y?(this.addCells([W],y,null,null,null,!0),u=null):D&&!P&&this.addCells([W],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&D||null==u&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,W,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=qa.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==qa.parent&&(oa=T.parent.getIndex(T),this.model.add(T.parent,qa,oa))}null==u&&null!=W&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent,
-W,oa));null!=qa&&G.push(qa);null==u&&null!=W&&G.push(W);null==W&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==F||null!=W||!D||null==u&&P)return C(W);F(d+f.x*k,x+f.y*k,C)};
+this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
+!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
+S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2410,7 +2411,7 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=F&&null!=K){var P=Math.round(K.width-F.width/this.view.scale),d=Math.round(K.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
+Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
@@ -2448,201 +2449,201 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,P,d){if(null!=k){var f=new mxRectangle(P,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?P+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(P-=f.x+f.width-k.x))}K.style.left=P+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(K,P){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K,
-this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
+this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),K=this.getCellGeometry(F);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
+Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,K,P,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
+m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(F,b);if(K<F.length-1){var P=F[K+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var K=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
+g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return K};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),K=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(J),J=C||m?J+y.height:J+y.height/x*P,y.height=Math.round(J)-y.y,F.setGeometry(f[g],y)),K=Math.max(K,this.layoutRow(f[g],u,y.height,d,H));m&&P<x&&(k=k.clone(),k.height=J+e.height,F.setGeometry(b,
-k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){F.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
+TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
+0,d.width,d.height),C.setGeometry(p[P],d))}return L};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
+f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
+k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
!1)}finally{F.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(fa,ia,M){var aa=new mxPoint(ia,M);aa.type=fa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-fa||aa.x!=ia||aa.y!=M},H=.5*this.scale;x=!1;y=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],W=[],T=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,T.x,T.y,D.x,D.y)<1*this.scale*this.scale;)D=T,J++,T=g[J+2];x=u(0,G.x,G.y)||x;for(var Z=0;Z<this.validEdges.length;Z++){var N=this.validEdges[Z],qa=N.absolutePoints;if(null!=qa&&mxUtils.intersects(f,N)&&"1"!=N.style.noJump)for(N=0;N<qa.length-1;N++){var oa=qa[N+1],S=qa[N];for(T=qa[N+2];N<qa.length-2&&mxUtils.ptSegDistSq(S.x,S.y,T.x,T.y,oa.x,
-oa.y)<1*this.scale*this.scale;)oa=T,N++,T=qa[N+2];T=mxUtils.intersection(G.x,G.y,D.x,D.y,S.x,S.y,oa.x,oa.y);if(null!=T&&(Math.abs(T.x-G.x)>H||Math.abs(T.y-G.y)>H)&&(Math.abs(T.x-D.x)>H||Math.abs(T.y-D.y)>H)&&(Math.abs(T.x-S.x)>H||Math.abs(T.y-S.y)>H)&&(Math.abs(T.x-oa.x)>H||Math.abs(T.y-oa.y)>H)){oa=T.x-G.x;S=T.y-G.y;T={distSq:oa*oa+S*S,x:T.x,y:T.y};for(oa=0;oa<W.length;oa++)if(W[oa].distSq>T.distSq){W.splice(oa,0,T);T=null;break}null==T||0!=W.length&&W[W.length-1].x===T.x&&W[W.length-1].y===T.y||
-W.push(T)}}}for(N=0;N<W.length;N++)x=u(1,W[N].x,W[N].y)||x}T=g[g.length-1];x=u(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,W=[],T=null;f.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var N=this.state.routedPoints[Z],qa=new mxPoint(N.x/this.scale,N.y/this.scale);0==Z?qa=g[0]:Z==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==N.type){var S=this.state.routedPoints[Z+1];N=S.x/this.scale-qa.x;S=S.y/this.scale-qa.y;N=
-N*N+S*S;null==T&&(T=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(T.x*T.x+T.y*T.y),0<G?(T.x=T.x*u/G,T.y=T.y*u/G):T=null);N>u*u&&0<G&&(N=D.x-qa.x,S=D.y-qa.y,N=N*N+S*S,N>u*u&&(oa=new mxPoint(qa.x-T.x,qa.y-T.y),N=new mxPoint(qa.x+T.x,qa.y+T.y),W.push(oa),this.addPoints(f,W,x,y,!1,null,J),W=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-T.y*W,oa.y+T.x*W),f.lineTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x,N.y)):"line"==H?(f.moveTo(oa.x+T.y*W,oa.y-T.x*W),f.lineTo(oa.x-
-T.y*W,oa.y+T.x*W),f.moveTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x+T.y*W,N.y-T.x*W),f.moveTo(N.x,N.y)):"arc"==H?(W*=1.3,f.curveTo(oa.x-T.y*W,oa.y+T.x*W,N.x-T.y*W,N.y+T.x*W,N.x,N.y)):(f.moveTo(N.x,N.y),J=!0),W=[N],oa=!0))}else T=null;oa||(W.push(qa),D=qa)}this.addPoints(f,W,x,y,!1,null,J);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
-g.getCenterY()):F.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var u=this.getNextPoint(f,x,y),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),W=
-Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,W,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),W=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,W,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,u),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,y,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
-y=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==y||D<y)x=J,y=D}}null!=x&&(u=x)}return u};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
-mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
+function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
+oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
+T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
+S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
+la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
+G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
+g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
+g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
+x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
+y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-K=m.getAttribute("h");F=null==F?80:parseInt(F,10);K=null==K?80:parseInt(K,10);e(C,p,b,F,K)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(O){var V=L.apply(this,arguments);this.error=null;return V});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<L.length;O++)null!=this.currentEdgeStyle[L[O]]&&(z+=L[O]+"="+this.currentEdgeStyle[L[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var O=0;O<z.length;O++){var V=z[O];L[mxObjectIdentity.get(V)]=V.getId();for(var U=this.model.getChildCount(V),
-ha=0;ha<U;ha++)this.createCellLookup([this.model.getChildAt(V,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,O){O=null!=O?O:{};for(var V in z){var U=L[V];null==O[U]&&(O[U]=z[V].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,L,O,V){L=null!=L?L:0;O=null!=O?O:0;var U=new mxCodec(z.ownerDocument),ha=new mxGraphModel;U.decode(z,ha);z=[];U={};var ma={},wa=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),U));if(null!=wa){var sa=this.createCellLookup([ha.root]);
-wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<wa.length;ha++)ya=this.model.getChildren(this.moveCells([wa[ha]],L,O,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ha.getChildren(wa[0]);null!=ya&&(z=this.moveCells(ya,L,O,!1,this.getDefaultParent()),ma[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(U,sa,ma),this.updateCustomLinks(ma,z),V)){this.isGridEnabled()&&
-(L=this.snap(L),O=this.snap(O));var Ha=this.getBoundingBoxFromGeometry(z,!0);null!=Ha&&this.moveCells(z,L-Ha.x,O-Ha.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},O=this.cloneCells(z,null,L),V=new mxDictionary,U=0;U<z.length;U++)V.put(z[U],!0);var ha=new mxCodec,ma=new mxGraphModel,wa=ma.getChildAt(ma.getRoot(),0);for(U=0;U<O.length;U++){ma.add(wa,O[U]);var sa=this.view.getState(z[U]);if(null!=sa){var ya=this.getCellGeometry(O[U]);null!=ya&&ya.relative&&
-!this.model.isEdge(z[U])&&null==V.get(this.model.getParent(z[U]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),O);return ha.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var O=this.getCurrentCellStyle(L);if(null!=O.expand)return"0"!=O.expand}return K.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,O,V,U,ha,ma,wa){null==wa&&(wa=this.model.getParent(z),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ha,ma,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,L,O,V,U,ha,ma,wa]);this.model.setValue(O,"");var sa=this.getChildCells(O,!0);for(L=0;L<sa.length;L++){var ya=this.getCellGeometry(sa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[L])}var Ha=this.getChildCells(z,!0);for(L=0;L<Ha.length;L++)ya=this.getCellGeometry(Ha[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ha[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Qa=this.model.getTerminal(O,!1);if(null!=Qa){var ua=this.getCurrentCellStyle(Qa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,L,O){if(L||O)d.apply(this,arguments);else{var V=this.getSelectionCell(),U=null,ha=[],ma=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(ha.push(wa),wa==V)U=ha.length-1;else if(z&&null==V&&0<ha.length||null!=U&&z&&ha.length>U||!z&&0<U)return;for(var sa=0;sa<this.model.getChildCount(wa);sa++)ma(this.model.getChildAt(wa,sa))});ma(this.model.root);0<ha.length&&(U=null!=U?mxUtils.mod(U+(z?1:-1),ha.length):0,this.setSelectionCell(ha[U]))}};
-Graph.prototype.swapShapes=function(z,L,O,V,U,ha,ma){L=!1;if(!V&&null!=U&&1==z.length&&(V=this.view.getState(U),O=this.view.getState(z[0]),null!=V&&null!=O&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==V.style.shape&&"umlLifeline"==O.style.shape)&&(V=this.getCellGeometry(U),ha=this.getCellGeometry(z[0]),null!=V&&null!=ha))){L=V.clone();V=ha.clone();V.x=L.x;V.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(U,L),this.model.setGeometry(z[0],V)}finally{this.model.endUpdate()}L=
-!0}return L};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,O,V,U,ha,ma){if(this.swapShapes(z,L,O,V,U,ha,ma))return z;ma=null!=ma?ma:{};if(this.isTable(U)){for(var wa=[],sa=0;sa<z.length;sa++)this.isTable(z[sa])?wa=wa.concat(this.model.getChildCells(z[sa],!0).reverse()):wa.push(z[sa]);z=wa}this.model.beginUpdate();try{wa=[];for(sa=0;sa<z.length;sa++)if(null!=U&&this.isTableRow(z[sa])){var ya=this.model.getParent(z[sa]),Ha=this.getCellGeometry(z[sa]);this.isTable(ya)&&wa.push(ya);
-if(null!=ya&&null!=Ha&&this.isTable(ya)&&this.isTable(U)&&(V||ya!=U)){if(!V){var Qa=this.getCellGeometry(ya);null!=Qa&&(Qa=Qa.clone(),Qa.height-=Ha.height,this.model.setGeometry(ya,Qa))}Qa=this.getCellGeometry(U);null!=Qa&&(Qa=Qa.clone(),Qa.height+=Ha.height,this.model.setGeometry(U,Qa));var ua=this.model.getChildCells(U,!0);if(0<ua.length){z[sa]=V?this.cloneCell(z[sa]):z[sa];var za=this.model.getChildCells(z[sa],!0),Fa=this.model.getChildCells(ua[0],!0),Ba=Fa.length-za.length;if(0<Ba)for(var Ea=
-0;Ea<Ba;Ea++){var Oa=this.cloneCell(za[za.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[sa],Oa))}else if(0>Ba)for(Ea=0;Ea>Ba;Ea--)this.model.remove(za[za.length+Ea-1]);za=this.model.getChildCells(z[sa],!0);for(Ea=0;Ea<Fa.length;Ea++){var Pa=this.getCellGeometry(Fa[Ea]),bb=this.getCellGeometry(za[Ea]);null!=Pa&&null!=bb&&(bb=bb.clone(),bb.width=Pa.width,this.model.setGeometry(za[Ea],bb))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<wa.length;sa++)!V&&this.model.contains(wa[sa])&&0==this.model.getChildCount(wa[sa])&&
-this.model.remove(wa[sa]);V&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var O=[];this.model.beginUpdate();try{for(var V=0;V<z.length;V++)if(this.isTableCell(z[V])){var U=this.model.getParent(z[V]),ha=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha)&&O.push(ha):
-this.labelChanged(z[V],"")}else{if(this.isTableRow(z[V])&&(ha=this.model.getParent(z[V]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha))){for(var ma=this.model.getChildCells(ha,!0),wa=0,sa=0;sa<ma.length;sa++)0<=mxUtils.indexOf(z,ma[sa])&&wa++;wa==ma.length&&O.push(ha)}O.push(z[V])}O=g.apply(this,[O,L])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,L,O){O=null!=O?O:new Graph;for(var V=0;V<L.length;V++)null!=L[V]&&O.updateCustomLinksForCell(z,L[V],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var O=this.model.getChildCount(L),V=0;V<O;V++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,V))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var O=JSON.parse(L);for(L=0;L<O.length;L++){var V=O[L];z.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?
-V[3]:0,4<V.length?V[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){V=z.shape.direction;L=z.shape.bounds;var U=z.shape.scale;O=L.width/U;L=L.height/U;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=O,O=L,L=V;L=z.shape.getConstraints(z.style,O,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),O=0,V=0;V<L;V++){var U=this.model.getChildAt(z,V);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,L,O){for(var V=this.getCurrentCellStyle(z),U=!0,ha=!0,ma=0;ma<L.length&&ha;ma++)U=U&&this.isTable(L[ma]),ha=ha&&this.isTableRow(L[ma]);return(1==L.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||U))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var O=this.getModel(),V=[];O.beginUpdate();try{for(var U=0;U<z.length;U++){var ha=z[U];if(O.isEdge(ha)){var ma=O.getTerminal(ha,!0),wa=O.getTerminal(ha,!1);O.setTerminal(ha,wa,!0);O.setTerminal(ha,ma,!1);var sa=O.getGeometry(ha);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Ha=sa.getTerminalPoint(!1);
-sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Ha,!0);O.setGeometry(ha,sa);var Qa=this.view.getState(ha),ua=this.view.getState(ma),za=this.view.getState(wa);if(null!=Qa){var Fa=null!=ua?this.getConnectionConstraint(Qa,ua,!0):null,Ba=null!=za?this.getConnectionConstraint(Qa,za,!1):null;this.setConnectionConstraint(ha,ma,!0,Ba);this.setConnectionConstraint(ha,wa,!1,Fa);var Ea=mxUtils.getValue(Qa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Qa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[ha])}V.push(ha)}}else if(O.isVertex(ha)&&(sa=this.getCellGeometry(ha),null!=sa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Oa=sa.width;sa.width=sa.height;sa.height=Oa;O.setGeometry(ha,sa)}var Pa=this.view.getState(ha);if(null!=Pa){var bb=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Pa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,eb)+(L?-1:1),bb.length)],[ha])}V.push(ha)}}}finally{O.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var O=this.view.getState(L);null!=O&&null!=O.shape&&(this.view.invalidate(L),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var O=this.view.getState(z[L]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};
-Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)L(z[O])}};Graph.prototype.updateLabelElements=function(z,L,O){z=null!=z?z:this.getSelectionCells();for(var V=document.createElement("div"),
-U=0;U<z.length;U++)if(this.isHtmlLabel(z[U])){var ha=this.convertValueToString(z[U]);if(null!=ha&&0<ha.length){V.innerHTML=ha;for(var ma=V.getElementsByTagName(null!=O?O:"*"),wa=0;wa<ma.length;wa++)L(ma[wa]);V.innerHTML!=ha&&this.cellLabelChanged(z[U],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,O){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var V=z.getAttribute("placeholder"),
-U=z;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(V)){this.setAttributeForCell(U,V,L);break}U=this.model.getParent(U)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var L=new mxDictionary,O=0;O<z.length;O++)L.put(z[O],!0);var V=[];for(O=0;O<z.length;O++){var U=this.model.getParent(z[O]);null==U||L.get(U)||(L.put(U,!0),V.push(U))}for(O=0;O<V.length;O++)if(U=this.view.getState(V[O]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var ha=!0,ma=0;ma<this.model.getChildCount(U.cell)&&ha;ma++)L.get(this.model.getChildAt(U.cell,ma))||(ha=!1);ha&&z.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&L.push(z[O]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,L)};Graph.prototype.getAttributeForCell=function(z,L,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,L,O){if(null!=z.value&&"object"==typeof z.value)var V=z.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),V.setAttribute("label",z.value||"");null!=O?V.setAttribute(L,O):V.removeAttribute(L);
-this.model.setValue(z,V)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,O,V){this.getModel();if(mxEvent.isAltDown(L))return null;for(var U=0;U<z.length;U++){var ha=this.model.getParent(z[U]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=y.apply(this,arguments);var ma=!0;for(U=0;U<z.length&&ma;U++)ma=ma&&this.isTableRow(z[U]);ma&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||
-(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var V=this.model.isEdge(L)?this.view.getState(L):
-null,U=mxEvent.getSource(z);this.firstClickState!=V||this.firstClickSource!=U||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&(mxUtils.contains(V.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(z)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(O.x,O.y))),L=this.addText(O.x,O.y,V))}return L};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),U=this.getPageSize();L=Math.max(L,V.x*U.width);O=Math.max(O,V.y*U.height)}return new mxPoint(this.snap(L+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),O=this.getInsertPoint(),V=this.snap(Math.round(Math.max(O.x,
-L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(V,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,O){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){V.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-V.geometry.relative=!0;V.connectable=!1;var U=this.view.getRelativePoint(O,z,L);V.geometry.x=Math.round(1E4*U.x)/1E4;V.geometry.y=Math.round(U.y);V.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(O,V.geometry);var ha=this.view.scale;V.geometry.offset=new mxPoint(Math.round((z-U.x)/ha),Math.round((L-U.y)/ha))}else U=this.view.translate,V.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(z/this.view.scale)-
-U.x-(null!=O?O.origin.x:0),V.geometry.y=Math.round(L/this.view.scale)-U.y-(null!=O?O.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(z,L,O){var V=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Ha=
-this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Ha&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Ha),null!=L&&mxEvent.addGestureListeners(sa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,V);V();var U=this.container.style.cursor,ha=this.getTolerance(),ma=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya=
-sa.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))sa=ma.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Ha,Qa,ua){return null==ma.getLinkForCell(Ha.cell)}),ya=null==ya||ma.model.isAncestor(sa,ya.cell)?ma.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft;
-this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(ma.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>ha||ya>ha)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Ha=ya.getSource();for(sa=ya.getEvent();null!=Ha&&"a"!=Ha.nodeName.toLowerCase();)Ha=Ha.parentNode;null==Ha&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&(null==ya.sourceState||
-!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Ha=ma.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ha||null==L||L(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Ha?ma.linkTarget:"_top",ma.openLink(this.currentLink,sa),ya.consume())):null!=O&&!ya.isConsumed()&&
-Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&Math.abs(this.startX-ya.getGraphX())<ha&&Math.abs(this.startY-ya.getGraphY())<ha&&O(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(sa.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=ma.container&&
-(ma.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(sa){};ma.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(sa){wa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var V=this.getModel(),U=this.gridSize,ha=[];V.beginUpdate();try{var ma={},wa=this.createCellLookup(z),sa=this.cloneCells(z,!1,ma,!0);for(O=0;O<z.length;O++){var ya=V.getParent(z[O]);if(null!=ya){var Ha=this.moveCells([sa[O]],U,U,!1)[0];ha.push(Ha);if(L)V.add(ya,sa[O]);else{var Qa=ya.getIndex(z[O]);V.add(ya,sa[O],Qa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[O]),za=this.getCellGeometry(ya);null!=ua&&null!=za&&(za=za.clone(),za.height+=ua.height,V.setGeometry(ya,za))}}else ha.push(sa[O])}this.updateCustomLinks(this.createCellMapping(ma,
-wa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{V.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,O){if(null!=z&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),U=[],ha=0;ha<V.length;ha++)U.push(V[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==U.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=U[ha-1]){z[ha].setAttribute("width",
-L);z[ha].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),O=[],V=0;V<L.length;V++)O.push(L[V]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==O.length+1)for(V=L.length-1;0<=V;V--)if(L[V]!=O[V-1]){for(L=L[V].getElementsByTagName("a");0<L.length;){for(O=
-L[0].parentNode;null!=L[0].firstChild;)O.insertBefore(L[0].firstChild,L[0]);O.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==
-L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var O=[],V=null,U=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var ma=this.view.getState(L[ha]);if(null!=ma){var wa=z?ma.getCenterX():ma.getCenterY();V=null!=V?Math.max(V,wa):wa;U=null!=U?Math.min(U,wa):wa;O.push(ma)}}if(2<O.length){O.sort(function(Qa,ua){return z?Qa.x-ua.x:Qa.y-ua.y});ma=this.view.translate;wa=this.view.scale;U=U/wa-(z?ma.x:ma.y);V=V/wa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var sa=(V-U)/(O.length-
-1);V=U;for(ha=1;ha<O.length-1;ha++){var ya=this.view.getState(this.model.getParent(O[ha].cell)),Ha=this.getCellGeometry(O[ha].cell);V+=sa;null!=Ha&&null!=ya&&(Ha=Ha.clone(),z?Ha.x=Math.round(V-Ha.width/2)-ya.origin.x:Ha.y=Math.round(V-Ha.height/2)-ya.origin.y,this.getModel().setGeometry(O[ha].cell,Ha))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,O){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,O,V,U,ha,ma,wa,sa,ya,Ha,Qa,ua,za){var Fa=null;if(null!=za)for(Fa=new mxDictionary,Ha=0;Ha<za.length;Ha++)Fa.put(za[Ha],
-!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;O=null!=O?O:0;U=null!=U?U:!0;ha=null!=ha?ha:!0;ma=null!=ma?ma:!0;ya=null!=ya?ya:!1;var Ba="page"==ua?this.view.getBackgroundPageBounds():ha&&null==Fa||V||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));V=L/Ea;ua=U?-.5:0;var Oa=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ba.width*V)+2*O)+(ya&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*V)+2*O)+(ya&&0==O?5:0),z),Pa=Oa.ownerDocument,bb=null!=Pa.createElementNS?Pa.createElementNS(mxConstants.NS_SVG,"g"):Pa.createElement("g");Oa.appendChild(bb);var eb=this.createSvgCanvas(bb);eb.foOffset=
-U?-.5:0;eb.textOffset=U?-.5:0;eb.imageOffset=U?-.5:0;eb.translate(Math.floor(O/L-Ba.x/Ea),Math.floor(O/L-Ba.y/Ea));var db=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(db.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ea/L;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(V);eb.textEnabled=
-ma;wa=null!=wa?wa:this.createSvgImageExport();var lb=wa.drawCellState,$a=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};wa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Fa?Fa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ha&&null==Fa||qb)&&null!=nb;)qb=null!=
-Fa?Fa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ha&&null==Fa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};wa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,sa,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),V=z.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var U=z.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(V);U.appendChild(z);O.appendChild(U);L.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,L,O){z=z.getElementsByTagName("a");for(var V=0;V<z.length;V++)if(null==z[V].getAttribute("target")){var U=z[V].getAttribute("href");null==U&&(U=z[V].getAttribute("xlink:href"));
-null!=U&&(null!=L&&/^https?:\/\//.test(U)?z[V].setAttribute("target",L):O&&this.isCustomLink(U)&&z[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,O){for(;null!=z&&z.nodeName!=
-L;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,O){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var O=document.createRange();O.selectNode(z);L.removeAllRanges();L.addRange(O)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),O=L.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,L,O){var V=this.getCellGeometry(z);if(null!=V){V=V.clone();if(null!=V.points)for(var U=0;U<V.points.length;U++)L?V.points[U].x=O+(O-V.points[U].x):V.points[U].y=O+(O-V.points[U].y);U=function(ha){null!=ha&&(L?ha.x=O+(O-ha.x):ha.y=O+(O-ha.y))};U(V.getTerminalPoint(!0));U(V.getTerminalPoint(!1));this.model.setGeometry(z,V)}};Graph.prototype.flipChildren=function(z,L,O){this.model.beginUpdate();try{for(var V=this.model.getChildCount(z),
-U=0;U<V;U++){var ha=this.model.getChildAt(z,U);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,O);else{var ma=this.getCellGeometry(ha);null!=ma&&(ma=ma.clone(),L?ma.x=O+(O-ma.x-ma.width):ma.y=O+(O-ma.y-ma.height),this.model.setGeometry(ha,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],V=0;V<z.length;V++)if(this.model.isEdge(z[V])){var U=this.view.getState(z[V]);null!=U&&this.flipEdgePoints(z[V],
-L,(L?U.getCenterX():U.getCenterY())/this.view.scale-(L?U.origin.x:U.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[V]);null!=ha&&this.flipChildren(z[V],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);O.push(z[V])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var V=0;V<z.length;V++){var U=
-this.model.getParent(z[V]);if(this.isTable(U)){var ha=this.getCellGeometry(z[V]),ma=this.getCellGeometry(U);null!=ha&&null!=ma&&(ma=ma.clone(),ma.height-=ha.height,this.model.setGeometry(U,ma))}}var wa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=wa)for(O=[],V=0;V<wa.length;V++)this.model.contains(wa[V])&&(this.model.isVertex(wa[V])||this.model.isEdge(wa[V]))&&O.push(wa[V])}return O};Graph.prototype.insertTableColumn=function(z,
-L){var O=this.getModel();O.beginUpdate();try{var V=z,U=0;if(this.isTableCell(z)){var ha=O.getParent(z);V=O.getParent(ha);U=mxUtils.indexOf(O.getChildCells(ha,!0),z)}else this.isTableRow(z)?V=O.getParent(z):z=O.getChildCells(V,!0)[0],L||(U=O.getChildCells(z,!0).length-1);var ma=O.getChildCells(V,!0),wa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var sa=O.getChildCells(ma[z],!0)[U],ya=O.cloneCell(sa,!1),Ha=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,
-"rowspan",null),"colspan",null);if(null!=Ha){null!=Ha.alternateBounds&&(Ha.width=Ha.alternateBounds.width,Ha.height=Ha.alternateBounds.height,Ha.alternateBounds=null);wa=Ha.width;var Qa=this.getCellGeometry(ma[z]);null!=Qa&&(Ha.height=Qa.height)}O.add(ma[z],ya,U+(L?0:1))}var ua=this.getCellGeometry(V);null!=ua&&(ua=ua.clone(),ua.width+=wa,O.setGeometry(V,ua))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:L.getParent(z);var V=L.getChildCells(O,!0);0==V.length?L.remove(O):(O==z&&(z=V[V.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var O=this.getModel();O.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){V=z;var U=O.getChildCells(V,!0);z=U[L?0:U.length-1]}else V=O.getParent(z);var ha=V.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(V,z,ha+(L?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var O=
-this.getModel();O.beginUpdate();try{var V=z,U=z;if(this.isTableCell(z))U=O.getParent(z),V=O.getParent(U);else if(this.isTableRow(z))V=O.getParent(z);else{var ha=O.getChildCells(V,!0);U=ha[L?0:ha.length-1]}var ma=O.getChildCells(U,!0),wa=V.getIndex(U);U=O.cloneCell(U,!1);U.value=null;var sa=this.getCellGeometry(U);if(null!=sa){for(ha=0;ha<ma.length;ha++){z=O.cloneCell(ma[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);
-null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);U.insert(z)}O.add(V,U,wa+(L?0:1));var Ha=this.getCellGeometry(V);null!=Ha&&(Ha=Ha.clone(),Ha.height+=sa.height,O.setGeometry(V,Ha))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(V=L.getParent(z));this.isTableRow(V)&&(O=L.getParent(V));var U=L.getChildCells(O,
-!0);if(0==U.length)L.remove(O);else{this.isTableRow(V)||(V=U[0]);var ha=L.getChildCells(V,!0);if(1>=ha.length)L.remove(O);else{var ma=ha.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ha,z));for(V=z=0;V<U.length;V++){var wa=L.getChildCells(U[V],!0)[ma];L.remove(wa);var sa=this.getCellGeometry(wa);null!=sa&&(z=Math.max(z,sa.width))}var ya=this.getCellGeometry(O);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(O,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();
-L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(z=V=L.getParent(z));this.isTableRow(z)&&(O=L.getParent(V));var U=L.getChildCells(O,!0);if(1>=U.length)L.remove(O);else{this.isTableRow(V)||(V=U[U.length-1]);L.remove(V);z=0;var ha=this.getCellGeometry(V);null!=ha&&(z=ha.height);var ma=this.getCellGeometry(O);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(O,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var O=z.tBodies[0],V=O.rows[0].cells,U=z=0;U<V.length;U++){var ha=
-V[U].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=O.insertRow(L);for(U=0;U<z;U++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var O=z.tHead;if(null!=O)for(var V=0;V<O.rows.length;V++){var U=document.createElement("th");O.rows[V].appendChild(U);mxUtils.br(U)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)V=z.rows[O].insertCell(L),mxUtils.br(V);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>L&&z[O].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var V;V=O.firstChild;)lastNode=z.appendChild(V);L.insertNode(z)}}else(L=document.selection)&&"Control"!=
-L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function O(U,ha){U.length>ha&&(U=U.substring(0,Math.round(ha/2))+"..."+U.substring(U.length-Math.round(ha/4)));return U}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var V=document.createElement("a");V.setAttribute("rel",this.linkRelation);V.setAttribute("href",this.getAbsoluteUrl(z));V.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&V.setAttribute("target",this.linkTarget);mxUtils.write(V,O(L,40));this.isCustomLink(z)&&mxEvent.addListener(V,"click",mxUtils.bind(this,function(U){this.customLinkClicked(z);mxEvent.consume(U)}));return V};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var ma=this.getCellAt(ha.graphX,ha.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ha.graphX,ha.graphY)||(ha.state=this.view.getState(ma),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,O=!1,V=!1,U=this.fireMouseEvent;this.fireMouseEvent=
-function(ha,ma,wa){ha==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),O=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,ma){var wa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!wa&&(O&&null==ma.getCell()&&
-this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,sa,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,ma,wa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),O=L.getRangeAt(0),
-V="\t";if(null!=z)for(V="";0<z;)V+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(V));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);L.removeAllRanges();L.addRange(O)};mxCellEditor.prototype.alignText=function(z,L){var O=null!=L&&mxEvent.isShiftDown(L);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var V=!0;this.graph.processElements(this.textarea,function(U){O||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"),
-U.style.textAlign=null):V=!1});V&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],O=0,V=z.rangeCount;O<V;++O)L.push(z.getRangeAt(O));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var L=0,O=z.length;L<O;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(V){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);J.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var V=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=V&&V.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(U,ha){ha.originalNode=U;U=U.firstChild;
-for(var ma=ha.firstChild;null!=U&&null!=ma;)L(U,ma),U=U.nextSibling,ma=ma.nextSibling;return ha}function O(U,ha){if(null!=U)if(ha.originalNode!=U)V(U);else for(U=U.firstChild,ha=ha.firstChild;null!=U;){var ma=U.nextSibling;null==ha?V(U):(O(U,ha),ha=ha.nextSibling);U=ma}}function V(U){for(var ha=U.firstChild;null!=ha;){var ma=ha.nextSibling;V(ha);ha=ma}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U,
-mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=ma.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=
-wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var V=null!=z.text?z.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
+ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
+xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
+(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
+!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
+"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
+try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
+Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
+!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
+if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
+0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
+this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
+this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
+function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
+U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
+ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
+Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
+W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
+W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
+this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
+(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
+null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
+J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
+W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
+this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
+ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
+this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
+!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
+Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
+(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
+var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
+xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
+J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
+J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
+J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
+1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
+!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
+W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
+ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
+Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
+z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
+null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
+J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
+O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
+W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
+J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
+this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
+J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
+"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
+z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
+this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
+null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
+!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
+J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
+U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
+J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
+null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
+function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
+function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
+this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
+z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
+U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
+W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
+window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
+G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
+for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
+mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=
+xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
+60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var W=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();W.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=
-function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){Z.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var V=this.graph.model.getParent(z),U=null!=V?this.graph.getCellGeometry(V):null;if(null!=U&&(O=this.graph.getCellStyle(V),"stackLayout"==O.childLayout)){var ha=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ma=this.graph.getActualStartSize(V);U=U.clone();O?U.height=L.height+ma.y+ma.height+2*ha:U.width=L.width+ma.x+ma.width+2*ha;this.graph.model.setGeometry(V,U)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(wa){O.get(wa)||(O.put(wa,!0),U.push(wa))}for(var L=N.apply(this,arguments),O=new mxDictionary,V=
-this.graph.model,U=[],ha=0;ha<L.length;ha++){var ma=L[ha];this.graph.isTableCell(ma)?z(V.getParent(V.getParent(ma))):this.graph.isTableRow(ma)&&z(V.getParent(ma));z(ma)}return U};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=qa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=
-oa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var S=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return S.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 fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=X.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var L=function(Fa,Ba,Ea){for(var Oa=[],Pa=0;Pa<Fa.length;Pa++){var bb=Fa[Pa];Oa.push(null==bb?null:new mxPoint((sa+bb.x+Ba)*ha,(ya+bb.y+Ea)*ha))}return Oa},O=this,V=this.graph,U=V.model,ha=V.view.scale,ma=this.state,wa=this.selectionBorder,sa=this.state.origin.x+V.view.translate.x,ya=this.state.origin.y+V.view.translate.y;null==z&&(z=[]);var Ha=V.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ha.length){var Qa=U.getChildCells(Ha[0].cell,!0),ua=
-V.getTableLines(this.state.cell,!1,!0),za=V.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ha.length;U++)mxUtils.bind(this,function(Fa){var Ba=Ha[Fa],Ea=Fa<Ha.length-1?Ha[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea.cell):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=za[Fa]?new aa(za[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ea);Ba.tableHandle=!0;var Pa=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(za[Fa],0,Pa),this.shape.updateBoundsFromLine();else{var eb=V.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Pa*ha;this.shape.bounds.x=ma.x+(Fa==Ha.length-1?0:eb.x*ha);this.shape.bounds.width=ma.width-(Fa==Ha.length-
-1?0:eb.width+eb.x+ha)}this.shape.redraw()}};var bb=!1;Ba.setPosition=function(eb,db,ub){Pa=Math.max(Graph.minTableRowHeight-eb.height,db.y-eb.y-eb.height);bb=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&bb&&(Pa=Math.min(Pa,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Pa)V.setTableRowHeight(this.state.cell,Pa,!bb);else if(!O.blockDelayedSelection){var db=V.getCellAt(eb.getGraphX(),eb.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(db,eb)}Pa=0};Ba.reset=function(){Pa=0};
-z.push(Ba)})(U);for(U=0;U<Qa.length;U++)mxUtils.bind(this,function(Fa){var Ba=V.view.getState(Qa[Fa]),Ea=V.getCellGeometry(Qa[Fa]),Oa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ba&&(Ba=new mxCellState(V.view,Qa[Fa],V.getCellStyle(Qa[Fa])),Ba.x=ma.x+Ea.x*ha,Ba.y=ma.y+Ea.y*ha,Ba.width=Oa.width*ha,Ba.height=Oa.height*ha,Ba.updateCachedBounds());Ea=Fa<Qa.length-1?Qa[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea):null;var Pa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=ua[Fa]?
-new aa(ua[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ea);Ba.tableHandle=!0;var bb=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(ua[Fa],bb,0),this.shape.updateBoundsFromLine();else{var db=V.getActualStartSize(ma.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+bb)*ha;this.shape.bounds.y=ma.y+(Fa==Qa.length-1?0:db.y*ha);this.shape.bounds.height=ma.height-(Fa==Qa.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(db,ub,fb){bb=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-db.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Pa||eb||(bb=Math.min(bb,Pa.width-Graph.minTableColumnWidth))};Ba.execute=function(db){if(0!=bb)V.setTableColumnWidth(this.state.cell,
-bb,eb);else if(!O.blockDelayedSelection){var ub=V.getCellAt(db.getGraphX(),db.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(ub,db)}bb=0};Ba.positionChanged=function(){};Ba.reset=function(){bb=0};z.push(Ba)})(U)}}return null!=z?z.reverse():null};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ja.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var V=mxUtils.createImage(Editor.rowMoveImage);
-V.style.position="absolute";V.style.cursor="pointer";V.style.width="7px";V.style.height="4px";V.style.padding="4px 2px 4px 2px";V.rowState=O;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),O.cell,U),mxEvent.consume(U))}));this.moveHandles.push(V);this.graph.container.appendChild(V)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var U=this.customHandles[V].shape.bounds,ha=U.getCenterX(),ma=U.getCenterY();if(Math.abs(this.state.x-ha)<U.width/2||Math.abs(this.state.y-ma)<U.height/2||Math.abs(this.state.x+this.state.width-ha)<U.width/2||Math.abs(this.state.y+this.state.height-ma)<U.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=
-2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ca.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,V=this.graph.view.scale,U=this.roundLength(L.x/V-O.x);O=this.roundLength(L.y/V-O.y);V=this.graph.view.unit;this.hint.innerHTML=e(U,V)+", "+e(O,V);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
+"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
+this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
+null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
+function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
+"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
+U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
+ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
+this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
+U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
+0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
+1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
+z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
+new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
+db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
+if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
+U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
+0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
+2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
+z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.display="")};var ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2652,318 +2653,318 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,L){E.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,V=null,U=null,ha=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,U=this.first.y,z=(this.currentX-V)/this.graph.view.scale,ha=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(O){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(V,U,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ma.length;O++)if(this.graph.isCellMovable(ma[O])){var wa=this.graph.view.getState(ma[O]),sa=this.graph.getCellGeometry(ma[O]);null!=wa&&null!=sa&&(sa=sa.clone(),sa.translate(z,ha),this.graph.model.setGeometry(ma[O],sa))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=L.getX()+O.x;O=L.getY()+O.y;var V=this.first.x-z,U=this.first.y-O,ha=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ha||Math.abs(U)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(L)?(z=this.x+this.width,O=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
+!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
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)),L.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,O,V){ba.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,O){L=null!=z&&0==z;var V=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,V,L):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=V?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,O){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),O=L.getParent(z[0]),V=this.graph.getCellGeometry(z[0]);if(L.isEdge(O)&&null!=V&&V.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ta.apply(this,arguments)};var la=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=la.apply(this,arguments),L=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&L.push(z[O]);return L};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),O=L.getParent(z.cell),V=this.graph.getCellGeometry(z.cell);return L.isEdge(O)&&null!=V&&V.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):pa.apply(this,arguments)};var xa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var O=this.graph.getModel(),V=O.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!O.isEdge(V)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&xa.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.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 Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ia.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 Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var V=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(U,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));V()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-L=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(L,O);if(null!=L||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
+R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
+new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var V=O.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-V.style.marginLeft="4px";this.linkHint.appendChild(V);mxEvent.addListener(V,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(O=0;O<L.length;O++){var U=document.createElement("div");U.style.marginTop=null!=z||0<O?"6px":"0px";U.appendChild(this.graph.createLinkForHint(L[O].getAttribute("href"),mxUtils.getTextContent(L[O])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(V,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=L||null!=O&&0<O.length)this.updateLinkHint(L,
-O),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,O=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-O+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x=
-L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=L&&(O=Math.max(O,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
+O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
+5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
+J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ja(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function la(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function xa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Da(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ha(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}
-function ya(){mxRhombus.call(this)}function Ha(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)}
-function bb(c,l,v,n,t,A,B,da,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var t=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==t?c.moveTo(B.x+v,B.y+n):null!=t&&c.lineTo(B.x+v,B.y+n));t=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var t=this.line[n];null!=t&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?ua.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&da<t||!B&&da<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=A;A=B;B=da}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,t)}};e.prototype.paintTableForeground=function(c,l,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=da&&(c.setFillAlpha(Math.abs(da)),c.setFillColor(0>da?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),db=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1;
-u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(I*=Math.min(n,t));
-I=Math.min(I,.5*n,.5*(t-v));l=Math.max(l,I);l=Math.min(n-I,l);B||(I=0);c.begin();"left"==A?(c.moveTo(Math.max(I,0),v),c.lineTo(Math.max(I,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(I,0),0),c.lineTo(n-Math.max(I,0),v));B?(c.moveTo(0,I+v),c.arcTo(I,I,0,0,1,I,v),c.lineTo(n-I,v),c.arcTo(I,I,0,0,1,n,I+v),c.lineTo(n,t-I),c.arcTo(I,I,0,0,1,n-I,t),c.lineTo(I,t),c.arcTo(I,I,0,0,1,0,t-I)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,t));l=Math.min(l,.5*n,.5*t);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,t-l);c.arcTo(l,l,0,0,1,n-l,t);c.lineTo(A+l,t);c.arcTo(l,l,0,0,1,A,t-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=
-function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",J);mxUtils.extend(D,mxActor);D.prototype.size=.4;D.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};D.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",D);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(W,mxActor);W.prototype.size=.2;W.prototype.fixedSize=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",W);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.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)};
-qa.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};qa.prototype.curveTo=function(c,l,v,n,t,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=A};qa.prototype.arcTo=function(c,l,v,n,t,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};qa.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},
-n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),da=this.defaultVariation;5>B&&(B=5,da/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};qa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new qa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=qa)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
-"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(t/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,t*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+t-A),c.quadTo(l+n,v+t,l+n-A,v+t),c.lineTo(l+A,v+t),c.quadTo(l,v+t,l,v+t-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+t),c.lineTo(l,v+t),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-oa.prototype.paintForeground=function(c,l,v,n,t){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,t*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(S,mxRectangleShape);S.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};S.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",S);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),da=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+da),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,
-l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(0,t),new mxPoint(l,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-ia);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(X,mxRectangleShape);X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};X.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var da=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Ya=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Ya,cb=this.style["symbol"+A+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Ya+=cb,jb+=cb);cb=l;var Ga=v;cb=da==mxConstants.ALIGN_CENTER?cb+(n-va)/2:da==mxConstants.ALIGN_RIGHT?cb+(n-va-Ya):cb+Ya;Ga=I==mxConstants.ALIGN_MIDDLE?Ga+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ga+(t-na-jb):Ga+jb;c.save();da=new B;da.style=this.style;B.prototype.paintVertexShape.call(da,c,cb,Ga,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",X);mxUtils.extend(ja,mxCylinder);ja.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ja);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);
-c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",
-E);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);
-Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),da=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,da-1.5*A));c.lineTo(l+Math.max(0,B-A),v+da);c.lineTo(l,v+da);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+da);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
+function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
+function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
+function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
+function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
+mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
+15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
+t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
+function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
+l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
+la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};la.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
+A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
+l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
+Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
+40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
+A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",fa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?W.prototype.fixedSize:W.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da+t),new mxPoint(B+
-I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=t?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va),new mxPoint(B+
-t,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(B+I,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+
-I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,c),new mxPoint(B,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,
-A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,c),new mxPoint(B+I,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va),new mxPoint(na,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(na,da+
-t),new mxPoint(B+I,da),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t),new mxPoint(na,da)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,
-Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(la,mxCylinder);la.prototype.jettyWidth=20;la.prototype.jettyHeight=10;la.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var da=Math.min(l,t-l),I=Math.min(da+2*l,t-l);A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("module",la);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=
-32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var da=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,
-I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(xa,mxRectangleShape);xa.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,da,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",xa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ia,Ca);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector);
-Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-
-l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(c,
-l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n,
-v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ha);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,da=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,da);c.lineTo(l+A+B,da-B/2);c.moveTo(l+A,da);c.lineTo(l+A+B,da+B/2);c.moveTo(l+A,da);c.lineTo(l+n-A,da);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,da);c.lineTo(l+n-B-A,da-B/2);c.moveTo(l+
-n-A,da);c.lineTo(l+n-B-A,da+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Qa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style,
-"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||da||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||da?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Fa,mxActor);Fa.prototype.redrawPath=function(c,
-l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Fa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Oa,
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
+u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
+32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
+za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
+mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
+new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
+mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
+l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
+l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
+.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
+n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
+l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Oa,
mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,t)};Oa.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ma=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ja=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ua=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,
+v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,I));A=Oa.prototype;c.setDashed(Ya);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);da||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));da||(na=Math.min(cb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ga||Ma||Ka||Ja)&&"frame"!=va&&(c.begin(),Ga?A.moveNW(c,l,v,n,t,B,Ua,I,Ja):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),Ma&&A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),Ka&&
-A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),Ja&&A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Ya=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Ya=0),c.setGradient(Db,Eb,0,0,n,t,Hb,da,Ya),c.begin(),Ga?A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),Ja&&Ka&&A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),Ka&&Ma&&A.paintSEInner(c,
-l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),Ma&&Ga&&A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),Ga&&Ja&&A.paintNWInner(c,l,v,n,t,B,Ua,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Ua,Va,Wa,Xa,I,Ga,Ma,Ka,Ja),c.stroke()));Ga||Ma||Ka||!Ja?Ga||Ma||!Ka||Ja?!Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==
-va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),
-c.fillAndStroke()):Ga||!Ma||Ka||Ja?!Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,
-I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,
-l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&
-Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga||Ma||Ka||Ja?
-Ga&&!Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,
-l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,
-I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,
-I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,
-v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,
-l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,
-l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,
-t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,
-l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ma&&Ka&&Ja&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,
-B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),
-A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),
-A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Ua,Va,
-Wa,Xa,I,Ga,Ma,Ka,Ja);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,da)};Oa.prototype.moveNE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-da,0)};Oa.prototype.moveSE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-da)};Oa.prototype.moveSW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,
-t):c.moveTo(da,t)};Oa.prototype.paintNW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,da,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(da,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-da,0)};Oa.prototype.paintNE=
-function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n,da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,da);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-da)};Oa.prototype.paintLeft=function(c,l,v,n,t,A,B,da,I){"square"==
-B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,da)};Oa.prototype.paintSE=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n-da,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-da,t);else c.lineTo(n,t)};Oa.prototype.paintBottom=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0,
-t):c.lineTo(da,t)};Oa.prototype.paintSW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,0,t-da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-da);else c.lineTo(0,t)};Oa.prototype.paintNWInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,I,.5*I+da);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,I,I+da);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+da);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,I+da),c.lineTo(I,I+da)};Oa.prototype.paintTopInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(da+.5*I,I):c.lineTo(da+I,I):c.lineTo(0,
-I):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-da-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-da-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-da-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,da+I),c.lineTo(n-da-I,I)};Oa.prototype.paintRightInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n,
-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):c.lineTo(n-I,da+I):c.lineTo(n-I,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):c.lineTo(I,t-da-I):
-c.lineTo(I,t):c.lineTo(0,t)};Oa.prototype.paintSEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-I,t-da-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-I,t-da-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-da-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,t-da-I),c.lineTo(n-I,t-da-I)};Oa.prototype.paintBottomInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n,
-t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-da-.5*I,t-I):c.lineTo(n-da-I,t-I):c.lineTo(n,t)};Oa.prototype.paintSWInner=function(c,l,v,n,t,A,B,da,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,da+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(da+I,da+I,0,0,1,da+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(da+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,t-da-I),c.lineTo(I+da,t-I)};Oa.prototype.moveSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-da-I):
-c.moveTo(0,t-I)};Oa.prototype.lineSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-da-I):c.lineTo(0,t-I)};Oa.prototype.moveSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-da-I):c.moveTo(n-I,t)};Oa.prototype.lineSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-da-I):
-c.lineTo(n-I,t)};Oa.prototype.moveNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,da+I):c.moveTo(n,I)};Oa.prototype.lineNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,da+I):c.lineTo(n,I)};Oa.prototype.moveNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(I,da+I):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,da+I):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,t,A,B,da,I,va,na,Ya,jb,cb,Ga){if("fold"==
-A||"fold"==B||"fold"==da||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Ya&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==da||"default"==da&&"fold"==A)&&Ya&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&cb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&cb&&Ga&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Pa,mxConnector);Pa.prototype.origPaintEdgeShape=Pa.prototype.paintEdgeShape;Pa.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Pa.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Pa.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Pa);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();
-c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.x+na/2,cb=n.y+Ya/2;n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb-na/2-Ya/2,cb-Ya/2+na/2);c.lineTo(jb-na/2+Ya/2,cb-Ya/2-na/2);c.lineTo(jb+Ya/2-3*na/2,cb-3*Ya/2-na/2);c.lineTo(jb-Ya/2-3*na/2,cb-3*Ya/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,da,I,
-va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.moveTo(n.x-na/2+Ya/2,n.y-Ya/2-na/2);c.lineTo(n.x-Ya/2-3*na/2,n.y-3*Ya/2+na/2);c.stroke()}});mxMarker.addMarker("circle",bb);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,da,I,va){var na=n.clone(),Ya=bb.apply(this,arguments),jb=t*(B+2*I),cb=A*(B+2*I);return function(){Ya.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+
-t*I,na.y-2*cb+A*I);c.moveTo(na.x-jb-cb+A*I,na.y-cb+jb-t*I);c.lineTo(na.x+cb-jb-A*I,na.y-cb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb.x-Ya,jb.y+na);c.quadTo(n.x-Ya,n.y+na,n.x,n.y);c.quadTo(n.x+Ya,n.y-na,jb.x+Ya,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,da,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-=
-v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);da?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,da,I,va,na){A*=da+va;B*=da+va;var Ya=t.clone();return function(){l.begin();l.moveTo(Ya.x,Ya.y);I?l.lineTo(Ya.x-A-B/c,Ya.y-B+A/c):l.lineTo(Ya.x+B/c-A,Ya.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,da){da=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,da=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[da];B=v?B[1]:B[da-1];da=B.x-va.x;var na=B.y-va.y,Ya=Math.sqrt(da*da+na*na);va=
-n.call(this,Ya,da/Ya,na/Ya,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,da){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Ya=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Ya.x;var jb=I.y-Ya.y,cb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,cb,va/cb,jb/cb,Ya,I,B,da)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,da){da=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var t=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(da){var I=null!=t?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,va*(I?1:da.width))),da.getCenterY())},function(da,I,va){da=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-da.x:Math.max(0,Math.min(v,(I.x-da.x)/da.width));this.state.style.size=da},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,da*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-t,A,B){var da=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};da.getPosition=v;da.setPosition=n;da.ignoreGrid=null!=t?t:!0;if(A){var I=da.positionChanged;da.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return da},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,
-I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n=
-t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],da=0;da<A.length;da++)A[da]!=c.cell&&t.isSwimlane(A[da])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[da]))==n&&B.push(A[da]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
+Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
+A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
+l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
+wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
+c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
+K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
+l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
+La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
+Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
+l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
+K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
+K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
+v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
+l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
+l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
+u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
+l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
+B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
+A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
+A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
+Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
+function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
+c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
+c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
+c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
+A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
+Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
+[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
+wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
+v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
+function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
+n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
+function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
+function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
+function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
+u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
+B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?L.prototype.fixedSize:L.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,"base",fa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",la.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",la.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
+Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
+2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",u.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",u.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",G.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
+Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
+["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:wb(Z.prototype.size,!1),display:wb(Ea.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,U.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,W.prototype.size,W.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
+m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,da=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==da&&null!=l&&(da=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Ya=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=da){c=function(Ga,Ma,Ka){Ga-=cb.x;var Ja=Ma-cb.y;Ma=(Ya*Ga-na*Ja)/(I*Ya-va*na);Ga=(va*Ga-I*Ja)/(va*na-I*Ya);jb?(Ka&&(cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma),t.push(cb)),cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga)):(Ka&&(cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga),t.push(cb)),
-cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma));t.push(cb)};var cb=da;null==n&&(n=new mxPoint(da.x+(B.x-da.x)/2,da.y+(B.y-da.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};fa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
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))];ua.prototype.constraints=mxRectangleShape.prototype.constraints;
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};u.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;
-sa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};la.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",la.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",la.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
+ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};U.prototype.constraints=mxRectangleShape.prototype.constraints;ha.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];D.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)];ia.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
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)];W.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ra.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=
-function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var A=n+t,B=(l-t)/2;t=B+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];V.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)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var u=y.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,y.getModel().setGeometry(d,
-u));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
+Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
+t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));
window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,u=0;u<
-x.length&&y;u++)y=y&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&y){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,y);null!=H&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,y-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
+x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var J=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==J||isNaN(J.nodeType)||H.setAttribute("placeholders",J.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
+null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2978,25 +2979,25 @@ x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T")
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g)}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=p.getEditableCells(p.getSelectionCells()),
-g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;
-d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*
-Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-
-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/
-p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid",
-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
-K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled});
-K.isEnabled=F;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=F;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=F;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<y.length;u++)0==p.model.getChildCount(y[u])&&p.autoSizeCell(y[u],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
+try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
+p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
+x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
+(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
+m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
+g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
+f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
+0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
+300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
+L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
+L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
+!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
@@ -3005,17 +3006,17 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)y+=u.x,g+=u.y,d=
-p.getModel().getParent(d),u=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var u=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(y,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,W){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(u,H,J);else{var T=p.getSelectionCells();if(null!=u&&(0<u.length||0<T.length)){var Z=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var N=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=N.x;T[0].geometry.y=N.y;null!=D&&k(T[0],D,G,W,p);Z=T;p.fireEvent(new mxEventObject("cellsInserted","cells",Z))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,T);var qa=p.getCurrentCellStyle(T[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=H&&null!=J)for(u=0;u<T.length;u++){var oa=T[u];if("0"!=p.getCurrentCellStyle(oa).expand){var S=p.getModel().getGeometry(oa);null!=S&&(S=S.clone(),S.width=H,S.height=J,p.getModel().setGeometry(oa,S))}null!=D&&k(oa,D,G,W,p)}}finally{p.getModel().endUpdate()}null!=Z&&(p.setSelectionCells(Z),p.scrollCellToVisible(Z[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,u,H){k(d,y,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
+p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
+0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
+g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
@@ -3024,25 +3025,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var K=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(K);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(W){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(W);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,W);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,W)}}catch(T){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
+m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=K?
-"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),K=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+K+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
+t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
+"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3089,7 +3090,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),K=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -3098,10 +3099,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(F,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3151,45 +3152,45 @@ type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",t
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var ba=Y[R];switch(ba.type){case "path":null!=Q.stroke&&this._drawToContext(q,ba,Q);break;case "fillPath":this._drawToContext(q,ba,Q);break;case "fillSketch":this.fillSketch(q,ba,Q)}}};E.fillSketch=function(Q,Y,R){var ba=q.state.strokeColor,ea=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,la=
-R.fillWeight;0>la&&(la=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(la);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(ta);q.setStrokeWidth(ea);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};E._drawToContext=function(Q,Y,R){Q.begin();for(var ba=0;ba<Y.ops.length;ba++){var ea=Y.ops[ba],ra=ea.data;switch(ea.op){case "move":Q.moveTo(ra[0],ra[1]);break;case "bcurveTo":Q.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":Q.lineTo(ra[0],
-ra[1])}}Q.end();"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(ba,ea,ra){this.canvas=ba;this.rc=ea;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
-this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ea){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var la=0;la<ta.length;la++)ra=(ra<<5)-ra+ta.charCodeAt(la)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ea)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ea?-1:ea;ra.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=ra.fill&&(null!=ba||null!=ea&&ra.fill==ea)?"solid":
-ta.fillStyle);ra.fillStyle=ea;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(ba,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ea),this.lastX=ba,this.lastY=ea)};q.prototype.moveTo=function(ba,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ea),this.lastX=ba,this.lastY=ea,this.firstX=ba,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba,
-ea,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ea,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ea,ra,ta,la,pa),this.lastX=la,this.lastY=pa)};q.prototype.arcTo=function(ba,ea,ra,ta,la,pa,xa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,
-ba,ea,ra,ta,la,pa,xa);if(null!=Ca)for(var Ia=0;Ia<Ca.length;Ia+=6)this.curveTo(Ca[Ia],Ca[Ia+1],Ca[Ia+2],Ca[Ia+3],Ca[Ia+4],Ca[Ia+5]);this.lastX=pa;this.lastY=xa}};q.prototype.rect=function(ba,ea,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ea,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ea,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+
-ra/2,ea+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+la,ea),this.lineTo(ba+ra-la,ea),this.quadTo(ba+ra,ea,ba+ra,ea+pa),this.lineTo(ba+ra,ea+ta-pa),this.quadTo(ba+ra,ea+ta,ba+ra-la,ea+ta),this.lineTo(ba+la,ea+ta),this.quadTo(ba,ea+ta,ba,ea+ta-pa),this.lineTo(ba,ea+pa),this.quadTo(ba,ea,ba+la,ea))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ba)this.nextShape.options[ea]=ba[ea];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
-function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
-this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var E=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ea,ra,ta,la){null!=ba.handJiggle&&ba.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ba){var ea=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,la=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,xa=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ca=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;Y.apply(this,
-arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ca;ba.setStrokeColor=xa;this.configurePointerEvents=pa;this.stroke=la;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}Y.apply(this,arguments);ba.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ea,ra,ta,la,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,R.apply(this,arguments),ba.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var ba=0;ba<Y.length;ba++)if("mxgraph"==Y[ba].getAttribute("class")){R.push(Y[ba]);
-break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&
-(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),
-Y=null;0<Q.length?(q=Graph.decompress(Q,null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&
-!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,ba=[],ea=null;R<q.length;){var ra=q.charCodeAt(R);R+=1;10!=ra&&(E+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=
-0;if(19==Y){var ta=q.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ta>R){Q=q.substring(R,ta);break}}10==ra&&("endobj"==E?ea=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(ea=[],ba[E.split(" ")[0]]=ea):null!=ea&&ea.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ba));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),
-null!=E&&0<E.length&&(E=q[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,
-E){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
-q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=
-q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+
-"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");
-E.appendChild(document.createTextNode(q.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=
-q.zoomFactor&&(E=parseFloat(q.zoomFactor),!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),
-mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
-null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");
-Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
-"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
+0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
+"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
+q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
+qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
+qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
+va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
+va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
+qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
+Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
+this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){return this.outline||
+null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
+mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
+ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
+q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
+null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
+mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
+null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
+!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
+R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
+(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
+q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
+StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
+q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
+Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
+var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
+null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
+!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
+(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
+(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
+"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
+"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
@@ -3197,95 +3198,95 @@ E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=t
this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content");
if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([R]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ba,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(R&&ba===E&&(Q[Y]+=ba),R=!R):","===ba&&R?ba=Q[++Y]="":Q[Y]+=ba,E=ba;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
-E=/\.png$/i.test(q)||/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
+Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
+/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ba){window.clearTimeout(Y);Q&&
-E(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var ba=document.createElement("canvas"),ea=ba.getContext("2d");ba.height=R.height;ba.width=R.width;ea.drawImage(R,0,0);E(ba.toDataURL())}catch(ra){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(ba){E(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,ba=Q||{};Q=mxUtils.bind(this,function(ea,ra){ea=q.getElementsByTagName(ea);for(var ta=0;ta<ea.length;ta++)mxUtils.bind(this,function(la){try{if(null!=la){var pa=Y.convert(la.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var xa=ba[pa];null==xa?(R++,this.convertImageToDataUri(pa,function(Ca){null!=Ca&&(ba[pa]=Ca,la.setAttribute(ra,Ca));R--;0==R&&E(q)})):la.setAttribute(ra,xa)}else null!=
-pa&&la.setAttribute(ra,pa)}}catch(Ca){}})(ea[ta])});Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,ba,ea;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}ba=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);E+="=";break}ea=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2|(ea&192)>>
-6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,ba,ea,ra){try{var ta=!ea&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var la=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=E){var xa=pa.getText();if(ta){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();xa=Array(pa.length);for(var Ca=0;Ca<pa.length;Ca++)xa[Ca]=String.fromCharCode(pa[Ca]);xa=xa.join("")}ba=null!=ba?ba:"data:image/png;base64,";xa=ba+Editor.base64Encode(xa)}E(xa)}}else null!=Q&&(0==pa.getStatus()?Q({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?Q({code:pa.getStatus()},pa):Q({message:mxResources.get("error")+" "+pa.getStatus()},pa))}),function(pa){null!=Q&&
-Q({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:la})},ra)});la()}catch(pa){null!=Q&&Q(pa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var ba=1;ba<Q.length;ba++)if(Y=
-Q[ba].indexOf(")"),0<Y){var ea=Editor.trimCssUrl(Q[ba].substring(0,Y));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);E.push('url("'+ea+'"'+Q[ba].substring(Y))}else E.push(Q[ba])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=
-q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var ta=[Q[0]],la=1;la<Q.length;la++){var pa=Q[la].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(Q[la].substring(0,pa))]);ta.push('"'+Q[la].substring(pa))}E(ta.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var ba=Q[q].indexOf(")"),ea=null,ra=Q[q].indexOf("format(",ba);0<ra&&(ea=Editor.trimCssUrl(Q[q].substring(ra+7,Q[q].indexOf(")",ra))));mxUtils.bind(this,
-function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;Y++;var la="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ta))la="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ta))la="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ta))la="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ta))la="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ta))la="application/vnd.ms-fontobject";else if("sfnt"==
-ea||/(\.sfnt)($|\?)/i.test(ta))la="application/font-sfnt";this.mapFontUrl(la,ta,mxUtils.bind(this,function(pa,xa){this.loadUrl(xa,mxUtils.bind(this,function(Ca){this.cachedFonts[ta]=Ca;Y--;R()}),mxUtils.bind(this,function(Ca){Y--;R()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,ba)),ea)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=
-E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),ba=0;ba<E.length;ba++)mxUtils.bind(this,function(ea,
-ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(Y++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;Q.push(ta+"\n");Y--;R()}),mxUtils.bind(this,function(ta){Y--;Q.push("@import url("+ra+");\n");R()}))):Q.push(this.cachedGoogleFonts[ra]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+ra+'")}\n')})(E[ba].name,E[ba].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),
-Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?
-Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia,Aa,La,Da,Sa){try{ba=null!=ba?ba:!0;ea=null!=ea?ea:
-!0;xa=null!=xa?xa:this.graph;Ca=null!=Ca?Ca:0;var Ra=ta?null:xa.background;Ra==mxConstants.NONE&&(Ra=null);null==Ra&&(Ra=Y);null==Ra&&0==ta&&(Ra=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(xa.getSvg(null,null,Ca,Ia,null,ea,null,null,null,la,null,La,Da,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(Za,0,0);q(L,Ta)},0):(U.drawImage(Za,0,0),q(L,Ta))},
-L=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),V=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=E&&(ra=ba?Math.min(1,Math.min(3*E/(4*V),E/O)):E/O);ra=this.getMaxCanvasScale(O,V,ra);O=Math.ceil(ra*O);V=Math.ceil(ra*V);L.setAttribute("width",O);L.setAttribute("height",V);var U=L.getContext("2d");null!=Ra&&(U.beginPath(),U.rect(0,0,O,V),U.fillStyle=Ra,U.fill());1!=ra&&U.scale(ra,ra);if(Aa){var ha=xa.view,ma=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));
-ha.scale=ma;wa="data:image/svg+xml;base64,"+wa;var sa=xa.gridSize*ha.gridSteps*ra,ya=xa.getGraphBounds(),Ha=ha.translate.x*ma,Qa=ha.translate.y*ma,ua=Ha+(ya.x-Ha)/ma-Ca,za=Qa+(ya.y-Qa)/ma-Ca,Fa=new Image;Fa.onload=function(){try{for(var Ba=-Math.round(sa-mxUtils.mod((Ha-ua)*ra,sa)),Ea=-Math.round(sa-mxUtils.mod((Qa-za)*ra,sa));Ba<O;Ba+=sa)for(var Oa=Ea;Oa<V;Oa+=sa)U.drawImage(Fa,Ba/ra,Oa/ra);z()}catch(Pa){null!=R&&R(Pa)}};Fa.onerror=function(Ba){null!=R&&R(Ba)};Fa.src=wa}else z()}catch(Ba){null!=
-R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};la&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),Q,pa)}catch(Ta){null!=R&&R(Ta)}};
-Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function ba(pa,xa){var Ca=ta;ta+=xa;return pa.substring(Ca,ta)}function ea(pa){pa=ba(pa,4);return pa.charCodeAt(3)+
-(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ba(q,4),"IHDR"!=ba(q,4))null!=R&&R();else{ba(q,17);R=q.substring(0,ta);do{var la=ea(q);if("IDAT"==ba(q,4)){R=q.substring(0,ta-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),
-Q=ra(Q)+ra(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=ra(Q.length)+E+Q+ra(Y^4294967295);R+=q.substring(ta-8,q.length);break}R+=q.substring(ta-8,ta-4+la);ba(q,la);ba(q,4)}while(la);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(q,E){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});
-if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
-null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ba=new ChangePageSetup(E);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible=
-R;Q.model.execute(ba)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;
-if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(ea){E.editor.setAutosave(ea);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(ea){this.listener=function(){ea(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&
-"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){E.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var ba=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position=
-"relative";ba.style.marginLeft="6px";ba.style.top="2px";R.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,E,Q){if(null!=E){var Y=function(ba){if(null!=ba)if(Q)for(var ea=0;ea<ba.length;ea++)E[ba[ea].name]=ba[ea];else for(var ra in E){var ta=!1;for(ea=0;ea<ba.length;ea++)if(ba[ea].name==ra&&ba[ea].type==E[ra].type){ta=!0;break}ta||
-delete E[ra]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(ba){}}};var y=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E={},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<
-Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(U,ha,ma,wa){xa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ma.index){for(var Ha=[],Qa=ma.parentRow.nextSibling;Qa&&
-Qa.getAttribute("data-pName")==U;)Ha.push(Qa.getAttribute("data-pValue")),Qa=Qa.nextSibling;ma.index<Ha.length?null!=wa?Ha.splice(wa,1):Ha[ma.index]=ha:Ha.push(ha);null!=ma.size&&Ha.length>ma.size&&(Ha=Ha.slice(0,ma.size));ha=Ha.join(",");null!=ma.countProperty&&(xa.setCellStyles(ma.countProperty,Ha.length,xa.getSelectionCells()),sa.push(ma.countProperty),ya.push(Ha.length))}xa.setCellStyles(U,ha,xa.getSelectionCells());sa.push(U);ya.push(ha);if(null!=ma.dependentProps)for(U=0;U<ma.dependentProps.length;U++){var ua=
-ma.dependentPropsDefVal[U],za=ma.dependentPropsVals[U];if(za.length>ha)za=za.slice(0,ha);else for(var Fa=za.length;Fa<ha;Fa++)za.push(ua);za=za.join(",");xa.setCellStyles(ma.dependentProps[U],za,xa.getSelectionCells());sa.push(ma.dependentProps[U]);ya.push(za)}if("function"==typeof ma.onChange)ma.onChange(xa,ha);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",xa.getSelectionCells()))}finally{xa.getModel().endUpdate()}}function R(U,ha,ma){var wa=mxUtils.getOffset(q,
-!0),sa=mxUtils.getOffset(U,!0);ha.style.position="absolute";ha.style.left=sa.x-wa.x+"px";ha.style.top=sa.y-wa.y+"px";ha.style.width=U.offsetWidth+"px";ha.style.height=U.offsetHeight-(ma?4:0)+"px";ha.style.zIndex=5}function ba(U,ha,ma){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(ha,
-function(ya){wa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;Y(U,ya,ma)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,ha,ma,wa,sa,ya,Ha){null!=ha&&(ha=ha.split(","),Ca.push({name:U,values:ha,type:ma,defVal:wa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Ha}));btn=mxUtils.button("+",mxUtils.bind(pa,function(Qa){for(var ua=ya,za=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")==
-U)ua=ua.nextSibling,za++;else break;var Fa={type:ma,parentRow:ya,index:za,isDeletable:!0,defVal:wa,countProperty:sa};za=la(U,"",Fa,0==za%2,Ha);Y(U,wa,Fa);ua.parentNode.insertBefore(za,ua.nextSibling);mxEvent.consume(Qa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(U,ha,ma,wa,sa,ya,Ha){if(0<sa){var Qa=Array(sa);ha=null!=ha?ha.split(","):[];for(var ua=0;ua<sa;ua++)Qa[ua]=null!=ha[ua]?ha[ua]:null!=wa?wa:"";Ca.push({name:U,values:Qa,type:ma,defVal:wa,
-parentRow:ya,flipBkg:Ha,size:sa})}return document.createElement("div")}function ta(U,ha,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){Y(U,wa.checked?"1":"0",ma)});return wa}function la(U,ha,ma,wa,sa){var ya=ma.dispName,Ha=ma.type,Qa=document.createElement("tr");Qa.className="gePropRow"+(sa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Qa.setAttribute("data-pName",U);Qa.setAttribute("data-pValue",ha);wa=!1;null!=ma.index&&
-(Qa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);wa&&(ua.style.textAlign="right");Qa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Ha)ua.appendChild(ba(U,ha,ma));else if("bool"==Ha||"boolean"==Ha)ua.appendChild(ta(U,ha,ma));else if("enum"==Ha){var za=ma.enumList;for(sa=0;sa<za.length;sa++)if(ya=
-za[sa],ya.val==ha){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Fa=document.createElement("select");R(ua,Fa);for(var Ba=0;Ba<za.length;Ba++){var Ea=za[Ba],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Oa,mxResources.get(Ea.dispName,null,Ea.dispName));Fa.appendChild(Oa)}Fa.value=ha;q.appendChild(Fa);mxEvent.addListener(Fa,"change",function(){var Pa=mxUtils.htmlEntities(Fa.value);
-Y(U,Pa,ma)});Fa.focus();mxEvent.addListener(Fa,"blur",function(){q.removeChild(Fa)})}))}else"dynamicArr"==Ha?ua.appendChild(ea(U,ha,ma.subType,ma.subDefVal,ma.countProperty,Qa,sa)):"staticArr"==Ha?ua.appendChild(ra(U,ha,ma.subType,ma.subDefVal,ma.size,Qa,sa)):"readOnly"==Ha?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ha,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(ua,
-"click",mxUtils.bind(pa,function(){function Fa(){var Ea=Ba.value;Ea=0==Ea.length&&"string"!=Ha?0:Ea;ma.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ha="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=ma.min&&Ea<ma.min?Ea=ma.min:null!=ma.max&&Ea>ma.max&&(Ea=ma.max);Ea=encodeURIComponent(("int"==Ha?parseInt(Ea):Ea)+"");Y(U,Ea,ma)}var Ba=document.createElement("input");R(ua,Ba,!0);Ba.value=decodeURIComponent(ha);Ba.className="gePropEditor";"int"!=Ha&&"float"!=Ha||ma.allowAuto||
-(Ba.type="number",Ba.step="int"==Ha?"1":"any",null!=ma.min&&(Ba.min=parseFloat(ma.min)),null!=ma.max&&(Ba.max=parseFloat(ma.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ea){13==Ea.keyCode&&Fa()});Ba.focus();mxEvent.addListener(Ba,"blur",function(){Fa()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Fa){Y(U,"",ma,ma.index);mxEvent.consume(Fa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa));
-Qa.appendChild(ua);return Qa}var pa=this,xa=this.editorUi.editor.graph,Ca=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";La.appendChild(Da);
-mxUtils.write(La,mxResources.get("property"));Aa.style.cursor="pointer";var Sa=function(){var U=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ha="none";for(var ma=q.childNodes.length-1;0<=ma;ma--)try{var wa=q.childNodes[ma],sa=wa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(wa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ha="";for(ma=0;ma<U.length;ma++)U[ma].style.display=ha};mxEvent.addListener(Aa,
-"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Sa()});Aa.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");Aa.appendChild(La);Ia.appendChild(Aa);var Ra=!1,Ta=!1;Aa=null;1==Q.vertices.length&&0==Q.edges.length?Aa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(Aa=Q.edges[0].id);null!=Aa&&Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(Aa=
-E[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(Q,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(Q.style[Aa.sizeProperty]||E[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var z=Aa.dependentProps,L=[],O=[];for(La=0;La<z.length;La++){var V=Q.style[z[La]];O.push(E[z[La]].subDefVal);L.push(null!=V?V.split(","):[])}Aa.dependentPropsDefVal=
-O;Aa.dependentPropsVals=L}Ia.appendChild(la(Za,Na,Aa,Ra,Ta));Ra=!Ra}}for(La=0;La<Ca.length;La++)for(Aa=Ca[La],E=Aa.parentRow,Q=0;Q<Aa.values.length;Q++)Za=la(Aa.name,Aa.values[Q],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:Q,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==Q%2,Aa.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ia);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(Aa){mxEvent.addListener(Aa,
-"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var la=document.createElement("div");la.style.display="inline-block";la.style.width="6px";la.style.height="6px";la.style.marginLeft="4px";la.style.marginRight="3px";la.style.borderRadius="3px";la.style.cursor="pointer";la.style.background="transparent";la.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(Aa){mxEvent.addListener(la,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(la);ea.appendChild(la)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,xa(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),xa=mxUtils.bind(this,function(Aa){var La=mxUtils.bind(this,
-function(Sa){var Ra=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,L=0;L<z.length;L++){for(var O=Y.getModel().getStyle(z[L]),V=0;V<ba.length;V++)O=mxUtils.removeStylename(O,ba[V]);var U=Y.getModel().isVertex(z[L])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(U,
-mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[L])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,
-Sa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[L])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,
-null))));Y.getModel().setStyle(z[L],O)}}finally{Y.getModel().endUpdate()}}));Ra.className="geStyleButton";Ra.style.width="36px";Ra.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ra.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Ra.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+
-"', GradientType=0)":Ra.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Ra.style.background="url('"+Dialog.prototype.noColorImage+"')":Ra.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ra.style.border=Sa.stroke==mxConstants.NONE?
-Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Ra.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-"#000000");Ra.style.backgroundColor=Ta;Ra.style.border="1px solid "+Za}Ra.style.borderRadius="0";R.appendChild(Ra)});R.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(R),La(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"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(Ca,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Ca),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Ca);E(Ia);xa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
+Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
+function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
+Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
+3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
+63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
+ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
+retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
+R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
+[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
+"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
+function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
+(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
+"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
+"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
+this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
+ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
+function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
+Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
+sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
+E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
+this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
+DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
+destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
+function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
+{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
+defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
+dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
+type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
+ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
+ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
+"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
+Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
+ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
+Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
+document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
+ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
+ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
+"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
+document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
+1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
+!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
+parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
+index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
+R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){var ja=
+document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
+null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
+0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
+"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
+"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
+null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
@@ -3293,53 +3294,53 @@ E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createE
Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ba=this.graph.getCellStyle(R);if(null!=ba&&"rack"==ba.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ba.marginLeft||0;ea.marginRight=ba.marginRight||0;ea.marginTop=ba.marginTop||
-0;ea.marginBottom=ba.marginBottom||0;ea.allowGaps=ba.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,ba,ea,ra,ta,la,
-pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var Aa=ea.getSelectionCells(),La=[],Da=0;Da<Aa.length;Da++)ea.isCellVisible(Aa[Da])&&La.push(Aa[Da]);ea.setSelectionCells(La)}function R(Aa){ea.setHiddenTags(Aa?[]:ra.slice());Y();ea.refresh()}function ba(Aa,
-La){la.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Sa=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Ra=0;Ra<Aa.length;Ra++)(function(Ta){var Za=0>mxUtils.indexOf(ea.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src",
-Za?Editor.visibleImage:Editor.hiddenImage);L.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(L,Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(V){mxEvent.isShiftDown(V)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ta)):(ea.toggleHiddenTag(Ta),Y(),ea.refresh());mxEvent.consume(V)});Na.appendChild(z);z=document.createElement("td");
-z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(V){if(mxEvent.isShiftDown(V)){R(!0);var U=ea.getCellsForTags([Ta],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(Za&&
-0<ea.hiddenTags.length)R(!0);else{U=ra.slice();var ha=mxUtils.indexOf(U,Ta);U.splice(ha,1);ea.setHiddenTags(U);Y();ea.refresh()}mxEvent.consume(V)});Na.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==La){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(L,
-Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(V){var U=mxUtils.indexOf(ra,Ta);0<=U&&ra.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ta]);ea.refresh();mxEvent.consume(V)});z.appendChild(L)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-Ta);O.checked=O.defaultChecked;O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(V){O.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ta]):ea.removeTagsForCells(ea.getSelectionCells(),[Ta]);mxEvent.consume(V)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(Aa[Ra]);Da.appendChild(Sa);la.appendChild(Da)}}var ea=this,ra=ea.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect=
-"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.borderRadius="4px";la.style.userSelect="none";la.style.overflow="auto";la.style.position="absolute";la.style.left="10px";la.style.right="10px";la.style.top="10px";la.style.border=ea.isEnabled()?"1px solid #808080":"none";la.style.bottom=ea.isEnabled()?"48px":"10px";ta.appendChild(la);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ea.setHiddenTags([]);
-mxEvent.isShiftDown(Aa)||(ra=ea.hiddenTags.slice());Y();ea.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var xa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(ra,function(Aa){ra=Aa;Ca()})});xa.setAttribute("title",mxResources.get("add"));xa.className="geBtn";xa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){ra=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(Aa,La){if(q()){Aa=ea.getAllTags();for(La=0;La<
-Aa.length;La++)0>mxUtils.indexOf(ra,Aa[La])&&ra.push(Aa[La]);ra.sort();ea.isSelectionEmpty()?ba(ra):ba(ra,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px";
-Ia.style.left="10px";ea.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(xa),ta.appendChild(Ia));return{div:ta,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,
-E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var W=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return W.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=q)for(var E in q)this.globalVars[E]=q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia){var Aa=null,La=null,Da=null;xa||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,La=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=Z.apply(this,arguments),Ra=this.getCustomFonts();if(pa&&0<Ra.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",L=0;L<Ra.length;L++){var O=
-Ra[L].name,V=Ra[L].url;Graph.isCssFontUrl(V)?Na+="@import url("+V+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+V+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=La,this.stylesheet=Aa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(q){N.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this,
-arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
+Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
+Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
+za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
+Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
+z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
+else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
+"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
+O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
+"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
+(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
+za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
+(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
+q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
+q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
+Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
+arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var S=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){S.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var fa=Graph.prototype.refresh;Graph.prototype.refresh=function(){fa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ia=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ia.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,ba=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&ta()}),ta=mxUtils.bind(this,function(){if(R<q.length){var la=this.stoppingCustomActions,pa=q[R++],xa=[];if(null!=pa.open)if(ea(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=pa.wait?parseInt(pa.wait):1E3),ea());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,la?0:pa.fadeIn.delay));null!=pa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,la?0:pa.fadeOut.delay));null!=pa.wipeIn&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn,
-!0),!0)));null!=pa.wipeOut&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ca=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=pa.hide&&(ba(),Ca=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=pa.toggleStyle&&
-null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ca=[];null!=pa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(pa.select),this.setSelectionCells(Ca));null!=pa.highlight&&(Ca=this.getCellsForAction(pa.highlight),this.highlightCells(Ca,
-pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ca=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=pa.tags){Ca=[];null!=pa.tags.hidden&&(Ca=Ca.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ca,Ia[Aa])&&Ca.push(Ia[Aa]);this.setHiddenTags(Ca);this.refresh()}0<
-xa.length&&(Y++,this.executeAnimations(xa,ra,la?1:pa.steps,la?0:pa.delay));0==Y?ta():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=E&&E()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),
-ba=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(q,Q)),ba=!0);ba&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var ba=q[E[Q][R]];null!=ba?""!=ba&&Y.push(ba):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=
-q.excludeCells){for(var Q=[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(ba){return ba!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
+Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
+function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
+!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
+sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
+sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
+(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
+!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
+E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
+[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var ba=0,ea={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ea[q[ra]]=!0,ba++);for(ra=0;ra<E.length;ra++)if(Q&&this.model.getParent(E[ra])==this.model.root||this.model.isVertex(E[ra])||this.model.isEdge(E[ra])){var ta=this.getTagsForCell(E[ra]),la=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa=
-la=0;pa<ta.length&&la<ba;pa++)null!=ea[ta[pa]]&&la++;la=la==ba}la&&(1!=Y||this.isCellVisible(E[ra]))&&R.push(E[ra])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var ba={},ea=0;ea<R.length;ea++)if(null==E||null!=E[R[ea]])ba[R[ea]]=!0,Q.push(R[ea]);E=ba}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var ba=0;ba<R.length;ba++)null==Q[R[ba]]&&(Q[R[ba]]=!0,E.push(R[ba]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),ba=
-!1,ea=0;ea<E.length;ea++){var ra=mxUtils.trim(E[ea]);""!=ra&&0>mxUtils.indexOf(R,ra)&&(Y=0<Y.length?Y+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),ba=!1,ea=0;ea<E.length;ea++){var ra=mxUtils.indexOf(R,E[ea]);0<=ra&&(R.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[Q],
+mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
+ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
+Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
+0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var ba=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ba=new mxCellHighlight(this,E,R,!1),null!=Y&&(ba.opacity=Y),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()},
-1200)},Q));return ba};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,ba=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ba.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ba.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ba.appendChild(ea);
-ea=q.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=ea[0];R.appendChild(ba);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
+1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
+da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
+"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
+q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
+6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
@@ -3352,160 +3353,160 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,ba,ea,ra,ta,la){if(null!=Q&&null==mxMarker.markers[Q]){var pa=this.getPackageForType(Q);null!=pa&&mxStencilRegistry.getStencil(pa)}return aa.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,ba){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Ca.value=
-Math.max(1,Math.min(ra,Math.max(parseInt(Ca.value),parseInt(xa.value))));xa.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ca.value),parseInt(xa.value))))}function Y(ya){function Ha($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=wa.get(),hb=
-1/$a.pageScale,tb=Sa.checked;if(tb){hb=parseInt(ha.value);var Cb=parseInt(ma.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(Qa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Qa);kb.height=Math.ceil(kb.height*Qa);hb*=Qa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,
-hb,kb,0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ia.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),
-ob.writeln(q.editor.fontCss),ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;
-ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,
-null,ib,!0);R.enableFlowAnimation=kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Qa=parseInt(sa.value)/100;isNaN(Qa)&&(Qa=1,sa.value="100 %");Qa*=.75;var ua=null,za=R.shapeForegroundColor,Fa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(ua=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=xa.value,Ea=Ca.value,Oa=!la.checked,Pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,la.checked,Ba,Ea,Sa.checked,ha.value,ma.value,parseInt(Da.value)/100,parseInt(sa.value)/100,wa.get());else{Oa&&(Oa=Ia.checked||Ba==ta&&Ea==ta);if(!Oa&&null!=q.pages&&q.pages.length){var bb=0;Oa=q.pages.length-1;la.checked||(bb=parseInt(Ba)-1,
-Oa=parseInt(Ea)-1);for(var eb=bb;eb<=Oa;eb++){var db=q.pages[eb];Ba=db==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ea=!0;bb=!1;var ub=null,fb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ea=db.viewState.pageVisible,bb=db.viewState.mathEnabled,ub=db.viewState.background,fb=db.viewState.backgroundImage,Ba.extFonts=db.viewState.extFonts);null!=
-fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,db));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ea;Ba.mathEnabled=bb;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*
-gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=function($a){return"page"==$a?db.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(db);Ba.model.setRoot(db.root)}Pa=Ha(Ba,Pa,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Pa=Ha(R);null==Pa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Pa.mathEnabled&&(Oa=Pa.wnd.document,
-ya&&(Pa.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Pa.closeDocument(),!Pa.mathEnabled&&ya&&PrintDialog.printPreview(Pa));null!=ua&&(R.shapeForegroundColor=za,R.shapeBackgroundColor=Fa,R.stylesheet=ua,R.refresh())}}var R=q.editor.graph,ba=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,E||mxResources.get("print"));
-ba.appendChild(ea);var ra=1,ta=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var la=document.createElement("input");la.style.cssText="margin-right:8px;margin-bottom:8px;";la.setAttribute("value","all");la.setAttribute("type","radio");la.setAttribute("name","pages-printdialog");ea.appendChild(la);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));ea.appendChild(E);mxUtils.br(ea);var pa=
-la.cloneNode(!0);la.setAttribute("checked","checked");pa.setAttribute("value","range");ea.appendChild(pa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");ea.appendChild(E);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","1");xa.setAttribute("type","number");xa.setAttribute("min","1");xa.style.width="50px";ea.appendChild(xa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));ea.appendChild(E);
-var Ca=xa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(xa,"focus",function(){pa.checked=!0});mxEvent.addListener(Ca,"focus",function(){pa.checked=!0});mxEvent.addListener(xa,"change",Q);mxEvent.addListener(Ca,"change",Q);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){ta=E+1;xa.value=ta;Ca.value=ta;break}xa.setAttribute("max",ra);Ca.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ea),pa.checked=!0):pa.checked=
-!0;mxUtils.br(ea);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";R.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ea.appendChild(Ia));E=document.createElement("span");mxUtils.write(E,
-mxResources.get("selectionOnly"));Ia.parentNode.appendChild(E);1==ra&&mxUtils.br(Ia.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");Aa.appendChild(La);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));Aa.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width=
-"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){La.checked=!0});ba.appendChild(Aa);ea=ea.cloneNode(!1);var Sa=La.cloneNode(!0);Sa.setAttribute("value","fit");La.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);ea.appendChild(E);Aa=document.createElement("table");Aa.style.display="inline-block";var Ra=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),
-Na=document.createElement("td"),z=Na.cloneNode(!0),L=Na.cloneNode(!0),O=Na.cloneNode(!0),V=Na.cloneNode(!0),U=Na.cloneNode(!0);Na.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));
-L.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ma=ha.cloneNode(!0);V.appendChild(ma);mxEvent.addListener(ha,"focus",function(){Sa.checked=!0});mxEvent.addListener(ma,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));U.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(L);Za.appendChild(O);Za.appendChild(V);Za.appendChild(U);Ra.appendChild(Ta);Ra.appendChild(Za);Aa.appendChild(Ra);ea.appendChild(Aa);
-ba.appendChild(ea);ea=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));ea.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));ea.appendChild(E);var sa=
-document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ea.appendChild(sa);ba.appendChild(ea);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&E.appendChild(ea);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-Aa.className="geBtn",E.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();Y(!1)}),Aa.className="geBtn",E.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});Aa.className="geBtn gePrimaryBtn";E.appendChild(Aa);q.editor.cancelFirst||E.appendChild(ea);ba.appendChild(E);this.container=ba};var ja=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
-function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else ja.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 ca=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ca.getContext("2d").drawImage(ka,
-0,0);var q=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
+Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
+tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
+0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
+ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
+Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
+kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
+ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
+R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
+q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
+cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
+function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
+"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
+da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
+!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
+"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
+Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
+Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
+"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
+function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
+"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
+da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
+function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&
+(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
+ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,y)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
+encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(u){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=y.spin;y.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
-G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var W=function(){};this.active&&(W=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return W}),G=!0);return G};var H=y.stop;y.stop=function(){H.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
+H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var H=y.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&y.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&y.movePage(H,0)};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,
-H+1)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,y.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&y.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&y.selectPage(y.pages[0])};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.selectNextPage(!0)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),u=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var u=this.updatePageRoot(new DiagramPage(x[y]));null==u.getName()&&
-u.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,u,0==y?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,u,H,J,D,G,W){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;D=null!=D?D:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else T=Z=x;if(null==d)return"";var N=d;if("mxfile"!=N.nodeName.toLowerCase()){if(W){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
-qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));N=Graph.compress(qa);if(Graph.decompress(N)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,N)}N=d.ownerDocument.createElement("mxfile");N.appendChild(qa)}G?(N=N.cloneNode(!0),N.removeAttribute("modified"),N.removeAttribute("host"),N.removeAttribute("agent"),N.removeAttribute("etag"),N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),
-N.removeAttribute("type")):(N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),N.removeAttribute("pages"),N.removeAttribute("type"),mxClient.IS_CHROMEAPP?N.setAttribute("host","Chrome"):EditorUi.isElectronApp?N.setAttribute("host","Electron"):N.setAttribute("host",window.location.hostname),N.setAttribute("modified",(new Date).toISOString()),N.setAttribute("agent",navigator.appVersion),N.setAttribute("version",EditorUi.VERSION),N.setAttribute("etag",Editor.guid()),
-d=null!=g?g.getMode():this.mode,null!=d&&N.setAttribute("type",d),1<N.getElementsByTagName("diagram").length&&null!=this.pages&&N.setAttribute("pages",this.pages.length));W=W?mxUtils.getPrettyXml(N):mxUtils.getXml(N);if(!u&&!y&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))W=this.getHtml2(mxUtils.getXml(N),f,null!=g?g.getTitle():null,Z,T);else if(u||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),W=this.getEmbeddedSvg(W,f,
-x,null,J,D,T);return W};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D=
-D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));y.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
-J,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(J));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
-null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
+G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
+x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
+t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
+la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
+fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
+f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
+I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
+D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&
+null!=t.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(u){var H=y.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style=
-"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete y.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
+"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,u,H,
-J,D,G,W){y=null!=y?y:!0;u=null!=u?u:!1;var T=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Z=null!=T.themes&&"darkTheme"==T.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var N=T.getGlobalVariable;T=this.createTemporaryGraph(Z?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=qa.viewState&&null!=qa.viewState&&T.setBackgroundImage(qa.viewState.backgroundImage);T.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:N.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(y,u,G,W);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,T,D,window.location.href,d,f,g,x,y,J,G);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
+D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,u,H,J,D,G,W,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!y),N=Z+("xml"==d||"pdf"==d&&W?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(N,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Z),this.saveData(N,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)N=Z+".png";else if("jpeg"==d)N=Z+".jpg";else if("remoteSvg"==d){N=Z+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var S=this.editor.graph,fa=S.getGraphBounds();var ia=Math.ceil(fa.width*J/S.view.scale+2*oa);var M=Math.ceil(fa.height*J/S.view.scale+2*oa)}}this.saveRequest(N,d,mxUtils.bind(this,function(ka,q){try{var E=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var Q=this.createDownloadRequest(ka,d,x,q,H,y,J,D,G,W,
-T,ia,M);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,X=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ja=this.editor.graph.background;if(H||ja==mxConstants.NONE)ja=null;var ca=this.editor.graph.getSvg(ja,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ca);
-this.editor.convertImages(ca,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();X(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else N=Z+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();X(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){var N=this.editor.graph,qa=N.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var oa="",S="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=W?S="&from="+W.from+"&to="+W.to:0==u&&(S="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=N.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=u&&u!=mxConstants.NONE||(u=
-"#ffffff"):u=mxConstants.NONE;y={globalVars:N.getExportVariables()};D&&(y.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+S+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+J:"")+
-(T&&isFinite(T)?"&w="+T:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
-"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Z){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,W=mxUtils.bind(this,function(){var Z=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){Z===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),T()):
-this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(W,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();W()}));T();W()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){y(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(M){var aa=new mxCellOverlay(M.image||y.warningImage,M.tooltip,M.align,M.valign,M.offset);aa.addListener(mxEvent.CLICK,function(X,ja){x.alert(M.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,u=y.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id"));
-if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var W=G.attributes,T=0;T<W.length;T++)y.setAttributeForCell(J,W[T].nodeName,0<W[T].nodeValue.length?W[T].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+J.id+": "+M)}try{var Z=d.getAttribute("style");null!=Z&&y.model.setStyle(J,Z)}catch(M){null!=window.console&&console.log("Error in style for "+
-J.id+": "+M)}try{var N=d.getAttribute("icon");if(null!=N){var qa=0<N.length?JSON.parse(N):null;null!=qa&&qa.append||y.removeCellOverlays(J);null!=qa&&y.addCellOverlay(J,f(qa))}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var S=y.getCellGeometry(J);if(null!=S){S=S.clone();for(key in oa){var fa=parseFloat(oa[key]);"dx"==key?S.x+=fa:"dy"==key?S.y+=fa:"dw"==key?S.width+=fa:"dh"==key?S.height+=fa:S[key]=
-parseFloat(oa[key])}y.model.setGeometry(J,S)}}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var u=
-y.getDate(),H=y.getHours(),J=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
+function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
+d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
+D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
+this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
+null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
+(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
+D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
+"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
+T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
+EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
+if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
+D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
+oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
+0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
+y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+u})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(J){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(J){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H=
-d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=y.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,W,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?T&&"mxCell"==D.nodeName&&"previous"==
-G?null:W:Math.round(W)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var u=d.attributes[y].name,H=null!=f?f(d,u,d.attributes[y].value,!0):d.attributes[y].value;null!=H&&(x^=this.hashValue(u,
-f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
+d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
+H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
+f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,M){0==ia.length&&d.isEditable()?
-(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),M.appendChild(u)):this.addLibraryEntries(ia,M)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(y);var D=J.parentNode.previousSibling;x=D.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var W=document.createElement("img");W.className="geAdaptiveAsset";W.setAttribute("src",Editor.crossImage);W.setAttribute("title",mxResources.get("close"));W.setAttribute("valign","absmiddle");W.setAttribute("border",
-"0");W.style.position="relative";W.style.top="2px";W.style.width="14px";W.style.cursor="pointer";W.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(W),mxEvent.addListener(W,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var M=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(ia)}}));if(d.isEditable()){var Z=
-this.editor.graph,N=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=W.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",G.insertBefore(N,G.firstChild),D.style.paddingRight=18*G.childNodes.length+
-"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&(N.parentNode.removeChild(N),D.style.paddingRight=18*G.childNodes.length+"px")})):null==T&&(T=W.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),G.insertBefore(T,G.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(D.style.paddingRight=
-18*G.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(M)})),D.style.paddingRight=18*G.childNodes.length+"px")}),S=mxUtils.bind(this,function(ia,M,aa,X){ia=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(ia)));for(var ja=0;ja<ia.length;ja++){var ca=Z.getCellGeometry(ia[ja]);null!=ca&&ca.translate(-M.x,-M.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,M.width,M.height,X||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))),
-w:M.width,h:M.height};null!=X&&(ia.title=X);f.push(ia);oa(aa);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),fa=mxUtils.bind(this,function(ia){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(ia),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Z.getSelectionCells(),aa=Z.view.getBounds(M),X=Z.view.scale;aa.x/=X;aa.y/=X;aa.width/=X;aa.height/=X;aa.x-=
-Z.view.translate.x;aa.y-=Z.view.translate.y;S(M,aa)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&
-null!=Z.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,fa(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,aa,X,ja,ca,ka,q,E,Q){if(null!=M&&"image/"==aa.substring(0,
-6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,ca,ka),M)],M[0].vertex=!0,S(M,new mxRectangle(0,0,ca,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var Y=!1,R=mxUtils.bind(this,function(ba,ea){null!=ba&&"application/pdf"==ea&&(ea=Editor.extractGraphModelFromPdf(ba),null!=
-ea&&0<ea.length&&(ba=ea));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();Y=!0}catch(xa){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var la=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(la);S(la,new mxRectangle(0,
-0,pa.width,pa.height),ia)}Y=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(ba){R(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?R(ba.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(M,aa)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor=
-"";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));W=W.cloneNode(!1);W.setAttribute("src",Editor.editImage);W.setAttribute("title",mxResources.get("edit"));G.insertBefore(W,G.firstChild);mxEvent.addListener(W,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=W.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",fa);this.isOffline()||
-".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(d,f){for(var g=0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=
-function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
+(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
+null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border",
+"0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
+this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
+18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
+w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
+M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
+null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
+(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
+6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
+da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
+0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
+this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
+"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
+d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,u,H){d=new ImageDialog(this,d,f,g,x,y,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
+new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
+400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(N){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),W=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),W=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code?
-null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=u?u:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),W,mxResources.get("changeUser"),mxUtils.bind(this,function(){function N(){fa.innerText="";for(var ia=
-0;ia<qa.length;ia++){var M=document.createElement("option");mxUtils.write(M,qa[ia].displayName);M.value=ia;fa.appendChild(M);M=document.createElement("option");M.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(M,"<"+qa[ia].email+">");M.setAttribute("disabled","disabled");fa.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=qa.length;fa.appendChild(M)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),S=document.createElement("span");
-S.style.marginTop="6px";mxUtils.write(S,mxResources.get("changeUser")+": ");oa.appendChild(S);var fa=document.createElement("select");fa.style.width="200px";N();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ia=fa.value,M=qa.length!=ia;M&&this.drive.setUser(qa[ia]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(qa=this.drive.getUsersList(),N())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));oa.appendChild(fa);oa=new CustomDialog(this,oa,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):
-D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Z=u=null;null!=D&&null!=D.helpLink?(u=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f,
-H,G,g,W,null,null,u,Z,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,y,null,null,null,null,
-J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.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(u.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");u.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";u.appendChild(y);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");
-H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J);u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(W){mxEvent.consume(W);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(W){var T=mxEvent.getSource(W);T!=H&&T!=J?(null!=g&&g(),D(),mxEvent.consume(W)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,f,g,y);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=
-document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10):!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},
-2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);y[u]=new Uint8Array(D)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(u);isLocalStorage&&y++;var D=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,W){try{if("_blank"==W)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else W==App.MODE_DEVICE||"download"==W?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(W,mxUtils.bind(this,function(N){try{this.exportFile(d,G,g,x,W,N)}catch(qa){this.handleError(qa)}}))}catch(N){this.handleError(N)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<y,D,d,g,x);u=this.isServices(y)?y>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
+d.message)try{G?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
+0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
+ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
+function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
+I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
+G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
+D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
+"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
+Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
+G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
+"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
+0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
+9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
+(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
+document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
+2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
+t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
@@ -3513,173 +3514,200 @@ this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsCom
4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=u.zIndex;var H=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});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight=
-"140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,y,f,H)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;
-var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,W){if("_blank"==W||null!=G&&0<G.length){var T=g("_blank"==W?null:G,W==App.MODE_DEVICE||"download"==W||null==W||"_blank"==W?"0":"1");null!=T&&(W==App.MODE_DEVICE||"download"==W||"_blank"==W?T.simulate(document,"_blank"):this.pickFolder(W,mxUtils.bind(this,function(Z){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(N){this.spinner.stop();this.handleError(N)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,y);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container,
-420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,u){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==
-mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=W?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var S=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,W,T);x&&this.editor.graph.addSvgShadow(S);var fa=this.getBaseFilename()+(y?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var ia=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));N(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var M=mxUtils.bind(this,function(aa){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-ia,this.thumbImageCache)):ia(aa)});Z?this.embedFonts(S,M):(this.editor.addFontCss(S),M(S))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,u,H){return this.addCheckbox(d,g,x,y,u,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&&
-(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),y||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
-var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==
-u.value){var H=new FilenameDialog(this,y,mxResources.get("ok"),function(J){null!=J?y=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+
+function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
+"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
+var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
+420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
+mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
+na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
+g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
+var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
+t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
+getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),
-"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&H.push("edit="+encodeURIComponent(y)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,y,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,y,u,D);d=this.getCurrentFile();
-f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,u,H,J,D,G,W,T){this.getBasenames();var Z={};""!=y&&y!=mxConstants.NONE&&(Z.highlight=y);"auto"!==x&&(Z.target=x);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];H&&(g.push("pages"),Z.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=W&&0<W.length&&(Z.edit=W);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,
-mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value",
-"copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D),
-mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");y.appendChild(H);var W=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");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%";y.appendChild(Z);var N=this.addCheckbox(y,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(y,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(y,mxResources.get("layers"),!0),S=this.addCheckbox(y,mxResources.get("tags"),!0),fa=this.addCheckbox(y,mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(y,fa);var M=ia.getEditInput();M.style.marginBottom="16px";H+=50;mxEvent.addListener(fa,"change",function(){fa.checked?
-M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&fa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(J.checked?g:null,T.checked,Z.value,W.getTarget(),W.getColor(),N.checked,qa.checked,oa.checked,S.checked,fa.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,
-f,g,x,y,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var W=this.getCurrentFile();d=0;if(null==W||W.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));G.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(W.getId())}));T.style.marginTop="12px";T.className="geBtn";G.appendChild(T);D.appendChild(G);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));G.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,
-300,80,!0,!1);X.init()}))}))}var Z=null,N=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",D.appendChild(Z),mxUtils.write(D,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
-"10px",N.value=x+"px",D.appendChild(N),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==W||W.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var S=this.addCheckbox(D,mxResources.get("lightbox"),!0,null,null,!u),fa=this.addEditButton(D,S),ia=fa.getEditInput();u&&(ia.style.marginLeft=S.style.marginLeft,S.style.display="none",d-=20);var M=this.addCheckbox(D,mxResources.get("layers"),!0);M.style.marginLeft=
-ia.style.marginLeft;M.style.marginTop="8px";var aa=this.addCheckbox(D,mxResources.get("tags"),!0);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?(M.removeAttribute("disabled"),ia.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&S.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});
-f=new CustomDialog(this,D,mxUtils.bind(this,function(){y(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,S.checked,fa.getLink(),M.checked,null!=Z?Z.value:null,null!=N?N.value:null,aa.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var u=document.createElement("div");
-u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";u.appendChild(H);if(y){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u,
-mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),W=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var T=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),
-H.background==mxConstants.NONE||null==H.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Z=parseInt(J.value)/100||1,N=parseInt(D.value)||0;g(!G.checked,null!=W?W.checked:!1,null!=T?T.checked:!1,Z,N)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";
-var W=this.editor.graph,T="jpeg"==J?220:300,Z=document.createElement("h3");mxUtils.write(Z,d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);mxUtils.write(G,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";G.appendChild(N);mxUtils.write(G,mxResources.get("borderWidth")+
-":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,W.isSelectionEmpty()),S=document.createElement("input");S.style.marginTop="16px";S.style.marginRight="8px";S.style.marginLeft="24px";S.setAttribute("disabled","disabled");S.setAttribute("type","checkbox");var fa=document.createElement("select");
-fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Z=0;Z<d.length;Z++)if(!W.isSelectionEmpty()||"selectionOnly"!=d[Z]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Z]));M.setAttribute("value",d[Z]);fa.appendChild(M);ia[d[Z]]=M}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),T+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(oa.checked=!0)})):u&&(G.appendChild(S),
-mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),T+=30,mxEvent.addListener(oa,"change",function(){oa.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}));W.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display="none",oa.nextSibling.nextSibling.style.display="none",T-=30):(fa.value="diagram",S.setAttribute("checked","checked"),S.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){fa.value=oa.checked?"selectionOnly":"diagram"}));var aa=
-this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(G,mxResources.get("dark"),!0),T+=26);var ja=this.addCheckbox(G,mxResources.get("shadow"),W.shadowVisible),ca=null;if("png"==J||"jpeg"==J)ca=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input");
-q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value",
-"embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(u);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==fa.value&&(fa.value="diagram"),ja.checked=!1,ja.setAttribute("disabled","disabled"),
-Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ja.removeAttribute("disabled"),ia.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(E),mxUtils.br(G),T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";
-Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));
-Y.style.margin="7px";Y.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(Q),G.appendChild(Y),mxUtils.br(G),mxUtils.br(G),T+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=N.value;y(N.value,aa.checked,!oa.checked,ja.checked,ka.checked,q.checked,qa.value,S.checked,!1,Q.value,null!=ca?ca.checked:null,null!=X?X.checked:null,fa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,
-340,T,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"),
-!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),W=this.addCheckbox(u,g),T=this.addCheckbox(u,mxResources.get("lightbox"),!0),Z=this.addEditButton(u,T),N=Z.getEditInput(),qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=N.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(qa&&oa.removeAttribute("disabled"),N.removeAttribute("disabled")):
-(oa.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&T.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,W.checked,T.checked,Z.getLink(),oa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,u,H,J){function D(N){var qa=" ",oa="";x&&(qa=
-" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=W?"&page="+W:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var S="";g&&(S=
-' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+N+'"'+S+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),W=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var qa=x?this.getFileData(!0):null;N=this.createImageDataUri(N,qa,"png");D(N)}),null,null,null,mxUtils.bind(this,function(N){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);
-else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?D("data:image/png;base64,"+Z.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,x,y,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var W=D[G].getAttribute("href");null!=W&&"#"==W.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&&J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var T=" ",Z="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(N){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=Z?' style="'+Z+'"':"")+T+"/>")}))}else Z="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),y=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),Z+="max-width:100%;max-height:"+y+"px;",J.removeAttribute("height")),""!=Z&&J.setAttribute("style",Z),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=
+mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
+G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
+"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
+f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
+"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,
+mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
+"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
+mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
+"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
+function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
+function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
+H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
+T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
+300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,mxResources.get("width")+":"),M=document.createElement("input"),M.setAttribute("type","text"),M.style.marginRight="16px",M.style.width="50px",M.style.marginLeft="6px",M.style.marginRight="16px",M.style.marginBottom="10px",M.value="100%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
+fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
+!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
+document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";
+t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
+x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
+var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
+"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
+"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
+"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
+"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
+G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
+mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
+"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
+T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
+Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
+null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
+"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(y?"&edit=_blank":
+"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
+function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(W){return"page"==W?G.getName():"pagenumber"==W?1:D.apply(this,
-arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(W){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=W.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(J));d(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(W){null!=f&&
-f(W)}),null,null,x,null,u.shadowVisible,null,u,y,null,null,null,"diagram",null)}catch(W){null!=f&&f(W)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){J=null!=J?J:!0;W=null!=W?W:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,W,null,null,u,null,null,null,f.shadowVisible||T,null,Z,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(u,null,null,0==W);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var N=mxUtils.bind(this,function(qa){qa=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=y&&y(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=y)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){N(oa)})):N(qa)}));else return N(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var N=this.editor.graph.isSelectionEmpty();g=null!=g?g:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-y?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,W)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,T,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,u,H){f=null!=f?f:0;g=null!=g?g:0;var J=
-[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var W=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=W&&"mxfile"==W.nodeName&&null!=this.pages){var T=W.getElementsByTagName("diagram");if(1==T.length&&!u){if(W=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=T[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,Z))}}else if(0<T.length){u=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),W=Editor.parseDiagramNode(T[0]),x=!1,N=1);for(;N<T.length;N++){var qa=T[N].getAttribute("id");T[N].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(T[N]));d[qa]=T[N].getAttribute("id");var S=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[S+1]));D.model.execute(new ChangePage(this,
-oa,oa,S,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=W&&"mxGraphModel"===W.nodeName){J=D.importGraphModel(W,f,g,x);if(null!=J)for(N=0;N<J.length;N++)this.updatePageLinksForCell(d,J[N]);var fa=D.parseBackgroundImage(W.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ia=new ChangePageSetup(this,null,fa);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(M){if(y)throw M;
-this.handleError(M)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)y=u[J].getAttribute("href"),null!=y&&(u[J].setAttribute("href",this.updatePageLink(d,y)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var u=x.actions[y];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
-G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(T){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var W=new XMLHttpRequest;W.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));W.responseType="blob";this.addRemoteServiceSecurityCheck(W);
-null!=y&&W.setRequestHeader("x-convert-custom",y);W.onreadystatechange=mxUtils.bind(this,function(){if(4==W.readyState)if(200<=W.status&&299>=W.status)try{var T=W.response;if("text/xml"==T.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(N){try{f(N.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(N){g(N)}else try{""==W.responseType||"text"==W.responseType?g({message:W.responseText}):(Z=new FileReader,
-Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(W.response))}catch(N){g({})}});W.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
+d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
+d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
+arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
+f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
+(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
+y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
+ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
+this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
+H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
+null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
+M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&u.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var H=0;H<y.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(y.svgThumbs[H]));null!=y.thumb&&u.push(y.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg");
-if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var W=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(W[2]);G=parseFloat(W[3])}catch(T){D=D||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+y(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+y(J.charCodeAt(i),0,0):r+y(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var W=new Image;W.onload=
-function(){try{var T=W.width,Z=W.height;if(0==T&&0==Z){var N=D.result,qa=N.indexOf(","),oa=decodeURIComponent(escape(atob(N.substring(qa+1)))),S=mxUtils.parseXml(oa).getElementsByTagName("svg");0<S.length&&(T=parseFloat(S[0].getAttribute("width")),Z=parseFloat(S[0].getAttribute("height")))}g(D.result,T,Z)}catch(fa){x(fa)}};W.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=null;x.getModel().beginUpdate();
-try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Z){4==
-Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,
-f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var W=this.importXml(G,f,g,u,!0,J);if(0<W.length)return W}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(oa,S,fa){D.setSelectionCell(D.insertVertex(null,null,
-"",D.snap(f),D.snap(g),S,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*N);Z=Math.round(Z.height*N);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Z=null;D.getModel().beginUpdate();try{Z=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Z),D.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,u,null,J))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{D=this.editor.graph;y=null;D.getModel().beginUpdate();try{y=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;D.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&D.setLinkForCell(y,y.value);y.geometry.width+=D.gridSize;y.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
+if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
+function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
+null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+" "),mxUtils.bind(this,function(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
+null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
+oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,J){StorageFile.listFiles(this,
-"F",H,J)});window.openBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.getFileContent(this,H,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.deleteFile(this,H,J,D)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(H=new Blob([H],{type:"application/octet-stream"}),
-this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,u=y.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(y,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,W){G=W.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,W.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=W))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?f(W.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,u,H,J,D,G,W,T){G=null!=
-G?G:!0;var Z=!1,N=null,qa=mxUtils.bind(this,function(oa){var S=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):S=this.importXml(oa,g,x,G,null,null!=T?mxEvent.isControlDown(T):null);null!=J&&J(S)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=W?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(N=this.importXml(f,g,x,G,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0,
-D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),N=[f.insertVertex(null,null,"",g,x,y,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Z=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,y=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,y,H):this.parseFile(D,y,H)):0==d.indexOf("PK")&&null!=D?(Z=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(N)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(N=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,G,null,null!=T?mxEvent.isControlDown(T):null));Z||null==J||J(N);return N};EditorUi.prototype.importFiles=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var N=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var S=W||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>S){oa=!0;break}var ia=mxUtils.bind(this,
-function(){var M=this.editor.graph,aa=M.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,ba,ea,ra,ta,la){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,ra)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,ra,!0)),null):this.importFile(E,Q,Y,R,ba,ea,ra,ta,la,N,T,Z)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this,
-function(E){M.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=d.length,ja=X,ca=[],ka=mxUtils.bind(this,function(E,Q){ca[E]=Q;if(0==--ja){this.spinner.stop();if(null!=J)J(ca);else{var Y=[];M.getModel().beginUpdate();try{for(E=0;E<ca.length;E++){var R=ca[E]();null!=R&&(Y=Y.concat(R))}}finally{M.getModel().endUpdate()}}u(Y)}}),q=0;q<X;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-H||H(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var ba=Graph.clipSvgDataUri(R.target.result),ea=ba.indexOf(",");ea=decodeURIComponent(escape(atob(ba.substring(ea+1))));var ra=mxUtils.parseXml(ea);ea=ra.getElementsByTagName("svg");if(0<ea.length){ea=ea[0];var ta=T?null:ea.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta||
-"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(E,mxUtils.bind(this,function(){try{if(null!=ra){var xa=ra.getElementsByTagName("svg");if(0<xa.length){var Ca=xa[0],Ia=Ca.getAttribute("width"),Aa=Ca.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var La=Ca.getAttribute("viewBox");if(null==La||0==La.length)Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da=
-La.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Sa=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Ra=y(ba,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ia*Sa)),Math.max(1,Math.round(Aa*Sa)),Q.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Ra[0].geometry.width=Ia;Ra[0].geometry.height=Aa;Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);
-ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));M.setCellStyles("image",ba,[Ra[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ca))}return Ra}}}catch(Za){}return null})):ka(E,mxUtils.bind(this,function(){return y(ta,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ka(E,mxUtils.bind(this,function(){return null}))}else{ea=!1;if("image/png"==Q.type){var la=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=
-la&&0<la.length){var pa=new Image;pa.src=R.target.result;ka(E,mxUtils.bind(this,function(){return y(la,"text/xml",f+E*aa,g+E*aa,pa.width,pa.height,Q.name)}));ea=!0}}ea||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,
-R.target.result,mxUtils.bind(this,function(Ca,Ia,Aa){ka(E,mxUtils.bind(this,function(){if(null!=Ca&&Ca.length<G){var La=qa&&this.isResampleImageSize(Q.size,W)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return y(Ca,Q.type,f+E*aa,g+E*aa,Math.round(Ia*La),Math.round(Aa*La),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,W,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=R.target.result,y(ba,Q.type,f+
-E*aa,g+E*aa,240,160,Q.name,function(xa){ka(E,function(){return xa})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ka(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(oa){oa=[];for(fa=0;fa<d.length;fa++)oa.push(d[fa]);d=oa;this.confirmImageResize(function(M){qa=M;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!=
-this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(u){y(u,!0)},function(u){y(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};
-EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=
-function(d,f,g,x,y,u,H){y=null!=y?y:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/y,D/y);if(1<G){var W=Math.round(J/G),T=Math.round(D/G),Z=document.createElement("canvas");Z.width=W;Z.height=T;Z.getContext("2d").drawImage(d,0,0,W,T);var N=Z.toDataURL();if(N.length<f.length){var qa=document.createElement("canvas");qa.width=W;qa.height=T;var oa=qa.toDataURL();N!==oa&&(f=N,J=W,D=T)}}}catch(S){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng=
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
+"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
+this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
+x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
+H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
+d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
+this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
+g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
+function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
+function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
+G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
+va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
+3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
+var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
+ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
+function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
+function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(t,
+!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
+G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var fa=S.getEvent();
-return null==S.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==S.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});f.cellEditor.editPlantUmlData=function(S,fa,ia){var M=JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,M.format,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-M.format)f.labelChanged(S,"<pre>"+X+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",d.convertDataUri(X),[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=ja,ka.height=ca,f.cellsResized([S],[ka],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:aa,format:M.format}))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(S,fa,ia){var M=
-JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,M.config,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",X,[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ja),ka.height=Math.max(ka.height,ca),f.cellsResized([S],[ka],!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:aa,
-config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,fa){try{var ia=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=ia)this.editPlantUmlData(S,fa,ia);else if(ia=this.graph.getAttributeForCell(S,"mermaidData"),null!=ia)this.editMermaidData(S,fa,ia);else{var M=f.getCellStyle(S);"1"==mxUtils.getValue(M,"metaEdit",
-"0")?d.showDataDialog(S):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(S){return d.getLinkTitle(S)};f.customLinkClicked=function(S){var fa=!1;try{d.handleCustomLink(S),fa=!0}catch(ia){d.handleError(ia)}return fa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var fa=x.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var y=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!=
-S.originalSrc&&(S=d.createImageForPageLink(S.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(S,fa){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var ia=S.indexOf(",");if(0<ia)for(S=S.substring(ia+1),fa=fa.getProperty("patches"),
-ia=0;ia<fa.length;ia++)if(null!=fa[ia][EditorUi.DIFF_UPDATE]&&null!=fa[ia][EditorUi.DIFF_UPDATE][S]||null!=fa[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ia][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,fa){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!fa)ia={src:ia.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,aa=this.shapeForegroundColor,
-X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=aa;this.stylesheet=M}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(S,fa,ia){var M=fa;fa=function(aa,X){if(null==X){var ja=mxEvent.getSource(aa);"a"==ja.nodeName.toLowerCase()&&(X=
-ja.getAttribute("href"))}null!=X&&f.isCustomLink(X)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(X)&&mxEvent.consume(aa);null!=M&&M(aa,X)};D.call(this,S,fa,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,fa,ia){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(S,
-"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var W=f.getExportVariables;f.getExportVariables=function(){var S=W.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(S.filename=fa.getTitle());S.pagecount=null!=d.pages?d.pages.length:1;S.page=null!=d.currentPage?d.currentPage.getName():"";
-S.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return S};var T=f.getGlobalVariable;f.getGlobalVariable=function(S){var fa=d.getCurrentFile();return"filename"==S&&null!=fa?fa.getTitle():"page"==S&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==S?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==S?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(S,
-fa,ia){var M=fa.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var S=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(S=null!=fa.getTitle()?fa.getTitle():S);return S};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);
-N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),
-this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var fa=f.cellEditor.text2,
-ia=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(M){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(fa));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(fa,"drop",mxUtils.bind(this,function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,
-0,0,this.maxImageSize,function(X,ja,ca,ka,q,E){f.insertImage(X,q,E)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var ja=0;ja<X.length;ja++)X[ja]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var aa=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(X){var ja=Math.max(1,X.width);X=Math.max(1,X.height);var ca=this.maxImageSize;
-ca=Math.min(1,Math.min(ca/Math.max(1,ja)),ca/Math.max(1,X));f.insertImage(decodeURIComponent(aa),ja*ca,X*ca)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&&
-(N=this.editor.graph.view,N.setUnit(mxSettings.getUnit()),N.addListener("unitChanged",function(S,fa){mxSettings.setUnit(fa.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,N.unit),this.refresh());if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(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)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(S,fa){0<this.editor.graph.getSelectionCount()?(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:qa.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||
-this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,
-function(S){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),ia=S.dataTransfer.files,M=f.view.translate,aa=f.view.scale,X=fa.x/aa-M.x,ja=fa.y/aa-M.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ia,!0)):(mxEvent.isAltDown(S)&&(ja=X=null),this.importFiles(ia,X,ja,this.maxImageSize,
-null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),S));else{mxEvent.isAltDown(S)&&(ja=X=0);var ca=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;fa=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=fa)f.setSelectionCells(this.importXml(fa,X,ja,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var ka=S.dataTransfer.getData("text/html");fa=document.createElement("div");fa.innerHTML=f.sanitizeHtml(ka);
-var q=null;ia=fa.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=fa.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(fa=fa.getElementsByTagName("pre"),null!=fa&&1==fa.length&&(ka=mxUtils.getTextContent(fa[0]))));var E=!0,Q=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ka,X,ja,!0,q,null,E,mxEvent.isControlDown(S)))});
-q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(S)):Q()}else null!=ca&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ca)?this.loadImage(decodeURIComponent(ca),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,R)),ba/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,null,"",X,ja,R*ba,Y*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-ca+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(ca,X,ja,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),X,ja,!0))}}S.stopPropagation();S.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();N=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",
-N);this.addListener("sketchModeChanged",N);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=
-this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(D,G,W,T,Z,N){d.insertImage(D,Z,N)},function(){},function(D){return"image/"==D.type.substring(0,
-6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect",
-"off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=
-!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+
-10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,
-function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this,
-function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);f=f||this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var f=Editor.currentTheme,g=!1;if(f!=d){if("1"==urlParams["live-ui"]){var x=
-function(y){return null==y||""==y||"dark"==y||"kennedy"==y};console.log("doSetCurrentTheme",f,d);d=x(d)?"default":d;f=x(f)?"default":f;"sketch"==f&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,
-this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==f&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(d)}Editor.currentTheme=d}return g};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d);
-this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),
-this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=
-function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height=
-"22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&
-(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,f,g,x){var y=this.menus.get(f);d=d.addMenu(mxResources.get(f),y.funct);d.className=g;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height="30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(f));this.menus.menuCreated(y,
-d,"geMenuItem");null!=x&&(d.style.backgroundImage="url("+x+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-241):Math.max(10,this.diagramContainer.clientWidth-248),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?
-580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
-"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
+return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
+na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
+config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
+"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
+ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
+1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
+this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
+V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
+H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
+null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
+var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
+fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
+this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
+na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
+function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
+N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
+null!=fa&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),fa.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
+null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
+ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
+this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
+ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
+null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&
+!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
+5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
+"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var G=mxEvent.getSource(t);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
+mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
+this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
+"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
+function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
+"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
+H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
+"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
+this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
+(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
+Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
+function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
+(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
+this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
+"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
+y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
+H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
+[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
+D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
+G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
+"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
+"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
+null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
+d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
+"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
-"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }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); "+
-(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+
-(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
+(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
@@ -3687,168 +3715,168 @@ p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.pro
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):null!=p.parentNode&&p.parentNode.removeChild(p)}};
-EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,y,u){null==
-x[y]&&(x[y]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");
-f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,
-"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():
-mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
-EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],
-"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,
-function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
+null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
+d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
+"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
+f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
+f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
+mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
+mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(y.getAttribute("width")),J=parseInt(y.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,u=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var H=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),y.setSelectionCells(u);else if(f&&1==y.getSelectionCount()){H=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{y.model.beginUpdate();try{y.labelChanged(H,d),Graph.isLink(d)&&y.setLinkForCell(H,d)}finally{y.model.endUpdate()}}y.setSelectionCell(H)}else u=y.getInsertPoint(),y.isMouseInsertPoint()&&(H=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),y.setSelectionCells(u);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(y=
-this.parseHtmlData(J),u="text/plain"!=y.getAttribute("data-type")):null!=H&&0<H.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,J))}H=y.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
-0);var S=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,S,S));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),W=!1;try{var T=G.lastIndexOf("%3E");0<=T&&T<G.length-3&&(G=G.substring(0,T+3))}catch(qa){}try{H=y.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):
-decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(W=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Z=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,W,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Z):Z()}else this.pasteXml(G,
-x,W,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
+f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
+x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
+this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
+0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
+decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
+x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?y=u.getData("Text"):(y=null,y=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=y&&0<y.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(y),
-u=u.getElementsByTagName("img"),0<u.length&&(y=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(y=u.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&
-299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var u=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,u-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
+!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
+t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
+299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
+var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,J,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),
-200<=J.status&&299>=J.status?u(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,x)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(y=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});y.onerror=mxUtils.bind(this,function(u){this.spinner.stop();
-this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var u=0;u<y;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
+200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
+this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!=
-D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==
-(window.opener||window.parent)){var G=D.data,W=null,T=mxUtils.bind(this,function(la){if(null!=la&&"function"===typeof la.charAt&&"<"!=la.charAt(0))try{Editor.isPngDataUrl(la)?la=Editor.extractGraphModelFromPng(la):"data:image/svg+xml;base64,"==la.substring(0,26)?la=atob(la.substring(26)):"data:image/svg+xml;utf8,"==la.substring(0,24)&&(la=la.substring(24)),null!=la&&("%"==la.charAt(0)?la=decodeURIComponent(la):"<"!=la.charAt(0)&&(la=Graph.decompress(la)))}catch(pa){}return la});if("json"==urlParams.proto){var Z=
-!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(la){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.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
-G.action){this.spinner.stop();var N=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(la){null!=la?H.postMessage(JSON.stringify({event:"prompt",value:la,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==G.action){var qa=T(G.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",
-[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.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();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
-"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(la){la&&this.actions.get("exit").funct()}));try{N.init()}catch(la){H.postMessage(JSON.stringify({event:"draft",error:la.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,S=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),M=new TemplatesDialog(this,function(la,pa,xa){la=la||this.emptyDiagramXml;
-H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==this.emptyDiagramXml,name:pa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(la,pa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,la,pa)}):null,S?mxUtils.bind(this,function(la,pa,xa,Ca){this.remoteInvoke("searchDiagrams",[la,Ca],null,pa,xa)}):null,mxUtils.bind(this,
-function(la,pa,xa){this.remoteInvoke("getFileContent",[la.url],null,pa,xa)}),null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}N=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(la,pa,xa,Ca){la=la||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==
-this.emptyDiagramXml,name:pa,tempUrl:xa,libs:Ca,builtIn:!0,message:G}),"*"):(d(la,D,la!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(la){this.remoteInvoke("getRecentDiagrams",[null],null,la,function(){la(null,"Network Error!")})}):null,S?mxUtils.bind(this,function(la,pa){this.remoteInvoke("searchDiagrams",[la,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(la,
-pa,xa){H.postMessage(JSON.stringify({event:"template",docUrl:la,info:pa,name:xa}),"*")}),null,null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,1==G.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(la){this.sidebar.hideTooltip();la&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==G.action){var aa=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",
-data:aa,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("exit"==G.action){this.actions.get("exit").funct();
-return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ja=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ca=this.editor.graph,ka=mxUtils.bind(this,function(la){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=la;pa.xml=ja;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(la){null==la&&(la=Editor.blankImage);"xmlpng"==G.format&&(la=Editor.writeGraphModelToPng(la,"tEXt","mxfile",encodeURIComponent(ja)));ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);ka(la)}),E=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var la=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());for(var pa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==E){pa=this.updatePageRoot(this.pages[xa]);break}null==pa&&(pa=this.currentPage);ca.getGlobalVariable=function(La){return"page"==La?pa.getName():"pagenumber"==La?1:la.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}if(null!=G.layerIds){var Ca=
-ca.model,Ia=Ca.getChildCells(Ca.getRoot()),Aa={};for(xa=0;xa<G.layerIds.length;xa++)Aa[G.layerIds[xa]]=!0;for(xa=0;xa<Ia.length;xa++)Ca.setVisible(Ia[xa],Aa[Ia[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){q(La.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ca,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ja),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ja))).send(mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?ka("data:image/png;base64,"+la.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var la=this.createLoadMessage("export");
-la.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();la.xml=mxUtils.getXml(pa);la.data=this.getFileData(null,null,!0,null,null,null,pa);la.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),la.data=this.getHtml(pa,this.editor.graph),la.xml=mxUtils.getXml(pa),la.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa==
-mxConstants.NONE&&(pa=null);la.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);la.format="svg";var xa=mxUtils.bind(this,function(Ca){this.editor.graph.setEnabled(!0);this.spinner.stop();la.data=Editor.createSvgDataUri(Ca);H.postMessage(JSON.stringify(la),"*")});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(la.xml,this.editor.graph,null,!0,xa,null,null,G.embedImages,
-pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ca){G.embedImages||null==G.embedImages?this.editor.convertImages(Ca,
-mxUtils.bind(this,function(Ia){xa(mxUtils.getXml(Ia))})):xa(mxUtils.getXml(Ca))}));return}H.postMessage(JSON.stringify(la),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==G.action){Z=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
-null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var R=Editor.sketchMode;this.doSetSketchMode(G.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(R=Editor.darkMode,this.doSetDarkMode(G.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
-null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var ba=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";W=mxUtils.bind(this,function(){var la=this.editor.graph,pa=la.maxFitScale;la.maxFitScale=G.maxFitScale;la.fit(2*ba);la.maxFitScale=pa;la.container.scrollTop-=2*ba;la.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(la){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(qa=T(G.xml),null!=qa&&""!=qa&&ea.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(la){H.postMessage(JSON.stringify({event:"merge",message:G,error:la}),"*")}))}else"remoteInvokeReady"==
-G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(la){this.handleError(la)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(la,pa){g=!0;
-try{d(la,pa,null,Z)}catch(xa){this.handleError(xa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=ra();x&&null==f&&(f=mxUtils.bind(this,function(xa,Ca){xa=ra();xa==y||g||(Ca=this.createLoadMessage("autosave"),Ca.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ca),"*"));y=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=la,H.postMessage(JSON.stringify(pa),"*");null!=W&&W()});null!=G&&
-"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(T="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(la){ta(la,D)},mxUtils.bind(this,function(la){this.handleError(la)}),T)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
-mxUtils.bind(this,function(la){4==la.readyState&&200<=la.status&&299>=la.status&&"<mxGraphModel"==la.responseText.substring(0,13)&&ta(la.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(la){ta(la)}),mxUtils.bind(this,function(la){this.handleError(la)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=T(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(la){ta(ra(),D)}),
-mxUtils.bind(this,function(la){this.handleError(la,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,W){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:W}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
+!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
+H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
+[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
+"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
+this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
+ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
+xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
+data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
+return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
+X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
+ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
+mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
+sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
+mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
+null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
+null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
+H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
+try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
+"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
+mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
+mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,W=null,
-T=null,Z=null,N=null,qa=null,oa=null,S="whiteSpace=wrap;html=1;",fa=null,ia=null,M="",aa="auto",X="auto",ja=!1,ca=null,ka=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ea=ba.x,ra=ba.y;ba=ra;var ta=null,la="auto";ia=null;for(var pa=[],xa=null,Ca=null,Ia=0;Ia<g.length&&"#"==
-g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var La=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==La?ta=D.sanitizeHtml(Da):"labelname"==La&&0<Da.length&&"-"!=Da?N=Da:"labels"==La&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==La?W=Da:"parentstyle"==La?S=Da:"unknownStyle"==La&&"-"!=
-Da?qa=Da:"stylename"==La&&0<Da.length&&"-"!=Da?Z=Da:"styles"==La&&0<Da.length&&"-"!=Da?T=JSON.parse(Da):"vars"==La&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==La&&0<Da.length&&"-"!=Da?fa=Da:"parent"==La&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==La&&0<Da.length&&"-"!=Da?M=Da:"width"==La?aa=Da:"height"==La?X=Da:"collapsed"==La&&"-"!=Da?ja="true"==Da:"left"==La&&0<Da.length?ca=Da:"top"==La&&0<Da.length?ka=Da:"ignore"==La?Ca=Da.split(","):"connect"==La?pa.push(JSON.parse(Da)):"link"==La?xa=Da:"padding"==
-La?Y=parseFloat(Da):"edgespacing"==La?q=parseFloat(Da):"nodespacing"==La?E=parseFloat(Da):"levelspacing"==La?Q=parseFloat(Da):"layout"==La&&(la=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;La=[];for(Da=0;Da<Sa.length;Da++)fa==Sa[Da]&&(d=Da),ia==Sa[Da]&&(Aa=Da),La.push(mxUtils.trim(Sa[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+La[0]+"%");if(null!=pa)for(var Ra=
-0;Ra<pa.length;Ra++)null==J[pa[Ra].to]&&(J[pa[Ra].to]={});fa=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&fa.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<fa.length;Da++){Ta=fa[Da];var Na=null,z=null!=d?M+Ta[d]:null;g=!1;null!=z&&(Na=D.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var L=new mxCell(ta,
-new mxGeometry(ea,ba,0,0),W||"whiteSpace=wrap;html=1;");L.collapsed=ja;L.vertex=!0;L.id=z;null==Na||g||D.model.setCollapsed(Na,ja);for(var O=0;O<Ta.length;O++)D.setAttributeForCell(L,La[O],Ta[O]),null==Na||g||D.setAttributeForCell(Na,La[O],Ta[O]);if(null!=N&&null!=oa){var V=oa[L.getAttribute(N)];null!=V&&(D.labelChanged(L,V),null==Na||g||D.cellLabelChanged(Na,V))}if(null!=Z&&null!=T){var U=T[L.getAttribute(Z)];null!=U&&(L.style=U)}D.setAttributeForCell(L,"placeholders","1");L.style=D.replacePlaceholders(L,
-L.style,G);null==Na||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(D.model.setStyle(Na,L.style),0>mxUtils.indexOf(u,Na)&&u.push(Na),D.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=L;if(!g)for(Ra=0;Ra<pa.length;Ra++)J[pa[Ra].to][Na.getAttribute(pa[Ra].to)]=Na;null!=xa&&"link"!=xa&&(D.setLinkForCell(Na,Na.getAttribute(xa)),D.setAttributeForCell(Na,xa,null));var ha=this.editor.graph.getPreferredSizeForCell(Na);ia=null!=Aa?D.model.getCell(M+Ta[Aa]):null;if(Na.vertex){Za=
-null!=ia?0:ea;Ia=null!=ia?0:ra;null!=ca&&null!=Na.getAttribute(ca)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(ca)));null!=ka&&null!=Na.getAttribute(ka)&&(Na.geometry.y=Ia+parseFloat(Na.getAttribute(ka)));var ma="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ma?ha.width+Y:parseFloat(aa);var wa="@"==X.charAt(0)?Na.getAttribute(X.substring(1)):null;Na.geometry.height=null!=wa&&"auto"!=
-wa?parseFloat(wa):"auto"==X||"auto"==wa?ha.height+Y:parseFloat(X);ba+=Na.geometry.height+E}g?(null==H[z]&&(H[z]=[]),H[z].push(Na)):(x.push(Na),null!=ia?(ia.style=D.replacePlaceholders(ia,S,G),D.addCell(Na,ia),y.push(ia)):u.push(D.addCell(Na)))}for(Da=0;Da<y.length;Da++)ma="@"==aa.charAt(0)?y[Da].getAttribute(aa.substring(1)):null,wa="@"==X.charAt(0)?y[Da].getAttribute(X.substring(1)):null,"auto"!=aa&&"auto"!=ma||"auto"!=X&&"auto"!=wa||D.updateGroupBounds([y[Da]],Y,!0);var sa=u.slice(),ya=u.slice();
-for(Ra=0;Ra<pa.length;Ra++){var Ha=pa[Ra];for(Da=0;Da<x.length;Da++){Na=x[Da];var Qa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ea,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;J[lb.to][$a[ab]]=ib;
-ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb=
-D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?
-nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});Qa(Na,Na,Ha);if(null!=H[Na.id])for(O=0;O<H[Na.id].length;O++)Qa(Na,H[Na.id][O],Ha)}}if(null!=Ca)for(Da=0;Da<x.length;Da++)for(Na=x[Da],O=0;O<Ca.length;O++)D.setAttributeForCell(Na,mxUtils.trim(Ca[O]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var za=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x));
-pb.y=Math.round(D.snap(pb.y));"auto"==aa&&(pb.width=Math.round(D.snap(pb.width)));"auto"==X&&(pb.height=Math.round(D.snap(pb.height)))}};if("["==la.charAt(0)){var Fa=R;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(la)),function(){za();Fa()});R=null}else if("circle"==la){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ea=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ea.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ba.execute(D.getDefaultParent());
-za()},!0,R);R=null}else if("horizontaltree"==la||"verticaltree"==la||"auto"==la&&ya.length==2*u.length-1&&1==sa.length){D.view.validate();var Oa=new mxCompactTreeLayout(D,"horizontaltree"==la);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,R);R=null}else if("horizontalflow"==la||"verticalflow"==la||"auto"==la&&1==sa.length){D.view.validate();var Pa=new mxHierarchicalLayout(D,"horizontalflow"==la?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Pa.intraCellSpacing=E;Pa.parallelEdgeSpacing=q;Pa.interRankCellSpacing=Q;Pa.disableEdgeStyle=!1;this.executeLayout(function(){Pa.execute(D.getDefaultParent(),ya);D.moveCells(ya,ea,ra)},!0,R);R=null}else if("orgchart"==la){D.view.validate();var bb=new mxOrgChartLayout(D,2,Q,E),eb=bb.isVertexIgnored;bb.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){bb.execute(D.getDefaultParent());za()},!0,R);R=null}else if("organic"==
-la||"auto"==la&&ya.length>u.length){D.view.validate();var db=new mxFastOrganicLayout(D);db.forceConstant=3*E;db.disableEdgeStyle=!1;db.resetEdges=!1;var ub=db.isVertexIgnored;db.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());za()},!0,R);R=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
+T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
+g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
+Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
+"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
+D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
+Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
+H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
+null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
+parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
+0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
+!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
+null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
+mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
+"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
+Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
+ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
+this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(D.getSvg(x,y,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),W=D.getGraphBounds(),T=Math.floor(W.width*y/D.view.scale),Z=Math.floor(W.height*y/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&T*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var N={globalVars:D.getExportVariables()};J&&(N.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+Z+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(y,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
+"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
+"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));
-u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var W=0;W<G.length;W++){var T=G[W];u[T.id]&&(f[T.id]=T);var Z=this.addCheckbox(y,T.title,u[T.id]);(function(N,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[N.id]=N:delete f[N.id]})})(T,Z)}},
-mxUtils.bind(this,function(G){y.innerText="";var W=document.createElement("div");W.style.padding="8px";W.style.textAlign="center";mxUtils.write(W,mxResources.get("error")+": ");mxUtils.write(W,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(W)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,W;for(W in f)null==u[W]&&(G++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,T))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[W]));for(W in u)f[W]||this.closeLibrary(new RemoteLibrary(this,null,u[W]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
+document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
+t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
+mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
+[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var u=
-!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,W){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=W?T.error={errResp:W}:null!=G&&(T.resp=G);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var u=!1,H=0;H<y.allowedDomains.length;H++)if(f=="https://"+y.allowedDomains[H]){u=
-!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(y.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}),J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var u=x.result;1>y.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(y){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,W,T=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){T++;qa()}),qa=mxUtils.bind(this,function(){try{if(T>=W.length)Z();else{var S=W[T];StorageFile.getFileContent(this,S,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==S&&fa==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[S]}),"*"):N()}),N)}}catch(fa){console.log(fa)}}),
-oa=mxUtils.bind(this,function(S){try{this.setDatabaseItem(null,[{title:S.title,size:S.data.length,lastModified:Date.now(),type:S.isLib?"L":"F"},{title:S.title,data:S.data}],N,N,["filesInfo","files"])}catch(fa){console.log(fa)}});H=mxUtils.bind(this,function(S){try{if(S.source==J.contentWindow){var fa={};try{fa=JSON.parse(S.data)}catch(ia){}"init"==fa.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(D?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(W=fa.resp[0],D=!1,qa()):Z():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?oa(fa.resp[0]):N())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(u){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var H=u.transaction(y,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<y.length;u++)H.objectStore(y[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var u=0;u<x.length;u++)y.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var u=y.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-u=[];y.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};y.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
+d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
+!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
+!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
+!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
+ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
+f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
+g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
+t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
+function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
+f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var S=G.getElementsByTagName("div"),fa=0,ia=0;ia<S.length;ia++)"none"!=S[ia].style.display&&S[ia].parentNode==G&&fa++;W.style.display=0==fa?"block":"none"}function K(S,fa,ia,M){function aa(){fa.removeChild(ca);fa.removeChild(ka);ja.style.display="block";X.style.display="block"}H={div:fa,comment:S,saveCallback:ia,deleteOnCancel:M};var X=fa.querySelector(".geCommentTxt"),ja=fa.querySelector(".geCommentActionsList"),ca=document.createElement("textarea");
-ca.className="geCommentEditTxtArea";ca.style.minHeight=X.offsetHeight+"px";ca.value=S.content;fa.insertBefore(ca,X);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){M?(fa.parentNode.removeChild(fa),F()):aa();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){X.innerText="";S.content=ca.value;mxUtils.write(X,S.content);aa();ia(S);H=null});mxEvent.addListener(ca,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(E);fa.insertBefore(ka,X);ja.style.display="none";X.style.display="none";ca.focus()}function P(S,fa){fa.innerText="";S=new Date(S.modifiedDate);var ia=b.timeSince(S);null==ia&&(ia=mxResources.get("lessThanAMinute"));
-mxUtils.write(fa,mxResources.get("timeAgo",[ia],"{1} ago"));fa.setAttribute("title",S.toLocaleDateString()+" "+S.toLocaleTimeString())}function d(S){var fa=document.createElement("img");fa.className="geCommentBusyImg";fa.src=IMAGE_PATH+"/spin.gif";S.appendChild(fa);S.busyImg=fa}function f(S){S.style.border="1px solid red";S.removeChild(S.busyImg)}function g(S){S.style.border="";S.removeChild(S.busyImg)}function x(S,fa,ia,M,aa){function X(R,ba,ea){var ra=document.createElement("li");ra.className="geCommentAction";
-var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,R);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(la){ba(la,S);la.preventDefault();mxEvent.consume(la)});Y.appendChild(ra);ea&&(ra.style.display="none")}function ja(){function R(ra){ba.push(ea);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ea=ea.nextSibling,R(ra.replies[ta])}var ba=[],ea=ka;R(S);return{pdiv:ea,replies:ba}}function ca(R,ba,ea,ra,ta){function la(){d(Ia);S.addReply(Ca,function(Aa){Ca.id=
-Aa;S.replies.push(Ca);g(Ia);ea&&ea()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ca,Ia,function(Aa){la()},!0)}var xa=ja().pdiv,Ca=b.newComment(R,b.getCurrentUser());Ca.pCommentId=S.id;null==S.replies&&(S.replies=[]);var Ia=x(Ca,S.replies,xa,M+1);ba?pa():la()}if(aa||!S.isResolved){W.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";ka.setAttribute("data-commentId",
-S.id);ka.style.marginLeft=20*M+5+"px";S.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=S.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,S.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",S.id);P(S,Q);E.appendChild(Q);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,S.content||"");ka.appendChild(q);S.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||S.isLocked||0!=M&&!u||X(mxResources.get("reply"),function(){ca("",
-!0)},S.isResolved);E=b.getCurrentUser();null==E||E.id!=S.user.id||y||S.isLocked||(X(mxResources.get("edit"),function(){function R(){K(S,ka,function(){d(ka);S.editComment(S.content,function(){g(ka)},function(ba){f(ka);R();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},S.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);S.deleteComment(function(R){if(!0===R){R=ka.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(R=0;R<ba.length;R++)ba[R].parentNode.removeChild(ba[R]);g(ka);ka.style.opacity="0.5"}else{ba=ja(S).replies;for(R=0;R<ba.length;R++)G.removeChild(ba[R]);for(R=0;R<fa.length;R++)if(fa[R]==S){fa.splice(R,1);break}W.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(R){f(ka);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-S.isResolved));y||S.isLocked||0!=M||X(S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ba(){var ea=R.target;ea.innerText="";S.isResolved=!S.isResolved;mxUtils.write(ea,S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=S.isResolved?"none":"",ta=ja(S).replies,la=Editor.isDarkMode()?"transparent":S.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=la;for(var xa=ta[pa].querySelectorAll(".geCommentAction"),
-Ca=0;Ca<xa.length;Ca++)xa[Ca]!=ea.parentNode&&(xa[Ca].style.display=ra);N||(ta[pa].style.display="none")}F()}S.isResolved?ca(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ca(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=S.replies&&ia<S.replies.length;ia++)q=S.replies[ia],q.isResolved=S.isResolved,x(q,S.replies,null,M+1,aa);null!=H&&(H.comment.id==S.id?(aa=S.content,S.content=H.comment.content,K(S,ka,H.saveCallback,
-H.deleteOnCancel),S.content=aa):null==H.comment.id&&H.comment.pCommentId==S.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var y=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var W=document.createElement("span");W.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(W,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=D;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className=
-"geButton";if(!y){var Z=D.cloneNode();Z.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(S){function fa(){K(ia,M,function(aa){d(M);b.addComment(aa,function(X){aa.id=X;qa.push(aa);g(M)},function(X){f(M);fa();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),M=x(ia,qa,null,0);fa();S.preventDefault();
-mxEvent.consume(S)});T.appendChild(Z)}Z=D.cloneNode();Z.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Z.setAttribute("title",mxResources.get("showResolved"));Z.className="geAdaptiveAsset";var N=!1;mxEvent.addListener(Z,"click",function(S){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";oa();S.preventDefault();mxEvent.consume(S)});T.appendChild(Z);b.commentsRefreshNeeded()&&(Z=D.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',
-Z.setAttribute("title",mxResources.get("refresh")),Z.className="geAdaptiveAsset",mxEvent.addListener(Z,"click",function(S){oa();S.preventDefault();mxEvent.consume(S)}),T.appendChild(Z));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(S){p();S.preventDefault();mxEvent.consume(S)}),T.appendChild(D));J.appendChild(T);
-var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var S=H.div.querySelector(".geCommentEditTxtArea"),fa=H.div.querySelector(".geCommentEditBtns");H.comment.content=S.value;S.parentNode.removeChild(S);fa.parentNode.removeChild(fa)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();
-b.commentsSupported()?b.getComments(function(ia){function M(aa){if(null!=aa){aa.sort(function(ja,ca){return new Date(ja.modifiedDate)-new Date(ca.modifiedDate)});for(var X=0;X<aa.length;X++)M(aa[X].replies)}}ia.sort(function(aa,X){return new Date(aa.modifiedDate)-new Date(X.modifiedDate)});G.innerText="";G.appendChild(W);W.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)M(qa[ia].replies),x(qa[ia],qa,null,0,N);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(G.appendChild(H.div),K(H.comment,
-H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;T=mxUtils.bind(this,function(){function S(X){var ja=ia[X.id];if(null!=ja)for(P(X,ja),ja=0;null!=X.replies&&ja<X.replies.length;ja++)S(X.replies[ja])}if(this.window.isVisible()){for(var fa=G.querySelectorAll(".geCommentDate"),
-ia={},M=0;M<fa.length;M++){var aa=fa[M];ia[aa.getAttribute("data-commentId")]=aa}for(M=0;M<qa.length;M++)S(qa[M])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,K,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");
-d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
-k(y.checked)});d.appendChild(u);null!=F?(u.innerHTML=F+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
-x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){y.checked=!y.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
+X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
+"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
+mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
+"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
+function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
+ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
+Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
+!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
+R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
+ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
+I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
+0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
+mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
+(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
+H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
+mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
+mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3858,16 +3886,16 @@ function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}};
+mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
@@ -3887,7 +3915,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -3895,200 +3923,183 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var K=this.createControlTab(4,"&nbsp;&#10095;");K.style.position="absolute";
-K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
+L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(K,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),P),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(P),f());var g=this.currentPage;if(null!=g){K.addSeparator(P);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||K.addSeparator(P);K.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(K.addSeparator(P),f(),K.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
+var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
+function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
+[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var K=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(K,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,K,P,d,f){p=this.createUrlParameters(p,F,K,P,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-F.x,K.y=K.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);K==C||null!=P&&!d||p.push(K);return(null==P||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,K,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,K,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(M){return H.isVertex(M)&&p(M)}function C(M){var aa=
-!1;null!=M&&(aa="1"==u.getCurrentCellStyle(M).treeMoving);return aa}function p(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),aa="tree"==(null!=aa?aa.style:u.getCellStyle(M)).containerType);return aa}function F(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),u.view.getState(M),aa=null!=(null!=aa?aa.style:u.getCellStyle(M)).childLayout);return aa}function K(M){M=u.view.getState(M);if(null!=M){var aa=u.getIncomingTreeEdges(M.cell);if(0<aa.length&&(aa=u.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==M.y&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==M.y+M.height&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(M,aa){aa=null!=aa?aa:!0;u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=u.cloneCells([ja[0],
-M]);u.model.setTerminal(ca[0],u.model.getTerminal(ja[0],!0),!0);var ka=K(M),q=X.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ca[1].geometry.x+=aa?M.geometry.width+10:-ca[1].geometry.width-10:ca[1].geometry.y+=aa?M.geometry.height+10:-ca[1].geometry.height-10;u.view.currentRoot!=X&&(ca[1].geometry.x-=q.x,ca[1].geometry.y-=q.y);var E=u.view.getState(M),Q=u.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?M.geometry.width+10:-ca[1].geometry.width-10)*Q:Y.y+=(aa?M.geometry.height+10:-ca[1].geometry.height-10)*Q;var R=u.getOutgoingTreeEdges(u.model.getTerminal(ja[0],!0));if(null!=R){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=ja=0;ea<R.length;ea++){var ra=u.model.getTerminal(R[ea],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,ta)&&(ja=10+
-Math.max(ja,(Math.min(Y.x+Y.width,ta.x+ta.width)-Math.max(Y.x,ta.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,ta.y+ta.height)-Math.max(Y.y,ta.y))/Q))}}ba?q=0:ja=0;for(ea=0;ea<R.length;ea++)if(ra=u.model.getTerminal(R[ea],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY()))){var la=[];u.traverse(ta.cell,!0,function(pa,xa){var Ca=null!=xa&&u.isTreeEdge(xa);Ca&&la.push(xa);(null==xa||Ca)&&la.push(pa);return null==
-xa||Ca});u.moveCells(la,(aa?1:-1)*ja,(aa?1:-1)*q)}}}return u.addCells(ca,X)}finally{u.model.endUpdate()}}function d(M){u.model.beginUpdate();try{var aa=K(M),X=u.getIncomingTreeEdges(M),ja=u.cloneCells([X[0],M]);u.model.setTerminal(X[0],ja[1],!1);u.model.setTerminal(ja[0],ja[1],!0);u.model.setTerminal(ja[0],M,!1);var ca=u.model.getParent(M),ka=ca.geometry,q=[];u.view.currentRoot!=ca&&(ja[1].geometry.x-=ka.x,ja[1].geometry.y-=ka.y);u.traverse(M,!0,function(Y,R){var ba=null!=R&&u.isTreeEdge(R);ba&&q.push(R);
-(null==R||ba)&&q.push(Y);return null==R||ba});var E=M.geometry.width+40,Q=M.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);u.moveCells(q,E,Q);return u.addCells(ja,ca)}finally{u.model.endUpdate()}}function f(M,aa){u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=K(M);0==ja.length&&(ja=[u.createEdge(X,null,"",null,null,u.createCurrentEdgeStyle())],
-ca=aa);var ka=u.cloneCells([ja[0],M]);u.model.setTerminal(ka[0],M,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)u.setCellStyles(Q,E[Q],[ka[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&u.setCellStyles("elbow",ca==mxConstants.DIRECTION_SOUTH||ca==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ja=u.getOutgoingTreeEdges(M);var Y=X.geometry;aa=[];u.view.currentRoot==
-X&&(Y=new mxRectangle);for(q=0;q<ja.length;q++){var R=u.model.getTerminal(ja[q],!1);null!=R&&aa.push(R)}var ba=u.view.getBounds(aa),ea=u.view.translate,ra=u.view.scale;ca==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x-Y.x+10,ka[1].geometry.y+=ka[1].geometry.height-Y.y+40):ca==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x+-Y.x+
-10,ka[1].geometry.y-=ka[1].geometry.height+Y.y+40):(ka[1].geometry.x=ca==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+Y.x+40):ka[1].geometry.x+(ka[1].geometry.width-Y.x+40),ka[1].geometry.y=null==ba?M.geometry.y+(M.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ea.y+-Y.y+10);return u.addCells(ka,X)}finally{u.model.endUpdate()}}function g(M,aa,X){M=u.getOutgoingTreeEdges(M);X=u.view.getState(X);var ja=[];if(null!=X&&null!=M){for(var ca=0;ca<M.length;ca++){var ka=
-u.view.getState(u.model.getTerminal(M[ca],!1));null!=ka&&(!aa&&Math.min(ka.x+ka.width,X.x+X.width)>=Math.max(ka.x,X.x)||aa&&Math.min(ka.y+ka.height,X.y+X.height)>=Math.max(ka.y,X.y))&&ja.push(ka)}ja.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ja}function x(M,aa){var X=K(M),ja=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==ja&&X!=aa?y.actions.get("selectParent").funct():X==aa?
-(aa=u.getOutgoingTreeEdges(M),null!=aa&&0<aa.length&&u.setSelectionCell(u.model.getTerminal(aa[0],!1))):(X=u.getIncomingTreeEdges(M),null!=X&&0<X.length&&(ja=g(u.model.getTerminal(X[0],!0),ja,M),M=u.view.getState(M),null!=M&&(M=mxUtils.indexOf(ja,M),0<=M&&(M+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=ja.length-1&&u.setSelectionCell(ja[M].cell)))))}var y=this,u=y.editor.graph,H=u.getModel(),J=y.menus.createPopupMenu;y.menus.createPopupMenu=function(M,aa,X){J.apply(this,
-arguments);if(1==u.getSelectionCount()){aa=u.getSelectionCell();var ja=u.getOutgoingTreeEdges(aa);M.addSeparator();0<ja.length&&(m(u.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,X),this.addMenuItems(M,["selectDescendants"],null,X));m(u.getSelectionCell())?(M.addSeparator(),0<u.getIncomingTreeEdges(aa).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,X)):0<u.model.getEdgeCount(aa)&&this.addMenuItems(M,["selectConnections"],null,X)}};y.actions.addAction("selectChildren",
-function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getOutgoingTreeEdges(M);if(null!=M){for(var aa=[],X=0;X<M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=u.getOutgoingTreeEdges(u.model.getTerminal(M[0],!0)),null!=M)){for(var aa=[],X=0;X<
-M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);null!=M&&0<M.length&&u.setSelectionCell(u.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(M,aa){M=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(M)){if(null!=aa&&mxEvent.isAltDown(aa))u.setSelectionCells(u.model.getTreeEdges(M,
-null==aa||!mxEvent.isShiftDown(aa),null==aa||!mxEvent.isControlDown(aa)));else{var X=[];u.traverse(M,!0,function(ja,ca){var ka=null!=ca&&u.isTreeEdge(ca);ka&&X.push(ca);null!=ca&&!ka||null!=aa&&mxEvent.isShiftDown(aa)||X.push(ja);return null==ca||ka})}u.setSelectionCells(X)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(M,aa){aa=null!=aa?aa:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));aa&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var X=[],ja=0;ja<
-M.length;ja++){var ca=M[ja];H.isEdge(ca)&&p(ca)&&(X.push(ca),ca=H.getTerminal(ca,!1));if(m(ca)){var ka=[];u.traverse(ca,!0,function(q,E){var Q=null!=E&&u.isTreeEdge(E);Q&&ka.push(E);(null==E||Q)&&ka.push(q);return null==E||Q});0<ka.length&&(X=X.concat(ka),ca=u.getIncomingTreeEdges(M[ja]),M=M.concat(ca))}else null!=ca&&X.push(M[ja])}M=X;return D.apply(this,arguments)};y.hoverIcons.getStateAt=function(M,aa,X){return m(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,X))};var G=u.duplicateCells;
-u.duplicateCells=function(M,aa){M=null!=M?M:this.getSelectionCells();for(var X=M.slice(0),ja=0;ja<X.length;ja++){var ca=u.view.getState(X[ja]);if(null!=ca&&m(ca.cell)){var ka=u.getIncomingTreeEdges(ca.cell);for(ca=0;ca<ka.length;ca++)mxUtils.remove(ka[ca],M)}}this.model.beginUpdate();try{var q=G.call(this,M,aa);if(q.length==M.length)for(ja=0;ja<M.length;ja++)if(m(M[ja])){var E=u.getIncomingTreeEdges(q[ja]);ka=u.getIncomingTreeEdges(M[ja]);if(0==E.length&&0<ka.length){var Q=this.cloneCell(ka[0]);this.addEdge(Q,
-u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ja])}}}finally{this.model.endUpdate()}return q};var W=u.moveCells;u.moveCells=function(M,aa,X,ja,ca,ka,q){var E=null;this.model.beginUpdate();try{var Q=ca,Y=this.getCurrentCellStyle(ca);if(null!=M&&m(ca)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<M.length;R++)if(m(M[R])||u.model.isEdge(M[R])&&null==u.model.getTerminal(M[R],!0)){ca=u.model.getParent(M[R]);break}if(null!=Q&&ca!=Q&&null!=this.view.getState(M[0])){var ba=u.getIncomingTreeEdges(M[0]);
-if(0<ba.length){var ea=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ea){var ra=u.view.getState(Q);null!=ra&&(aa=(ra.getCenterX()-ea.getCenterX())/u.view.scale,X=(ra.getCenterY()-ea.getCenterY())/u.view.scale)}}}}E=W.apply(this,arguments);if(null!=E&&null!=M&&E.length==M.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(M[R])&&(ba=u.getIncomingTreeEdges(M[R]),0<ba.length))if(!ja)m(Q)&&
-0>mxUtils.indexOf(M,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0],Q,!0);else if(0==u.getIncomingTreeEdges(E[R]).length){Y=Q;if(null==Y||Y==u.model.getParent(M[R]))Y=u.model.getTerminal(ba[0],!0);ja=this.cloneCell(ba[0]);this.addEdge(ja,u.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(M,aa,X,ja){var ca=u.model,ka=null;ca.beginUpdate();try{if(ka=T.apply(this,arguments),m(M))for(var q=
-0;q<ka.length;q++)if(ca.isEdge(ka[q])&&null==ca.getTerminal(ka[q],!0)){ca.setTerminal(ka[q],M,!0);var E=u.getCellGeometry(ka[q]);E.points=null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{ca.endUpdate()}return ka}}var Z={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},N=y.onKeyDown;y.onKeyDown=function(M){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var aa=
-null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==M.which?aa=mxEvent.isShiftDown(M)?d(u.getSelectionCell()):f(u.getSelectionCell()):13==M.which&&(aa=P(u.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=aa&&0<aa.length)1==aa.length&&u.model.isEdge(aa[0])?u.setSelectionCell(u.model.getTerminal(aa[0],!1)):u.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(M);
-else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var X=Z[M.keyCode];null!=X&&(X.funct(M),mxEvent.consume(M))}else 37==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(ja){y.handleError(ja)}mxEvent.isConsumed(M)||
-N.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(M,aa,X,ja,ca,ka,q){var E=u.getIncomingTreeEdges(M);if(m(M)){var Q=K(M),Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(M,aa):Y==R?d(M):P(M,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(M){var aa=[M];!C(M)&&!m(M)||F(M)||u.traverse(M,!0,function(X,
-ja){var ca=null!=ja&&u.isTreeEdge(ja);ca&&0>mxUtils.indexOf(aa,ja)&&aa.push(ja);(null==ja||ca)&&0>mxUtils.indexOf(aa,X)&&aa.push(X);return null==ja||ca});return aa};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position=
-"absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;y.hoverIcons.reset();
-mxEvent.consume(M)})))};var S=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){S.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 fa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){fa.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=M?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(M,aa){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",
-new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=
-!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var K=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};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-y.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;F.insertEdge(u,!0);y.insertEdge(u,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(u);p.insert(F);p.insert(K);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
+C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
+!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
+null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
+N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
+Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
+(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
+(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
+return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
+N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
+0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
+Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
+ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
+t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
+var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
+t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
+null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
+aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
+(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
+for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
+var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
+null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
+Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
+null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
+13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
+mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
+Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
+X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
+!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+F.vertex=!0;var L=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
+F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');y.vertex=!0;var t=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var K=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"};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
+p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;K.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var T="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;W="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,W.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,T,240,W,
-function(Z){D.createFormat(Z).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),W=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),W.style.right="0px"):(W.parentNode.appendChild(D.formatElt),W.style.right=D.formatElt.style.width)}function e(D,G){function W(qa,oa){var S=D.menus.get(qa);qa=N.addMenu(oa,mxUtils.bind(this,function(){S.funct.apply(this,arguments)}));qa.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;";
-qa.className="geTitle";G.appendChild(qa);return qa}var T=document.createElement("div");T.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;";T.className="geTitle";var Z=document.createElement("span");Z.style.fontSize="18px";Z.style.marginRight="5px";Z.innerHTML="+";T.appendChild(Z);mxUtils.write(T,mxResources.get("moreShapes"));G.appendChild(T);mxEvent.addListener(T,"click",function(){D.actions.get("shapes").funct()});
-var N=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?T.style.bottom="0":null!=D.actions.get("newLibrary")?(T=document.createElement("div"),T.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("newLibrary")),T.appendChild(Z),
-G.appendChild(T),mxEvent.addListener(T,"click",D.actions.get("newLibrary").funct),T=document.createElement("div"),T.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;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("openLibrary")),T.appendChild(Z),G.appendChild(T),mxEvent.addListener(T,
-"click",D.actions.get("openLibrary").funct)):(T=W("newLibrary",mxResources.get("newLibrary")),T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="0",T=W("openLibraryFrom",mxResources.get("openLibraryFrom")),T.style.borderLeft="1px solid lightgray",T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"}
-function k(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(W.container.clientWidth-10,218);var T="1"==urlParams.embedInline?650:Math.min(W.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(W.container.clientHeight-T)/2):56,G-6,T-6,function(Z){e(D,Z)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Z){D.sidebar.showEntries(Z,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
-D.sidebarElt.style.borderRight="1px solid gray"),W=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),W.style.left="0px"):(W.parentNode.appendChild(D.sidebarElt),W.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
+!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
+function(T){D.createFormat(T).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=I?I:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
+D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
+var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
+I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
+"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
+function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
+D.sidebarElt.style.borderRight="1px solid gray"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):F.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var G=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var T=document.createElement("img");T.setAttribute("border","0");T.style.position="absolute";
-T.style.left="18px";T.style.top="2px";T.style.width="12px";T.style.height="12px";var Z=W.getRealtimeError();W=W.getRealtimeState();G+=" ("+mxResources.get("realtimeCollaboration");1==W?(T.src=Editor.syncImage,G+=mxResources.get("online")):(T.src=Editor.syncProblemImage,G=null!=Z&&null!=Z.message?G+Z.message:G+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(T);G+=")"}}D.setAttribute("title",G)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className="geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var W="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,W);G.setAttribute("title",W);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G),
-"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G=document.createElement("a"),W="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G,
-W),G.setAttribute("title",W),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,
-D)){var W=mxUtils.getOffset(this.editorUi.picker);W.x+=this.editorUi.picker.offsetWidth+4;W.y+=D.offsetTop-G.height/2+16;return W}var T=d.apply(this,arguments);W=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);T.x+=W.x-16;T.y+=W.y;return T};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,W){var T=this.editorUi.editor.graph;D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?T.isEnabled()&&(D.addSeparator(),1==T.getSelectionCount()&&this.addMenuItems(D,
-["-","lockUnlock"],null,W)):1==T.getSelectionCount()?(T.isCellFoldable(T.getSelectionCell())&&this.addMenuItems(D,T.isCellCollapsed(G)?["expand"]:["collapse"],null,W),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,W),D.addSeparator(),this.addSubmenu("layout",D)):T.isSelectionEmpty()&&T.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,W),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,W)):
-T.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,W)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,W){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,W)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var x=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.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){y.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&&
-null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(S){D.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));G=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));G.shortcut=D.actions.get("formatPanel").shortcut;G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(S.container,620,420,!0,!1);S.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(S.container,620,420,!0,!1);S.init()}));var W=
-this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,fa){var ia=this.editorUi.editor.graph,M=ia.getSelectionCell();W.call(this,S,M,null,fa);this.addMenuItems(S,["editTooltip"],fa);ia.model.isVertex(M)&&this.addMenuItems(S,["editGeometry"],fa);this.addMenuItems(S,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(S,fa,ia,M){S.addSeparator();this.addSubmenu("editCell",S,M,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(S,fa){var ia=
-D.getCurrentFile();D.menus.addMenuItems(S,["new"],fa);D.menus.addSubmenu("openFrom",S,fa);isLocalStorage&&this.addSubmenu("openRecent",S,fa);S.addSeparator(fa);D.menus.addMenuItems(S,["-","save"],fa);null!=ia&&ia.constructor==DriveFile||D.menus.addMenuItems(S,["saveAs"],fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile&&null==ia.fileHandle||D.menus.addMenuItems(S,["synchronize"],fa);null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,"- rename makeCopy - moveToFolder openFolder".split(" "),
-fa):(D.menus.addMenuItems(S,["-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa);if(null!=ia){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var M=null!=ia.getTitle()?ia.getTitle():D.defaultFilename;(ia.constructor==DriveFile&&null!=ia.sync&&ia.sync.isConnected()||!/(\.html)$/i.test(M)&&
-!/(\.svg)$/i.test(M))&&this.addMenuItems(S,["properties"],fa)}ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa)}D.menus.addMenuItems(S,["-","autosave"],fa)})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();D.menus.addSubmenu("extras",S,fa,mxResources.get("preferences"));S.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||
-D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&D.menus.addMenuItems(S,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(S,["saveAndExit"],fa),null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["revisionHistory"],fa);S.addSeparator(fa)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(S,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?
-(D.menus.addMenuItems(S,["new"],fa),D.menus.addSubmenu("openFrom",S,fa),isLocalStorage&&this.addSubmenu("openRecent",S,fa),S.addSeparator(fa),null!=ia&&(ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile||D.menus.addMenuItems(S,["synchronize"],fa)),S.addSeparator(fa),D.menus.addSubmenu("save",S,fa)):D.menus.addSubmenu("file",S,fa));D.menus.addSubmenu("exportAs",S,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-D.menus.addMenuItems(S,["import"],fa):"1"!=urlParams.noFileMenu&&D.menus.addSubmenu("importFrom",S,fa);D.menus.addMenuItems(S,["-","findReplace"],fa);D.commentsSupported()&&D.menus.addMenuItems(S,["comments","-"],fa);D.menus.addMenuItems(S,["toggleFormat","layers","tags","-","pageSetup"],fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(S,["print"],fa);"1"!=urlParams.sketch&&null!=ia&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(ia=null!=ia.getTitle()?ia.getTitle():
-D.defaultFilename,/(\.html)$/i.test(ia)||/(\.svg)$/i.test(ia)||this.addMenuItems(S,["-","properties"]));S.addSeparator(fa);D.menus.addSubmenu("help",S,fa);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(S,["-","exit"],fa):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,
-["save","makeCopy","-","rename","moveToFolder"],fa):(D.menus.addMenuItems(S,["save","saveAs","-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));D.menus.addMenuItems(S,["-","autosave"],fa);null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa)})));var T=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,fa){T.funct(S,
-fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(S,["publishLink"],fa);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(fa),D.menus.addSubmenu("embed",S,fa))})));var Z=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,fa){D.menus.addInsertTableCellItem(S,fa)})));var N=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,fa){N.funct(S,fa);this.addMenuItems(S,["-","ruler","-","pageScale"],fa)})));this.put("extras",new Menu(mxUtils.bind(this,
-function(S,fa){null==Z||"1"==urlParams.embed&&null!=urlParams.lang||D.menus.addSubmenu("language",S,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",S,fa);D.menus.addSubmenu("units",S,fa);S.addSeparator(fa);"1"!=urlParams.sketch&&D.menus.addMenuItems(S,["scrollbars","-","tooltips","copyConnect","collapseExpand"],fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&&
-D.menus.addMenuItems(S,["-","showStartScreen","search","scratchpad"],fa);S.addSeparator(fa);"1"==urlParams.sketch&&D.menus.addMenuItems(S,["copyConnect","collapseExpand","tooltips","-"],fa);EditorUi.isElectronApp&&D.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],fa);var ia=D.getCurrentFile();null!=ia&&ia.isRealtimeEnabled()&&ia.isRealtimeSupported()&&this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],fa);Graph.translateDiagram&&D.menus.addMenuItems(S,["diagramLanguage"],
-fa);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"configuration",fa);"1"!=urlParams.sketch&&!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"plugins",fa);S.addSeparator(fa)})));mxUtils.bind(this,function(){var S=this.get("insert"),fa=S.funct;S.funct=function(ia,M){"1"==urlParams.sketch?(D.menus.addMenuItems(ia,["toggleShapes"],M),D.menus.addSubmenu("table",ia,M),ia.addSeparator(M),D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(ia,["insertTemplate"],
-M),D.menus.addMenuItems(ia,["insertImage","insertLink","-"],M),D.menus.addSubmenu("insertAdvanced",ia,M,mxResources.get("advanced")),D.menus.addSubmenu("layout",ia,M)):(fa.apply(this,arguments),D.menus.addSubmenu("table",ia,M))}})();var qa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),oa=function(S,fa,ia,M){S.addItem(ia,null,mxUtils.bind(this,function(){var aa=new CreateGraphDialog(D,ia,M);D.showDialog(aa.container,620,420,!0,!1);aa.init()}),fa)};
-this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,fa){for(var ia=0;ia<qa.length;ia++)"-"==qa[ia]?S.addSeparator(fa):oa(S,fa,mxResources.get(qa[ia])+"...",qa[ia])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,W=document.createElement("div");W.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";G.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(T,Z){0<G.getSelectionCount()?(D.appendChild(W),W.innerHTML="Selected: "+G.getSelectionCount()):null!=W.parentNode&&W.parentNode.removeChild(W)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",
-this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(ua,za,Fa){var Ba=
-N.menus.get(ua),Ea=fa.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ba.funct.apply(this,arguments)}),S);Ea.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.top="6px";Ea.style.marginRight="6px";Ea.style.height="30px";Ea.style.paddingTop="6px";Ea.style.paddingBottom="6px";Ea.style.cursor="pointer";Ea.setAttribute("title",mxResources.get(ua));N.menus.menuCreated(Ba,Ea,"geMenuItem");null!=Fa?(Ea.style.backgroundImage=
-"url("+Fa+")",Ea.style.backgroundPosition="center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px",Ea.innerText=""):za||(Ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ea.style.backgroundPosition="right 6px center",Ea.style.backgroundRepeat="no-repeat",Ea.style.paddingRight="22px");return Ea}function G(ua,za,Fa,Ba,Ea,Oa){var Pa=document.createElement("a");Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";
-Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.height="30px";Pa.style.padding="6px";Pa.style.position="relative";Pa.style.verticalAlign="top";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.borderStyle="none",Pa.style.boxShadow="none",Pa.style.padding="6px",Pa.style.margin="0px");null!=N.statusContainer?oa.insertBefore(Pa,N.statusContainer):oa.appendChild(Pa);null!=Oa?(Pa.style.backgroundImage="url("+Oa+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat=
-"no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,ua);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(bb){bb.preventDefault()}));mxEvent.addListener(Pa,"click",function(bb){"disabled"!=Pa.getAttribute("disabled")&&za(bb);mxEvent.consume(bb)});null==Fa&&(Pa.style.marginRight="4px");null!=Ba&&Pa.setAttribute("title",Ba);null!=Ea&&(ua=function(){Ea.isEnabled()?(Pa.removeAttribute("disabled"),Pa.style.cursor="pointer"):
-(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ea.addListener("stateChanged",ua),qa.addListener("enabledChanged",ua),ua());return Pa}function W(ua,za,Fa){Fa=document.createElement("div");Fa.className="geMenuItem";Fa.style.display="inline-block";Fa.style.verticalAlign="top";Fa.style.marginRight="6px";Fa.style.padding="0 4px 0 4px";Fa.style.height="30px";Fa.style.position="relative";Fa.style.top="0px";"1"==urlParams.sketch&&(Fa.style.boxShadow="none");for(var Ba=0;Ba<ua.length;Ba++)null!=
-ua[Ba]&&("1"==urlParams.sketch&&(ua[Ba].style.padding="10px 8px",ua[Ba].style.width="30px"),ua[Ba].style.margin="0px",ua[Ba].style.boxShadow="none",Fa.appendChild(ua[Ba]));null!=za&&mxUtils.setOpacity(Fa,za);null!=N.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(Fa,N.statusContainer):oa.appendChild(Fa);return Fa}function T(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(E.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var ua=oa.firstChild;null!=ua;){var za=ua.nextSibling;
-"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}S=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>m||"1"==urlParams.sketch;var Fa=null;ua||(Fa=D("diagram"));za=ua?D("diagram",null,Editor.menuImage):null;null!=za&&(Fa=za);W([Fa,G(mxResources.get("shapes"),N.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),N.actions.get("image"),ua?Editor.shapesImage:null),G(mxResources.get("format"),N.actions.get("toggleFormat").funct,
-null,mxResources.get("format")+" ("+N.actions.get("formatPanel").shortcut+")",N.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);var Ba=D("insert",!0,ua?ca:null);W([Ba,G(mxResources.get("delete"),N.actions.get("delete").funct,null,mxResources.get("delete"),N.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=m&&(W([Ta,Za],60),520<=m&&W([ha,640<=m?G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",La,Editor.zoomInImage):null,640<=m?G("",Da.funct,!0,mxResources.get("zoomOut")+
-" ("+Editor.ctrlKey+" -)",Da,Editor.zoomOutImage):null],60))}null!=Fa&&(mxEvent.disableContextMenu(Fa),mxEvent.addGestureListeners(Fa,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&N.appIconClicked(Ea)}),null,null));za=N.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?
-(null==wa&&(Ba=fa.addMenu("",za.funct),Ba.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="22px 22px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="12px",oa.appendChild(Ba),
-wa=Ba,"1"==urlParams["live-ui"]&&(za=mxUtils.bind(this,function(){Ba.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",za),za())),N.buttonContainer.style.paddingRight="34px"):(N.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}J.apply(this,arguments);var Z=document.createElement("div");Z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-Z.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Z);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
-!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var N=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==N.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Fa=N.embedViewport.x+N.embedViewport.width,Ba=parseInt(this.div.offsetTop),Ea=parseInt(this.div.offsetHeight),Oa=N.embedViewport.y+
-N.embedViewport.height;this.div.style.left=Math.max(N.embedViewport.x,Math.min(ua,Fa-za))+"px";this.div.style.top=Math.max(N.embedViewport.y,Math.min(Ba,Oa-Ea))+"px";this.div.style.height=Math.min(N.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(N.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),Z=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Z)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));N=this;var qa=N.editor.graph;N.toolbar=this.createToolbar(N.createDiv("geToolbar"));N.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var S=null,
-fa=new Menubar(N,oa);N.statusContainer=N.createStatusContainer();N.statusContainer.style.position="relative";N.statusContainer.style.maxWidth="";N.statusContainer.style.marginTop="7px";N.statusContainer.style.marginLeft="6px";N.statusContainer.style.color="gray";N.statusContainer.style.cursor="default";var ia=N.hideCurrentMenu;N.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=N.descriptorChanged;N.descriptorChanged=function(){M.apply(this,arguments);
-var ua=N.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);oa.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else oa.removeAttribute("title")};N.setStatusText(N.editor.getStatus());oa.appendChild(N.statusContainer);N.buttonContainer=document.createElement("div");N.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-oa.appendChild(N.buttonContainer);N.menubarContainer=N.buttonContainer;N.tabContainer=document.createElement("div");N.tabContainer.className="geTabContainer";N.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Z=N.diagramContainer.parentNode;var aa=document.createElement("div");aa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";N.diagramContainer.style.top="1"==
-urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){aa.style.top="20px";N.titlebar=document.createElement("div");N.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var X=document.createElement("div");X.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";N.titlebar.appendChild(X);
-Z.appendChild(N.titlebar)}X=N.menus.get("viewZoom");var ja=X.funct;X.funct=function(ua,za){ja.apply(this,arguments);N.menus.addMenuItems(ua,["-","outline","fullscreen"],za)};var ca="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,E="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)E.style.left="10px",E.style.top=
-"10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",N.diagramContainer.setAttribute("data-bounds",N.diagramContainer.style.top+" "+N.diagramContainer.style.left+" "+N.diagramContainer.style.width+" "+N.diagramContainer.style.height),N.diagramContainer.style.top="0px",N.diagramContainer.style.left="0px",N.diagramContainer.style.bottom="0px",N.diagramContainer.style.right="0px",N.diagramContainer.style.width="",N.diagramContainer.style.height="";
-else{var ua=N.diagramContainer.getAttribute("data-bounds");if(null!=ua){N.diagramContainer.style.background="transparent";N.diagramContainer.removeAttribute("data-bounds");var za=qa.getGraphBounds();ua=ua.split(" ");N.diagramContainer.style.top=ua[0];N.diagramContainer.style.left=ua[1];N.diagramContainer.style.width=za.width+50+"px";N.diagramContainer.style.height=za.height+46+"px";N.diagramContainer.style.bottom="";N.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:N.diagramContainer.getBoundingClientRect()}),"*");N.refresh()}E.style.left=N.diagramContainer.offsetLeft+"px";E.style.top=N.diagramContainer.offsetTop-E.offsetHeight-4+"px";q.style.display="";q.style.left=N.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=N.diagramContainer.offsetTop+"px";ka.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=E.style.top;ka.style.right="";N.bottomResizer.style.left=N.diagramContainer.offsetLeft+
-(N.diagramContainer.offsetWidth-N.bottomResizer.offsetWidth)/2+"px";N.bottomResizer.style.top=N.diagramContainer.offsetTop+N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight/2-1+"px";N.rightResizer.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-N.rightResizer.offsetWidth/2-1+"px";N.rightResizer.style.top=N.diagramContainer.offsetTop+(N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight)/2+"px"}N.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
-"";N.rightResizer.style.visibility=N.bottomResizer.style.visibility;oa.style.display="none";E.style.visibility="";ka.style.visibility=""}),Y=N.actions.get("fullscreen"),R=G("",Y.funct,null,mxResources.get(""),Y,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){R.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
-Q()});Y=mxUtils.bind(this,function(){b(N,!0);N.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y);ba()});N.addListener("inlineFullscreenChanged",ba);N.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&N.addListener("darkModeChanged",Y);N.addListener("editInlineStop",mxUtils.bind(this,function(ua){N.diagramContainer.style.width="10px";N.diagramContainer.style.height="10px";N.diagramContainer.style.border="";
-N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=N.hoverIcons){var ea=N.hoverIcons.update;N.hoverIcons.update=function(){qa.freehand.isDrawing()||ea.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(ua){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className=
-"geToolbarContainer";E.className="geToolbarContainer";oa.className="geToolbarContainer";N.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=N.getServiceName()&&(mxEvent.addListener(oa,"mouseenter",function(){N.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(N.statusContainer.style.display="none")}));var la=mxUtils.bind(this,function(ua){null!=N.notificationBtn&&(null!=ua?N.notificationBtn.setAttribute("title",ua):N.notificationBtn.removeAttribute("title"))});
-if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var pa=D("theme",null,Editor.darkModeImage);null!=pa&&(pa.style.position="relative",pa.style.backgroundPosition="top center",pa.style.backgroundSize="22px 22px",pa.style.width="24px",pa.style.height="28px",pa.style.top="4px",oa.appendChild(pa),Y=mxUtils.bind(this,function(){pa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",Y),Y())}oa.style.visibility=20>oa.clientWidth?
-"hidden":"";N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=N.getServiceName())if(N.statusContainer.style.display="inline-block",ta=!0,1==N.statusContainer.children.length&&""==N.editor.getStatus())oa.style.visibility="hidden";else{if(0==N.statusContainer.children.length||1==N.statusContainer.children.length&&"function"===typeof N.statusContainer.firstChild.getAttribute&&null==N.statusContainer.firstChild.getAttribute("class")){var ua=
-null!=N.statusContainer.firstChild&&"function"===typeof N.statusContainer.firstChild.getAttribute?N.statusContainer.firstChild.getAttribute("title"):N.editor.getStatus();la(ua);var za=N.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(N.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',N.statusContainer.style.display="inline-block",ta=!0):6<N.buttonContainer.clientWidth&&
-(N.statusContainer.style.display="none",ta=!1)}else N.statusContainer.style.display="inline-block",la(null),ta=!0;oa.style.visibility=20>oa.clientWidth&&!ta?"hidden":""}}));U=D("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";E.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
-this.appIconClicked(ua)}),null,null);N.statusContainer.style.position="";N.statusContainer.style.display="none";N.statusContainer.style.margin="0px";N.statusContainer.style.padding="6px 0px";N.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";N.statusContainer.style.display="inline-block";N.statusContainer.style.textOverflow="ellipsis";N.buttonContainer.style.display="inline-block";N.buttonContainer.style.position="relative";N.buttonContainer.style.paddingRight="0px";N.buttonContainer.style.top=
-"0px";var xa=document.createElement("a");xa.style.padding="0px";xa.style.boxShadow="none";xa.className="geMenuItem";xa.style.display="inline-block";xa.style.width="40px";xa.style.height="12px";xa.style.marginBottom="-2px";xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";xa.style.backgroundPosition="top center";xa.style.backgroundRepeat="no-repeat";xa.setAttribute("title","Minimize");var Ca=!1,Ia=mxUtils.bind(this,function(){q.innerText="";if(!Ca){var ua=function(za,Fa,Ba,Ea){null!=
-Fa&&za.setAttribute("title",Fa);za.style.cursor=null!=Ba?Ba:"default";za.style.margin="2px 0px";q.appendChild(za);mxUtils.br(q);null!=Ea&&(za.style.position="relative",za.style.overflow="visible",Fa=document.createElement("div"),Fa.style.position="absolute",Fa.style.left="34px",Fa.style.top="28px",Fa.style.fontSize="8px",mxUtils.write(Fa,Ea),za.appendChild(Fa));return za};ua(N.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
-60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ua(N.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ua(N.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ua(N.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var za=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");za.geometry.setTerminalPoint(new mxPoint(0,0),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-0),!1);za.geometry.points=[];za.geometry.relative=!0;za.edge=!0;ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,za.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");za=za.clone();za.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";za.geometry.width=qa.defaultEdgeLength+20;za.geometry.setTerminalPoint(new mxPoint(0,20),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-20),!1);ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(za,Fa,Ba,Ea){za=G("",za.funct,null,Fa,za,Ba);za.style.width="40px";za.style.height="34px";za.style.opacity="0.7";return ua(za,null,"pointer",Ea)})(N.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");U=D("insert",null,Editor.plusImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin=
-"0px";U.style.height="34px";U.style.width="37px";ua(U,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(xa)});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){Ca?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",xa.style.width="40px",xa.style.height="12px",xa.setAttribute("title","Minimize"),Ca=!1,Ia()):(q.innerText=
-"",q.appendChild(xa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",xa.style.height="24px",xa.style.backgroundImage="url("+Editor.plusImage+")",xa.setAttribute("title",mxResources.get("insert")),xa.style.width="24px",Ca=!0)}));Ia();N.addListener("darkModeChanged",Ia);N.addListener("sketchModeChanged",Ia)}else N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus())}));
-if(null!=X){var Aa=function(ua){if(mxEvent.isAltDown(ua))N.hideCurrentMenu(),N.actions.get("customZoom").funct(),mxEvent.consume(ua);else if("geItem"!=mxEvent.getSource(ua).className||mxEvent.isShiftDown(ua))N.hideCurrentMenu(),N.actions.get("smartFit").funct(),mxEvent.consume(ua)},La=N.actions.get("zoomIn"),Da=N.actions.get("zoomOut");Y=N.actions.get("resetView");var Sa=N.actions.get("undo"),Ra=N.actions.get("redo"),Ta=G("",Sa.funct,null,mxResources.get("undo")+" ("+Sa.shortcut+")",Sa,Editor.undoImage),
-Za=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){Y=function(){V.style.display=null!=N.pages&&("0"!=urlParams.pages||1<N.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Na=function(){V.innerText="";if(null!=N.currentPage){mxUtils.write(V,N.currentPage.getName());var ua=null!=N.pages?N.pages.length:1,za=N.getPageIndex(N.currentPage);za=null!=za?za+1:1;var Fa=N.currentPage.getId();V.setAttribute("title",N.currentPage.getName()+" ("+za+
-"/"+ua+")"+(null!=Fa?" ["+Fa+"]":""))}},z=N.actions.get("delete"),L=G("",z.funct,null,mxResources.get("delete"),z,Editor.trashImage);L.style.opacity="0.1";E.appendChild(L);z.addListener("stateChanged",function(){L.style.opacity=z.enabled?"":"0.1"});var O=function(){Ta.style.display=0<N.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none";Za.style.display=Ta.style.display;Ta.style.opacity=Sa.enabled?"":"0.1";Za.style.opacity=Ra.enabled?"":"0.1"};E.appendChild(Ta);E.appendChild(Za);
-Sa.addListener("stateChanged",O);Ra.addListener("stateChanged",O);O();var V=this.createPageMenuTab(!1,!0);V.style.display="none";V.style.position="";V.style.marginLeft="";V.style.top="";V.style.left="";V.style.height="100%";V.style.lineHeight="";V.style.borderStyle="none";V.style.padding="3px 0";V.style.margin="0px";V.style.background="";V.style.border="";V.style.boxShadow="none";V.style.verticalAlign="top";V.style.width="auto";V.style.maxWidth="160px";V.style.position="relative";V.style.padding=
-"6px";V.style.textOverflow="ellipsis";V.style.opacity="0.8";ka.appendChild(V);N.editor.addListener("pagesPatched",Na);N.editor.addListener("pageSelected",Na);N.editor.addListener("pageRenamed",Na);N.editor.addListener("fileLoaded",Na);Na();N.addListener("fileDescriptorChanged",Y);N.addListener("pagesVisibleChanged",Y);N.editor.addListener("pagesPatched",Y);Y();Y=G("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);ka.appendChild(Y);var U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom"));U.innerHTML="100%";U.style.display="inline-block";U.style.color="inherit";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";ka.appendChild(U);X=G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",La,Editor.zoomInImage);
-ka.appendChild(X);"1"==urlParams.embedInline?(ka.appendChild(R),X=N.actions.get("exit"),ka.appendChild(G("",X.funct,null,mxResources.get("exit"),X,Editor.closeImage))):R.parentNode.removeChild(R);N.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";E.style.cssText=
-"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";aa.appendChild(E);aa.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(q.style.touchAction="none");aa.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(aa)}else{var ha=G("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(N.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(N.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px";
-U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";aa.appendChild(U)}(function(ua){mxEvent.addListener(ua,"click",Aa);var za=mxUtils.bind(this,function(){ua.innerText="";mxUtils.write(ua,Math.round(100*N.editor.graph.view.scale)+"%")});N.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);N.editor.addListener("resetGraphView",za);N.editor.addListener("pageSelected",
-za)})(U);var ma=N.setGraphEnabled;N.setGraphEnabled=function(){ma.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}aa.appendChild(oa);aa.appendChild(N.diagramContainer);Z.appendChild(aa);N.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&aa.appendChild(N.tabContainer);
-var wa=null;T();mxEvent.addListener(window,"resize",function(){T();null!=N.sidebarWindow&&N.sidebarWindow.window.fit();null!=N.formatWindow&&N.formatWindow.window.fit();null!=N.actions.outlineWindow&&N.actions.outlineWindow.window.fit();null!=N.actions.layersWindow&&N.actions.layersWindow.window.fit();null!=N.menus.tagsWindow&&N.menus.tagsWindow.window.fit();null!=N.menus.findWindow&&N.menus.findWindow.window.fit();null!=N.menus.findReplaceWindow&&N.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(N.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==N.diagramContainer.parentNode&&(N.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),N.sendEmbeddedSvgExport())});Z=document.createElement("div");Z.style.position="absolute";Z.style.width="10px";Z.style.height="10px";Z.style.borderRadius="5px";Z.style.border="1px solid gray";Z.style.background="#ffffff";Z.style.cursor=
-"row-resize";N.diagramContainer.parentNode.appendChild(Z);N.bottomResizer=Z;var sa=null,ya=null,Ha=null,Qa=null;mxEvent.addGestureListeners(Z,function(ua){Qa=parseInt(N.diagramContainer.style.height);ya=mxEvent.getClientY(ua);qa.popupMenuHandler.hideMenu();mxEvent.consume(ua)});Z=Z.cloneNode(!1);Z.style.cursor="col-resize";N.diagramContainer.parentNode.appendChild(Z);N.rightResizer=Z;mxEvent.addGestureListeners(Z,function(ua){Ha=parseInt(N.diagramContainer.style.width);sa=mxEvent.getClientX(ua);qa.popupMenuHandler.hideMenu();
-mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=sa&&(N.diagramContainer.style.width=Math.max(20,Ha+mxEvent.getClientX(ua)-sa)+"px",za=!0);null!=ya&&(N.diagramContainer.style.height=Math.max(20,Qa+mxEvent.getClientY(ua)-ya)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:N.diagramContainer.getBoundingClientRect()}),"*"),Q(),N.refresh())},function(ua){null==sa&&null==
-ya||mxEvent.consume(ua);ya=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&N.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
+D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
+S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
+"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
+H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
+"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
+D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null!=this.formatWindow&&(1E3<=I||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
+I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
+!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
+function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
+function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(pa));M.menus.menuCreated(Fa,
+Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
+"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
+Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
+for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
+la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
+null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
+W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);var T=document.createElement("div");T.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";T.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&
+!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
+var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
+Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
+this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
+"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
+la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
+"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
+urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
+"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
+ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
+"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
+2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
+aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
+fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
+(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
+""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
+"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
+"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
+")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
+"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
+ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
+Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
+null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
+"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
+Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
+"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
+E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+ha.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";N.appendChild(ia);N.appendChild(ha);X.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
+"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
+"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
+this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
+null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
+function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});T=document.createElement("div");T.style.position="absolute";T.style.width="10px";T.style.height="10px";T.style.borderRadius="5px";T.style.border="1px solid gray";T.style.background="#ffffff";T.style.cursor="row-resize";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
+function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
+Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
+M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;F.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+
-" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=P[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var J=0<=H;J&&this.selectPage(H);return J};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var J=H.src,
-D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=y.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
+" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
+P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
+I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
+urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var J=H.indexOf(",");K.selectPageById(H.substring(J+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
@@ -4096,36 +4107,36 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};K={left:K.left-P.left,top:K.top-P.top,bottom:K.bottom-P.top,right:K.right-P.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
+P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var F=mxUtils.bind(this,function(K){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty||
-null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;F(K)}};
+m);var F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
+null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var P=b.getCell(m[K]);null!=P&&(e=!0,p[P.id]=!0)}else for(K=0;K<k.length;K++)P=b.getChildAt(b.root,parseInt(k[K])),null!=P&&(e=!0,p[P.id]=!0);for(K=0;e&&
-K<F;K++)P=b.getChildAt(b.root,K),b.setVisible(P,p[P.id]||!1)}else for(K=0;K<F;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
+L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),oa||200)}),p=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var F=this.graph,K=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(oa,
-S){},mouseUp:function(oa,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<K&&Math.abs(this.scrollTop-F.container.scrollTop)<K&&Math.abs(this.startX-S.getGraphX())<K&&Math.abs(this.startY-S.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,S,fa,ia){oa=this.createToolbarButton(oa,S,fa,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,y=null,u=null,H=0;H<P.length;H++){var J=P[H];if("pages"==
-J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";J=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",J);J()}else if("zoom"==J)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var W=this.graph.getModel(),T=f(mxUtils.bind(this,function(oa){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var fa=this.graph.getGraphBounds(),ia=this.graph.view;0>fa.x||0>fa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<fa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<fa.y/ia.scale+this.graph.originalViewState.translate.y-
-ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var S=mxUtils.getDocumentScrollOrigin(document);g.style.left=S.x+oa.left-1+"px";g.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");W.addListener(mxEvent.CHANGE,function(){T.style.display=1<W.getChildCount(W.root)?"inline-block":"none"});T.style.display=
-1<W.getChildCount(W.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Z=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});oa=Z.getBoundingClientRect();var S=mxUtils.getDocumentScrollOrigin(document);y.style.left=S.x+oa.left-1+"px";y.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");W.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null==
-J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var N=b.style.border,qa=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 oa=b.getBoundingClientRect(),S=mxUtils.getScrollOrigin(document.body);S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};oa={left:oa.left-
-S.left,top:oa.top-S.top,bottom:oa.bottom-S.top,right:oa.right-S.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==N&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var fa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=g&&
-(g.parentNode.removeChild(g),g=null);b.style.border=N});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}fa()});mxEvent.addListener(document.body,"mouseleave",function(ia){fa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&qa()})).observe(b)};
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
+m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
+ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
+if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
+g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
+na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
+g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
+1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
+x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
+D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
+e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
+ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&la()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
@@ -4136,10 +4147,10 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var K=m.editor.graph,P=K.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
+"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
@@ -4148,8 +4159,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],u=y.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var W,T,Z,N;x=function(){if((Z=g.offsetWidth)!=W||(N=g.offsetHeight)!=T)D=!0,W=Z,T=N;J()};var qa=function(oa,
-S,fa){oa.attachEvent?oa.attachEvent("on"+S,fa):oa.addEventListener(S,fa)};qa(y,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],K)}else F(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
+g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
+ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
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 6c31a554..7b7656e5 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2006,104 +2006,104 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(m,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(m,C){m=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(F){return!(F instanceof mxChildChange)});if(0<m.length){b.getModel();C=[];for(var p=0;p<m.length;p++)null!=
b.view.getState(m[p])&&C.push(m[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,m,C,p,F,K,P,d,f){var g=P?57:0,x=k,y=m,u=P?0:64,H=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var J=H.height,D=Math.max(1,Math.round((H.width-k-u)/2)),G=Math.max(1,Math.round((J-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-u):k;m=Math.min(m,J-u);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=J+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";D+=H.x;G+=H.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-G+=b.embedViewport.y,D+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var W=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(D,G,k,m);D=C.x;G=C.y;W.style.width=k+"px";W.style.height=m+"px";W.style.left=D+"px";W.style.top=G+"px";W.style.zIndex=this.zIndex;W.appendChild(e);document.body.appendChild(W);!K&&e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=G+14+"px",p.style.left=D+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){T=!0}),null,mxUtils.bind(this,function(Z){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var Z=d();
-null!=Z&&(x=k=Z.w,y=m=Z.h)}Z=mxUtils.getDocumentSize();J=Z.height;this.bg.style.height=J+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");D=Math.max(1,Math.round((Z.width-k-u)/2));G=Math.max(1,Math.round((J-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-u):x;m=Math.min(y,J-u);Z=this.getPosition(D,G,k,m);D=Z.x;G=Z.y;W.style.left=D+"px";W.style.top=G+"px";W.style.width=k+"px";W.style.height=m+"px";!K&&
-e.clientHeight>W.clientHeight-u&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=G+14+"px",this.dialogImg.style.left=D+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=W;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,m,C,p,F,L,P,d,f){var g=P?57:0,x=k,y=m,t=P?0:64,G=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(G.height=window.innerHeight);var D=G.height,I=Math.max(1,Math.round((G.width-k-t)/2)),H=Math.max(1,Math.round((D-m-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-t):k;m=Math.min(m,D-t);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));G=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=G.x+"px";this.bg.style.top=G.y+"px";I+=G.x;H+=G.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+H+=b.embedViewport.y,I+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var S=b.createDiv(P?"geTransDialog":"geDialog");C=this.getPosition(I,H,k,m);I=C.x;H=C.y;S.style.width=k+"px";S.style.height=m+"px";S.style.left=I+"px";S.style.top=H+"px";S.style.zIndex=this.zIndex;S.appendChild(e);document.body.appendChild(S);!L&&e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=H+14+"px",p.style.left=I+k+38-g+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!f)){var T=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(M){T=!0}),null,mxUtils.bind(this,function(M){T&&(b.hideDialog(!0),T=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=d){var M=d();
+null!=M&&(x=k=M.w,y=m=M.h)}M=mxUtils.getDocumentSize();D=M.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");I=Math.max(1,Math.round((M.width-k-t)/2));H=Math.max(1,Math.round((D-m-b.footerHeight)/3));k=null!=document.body?Math.min(x,document.body.scrollWidth-t):x;m=Math.min(y,D-t);M=this.getPosition(I,H,k,m);I=M.x;H=M.y;S.style.left=I+"px";S.style.top=H+"px";S.style.width=k+"px";S.style.height=m+"px";!L&&
+e.clientHeight>S.clientHeight-t&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=I+k+38-g+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=F;this.container=S;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,m,C,p,F,K,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
+var ErrorDialog=function(b,e,k,m,C,p,F,L,P,d,f){P=null!=P?P:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=e){var x=document.createElement("div");x.style.padding="0px";x.style.margin="0px";x.style.fontSize="18px";x.style.paddingBottom="16px";x.style.marginBottom="10px";x.style.borderBottom="1px solid #c0c0c0";x.style.color="gray";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.overflow="hidden";mxUtils.write(x,e);x.setAttribute("title",e);g.appendChild(x)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;g.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",k.appendChild(d));var y=mxUtils.button(m,function(){P&&b.hideDialog();null!=C&&C()});
-y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=K&&K()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(y){var u=F.checked||d.checked,H=parseInt(g.value)/100;isNaN(H)&&(H=1,g.value="100%");H*=.75;var J=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,D=1/k.pageScale;if(u){var G=F.checked?1:parseInt(f.value);isNaN(G)||(D=mxUtils.getScaleForPageCount(G,k,J))}k.getGraphBounds();var W=G=0;J=mxRectangle.fromRectangle(J);J.width=Math.ceil(J.width*H);J.height=Math.ceil(J.height*H);D*=H;!u&&k.pageVisible?(H=k.getPageLayout(),G-=H.x*J.width,W-=H.y*J.height):
-u=!0;u=PrintDialog.createPrintPreview(k,D,J,0,G,W,u);u.open();y&&PrintDialog.printPreview(u)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
-K.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(K);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");K.appendChild(P);mxEvent.addListener(P,
-"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(K);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";K=document.createElement("td");K.style.fontSize="10pt";K.appendChild(f);mxUtils.write(K," "+mxResources.get("pages")+" (max)");p.appendChild(K);C.appendChild(p);mxEvent.addListener(d,"change",
-function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);K=document.createElement("td");mxUtils.write(K,mxResources.get("pageScale")+":");p.appendChild(K);K=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";K.appendChild(g);p.appendChild(K);C.appendChild(p);p=document.createElement("tr");K=document.createElement("td");K.colSpan=2;
-K.style.paddingTop="20px";K.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&K.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";K.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";K.appendChild(x);b.editor.cancelFirst||
-K.appendChild(P);p.appendChild(K);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var K=e.writeHead;e.writeHead=function(P){K.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
+y.className="geBtn";k.appendChild(y);null!=F&&(m=mxUtils.button(F,function(){P&&b.hideDialog();null!=L&&L()}),m.className="geBtn gePrimaryBtn",k.appendChild(m));this.init=function(){y.focus()};g.appendChild(k);this.container=g},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(y){var t=F.checked||d.checked,G=parseInt(g.value)/100;isNaN(G)&&(G=1,g.value="100%");G*=.75;var D=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/k.pageScale;if(t){var H=F.checked?1:parseInt(f.value);isNaN(H)||(I=mxUtils.getScaleForPageCount(H,k,D))}k.getGraphBounds();var S=H=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*G);D.height=Math.ceil(D.height*G);I*=G;!t&&k.pageVisible?(G=k.getPageLayout(),H-=G.x*D.width,S-=G.y*D.height):
+t=!0;t=PrintDialog.createPrintPreview(k,I,D,0,H,S,t);t.open();y&&PrintDialog.printPreview(t)}var k=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var F=document.createElement("input");F.setAttribute("type","checkbox");var L=document.createElement("td");L.setAttribute("colspan","2");L.style.fontSize="10pt";L.appendChild(F);var P=document.createElement("span");mxUtils.write(P," "+mxResources.get("fitPage"));
+L.appendChild(P);mxEvent.addListener(P,"click",function(y){F.checked=!F.checked;d.checked=!F.checked;mxEvent.consume(y)});mxEvent.addListener(F,"change",function(){d.checked=!F.checked});p.appendChild(L);C.appendChild(p);p=p.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(d);P=document.createElement("span");mxUtils.write(P," "+mxResources.get("posterPrint")+":");L.appendChild(P);mxEvent.addListener(P,
+"click",function(y){d.checked=!d.checked;F.checked=!d.checked;mxEvent.consume(y)});p.appendChild(L);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";L=document.createElement("td");L.style.fontSize="10pt";L.appendChild(f);mxUtils.write(L," "+mxResources.get("pages")+" (max)");p.appendChild(L);C.appendChild(p);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");F.checked=!d.checked});p=p.cloneNode(!1);L=document.createElement("td");mxUtils.write(L,mxResources.get("pageScale")+":");p.appendChild(L);L=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";L.appendChild(g);p.appendChild(L);C.appendChild(p);p=document.createElement("tr");L=document.createElement("td");L.colSpan=2;
+L.style.paddingTop="20px";L.setAttribute("align","right");P=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});P.className="geBtn";b.editor.cancelFirst&&L.appendChild(P);if(PrintDialog.previewEnabled){var x=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});x.className="geBtn";L.appendChild(x)}x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});x.className="geBtn gePrimaryBtn";L.appendChild(x);b.editor.cancelFirst||
+L.appendChild(P);p.appendChild(L);C.appendChild(p);m.appendChild(C);this.container=m};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,m,C,p,F){e=new mxPrintPreview(b,e,k,m,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=F;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var L=e.writeHead;e.writeHead=function(P){L.apply(this,arguments);P.writeln('<style type="text/css">');P.writeln("@media screen {");P.writeln(" body > div { padding:30px;box-sizing:content-box; }");P.writeln("}");P.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var J=u;null!=J&&Graph.isPageLink(J.src)&&(J=b.createImageForPageLink(J.src,null));null!=J&&null!=J.src?(y.setAttribute("src",J.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
-"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";mxUtils.write(K,mxResources.get("paperSize")+":");F.appendChild(K);K=document.createElement("td");K.style.verticalAlign="top";K.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(K,"pagesetupdialog",m.pageFormat);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");
-mxUtils.write(K,mxResources.get("background")+":");F.appendChild(K);K=document.createElement("td");K.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
-"click",function(J){b.pickColor(f||"none",function(D){f=D;e()});mxEvent.consume(J)});K.appendChild(d);mxUtils.write(K,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();K.appendChild(g);mxEvent.addListener(g,"change",function(){var J=parseInt(g.value);g.value=Math.max(1,isNaN(J)?m.getGridSize():J)});F.appendChild(K);p.appendChild(F);F=document.createElement("tr");
-K=document.createElement("td");mxUtils.write(K,mxResources.get("image")+":");F.appendChild(K);K=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
-"60px";y.style.padding="4px";var u=m.backgroundImage,H=function(J){b.showBackgroundImageDialog(function(D,G){G||(u=D,k())},u);mxEvent.consume(J)};mxEvent.addListener(x,"click",H);mxEvent.addListener(y,"click",H);k();K.appendChild(y);K.appendChild(x);F.appendChild(K);p.appendChild(F);F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="16px";K.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
-b.editor.cancelFirst&&K.appendChild(x);H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var J=parseInt(g.value);isNaN(J)||m.gridSize===J||m.setGridSize(J);J=new ChangePageSetup(b,f,u,P.get());J.ignoreColor=m.background==f;J.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=u?u.src:null);m.pageFormat.width==J.previousFormat.width&&m.pageFormat.height==J.previousFormat.height&&J.ignoreColor&&J.ignoreImage||m.model.execute(J)});H.className="geBtn gePrimaryBtn";
-K.appendChild(H);b.editor.cancelFirst||K.appendChild(x);F.appendChild(K);p.appendChild(F);C.appendChild(p);this.container=C};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(Z,N,qa){if(qa||g!=document.activeElement&&x!=document.activeElement){Z=!1;for(N=0;N<u.length;N++)qa=u[N],G?"custom"==qa.key&&(K.value=qa.key,G=!1):null!=qa.format&&("a4"==qa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==qa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-qa.format.width&&k.height==qa.format.height?(K.value=qa.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,Z=!0):k.width==qa.format.height&&k.height==qa.format.width&&(K.value=qa.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,Z=F.checked=!0));Z?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
-"checked"),K.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.border="1px solid rgb(160, 160, 160)";K.style.width="206px";
+var PageSetupDialog=function(b){function e(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function k(){var D=t;null!=D&&Graph.isPageLink(D.src)&&(D=b.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(y.setAttribute("src",D.src),y.style.display=""):(y.removeAttribute("src"),y.style.display="none")}var m=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var F=document.createElement("tr");var L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";mxUtils.write(L,mxResources.get("paperSize")+":");F.appendChild(L);L=document.createElement("td");L.style.verticalAlign="top";L.style.fontSize="10pt";var P=PageSetupDialog.addPageFormatPanel(L,"pagesetupdialog",m.pageFormat);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");
+mxUtils.write(L,mxResources.get("background")+":");F.appendChild(L);L=document.createElement("td");L.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="22px";d.style.height="22px";d.style.cursor="pointer";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(d.style.position="relative",d.style.top="-6px");var f=m.background;e();mxEvent.addListener(d,
+"click",function(D){b.pickColor(f||"none",function(I){f=I;e()});mxEvent.consume(D)});L.appendChild(d);mxUtils.write(L,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=m.getGridSize();L.appendChild(g);mxEvent.addListener(g,"change",function(){var D=parseInt(g.value);g.value=Math.max(1,isNaN(D)?m.getGridSize():D)});F.appendChild(L);p.appendChild(F);F=document.createElement("tr");
+L=document.createElement("td");mxUtils.write(L,mxResources.get("image")+":");F.appendChild(L);L=document.createElement("td");var x=document.createElement("button");x.className="geBtn";x.style.margin="0px";mxUtils.write(x,mxResources.get("change")+"...");var y=document.createElement("img");y.setAttribute("valign","middle");y.style.verticalAlign="middle";y.style.border="1px solid lightGray";y.style.borderRadius="4px";y.style.marginRight="14px";y.style.maxWidth="100px";y.style.cursor="pointer";y.style.height=
+"60px";y.style.padding="4px";var t=m.backgroundImage,G=function(D){b.showBackgroundImageDialog(function(I,H){H||(t=I,k())},t);mxEvent.consume(D)};mxEvent.addListener(x,"click",G);mxEvent.addListener(y,"click",G);k();L.appendChild(y);L.appendChild(x);F.appendChild(L);p.appendChild(F);F=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="16px";L.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";
+b.editor.cancelFirst&&L.appendChild(x);G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var D=parseInt(g.value);isNaN(D)||m.gridSize===D||m.setGridSize(D);D=new ChangePageSetup(b,f,t,P.get());D.ignoreColor=m.background==f;D.ignoreImage=(null!=m.backgroundImage?m.backgroundImage.src:null)===(null!=t?t.src:null);m.pageFormat.width==D.previousFormat.width&&m.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||m.model.execute(D)});G.className="geBtn gePrimaryBtn";
+L.appendChild(G);b.editor.cancelFirst||L.appendChild(x);F.appendChild(L);p.appendChild(F);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,m){function C(M,fa,la){if(la||g!=document.activeElement&&x!=document.activeElement){M=!1;for(fa=0;fa<t.length;fa++)la=t[fa],H?"custom"==la.key&&(L.value=la.key,H=!1):null!=la.format&&("a4"==la.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==la.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==la.format.width&&k.height==la.format.height?(L.value=la.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,F.removeAttribute("checked"),F.defaultChecked=!1,F.checked=!1,M=!0):k.width==la.format.height&&k.height==la.format.width&&(L.value=la.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,F.setAttribute("checked","checked"),F.defaultChecked=!0,M=F.checked=!0));M?(P.style.display="",f.style.display="none"):(g.value=k.width/100,x.value=k.height/100,p.setAttribute("checked",
+"checked"),L.value="custom",P.style.display="none",f.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var F=document.createElement("input");F.setAttribute("name",e);F.setAttribute("type","radio");F.setAttribute("value","landscape");var L=document.createElement("select");L.style.marginBottom="8px";L.style.borderRadius="4px";L.style.border="1px solid rgb(160, 160, 160)";L.style.width="206px";
var P=document.createElement("div");P.style.marginLeft="4px";P.style.width="210px";P.style.height="24px";p.style.marginRight="6px";P.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));P.appendChild(e);F.style.marginLeft="10px";F.style.marginRight="6px";P.appendChild(F);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));P.appendChild(d);var f=document.createElement("div");f.style.marginLeft=
-"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},u=PageSetupDialog.getFormats(),H=0;H<u.length;H++){var J=u[H];y[J.key]=J;var D=document.createElement("option");D.setAttribute("value",
-J.key);mxUtils.write(D,J.title);K.appendChild(D)}var G=!1;C();b.appendChild(K);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var W=k,T=function(Z,N){Z=y[K.value];null!=Z.format?(g.value=Z.format.width/100,x.value=Z.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");Z=parseFloat(g.value);if(isNaN(Z)||0>=Z)g.value=k.width/100;Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=k.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
-Math.floor(100*parseFloat(x.value)));"custom"!=K.value&&F.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));N&&G||Z.width==W.width&&Z.height==W.height||(W=Z,null!=m&&m(W))};mxEvent.addListener(e,"click",function(Z){p.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(d,"click",function(Z){F.checked=!0;T(Z);mxEvent.consume(Z)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);mxEvent.addListener(p,
-"change",T);mxEvent.addListener(K,"change",function(Z){G="custom"==K.value;T(Z,!0)});T();return{set:function(Z){k=Z;C(null,null,!0)},get:function(){return W},widthInput:g,heightInput:x}};
+"4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";f.appendChild(x);mxUtils.write(f," in");P.style.display="none";f.style.display="none";for(var y={},t=PageSetupDialog.getFormats(),G=0;G<t.length;G++){var D=t[G];y[D.key]=D;var I=document.createElement("option");I.setAttribute("value",
+D.key);mxUtils.write(I,D.title);L.appendChild(I)}var H=!1;C();b.appendChild(L);mxUtils.br(b);b.appendChild(P);b.appendChild(f);var S=k,T=function(M,fa){M=y[L.value];null!=M.format?(g.value=M.format.width/100,x.value=M.format.height/100,f.style.display="none",P.style.display=""):(P.style.display="none",f.style.display="");M=parseFloat(g.value);if(isNaN(M)||0>=M)g.value=k.width/100;M=parseFloat(x.value);if(isNaN(M)||0>=M)x.value=k.height/100;M=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),
+Math.floor(100*parseFloat(x.value)));"custom"!=L.value&&F.checked&&(M=new mxRectangle(0,0,M.height,M.width));fa&&H||M.width==S.width&&M.height==S.height||(S=M,null!=m&&m(S))};mxEvent.addListener(e,"click",function(M){p.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(d,"click",function(M){F.checked=!0;T(M);mxEvent.consume(M)});mxEvent.addListener(g,"blur",T);mxEvent.addListener(g,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(F,"change",T);
+mxEvent.addListener(p,"change",T);mxEvent.addListener(L,"change",function(M){H="custom"==L.value;T(M,!0)});T();return{set:function(M){k=M;C(null,null,!0)},get:function(){return S},widthInput:g,heightInput:x}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,m,C,p,F,K,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),u=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var H=document.createElement("tr");var J=document.createElement("td");J.style.textOverflow="ellipsis";J.style.textAlign="right";J.style.maxWidth=(x?x+15:100)+"px";J.style.fontSize="10pt";J.style.width=(x?x:84)+"px";mxUtils.write(J,(C||mxResources.get("filename"))+":");H.appendChild(J);var D=
-document.createElement("input");D.setAttribute("value",e||"");D.style.marginLeft="4px";D.style.width=null!=g?g+"px":"180px";var G=mxUtils.button(k,function(){if(null==p||p(D.value))P&&b.hideDialog(),m(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var W=y.parentNode;if(null!=W){var T=null;mxEvent.addListener(W,"dragleave",
-function(Z){null!=T&&(T.style.backgroundColor="",T=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(W,"dragover",mxUtils.bind(this,function(Z){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=D,T.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(W,"drop",mxUtils.bind(this,function(Z){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
-G.click());Z.stopPropagation();Z.preventDefault()}))}}};J=document.createElement("td");J.style.whiteSpace="nowrap";J.appendChild(D);H.appendChild(J);if(null!=C||null==F)u.appendChild(H),null!=f&&(J.appendChild(FilenameDialog.createTypeHint(b,D,f)),null!=b.editor.diagramFileTypes&&(H=document.createElement("tr"),J=document.createElement("td"),J.style.textOverflow="ellipsis",J.style.textAlign="right",J.style.maxWidth="100px",J.style.fontSize="10pt",J.style.width="84px",mxUtils.write(J,mxResources.get("type")+
-":"),H.appendChild(J),J=document.createElement("td"),J.style.whiteSpace="nowrap",H.appendChild(J),e=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",J.appendChild(e),D.style.width=null!=g?g-40+"px":"190px",H.appendChild(J),u.appendChild(H)));null!=F&&(H=document.createElement("tr"),J=document.createElement("td"),J.colSpan=2,J.appendChild(F),H.appendChild(J),u.appendChild(H));H=document.createElement("tr");J=document.createElement("td");J.colSpan=
-2;J.style.paddingTop=null!=f?"12px":"20px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&J.appendChild(f);null!=K&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(K)}),g.className="geBtn",J.appendChild(g));mxEvent.addListener(D,"keypress",function(W){13==W.keyCode&&G.click()});J.appendChild(G);b.editor.cancelFirst||J.appendChild(f);
-H.appendChild(J);u.appendChild(H);y.appendChild(u);this.container=y};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(b,e,k,m,C,p,F,L,P,d,f,g,x){P=null!=P?P:!0;var y=document.createElement("table"),t=document.createElement("tbody");y.style.position="absolute";y.style.top="30px";y.style.left="20px";var G=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(x?x+15:100)+"px";D.style.fontSize="10pt";D.style.width=(x?x:84)+"px";mxUtils.write(D,(C||mxResources.get("filename"))+":");G.appendChild(D);var I=
+document.createElement("input");I.setAttribute("value",e||"");I.style.marginLeft="4px";I.style.width=null!=g?g+"px":"180px";var H=mxUtils.button(k,function(){if(null==p||p(I.value))P&&b.hideDialog(),m(I.value)});H.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==F)if(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var S=y.parentNode;if(null!=S){var T=null;mxEvent.addListener(S,"dragleave",
+function(M){null!=T&&(T.style.backgroundColor="",T=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(M){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=I,T.style.backgroundColor="#ebf2f9");M.stopPropagation();M.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(M){null!=T&&(T.style.backgroundColor="",T=null);0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")&&(I.value=decodeURIComponent(M.dataTransfer.getData("text/uri-list")),
+H.click());M.stopPropagation();M.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(I);G.appendChild(D);if(null!=C||null==F)t.appendChild(G),null!=f&&(D.appendChild(FilenameDialog.createTypeHint(b,I,f)),null!=b.editor.diagramFileTypes&&(G=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
+":"),G.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",G.appendChild(D),e=FilenameDialog.createFileTypes(b,I,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",D.appendChild(e),I.style.width=null!=g?g-40+"px":"190px",G.appendChild(D),t.appendChild(G)));null!=F&&(G=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(F),G.appendChild(D),t.appendChild(G));G=document.createElement("tr");D=document.createElement("td");D.colSpan=
+2;D.style.paddingTop=null!=f?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";b.editor.cancelFirst&&D.appendChild(f);null!=L&&(g=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(L)}),g.className="geBtn",D.appendChild(g));mxEvent.addListener(I,"keypress",function(S){13==S.keyCode&&H.click()});D.appendChild(H);b.editor.cancelFirst||D.appendChild(f);
+G.appendChild(D);t.appendChild(G);y.appendChild(t);this.container=y};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var m=document.createElement("img");m.style.backgroundPosition="center bottom";m.style.backgroundRepeat="no-repeat";m.style.margin="2px 0 0 4px";m.style.verticalAlign="top";m.style.cursor="pointer";m.style.height="16px";m.style.width="16px";mxUtils.setOpacity(m,70);var C=function(){m.setAttribute("src",Editor.helpImage);m.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[p].ext.length-1)=="."+k[p].ext){m.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(m,"click",function(p){var F=m.getAttribute("title");m.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=F&&b.showError(null,F,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
C();return m};
FilenameDialog.createFileTypes=function(b,e,k){var m=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");m.appendChild(C)}mxEvent.addListener(m,"change",function(p){p=k[m.value].extension;var F=e.value.lastIndexOf(".drawio.");F=0<F?F:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<F?e.value.substring(0,F+1)+p:e.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,K=0;K<k.length;K++){var P=k[K].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=K;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
-var WrapperWindow=function(b,e,k,m,C,p,F){var K=b.createSidebarContainer();F(K);this.window=new mxWindow(e,K,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var K=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(K),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var F=0,L=0;L<k.length;L++){var P=k[L].extension,d=null;"drawio"!=P&&(d=P,P=".drawio."+P);if(p.substring(p.length-P.length-1)=="."+P||null!=d&&p.substring(p.length-d.length-1)=="."+d){F=L;break}}m.value=F};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+var WrapperWindow=function(b,e,k,m,C,p,F){var L=b.createSidebarContainer();F(L);this.window=new mxWindow(e,L,k,m,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&b.isSelectionAllowed(P)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph;if(null!=F.container&&!F.transparentBackground){if(F.pageVisible){var L=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var P=F.container.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=P.nextSibling;null!=P&&(this.backgroundPageShape=this.createBackgroundPageShape(L),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(F.container),P.style.position="absolute",F.container.insertBefore(this.backgroundPageShape.node,P),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){F.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){null!=
-F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=K,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,K=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
-")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor=
-F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=K,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var K=this.graph.gridSize*this.scale;K<this.minGridSize;)K*=2;for(var P=this.gridSteps*K,d=[],f=1;f<this.gridSteps;f++){var g=f*K;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
-" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+K,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
-K=y.width;P=y.height;var u=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),H=(F=F&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(P/u.height)-1:0,J=F?Math.ceil(K/u.width)-1:0,D=y.x+K,G=y.y+P;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<J&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(W){if(null!=W){for(var T=W==this.horizontalPageBreaks?H:J,Z=0;Z<=T;Z++){var N=W==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
-Math.round(y.y+(Z+1)*u.height)),new mxPoint(Math.round(D),Math.round(y.y+(Z+1)*u.height))]:[new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(Z+1)*u.width),Math.round(G))];null!=W[Z]?(W[Z].points=N,W[Z].redraw()):(N=new mxPolyline(N,this.pageBreakColor),N.dialect=this.dialect,N.isDashed=this.pageBreakDashed,N.pointerEvents=!1,N.init(this.view.backgroundPane),N.redraw(),W[Z]=N)}for(Z=T;Z<W.length;Z++)W[Z].destroy();W.splice(T,W.length-T)}});F(this.horizontalPageBreaks);
-F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,K,P){for(var d=0;d<K.length;d++){if(this.graph.isTableCell(K[d])||this.graph.isTableRow(K[d]))return!1;if(this.graph.getModel().isVertex(K[d])){var f=this.graph.getCellGeometry(K[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
-k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(K,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),K=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
-f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,K)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,K+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,K){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=K+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,K,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(F,K,P){var d=this.graph.model.getParent(F);if(K){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
-this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var K=this.graph.getModel(),P=K.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(K.isVertex(P)||K.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=K.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var X=C.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,ka=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ca.x+ja.x)*ka,(ca.y+ja.y)*ka,ja.width*ka,ja.height*ka))}return X};m.useCssTransforms&&
-(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(X,ja){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(X){return!mxEvent.isPopupTrigger(X.getEvent())});this.actions=new Actions(this);this.menus=
+F.tooltipHandler&&F.tooltipHandler.isHideOnHover()&&F.tooltipHandler.hide();F.isMouseDown&&!mxEvent.isConsumed(d)&&F.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){F.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=L,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var F=this.graph,L=null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background,P=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(F.isGridEnabled()||F.gridVisible){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(P))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=F.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var g=P=0;null!=F.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),P=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-P,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}P=F.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=f,F.view.backgroundPageShape.node.style.backgroundImage=d,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=
+F.defaultPageBorderColor,F.container.className="geDiagramContainer geDiagramBackdrop",P.style.backgroundImage="none",P.style.backgroundColor=""):(F.container.className="geDiagramContainer",P.style.backgroundPosition=f,P.style.backgroundColor=L,P.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(F){for(var L=this.graph.gridSize*this.scale;L<this.minGridSize;)L*=2;for(var P=this.gridSteps*L,d=[],f=1;f<this.gridSteps;f++){var g=f*L;d.push("M 0 "+g+" L "+P+" "+g+" M "+g+" 0 L "+g+
+" "+P)}return'<svg width="'+P+'" height="'+P+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+P+'" height="'+P+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+F+'" opacity="0.2" stroke-width="1"/><path d="M '+P+" 0 L 0 0 0 "+P+'" fill="none" stroke="'+F+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){b.apply(this,arguments);
+if(null!=this.shiftPreview1){var P=this.view.canvas;null!=P.ownerSVGElement&&(P=P.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps;d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+F,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+L,d))+"px";P.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,x=d*this.pageScale,y=this.view.getBackgroundPageBounds();
+L=y.width;P=y.height;var t=new mxRectangle(d*f.x,d*f.y,g.width*x,g.height*x),G=(F=F&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(P/t.height)-1:0,D=F?Math.ceil(L/t.width)-1:0,I=y.x+L,H=y.y+P;null==this.horizontalPageBreaks&&0<G&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);F=mxUtils.bind(this,function(S){if(null!=S){for(var T=S==this.horizontalPageBreaks?G:D,M=0;M<=T;M++){var fa=S==this.horizontalPageBreaks?[new mxPoint(Math.round(y.x),
+Math.round(y.y+(M+1)*t.height)),new mxPoint(Math.round(I),Math.round(y.y+(M+1)*t.height))]:[new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(y.y)),new mxPoint(Math.round(y.x+(M+1)*t.width),Math.round(H))];null!=S[M]?(S[M].points=fa,S[M].redraw()):(fa=new mxPolyline(fa,this.pageBreakColor),fa.dialect=this.dialect,fa.isDashed=this.pageBreakDashed,fa.pointerEvents=!1,fa.init(this.view.backgroundPane),fa.redraw(),S[M]=fa)}for(M=T;M<S.length;M++)S[M].destroy();S.splice(T,S.length-T)}});F(this.horizontalPageBreaks);
+F(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(F,L,P){for(var d=0;d<L.length;d++){if(this.graph.isTableCell(L[d])||this.graph.isTableRow(L[d]))return!1;if(this.graph.getModel().isVertex(L[d])){var f=this.graph.getCellGeometry(L[d]);if(null!=f&&f.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var F=
+k.apply(this,arguments);F.intersects=mxUtils.bind(this,function(L,P){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(F,arguments)});return F};mxGraphView.prototype.createBackgroundPageShape=function(F){return new mxRectangleShape(F,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var F=this.getGraphBounds(),L=0<F.width?F.x/this.scale-this.translate.x:0,P=0<F.height?F.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+f=this.graph.pageScale,g=d.width*f;d=d.height*f;f=Math.floor(Math.min(0,L)/g);var x=Math.floor(Math.min(0,P)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+x*d),this.scale*(Math.ceil(Math.max(1,L+F.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,P+F.height/this.scale)/d)-x)*d)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(F,L){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=F+"px",this.view.backgroundPageShape.node.style.marginTop=L+"px")};var C=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(F,L,P,d,f,g){var x=C.apply(this,arguments);null==g||g||mxEvent.addListener(x,"mousedown",function(y){mxEvent.consume(y)});return x};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(F,L,P){var d=this.graph.model.getParent(F);if(L){var f=this.graph.model.isEdge(F)?null:this.graph.getCellGeometry(F);f=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(F)&&(null!=f&&f.relative||!this.graph.isContainer(d)||this.graph.isPart(F))}else if(f=p.apply(this,arguments),this.graph.isTableCell(F)||this.graph.isTableRow(F))f=d,this.graph.isTable(f)||(f=this.graph.model.getParent(f)),f=!this.graph.selectionCellsHandler.isHandled(f)||this.graph.isCellSelected(f)&&this.graph.isToggleEvent(P.getEvent())||
+this.graph.isCellSelected(F)&&!this.graph.isToggleEvent(P.getEvent())||this.graph.isTableCell(F)&&this.graph.isCellSelected(d);return f};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(F){F=F.getCell();for(var L=this.graph.getModel(),P=L.getParent(F),d=this.graph.view.getState(P),f=this.graph.isCellSelected(F);null!=d&&(L.isVertex(P)||L.isEdge(P));){var g=this.graph.isCellSelected(P);f=f||g;if(g||!f&&(this.graph.isTableCell(F)||this.graph.isTableRow(F)))F=P;P=L.getParent(P)}return F}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this.editor.graph;m.lightbox=k;var C=m.getGraphBounds;m.getGraphBounds=function(){var V=C.apply(this,arguments),ha=this.backgroundImage;if(null!=ha&&null!=ha.width&&null!=ha.height){var X=this.view.translate,ia=this.view.scale;V=mxRectangle.fromRectangle(V);V.add(new mxRectangle((X.x+ha.x)*ia,(X.y+ha.y)*ia,ha.width*ia,ha.height*ia))}return V};m.useCssTransforms&&
+(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(V,ha){this.clearSelectionState()});m.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+m.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);m.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);m.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);m.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,m.isEnabled=function(){return!1},m.panningHandler.isForcePanningEvent=function(V){return!mxEvent.isPopupTrigger(V.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!m.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),F="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-K="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(X){try{m.getModel().isEdge(X)?d=!1:P=!1;var ja=m.getCellStyle(X,!1),ca=[],ka=[],q;for(q in ja)ca.push(ja[q]),ka.push(q);m.getModel().isEdge(X)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ca,"cells",[X]));m.getModel().isEdge(X)?d=!0:P=!0}catch(E){this.handleError(E)}};
-this.clearDefaultStyle=function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize",
-"endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(X,ja,ca,ka,q,E,Q){ka=null!=ka?ka:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;ca=null!=ca?ca:m.getModel();if(Q){Q=[];for(var Y=0;Y<X.length;Y++)Q=Q.concat(ca.getDescendants(X[Y]));X=Q}ca.beginUpdate();
-try{for(Y=0;Y<X.length;Y++){var R=X[Y];if(ja)var ba=["fontSize","fontFamily","fontColor"];else{var ea=ca.getStyle(R),ra=null!=ea?ea.split(";"):[];ba=p.slice();for(var ta=0;ta<ra.length;ta++){var la=ra[ta],pa=la.indexOf("=");if(0<=pa){var xa=la.substring(0,pa),Ca=mxUtils.indexOf(ba,xa);0<=Ca&&ba.splice(Ca,1);for(Q=0;Q<x.length;Q++){var Ia=x[Q];if(0<=mxUtils.indexOf(Ia,xa))for(var Aa=0;Aa<Ia.length;Aa++){var La=mxUtils.indexOf(ba,Ia[Aa]);0<=La&&ba.splice(La,1)}}}}}var Da=ca.isEdge(R);Q=Da?q:ka;var Sa=
-ca.getStyle(R);for(ta=0;ta<ba.length;ta++){xa=ba[ta];var Ra=Q[xa];null!=Ra&&"edgeStyle"!=xa&&("shape"!=xa||Da)&&(!Da||E||0>mxUtils.indexOf(K,xa))&&(Sa=mxUtils.setStyle(Sa,xa,Ra))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));ca.setStyle(R,Sa)}}finally{ca.endUpdate()}return X};m.addListener("cellsInserted",function(X,ja){y(ja.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(X,ja){y(ja.getProperty("cells"),!0)});
-this.insertHandler=y;this.createDivs();this.createUi();this.refresh();var u=mxUtils.bind(this,function(X){null==X&&(X=window.event);return m.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container==document.body&&(this.menubarContainer.onselectstart=u,this.menubarContainer.onmousedown=u,this.toolbarContainer.onselectstart=u,this.toolbarContainer.onmousedown=u,this.diagramContainer.onselectstart=u,this.diagramContainer.onmousedown=u,this.sidebarContainer.onselectstart=u,this.sidebarContainer.onmousedown=
-u,this.formatContainer.onselectstart=u,this.formatContainer.onmousedown=u,this.footerContainer.onselectstart=u,this.footerContainer.onmousedown=u,null!=this.tabContainer&&(this.tabContainer.onselectstart=u));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ja=mxEvent.getSource(X);if("A"==ja.nodeName)for(;null!=ja;){if("geHint"==ja.className)return!0;ja=ja.parentNode}}return u(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",e):this.diagramContainer.oncontextmenu=e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var H=m.graphHandler.start;m.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(X){var ja=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ja.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ja.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var J=!1,D=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ja){return J||D.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){32!=X.which||m.isEditing()?
-mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(J=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(X)!=m.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){m.container.style.cursor="";J=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(X){return G.apply(this,
-arguments)||J||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var W=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(X){return W.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var T=m.isZoomWheelEvent;
-m.isZoomWheelEvent=function(){return J||T.apply(this,arguments)};var Z=!1,N=null,qa=null,oa=null,S=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=m.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ja=[];null!=X;){var ca=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ja.push(X));X=ca}X=this.toolbar.fontMenu;ca=this.toolbar.sizeMenu;if(null==oa)this.toolbar.createTextToolbar();else{for(var ka=0;ka<oa.length;ka++)this.toolbar.container.appendChild(oa[ka]);
-this.toolbar.fontMenu=N;this.toolbar.sizeMenu=qa}Z=m.cellEditor.isContentEditing();N=X;qa=ca;oa=ja}}),fa=this,ia=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){ia.apply(this,arguments);S();if(m.cellEditor.isContentEditing()){var X=!1,ja=function(){X||(X=!0,window.setTimeout(function(){var ca=m.getSelectedEditingElement();null!=ca&&(ca=mxUtils.getCurrentStyle(ca),null!=ca&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(ca.fontFamily)),fa.toolbar.setFontSize(parseInt(ca.fontSize))));
-X=!1},0))};mxEvent.addListener(m.cellEditor.textarea,"input",ja);mxEvent.addListener(m.cellEditor.textarea,"touchend",ja);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ja);mxEvent.addListener(m.cellEditor.textarea,"keyup",ja);ja()}};var M=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(X,ja){try{M.apply(this,arguments),S()}catch(ca){fa.handleError(ca)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(X){}var aa=
-m.fireMouseEvent;m.fireMouseEvent=function(X,ja,ca){X==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ja,ca){this.menus.createPopupMenu(X,ja,ca)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
-function(X,ja){var ca=[ja.getProperty("cell")];ja.getProperty("terminalInserted")&&(ca.push(ja.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(m.view.getState(ca[ca.length-1]))},0));y(ca)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ja){var ca=ja.getProperty("cells"),ka=X=!1;if(0<ca.length)for(var q=0;q<ca.length&&(X=m.getModel().isVertex(ca[q])||X,!(ka=m.getModel().isEdge(ca[q])||ka)||!X);q++);else ka=X=!0;X=X&&!P;ka=ka&&!d;ca=ja.getProperty("keys");
-ja=ja.getProperty("values");for(q=0;q<ca.length;q++){var E=0<=mxUtils.indexOf(f,ca[q]);if("strokeColor"!=ca[q]||null!=ja[q]&&"none"!=ja[q])if(0<=mxUtils.indexOf(F,ca[q]))ka||0<=mxUtils.indexOf(g,ca[q])?null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]:X&&0<=mxUtils.indexOf(p,ca[q])&&(null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=ja[q]);else if(0<=mxUtils.indexOf(p,ca[q])){if(X||E)null==ja[q]?delete m.currentVertexStyle[ca[q]]:m.currentVertexStyle[ca[q]]=
-ja[q];if(ka||E||0<=mxUtils.indexOf(g,ca[q]))null==ja[q]?delete m.currentEdgeStyle[ca[q]]:m.currentEdgeStyle[ca[q]]=ja[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
+L="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),P=!1,d=!1;this.setDefaultStyle=function(V){try{m.getModel().isEdge(V)?d=!1:P=!1;var ha=m.getCellStyle(V,!1),X=[],ia=[],q;for(q in ha)X.push(ha[q]),ia.push(q);m.getModel().isEdge(V)?m.currentEdgeStyle={}:m.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",X,"cells",[V]));m.getModel().isEdge(V)?d=!0:P=!0}catch(E){this.handleError(E)}};this.clearDefaultStyle=
+function(){m.currentEdgeStyle=mxUtils.clone(m.defaultEdgeStyle);m.currentVertexStyle=mxUtils.clone(m.defaultVertexStyle);P=d=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(p,f[e])&&p.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),x=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<x.length;e++)for(k=0;k<x[e].length;k++)p.push(x[e][k]);for(e=0;e<F.length;e++)0>mxUtils.indexOf(p,F[e])&&p.push(F[e]);var y=function(V,ha,X,ia,q,E,Q){ia=null!=ia?ia:m.currentVertexStyle;q=null!=q?q:m.currentEdgeStyle;E=null!=E?E:!0;X=null!=X?X:m.getModel();if(Q){Q=[];for(var Y=0;Y<V.length;Y++)Q=Q.concat(X.getDescendants(V[Y]));V=Q}X.beginUpdate();try{for(Y=0;Y<V.length;Y++){var R=V[Y];if(ha)var Z=
+["fontSize","fontFamily","fontColor"];else{var da=X.getStyle(R),qa=null!=da?da.split(";"):[];Z=p.slice();for(var va=0;va<qa.length;va++){var ja=qa[va],sa=ja.indexOf("=");if(0<=sa){var ya=ja.substring(0,sa),Aa=mxUtils.indexOf(Z,ya);0<=Aa&&Z.splice(Aa,1);for(Q=0;Q<x.length;Q++){var Ea=x[Q];if(0<=mxUtils.indexOf(Ea,ya))for(var za=0;za<Ea.length;za++){var Ia=mxUtils.indexOf(Z,Ea[za]);0<=Ia&&Z.splice(Ia,1)}}}}}var Ca=X.isEdge(R);Q=Ca?q:ia;var Sa=X.getStyle(R);for(va=0;va<Z.length;va++){ya=Z[va];var Pa=
+Q[ya];null!=Pa&&"edgeStyle"!=ya&&("shape"!=ya||Ca)&&(!Ca||E||0>mxUtils.indexOf(L,ya))&&(Sa=mxUtils.setStyle(Sa,ya,Pa))}Editor.simpleLabels&&(Sa=mxUtils.setStyle(mxUtils.setStyle(Sa,"html",null),"whiteSpace",null));X.setStyle(R,Sa)}}finally{X.endUpdate()}return V};m.addListener("cellsInserted",function(V,ha){y(ha.getProperty("cells"),null,null,null,null,!0,!0)});m.addListener("textInserted",function(V,ha){y(ha.getProperty("cells"),!0)});this.insertHandler=y;this.createDivs();this.createUi();this.refresh();
+var t=mxUtils.bind(this,function(V){null==V&&(V=window.event);return m.isEditing()||null!=V&&this.isSelectionAllowed(V)});this.container==document.body&&(this.menubarContainer.onselectstart=t,this.menubarContainer.onmousedown=t,this.toolbarContainer.onselectstart=t,this.toolbarContainer.onmousedown=t,this.diagramContainer.onselectstart=t,this.diagramContainer.onmousedown=t,this.sidebarContainer.onselectstart=t,this.sidebarContainer.onmousedown=t,this.formatContainer.onselectstart=t,this.formatContainer.onmousedown=
+t,this.footerContainer.onselectstart=t,this.footerContainer.onmousedown=t,null!=this.tabContainer&&(this.tabContainer.onselectstart=t));!this.editor.chromeless||this.editor.editable?(e=function(V){if(null!=V){var ha=mxEvent.getSource(V);if("A"==ha.nodeName)for(;null!=ha;){if("geHint"==ha.className)return!0;ha=ha.parentNode}}return t(V)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=
+e):m.panningHandler.usePopupTrigger=!1;m.init(this.diagramContainer);mxClient.IS_SVG&&null!=m.view.getDrawPane()&&(e=m.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=m.graphHandler){var G=m.graphHandler.start;m.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();G.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(V){var ha=mxUtils.getOffset(this.diagramContainer);
+0<mxEvent.getClientX(V)-ha.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(V)-ha.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,I=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(V,ha){return D||I.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(V){32!=V.which||m.isEditing()?mxEvent.isConsumed(V)||27!=V.keyCode||this.hideDialog(null,
+!0):(D=!0,this.hoverIcons.reset(),m.container.style.cursor="move",m.isEditing()||mxEvent.getSource(V)!=m.container||mxEvent.consume(V))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(V){m.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=m.panningHandler.isForcePanningEvent;m.panningHandler.isForcePanningEvent=function(V){return H.apply(this,arguments)||D||mxEvent.isMouseEvent(V.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(V.getEvent()))&&(!mxEvent.isControlDown(V.getEvent())&&mxEvent.isRightMouseButton(V.getEvent())||mxEvent.isMiddleMouseButton(V.getEvent()))};var S=m.cellEditor.isStopEditingEvent;m.cellEditor.isStopEditingEvent=function(V){return S.apply(this,arguments)||13==V.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(V)||mxClient.IS_MAC&&mxEvent.isMetaDown(V)||mxClient.IS_SF&&mxEvent.isShiftDown(V))};var T=m.isZoomWheelEvent;m.isZoomWheelEvent=function(){return D||T.apply(this,arguments)};
+var M=!1,fa=null,la=null,ra=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&M!=m.cellEditor.isContentEditing()){for(var V=this.toolbar.container.firstChild,ha=[];null!=V;){var X=V.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,V)&&(V.parentNode.removeChild(V),ha.push(V));V=X}V=this.toolbar.fontMenu;X=this.toolbar.sizeMenu;if(null==ra)this.toolbar.createTextToolbar();else{for(var ia=0;ia<ra.length;ia++)this.toolbar.container.appendChild(ra[ia]);this.toolbar.fontMenu=fa;this.toolbar.sizeMenu=
+la}M=m.cellEditor.isContentEditing();fa=V;la=X;ra=ha}}),oa=this,na=m.cellEditor.startEditing;m.cellEditor.startEditing=function(){na.apply(this,arguments);ba();if(m.cellEditor.isContentEditing()){var V=!1,ha=function(){V||(V=!0,window.setTimeout(function(){var X=m.getSelectedEditingElement();null!=X&&(X=mxUtils.getCurrentStyle(X),null!=X&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(X.fontFamily)),oa.toolbar.setFontSize(parseInt(X.fontSize))));V=!1},0))};mxEvent.addListener(m.cellEditor.textarea,
+"input",ha);mxEvent.addListener(m.cellEditor.textarea,"touchend",ha);mxEvent.addListener(m.cellEditor.textarea,"mouseup",ha);mxEvent.addListener(m.cellEditor.textarea,"keyup",ha);ha()}};var N=m.cellEditor.stopEditing;m.cellEditor.stopEditing=function(V,ha){try{N.apply(this,arguments),ba()}catch(X){oa.handleError(X)}};m.container.setAttribute("tabindex","0");m.container.style.cursor="default";if(window.self===window.top&&null!=m.container.parentNode)try{m.container.focus()}catch(V){}var aa=m.fireMouseEvent;
+m.fireMouseEvent=function(V,ha,X){V==mxEvent.MOUSE_DOWN&&this.container.focus();aa.apply(this,arguments)};m.popupMenuHandler.autoExpand=!0;null!=this.menus&&(m.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(V,ha,X){this.menus.createPopupMenu(V,ha,X)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(V){m.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};m.connectionHandler.addListener(mxEvent.CONNECT,
+function(V,ha){var X=[ha.getProperty("cell")];ha.getProperty("terminalInserted")&&(X.push(ha.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(m.view.getState(X[X.length-1]))},0));y(X)});this.addListener("styleChanged",mxUtils.bind(this,function(V,ha){var X=ha.getProperty("cells"),ia=V=!1;if(0<X.length)for(var q=0;q<X.length&&(V=m.getModel().isVertex(X[q])||V,!(ia=m.getModel().isEdge(X[q])||ia)||!V);q++);else ia=V=!0;V=V&&!P;ia=ia&&!d;X=ha.getProperty("keys");
+ha=ha.getProperty("values");for(q=0;q<X.length;q++){var E=0<=mxUtils.indexOf(f,X[q]);if("strokeColor"!=X[q]||null!=ha[q]&&"none"!=ha[q])if(0<=mxUtils.indexOf(F,X[q]))ia||0<=mxUtils.indexOf(g,X[q])?null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]:V&&0<=mxUtils.indexOf(p,X[q])&&(null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=ha[q]);else if(0<=mxUtils.indexOf(p,X[q])){if(V||E)null==ha[q]?delete m.currentVertexStyle[X[q]]:m.currentVertexStyle[X[q]]=
+ha[q];if(ia||E||0<=mxUtils.indexOf(g,X[q]))null==ha[q]?delete m.currentEdgeStyle[X[q]]:m.currentEdgeStyle[X[q]]=ha[q]}}null!=this.toolbar&&(this.toolbar.setFontName(m.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(m.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==m.currentEdgeStyle.edgeStyle&&"1"==m.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==m.currentEdgeStyle.edgeStyle||"none"==m.currentEdgeStyle.edgeStyle||null==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==m.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==m.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=m.currentVertexStyle.fontFamily||"Helvetica",
-ja=String(m.currentVertexStyle.fontSize||"12"),ca=m.getView().getState(m.getSelectionCell());null!=ca&&(X=ca.style[mxConstants.STYLE_FONTFAMILY]||X,ja=ca.style[mxConstants.STYLE_FONTSIZE]||ja,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ja)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(X,ja){X=ja.getProperty("cells");ja=ja.getProperty("parent");null!=ja&&
-m.getModel().isLayer(ja)&&!m.isCellVisible(ja)&&null!=X&&0<X.length&&m.getModel().setVisible(ja,!0)});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);
-this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,
-function(){m.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,k){function m(K,P){var d=p;p+=P;return K.substring(d,p)}function C(K){K=m(K,4);return K.charCodeAt(3)+(K.charCodeAt(2)<<8)+(K.charCodeAt(1)<<16)+(K.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==m.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==m.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==m.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var V=m.currentVertexStyle.fontFamily||"Helvetica",
+ha=String(m.currentVertexStyle.fontSize||"12"),X=m.getView().getState(m.getSelectionCell());null!=X&&(V=X.style[mxConstants.STYLE_FONTFAMILY]||V,ha=X.style[mxConstants.STYLE_FONTSIZE]||ha,10<V.length&&(V=V.substring(0,8)+"..."));this.toolbar.setFontName(V);this.toolbar.setFontSize(ha)}),m.getSelectionModel().addListener(mxEvent.CHANGE,b),m.getModel().addListener(mxEvent.CHANGE,b));m.addListener(mxEvent.CELLS_ADDED,function(V,ha){V=ha.getProperty("cells");ha=ha.getProperty("parent");null!=ha&&m.getModel().isLayer(ha)&&
+!m.isCellVisible(ha)&&null!=V&&0<V.length&&m.getModel().setVisible(ha,!0)});this.gestureHandler=mxUtils.bind(this,function(V){null!=this.currentMenu&&mxEvent.getSource(V)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));
+this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){m.view.validateBackground()}));m.addListener("gridSizeChanged",mxUtils.bind(this,function(){m.isGridEnabled()&&m.view.validateBackground()}));this.editor.resetGraph()}this.init();m.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,e,k){function m(L,P){var d=p;p+=P;return L.substring(d,p)}function C(L){L=m(L,4);return L.charCodeAt(3)+(L.charCodeAt(2)<<8)+(L.charCodeAt(1)<<16)+(L.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(m(b,4),"IHDR"!=m(b,4))null!=k&&k();else{m(b,17);do{k=C(b);var F=m(b,4);if(null!=e&&e(p-8,F,k))break;value=m(b,k);m(b,4);if("IEND"==F)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2111,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),m=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,m),m=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),K=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=K&&P!=K||(K=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,m=k.getParent(e[0]),C=k.getParent(m),p=m.getIndex(e[0]),F=C.getIndex(m),L=null,P=1,d=1,f=0,g=F<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,F+1),p):null;f<e.length-1;){var x=e[++f];null==g||g!=x||null!=L&&P!=L||(L=P,P=0,d++,m=k.getParent(g),g=F+d<C.getChildCount()?k.getChildAt(k.getChildAt(C,F+d),p):null);var y=this.editor.graph.view.getState(x);
if(x==k.getChildAt(m,p+P)&&null!=y&&1==mxUtils.getValue(y.style,"colspan",1)&&1==mxUtils.getValue(y.style,"rowspan",1))P++;else break}f==d*P-1&&(b.mergeCell=e[0],b.colspan=P,b.rowspan=d)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,m){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,m))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,d){"mouseDown"==d.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(P,d){if(this.isEnabled())if(null!=d||null==e.sidebar||mxEvent.isShiftDown(P)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(P),mxEvent.getClientY(P));mxEvent.consume(P);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.x,f.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,u){var H=b.getCompositeParent(P.cell);x=b.getCellGeometry(H);for(f.consume();null!=H&&b.model.isVertex(H)&&null!=x&&x.relative;)cell=
-H,H=b.model.getParent(cell),x=b.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),H,mxUtils.bind(this,function(J){u(J);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(J))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var K=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K);K=window.setTimeout(mxUtils.bind(this,function(){var f=
-d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),u=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var H=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),J=e.showShapePicker(u,y,H,mxUtils.bind(this,function(D){null!=D&&b.connectVertex(H,g,b.defaultEdgeLength,x,!0,!0,function(G,W,T){T(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))},
-function(G){b.selectCellsForConnectVertex(G)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(J,f,u,y,g);mxUtils.setOpacity(J,30);mxEvent.addListener(J,"mouseenter",function(){mxUtils.setOpacity(J,100)});mxEvent.addListener(J,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=K&&window.clearTimeout(K)}))}};
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var F=this.hoverIcons.execute;this.hoverIcons.execute=function(P,d,f){var g=f.getEvent();this.graph.isCloneEvent(g)||mxEvent.isShiftDown(g)?F.apply(this,arguments):this.graph.connectVertex(P.cell,d,this.graph.defaultEdgeLength,g,null,null,mxUtils.bind(this,function(x,y,t){var G=b.getCompositeParent(P.cell);x=b.getCellGeometry(G);for(f.consume();null!=G&&b.model.isVertex(G)&&null!=x&&x.relative;)cell=
+G,G=b.model.getParent(cell),x=b.getCellGeometry(G);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(f.getGraphX(),f.getGraphY(),G,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),d)}),30)}),mxUtils.bind(this,function(x){this.graph.selectCellsForConnectVertex(x,g,this)}))};var L=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L);L=window.setTimeout(mxUtils.bind(this,function(){var f=
+d.getProperty("arrow"),g=d.getProperty("direction"),x=d.getProperty("event");f=f.getBoundingClientRect();var y=mxUtils.getOffset(b.container),t=b.container.scrollLeft+f.x-y.x;y=b.container.scrollTop+f.y-y.y;var G=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,y,G,mxUtils.bind(this,function(I){null!=I&&b.connectVertex(G,g,b.defaultEdgeLength,x,!0,!0,function(H,S,T){T(I);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(I))},
+function(H){b.selectCellsForConnectVertex(H)},x,this.hoverIcons)}),g,!0);this.centerShapePicker(D,f,t,y,g);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(P,d){null!=L&&window.clearTimeout(L)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,m,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,m-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,m+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,m-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,m-=p.height/2-10);b.style.left=k+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,m,C,p){b=this.createShapePicker(b,e,k,m,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,K){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";K||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var u=f.cloneCell(x);if(null!=m)m(u);else{u.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);u.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(u)}finally{f.model.endUpdate()}f.setSelectionCell(u);
-f.scrollCellToVisible(u);f.startEditingAtCell(u);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(u))}null!=p&&p()})});for(C=0;C<(K?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
+EditorUi.prototype.createShapePicker=function(b,e,k,m,C,p,F,L){var P=null;if(null!=F&&0<F.length){var d=this,f=this.editor.graph;P=document.createElement("div");C=f.view.getState(k);var g=null==k||null!=C&&f.isTransparentState(C)?null:f.copyStyle(k);k=6>F.length?35*F.length:140;P.className="geToolbarContainer geSidebarContainer";P.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";L||mxUtils.setPrefixedStyle(P.style,"transform","translate(-22px,-22px)");null!=f.background&&f.background!=mxConstants.NONE&&(P.style.backgroundColor=f.background);f.container.appendChild(P);k=mxUtils.bind(this,function(x){var y=document.createElement("a");y.className="geItem";y.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";P.appendChild(y);null!=g&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(g,[x]):d.insertHandler([x],""!=x.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([x],25,25,y,null,!0,!1,x.geometry.width,x.geometry.height);mxEvent.addListener(y,"click",function(){var t=f.cloneCell(x);if(null!=m)m(t);else{t.geometry.x=f.snap(Math.round(b/f.view.scale)-f.view.translate.x-x.geometry.width/2);t.geometry.y=f.snap(Math.round(e/f.view.scale)-f.view.translate.y-x.geometry.height/2);f.model.beginUpdate();try{f.addCell(t)}finally{f.model.endUpdate()}f.setSelectionCell(t);
+f.scrollCellToVisible(t);f.startEditingAtCell(t);null!=d.hoverIcons&&d.hoverIcons.update(f.view.getState(t))}null!=p&&p()})});for(C=0;C<(L?Math.min(F.length,4):F.length);C++)k(F[C]);F=P.offsetTop+P.clientHeight-(f.container.scrollTop+f.container.offsetHeight);0<F&&(P.style.top=Math.max(f.container.scrollTop+22,e-F)+"px");F=P.offsetLeft+P.clientWidth-(f.container.scrollLeft+f.container.offsetWidth);0<F&&(P.style.left=Math.max(f.container.scrollLeft+22,b-F)+"px")}return P};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,m,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,m||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2142,45 +2142,45 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var K={},P=p.createCellLookup(F),d=p.cloneCells(F,null,K),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
-0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var u=p.getCellGeometry(d[x]);null!=u&&u.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(u.offset=null,u.relative=!1,u.x=y.x/y.view.scale-y.view.translate.x,u.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(K,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var F=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{F=F||p.getSelectionCells();F=p.getExportableCells(p.model.getTopmostCells(F));for(var L={},P=p.createCellLookup(F),d=p.cloneCells(F,null,L),f=new mxGraphModel,g=f.getChildAt(f.getRoot(),
+0),x=0;x<d.length;x++){f.add(g,d[x]);var y=p.view.getState(F[x]);if(null!=y){var t=p.getCellGeometry(d[x]);null!=t&&t.relative&&!f.isEdge(F[x])&&null==P[mxObjectIdentity.get(f.getParent(F[x]))]&&(t.offset=null,t.relative=!1,t.x=y.x/y.view.scale-y.view.translate.x,t.y=y.y/y.view.scale-y.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(L,P),d);mxClipboard.insertCount=1;mxClipboard.setCells(d)}b.updatePasteActionStates();return F};var k=mxClipboard.paste;mxClipboard.paste=function(p){var F=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):F=k.apply(this,arguments);b.updatePasteActionStates();return F};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,F){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var ca=this.graph.getPageLayout(),ka=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ca.x*ka.width),this.scale*(this.translate.y+ca.y*ka.height),this.scale*ca.width*
-ka.width,this.scale*ca.height*ka.height)};b.getPreferredPageSize=function(ca,ka,q){ca=this.getPageLayout();ka=this.getPageSize();return new mxRectangle(0,0,ca.width*ka.width,ca.height*ka.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(ca,ka,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,
-ba=b.view.scale,ea=mxRectangle.fromRectangle(Q);ea.x=ea.x/ba-R.x;ea.y=ea.y/ba-R.y;ea.width/=ba;ea.height/=ba;R=b.container.scrollTop;var ra=b.container.scrollLeft,ta=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ta+=3;var la=b.container.offsetWidth-ta;ta=b.container.offsetHeight-ta;ca=ca?Math.max(.3,Math.min(ka||1,la/ea.width)):ba;ka=(la-ca*ea.width)/2/ca;var pa=0==this.lightboxVerticalDivider?0:(ta-ca*ea.height)/this.lightboxVerticalDivider/ca;Y&&(ka=Math.max(ka,
-0),pa=Math.max(pa,0));if(Y||Q.width<la||Q.height<ta)b.view.scaleAndTranslate(ca,Math.floor(ka-ea.x),Math.floor(pa-ea.y)),b.container.scrollTop=R*ca/ba,b.container.scrollLeft=ra*ca/ba;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/ba),Math.floor(Q.y+E/ba))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ca){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ca){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var X=this.graph.getPageLayout(),ia=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+X.x*ia.width),this.scale*(this.translate.y+X.y*ia.height),this.scale*X.width*ia.width,
+this.scale*X.height*ia.height)};b.getPreferredPageSize=function(X,ia,q){X=this.getPageLayout();ia=this.getPageSize();return new mxRectangle(0,0,X.width*ia.width,X.height*ia.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(X,ia,q,E){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;E=null!=E?E:0;var Q=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),Y=mxUtils.hasScrollbars(b.container),R=b.view.translate,Z=b.view.scale,
+da=mxRectangle.fromRectangle(Q);da.x=da.x/Z-R.x;da.y=da.y/Z-R.y;da.width/=Z;da.height/=Z;R=b.container.scrollTop;var qa=b.container.scrollLeft,va=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)va+=3;var ja=b.container.offsetWidth-va;va=b.container.offsetHeight-va;X=X?Math.max(.3,Math.min(ia||1,ja/da.width)):Z;ia=(ja-X*da.width)/2/X;var sa=0==this.lightboxVerticalDivider?0:(va-X*da.height)/this.lightboxVerticalDivider/X;Y&&(ia=Math.max(ia,0),sa=Math.max(sa,0));
+if(Y||Q.width<ja||Q.height<va)b.view.scaleAndTranslate(X,Math.floor(ia-da.x),Math.floor(sa-da.y)),b.container.scrollTop=R*X/Z,b.container.scrollLeft=qa*X/Z;else if(0!=q||0!=E)Q=b.view.translate,b.view.setTranslate(Math.floor(Q.x+q/Z),Math.floor(Q.y+E/Z))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(X){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(X){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var ca=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ca?parseInt(ca["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(ca,ka,
-q){F++;var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",ca);null!=q&&E.setAttribute("title",q);ca=document.createElement("img");ca.setAttribute("border","0");ca.setAttribute("src",ka);ca.style.width="36px";ca.style.filter="invert(100%)";E.appendChild(ca);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var K=Graph.sanitizeLink(C.backBtn.url);null!=K&&p(mxUtils.bind(this,function(ca){window.location.href=
-K;mxEvent.consume(ca)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(ca){this.actions.get("previousPage").funct();mxEvent.consume(ca)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(ca){this.actions.get("nextPage").funct();mxEvent.consume(ca)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
-"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(ca){this.actions.get("zoomOut").funct();mxEvent.consume(ca)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(ca){this.actions.get("zoomIn").funct();mxEvent.consume(ca)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(ca){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ca)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,u=null,H=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);y=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),ca||200)}),J=mxUtils.bind(this,function(ca){null!=y&&(window.clearTimeout(y),y=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ca||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=p(mxUtils.bind(this,function(ca){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ka=D.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=ka.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ka=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ka.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ca)}),Editor.layersImage,mxResources.get("layers")),G=b.getModel();G.addListener(mxEvent.CHANGE,function(){D.style.display=1<G.getChildCount(G.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,
-function(ca){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ca)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var W=this.lightboxToolbarActions[x];W.elem=p(W.fn,W.icon,W.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
-p(mxUtils.bind(this,function(ca){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(ca)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(ca){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(ca)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(ca){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(ca))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(ca){mxEvent.isTouchEvent(ca)||(mxEvent.isShiftDown(ca)||J(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ca){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ca)?H():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ca){mxEvent.isShiftDown(ca)?H():
-J(100);mxEvent.consume(ca)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||J(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(ca,ka){},mouseUp:function(ca,ka){mxEvent.isTouchEvent(ka.getEvent())&&Math.abs(this.scrollLeft-
-b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&Math.abs(this.startX-ka.getGraphX())<Z&&Math.abs(this.startY-ka.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?H():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var N=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var ca=this.graph.getPagePadding(),ka=this.graph.getPageSize();this.translate.x=
-ca.x-(this.x0||0)*ka.width;this.translate.y=ca.y-(this.y0||0)*ka.height}N.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var ca=this.getPageLayout(),ka=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ka.x+ca.width*q.width),Q=Math.ceil(2*ka.y+ca.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ka.x-ca.x*q.width;ka=
-ka.y-ca.y*q.height;this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ka?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=ca.x,this.view.y0=ca.y,ca=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ka),b.container.scrollLeft+=Math.round((E-ca)*b.view.scale),b.container.scrollTop+=Math.round((ka-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var oa=b.view.getBackgroundPane(),S=b.view.getDrawPane();
-b.cumulativeZoomFactor=1;var fa=null,ia=null,M=null,aa=null,X=null,ja=function(ca){null!=fa&&window.clearTimeout(fa);0<=ca&&window.setTimeout(function(){if(!b.isMouseDown||aa)fa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),S.style.transformOrigin=
-"",oa.style.transformOrigin="",mxClient.IS_SF?(S.style.transform="scale(1)",oa.style.transform="scale(1)",window.setTimeout(function(){S.style.transform="";oa.style.transform=""},0)):(S.style.transform="",oa.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ka=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=ia&&(Q=b.container.offsetWidth/2-ia.x+q.x,Y=b.container.offsetHeight/
-2-ia.y+q.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=M&&(Q+=ka.x-M.x,Y+=ka.y-M.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=X&&S.setAttribute("filter",X);b.cumulativeZoomFactor=1;X=aa=ia=M=fa=null}),null!=ca?ca:b.isFastZoomEnabled()?k.wheelZoomDelay:
-k.lazyZoomDelay)},0)};b.lazyZoom=function(ca,ka,q,E){E=null!=E?E:this.zoomFactor;(ka=ka||!b.scrollbars)&&(ia=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));ca?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?
-this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==X&&""!=S.getAttribute("filter")&&(X=S.getAttribute("filter"),S.removeAttribute("filter")),M=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ca=ka||null==
-ia?b.container.scrollLeft+b.container.clientWidth/2:ia.x+b.container.scrollLeft-b.container.offsetLeft,E=ka||null==ia?b.container.scrollTop+b.container.clientHeight/2:ia.y+b.container.scrollTop-b.container.offsetTop,S.style.transformOrigin=ca+"px "+E+"px",S.style.transform="scale("+this.cumulativeZoomFactor+")",oa.style.transformOrigin=ca+"px "+E+"px",oa.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(ca=b.view.backgroundPageShape.node,
-mxUtils.setPrefixedStyle(ca.style,"transform-origin",(ka||null==ia?b.container.clientWidth/2+b.container.scrollLeft-ca.offsetLeft+"px":ia.x+b.container.scrollLeft-ca.offsetLeft-b.container.offsetLeft+"px")+" "+(ka||null==ia?b.container.clientHeight/2+b.container.scrollTop-ca.offsetTop+"px":ia.y+b.container.scrollTop-ca.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ca.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity=
-"0",null!=k.hoverIcons&&k.hoverIcons.reset());ja(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(ca){null!=fa&&window.clearTimeout(fa)},null,function(ca){1!=b.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(b.container,"scroll",function(ca){null==fa||b.isMouseDown||1==b.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ca,ka,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&
-!q&&b.isScrollWheelEvent(ca))q=b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(ca)?b.view.setTranslate(q.x+(ka?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ka?E:-E));else if(q||b.isZoomWheelEvent(ca))for(var Y=mxEvent.getSource(ca);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),ia=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),aa=q,q=b.zoomFactor,E=null,ca.ctrlKey&&null!=ca.deltaY&&40>Math.abs(ca.deltaY)&&Math.round(ca.deltaY)!=
-ca.deltaY?q=1+Math.abs(ca.deltaY)/20*(q-1):null!=ca.movementY&&"pointermove"==ca.type&&(q=1+Math.max(1,Math.abs(ca.movementY))/20*(q-1),E=-1),b.lazyZoom(ka,null,E,q),mxEvent.consume(ca),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(ca){b.cumulativeZoomFactor=ca.scale;b.lazyZoom(0<ca.scale,!0);mxEvent.consume(ca)}};
-EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var X=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=X?parseInt(X["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var F=0;p=mxUtils.bind(this,function(X,ia,q){F++;
+var E=document.createElement("span");E.style.paddingLeft="8px";E.style.paddingRight="8px";E.style.cursor="pointer";mxEvent.addListener(E,"click",X);null!=q&&E.setAttribute("title",q);X=document.createElement("img");X.setAttribute("border","0");X.setAttribute("src",ia);X.style.width="36px";X.style.filter="invert(100%)";E.appendChild(X);this.chromelessToolbar.appendChild(E);return E});if(null!=C.backBtn){var L=Graph.sanitizeLink(C.backBtn.url);null!=L&&p(mxUtils.bind(this,function(X){window.location.href=
+L;mxEvent.consume(X)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var P=p(mxUtils.bind(this,function(X){this.actions.get("previousPage").funct();mxEvent.consume(X)}),Editor.previousImage,mxResources.get("previousPage")),d=document.createElement("div");d.style.fontFamily=Editor.defaultHtmlFont;d.style.display="inline-block";d.style.verticalAlign="top";d.style.fontWeight="bold";d.style.marginTop="8px";d.style.fontSize="14px";d.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(d);var f=p(mxUtils.bind(this,function(X){this.actions.get("nextPage").funct();mxEvent.consume(X)}),Editor.nextImage,mxResources.get("nextPage")),g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(d.innerText="",mxUtils.write(d,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});P.style.paddingLeft="0px";P.style.paddingRight="4px";f.style.paddingLeft="4px";f.style.paddingRight=
+"0px";var x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(f.style.display="",P.style.display="",d.style.display="inline-block"):(f.style.display="none",P.style.display="none",d.style.display="none");g()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",g)}p(mxUtils.bind(this,function(X){this.actions.get("zoomOut").funct();mxEvent.consume(X)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+function(X){this.actions.get("zoomIn").funct();mxEvent.consume(X)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(X){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(X)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,t=null,G=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);y=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);y=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),600)}),X||200)}),D=mxUtils.bind(this,function(X){null!=y&&(window.clearTimeout(y),y=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,X||30)});if("1"==urlParams.layers){this.layersDialog=null;var I=p(mxUtils.bind(this,function(X){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ia=I.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=ia.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ia=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=ia.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(X)}),Editor.layersImage,mxResources.get("layers")),H=b.getModel();H.addListener(mxEvent.CHANGE,function(){I.style.display=1<H.getChildCount(H.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(X){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(X)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=p(S.fn,S.icon,S.tooltip)}if(null!=C.refreshBtn){var T=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
+p(mxUtils.bind(this,function(X){null!=T?window.location.href=T:window.location.reload();mxEvent.consume(X)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(X){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(X)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(X){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(X))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(X){mxEvent.isTouchEvent(X)||(mxEvent.isShiftDown(X)||D(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(X){mxEvent.consume(X)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(X){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(X)?G():D(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(X){mxEvent.isShiftDown(X)?G():D(100);
+mxEvent.consume(X)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(X){mxEvent.isTouchEvent(X)||D(30)}));var M=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(X,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(X,ia){},mouseUp:function(X,ia){mxEvent.isTouchEvent(ia.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+M&&Math.abs(this.scrollTop-b.container.scrollTop)<M&&Math.abs(this.startX-ia.getGraphX())<M&&Math.abs(this.startY-ia.getGraphY())<M&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?G():D(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var X=this.graph.getPagePadding(),ia=this.graph.getPageSize();this.translate.x=X.x-(this.x0||
+0)*ia.width;this.translate.y=X.y-(this.y0||0)*ia.height}fa.apply(this,arguments)};if(!b.isViewer()){var la=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var X=this.getPageLayout(),ia=this.getPagePadding(),q=this.getPageSize(),E=Math.ceil(2*ia.x+X.width*q.width),Q=Math.ceil(2*ia.y+X.height*q.height),Y=b.minimumGraphSize;if(null==Y||Y.width!=E||Y.height!=Q)b.minimumGraphSize=new mxRectangle(0,0,E,Q);E=ia.x-X.x*q.width;ia=ia.y-X.y*q.height;
+this.autoTranslate||this.view.translate.x==E&&this.view.translate.y==ia?la.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=X.x,this.view.y0=X.y,X=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(E,ia),b.container.scrollLeft+=Math.round((E-X)*b.view.scale),b.container.scrollTop+=Math.round((ia-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ra=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=
+1;var oa=null,na=null,N=null,aa=null,V=null,ha=function(X){null!=oa&&window.clearTimeout(oa);0<=X&&window.setTimeout(function(){if(!b.isMouseDown||aa)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ra.style.transformOrigin=
+"",mxClient.IS_SF?(ba.style.transform="scale(1)",ra.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ra.style.transform=""},0)):(ba.style.transform="",ra.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var ia=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),E=b.view.scale,Q=0,Y=0;null!=na&&(Q=b.container.offsetWidth/2-na.x+q.x,Y=b.container.offsetHeight/2-na.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=E&&(null!=N&&(Q+=ia.x-N.x,Y+=ia.y-N.y),null!=e&&k.chromelessResize(!1,null,Q*(b.cumulativeZoomFactor-1),Y*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Q&&0==Y||(b.container.scrollLeft-=Q*(b.cumulativeZoomFactor-1),b.container.scrollTop-=Y*(b.cumulativeZoomFactor-1)));null!=V&&ba.setAttribute("filter",V);b.cumulativeZoomFactor=1;V=aa=na=N=oa=null}),null!=X?X:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(X,ia,q,E){E=null!=E?E:this.zoomFactor;(ia=ia||!b.scrollbars)&&(na=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));X?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=E,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==V&&""!=ba.getAttribute("filter")&&(V=ba.getAttribute("filter"),ba.removeAttribute("filter")),N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=ia||null==na?b.container.scrollLeft+
+b.container.clientWidth/2:na.x+b.container.scrollLeft-b.container.offsetLeft,E=ia||null==na?b.container.scrollTop+b.container.clientHeight/2:na.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=X+"px "+E+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ra.style.transformOrigin=X+"px "+E+"px",ra.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(X=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(X.style,
+"transform-origin",(ia||null==na?b.container.clientWidth/2+b.container.scrollLeft-X.offsetLeft+"px":na.x+b.container.scrollLeft-X.offsetLeft-b.container.offsetLeft+"px")+" "+(ia||null==na?b.container.clientHeight/2+b.container.scrollTop-X.offsetTop+"px":na.y+b.container.scrollTop-X.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(X.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ha(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(X){null!=oa&&window.clearTimeout(oa)},null,function(X){1!=b.cumulativeZoomFactor&&ha(0)});mxEvent.addListener(b.container,"scroll",function(X){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ha(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(X,ia,q,E,Q){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(X))q=
+b.view.getTranslate(),E=40/b.view.scale,mxEvent.isShiftDown(X)?b.view.setTranslate(q.x+(ia?-E:E),q.y):b.view.setTranslate(q.x,q.y+(ia?E:-E));else if(q||b.isZoomWheelEvent(X))for(var Y=mxEvent.getSource(X);null!=Y;){if(Y==b.container)return b.tooltipHandler.hideTooltip(),na=null!=E&&null!=Q?new mxPoint(E,Q):new mxPoint(mxEvent.getClientX(X),mxEvent.getClientY(X)),aa=q,q=b.zoomFactor,E=null,X.ctrlKey&&null!=X.deltaY&&40>Math.abs(X.deltaY)&&Math.round(X.deltaY)!=X.deltaY?q=1+Math.abs(X.deltaY)/20*(q-
+1):null!=X.movementY&&"pointermove"==X.type&&(q=1+Math.max(1,Math.abs(X.movementY))/20*(q-1),E=-1),b.lazyZoom(ia,null,E,q),mxEvent.consume(X),!1;Y=Y.parentNode}}),b.container);b.panningHandler.zoomGraph=function(X){b.cumulativeZoomFactor=X.scale;b.lazyZoom(0<X.scale,!0);mxEvent.consume(X)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
@@ -2196,7 +2196,7 @@ b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Ma
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),m=0,C=0;k&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var F=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,F-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var F=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-K=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,K-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,P=parseInt(this.div.style.width),d=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,F-P));p=Math.max(0,Math.min(p,L-d));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(P,d)};var m=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,k,m,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
@@ -2206,19 +2206,20 @@ EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b
EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,m=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,m);k.addListener(mxEvent.UNDO,m);k.addListener(mxEvent.REDO,m);k.addListener(mxEvent.CLEAR,m);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);m()};var p=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(F,K){p.apply(this,arguments);m()};m()};
+this.editor.graph.cellEditor.stopEditing=function(F,L){p.apply(this,arguments);m()};m()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<m.length;C++)this.actions.get(m[C]).setEnabled(0<e.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
-e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(1==e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
-e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var K=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=K+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=
-this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=K+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(b){if(null!=this.formatContainer&&null!=this.formatContainer.parentNode&&"geEditor"!=this.formatContainer.parentNode.className)this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0";else{b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);
+var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=
+this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var F=this.footerHeight+m;p=Math.max(0,Math.min(k-e-F,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=F+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=
+k+"px";this.formatContainer.style.display=null!=this.format?"":"none";F=this.getDiagramContainerOffset();var L=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=L+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=
+m+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+m+"px";this.formatContainer.style.bottom=this.footerHeight+m+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=L+F.x+"px",this.diagramContainer.style.top=e+F.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+m+C+"px");
+b&&this.editor.graph.sizeDidChange()}};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2229,19 +2230,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,K+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);K!=f()&&(P=!0,d=null)}}function p(g){C(g);F=K=null}var F=null,K=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
-mxEvent.getClientY(g));K=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,m){function C(g){if(null!=F){var x=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));m(Math.max(0,L+(e?x.x-F.x:F.y-x.y)-k));mxEvent.consume(g);L!=f()&&(P=!0,d=null)}}function p(g){C(g);F=L=null}var F=null,L=null,P=!0,d=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var f=mxUtils.bind(this,function(){var g=parseInt(e?b.style.left:b.style.bottom);e||(g=g+k-this.footerHeight);return g});mxEvent.addGestureListeners(b,function(g){F=new mxPoint(mxEvent.getClientX(g),
+mxEvent.getClientY(g));L=f();P=!1;mxEvent.consume(g)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(!P&&this.hsplitClickEnabled){var x=null!=d?d-k:0;d=f();m(x);mxEvent.consume(g)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){k(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,m,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,m?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,m,C,p,F,K,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,K,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,K,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,K,P,d);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,m,C,p,F,L,P,d,f,g,x){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),m,C,p,F,g,L,P);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,d||340,f||100+20*e,!0,!1,x);b.init()};EditorUi.prototype.showDialog=function(b,e,k,m,C,p,F,L,P,d){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,m,C,p,F,L,P,d);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,m=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(F){this.handleError(F)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,m=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(m);e(p)},function(){k.cellEditor.restoreSelection(m)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>k&&(e=b.substring(k,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var K=F.lastIndexOf("%3E");
-0<=K&&K<F.length-3&&(F=F.substring(0,K+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),F="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var L=F.lastIndexOf("%3E");
+0<=L&&L<F.length-3&&(F=F.substring(0,L+3))}catch(f){}try{var P=p.getElementsByTagName("span"),d=null!=P&&0<P.length?mxUtils.trim(decodeURIComponent(P[0].textContent)):decodeURIComponent(F);this.isCompatibleString(d)&&(F=d)}catch(f){}}catch(f){}b(this.isCompatibleString(F)?F:null)}))["catch"](function(C){b(null)})}))["catch"](function(m){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(m){m.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2257,13 +2258,13 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var u=m.getCompositeParents(m.getSelectionCells()),H=0<u.length?u[0]:null;if(null!=H)if(y){m.getModel().beginUpdate();try{for(H=0;H<u.length;H++)if(m.getModel().isVertex(u[H])&&m.isCellResizable(u[H])){var J=m.getCellGeometry(u[H]);null!=J&&(J=J.clone(),37==g?J.width=Math.max(0,J.width-x):38==g?J.height=Math.max(0,J.height-x):39==g?J.width+=x:40==g&&(J.height+=x),m.getModel().setGeometry(u[H],
-J))}}finally{m.getModel().endUpdate()}}else{J=m.model.getParent(H);var D=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(H)&&null!=m.layoutManager&&!m.isCellLocked(H)&&(y=m.layoutManager.getLayout(J));if(null!=y&&y.constructor==mxStackLayout)x=J.getIndex(H),37==g||38==g?m.model.add(J,H,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(J,H,Math.min(m.model.getChildCount(J),x+1));else{var G=m.graphHandler;null!=G&&(null==G.first&&G.start(H,0,0,u),null!=G.first&&(H=u=0,37==g?u=-x:38==
-g?H=-x:39==g?u=x:40==g&&(H=x),G.currentDx+=u*D,G.currentDy+=H*D,G.checkPreview(),G.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=G.first){var W=G.roundLength(G.currentDx/D),T=G.roundLength(G.currentDy/D);G.moveCells(G.cells,W,T);G.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
-89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=K[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),K[g.keyCode],
+EditorUi.prototype.createKeyHandler=function(b){function e(g,x,y){if(!m.isSelectionEmpty()&&m.isEnabled()){x=null!=x?x:1;var t=m.getCompositeParents(m.getSelectionCells()),G=0<t.length?t[0]:null;if(null!=G)if(y){m.getModel().beginUpdate();try{for(G=0;G<t.length;G++)if(m.getModel().isVertex(t[G])&&m.isCellResizable(t[G])){var D=m.getCellGeometry(t[G]);null!=D&&(D=D.clone(),37==g?D.width=Math.max(0,D.width-x):38==g?D.height=Math.max(0,D.height-x):39==g?D.width+=x:40==g&&(D.height+=x),m.getModel().setGeometry(t[G],
+D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(G);var I=m.getView().scale;y=null;1==m.getSelectionCount()&&m.model.isVertex(G)&&null!=m.layoutManager&&!m.isCellLocked(G)&&(y=m.layoutManager.getLayout(D));if(null!=y&&y.constructor==mxStackLayout)x=D.getIndex(G),37==g||38==g?m.model.add(D,G,Math.max(0,x-1)):(39==g||40==g)&&m.model.add(D,G,Math.min(m.model.getChildCount(D),x+1));else{var H=m.graphHandler;null!=H&&(null==H.first&&H.start(G,0,0,t),null!=H.first&&(G=t=0,37==g?t=-x:38==
+g?G=-x:39==g?t=x:40==g&&(G=x),H.currentDx+=t*I,H.currentDy+=G*I,H.checkPreview(),H.updatePreview()),null!=F&&window.clearTimeout(F),F=window.setTimeout(function(){if(null!=H.first){var S=H.roundLength(H.currentDx/I),T=H.roundLength(H.currentDy/I);H.moveCells(H.cells,S,T);H.reset()}},400))}}}}var k=this,m=this.editor.graph,C=new mxKeyHandler(m),p=C.isEventIgnored;C.isEventIgnored=function(g){return!(mxEvent.isShiftDown(g)&&9==g.keyCode)&&(!this.isControlDown(g)||mxEvent.isShiftDown(g)||90!=g.keyCode&&
+89!=g.keyCode&&188!=g.keyCode&&190!=g.keyCode&&85!=g.keyCode)&&(66!=g.keyCode&&73!=g.keyCode||!this.isControlDown(g)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(g){return!mxEvent.isConsumed(g)&&this.isGraphEvent(g)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(g){return mxEvent.isControlDown(g)||mxClient.IS_MAC&&g.metaKey};var F=null,L={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},P=C.getFunction;mxKeyHandler.prototype.getFunction=function(g){if(m.isEnabled()){if(mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){var x=k.actions.get(k.altShiftActions[g.keyCode]);if(null!=x)return x.funct}if(null!=L[g.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(g)&&mxEvent.isShiftDown(g)&&mxEvent.isAltDown(g)){if(m.model.isVertex(m.getSelectionCell()))return function(){var y=m.connectVertex(m.getSelectionCell(),L[g.keyCode],
m.defaultEdgeLength,g,!0);null!=y&&0<y.length&&(1==y.length&&m.model.isEdge(y[0])?m.setSelectionCell(m.model.getTerminal(y[0],!1)):m.setSelectionCell(y[y.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(g)?function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null,!0)}:function(){e(g.keyCode,mxEvent.isShiftDown(g)?m.gridSize:null)}}return P.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
-function(g,x,y,u){var H=this.actions.get(y);null!=H&&(y=function(){H.isEnabled()&&H.funct.apply(this,arguments)},x?u?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):u?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
+function(g,x,y,t){var G=this.actions.get(y);null!=G&&(y=function(){G.isEnabled()&&G.funct.apply(this,arguments)},x?t?C.bindControlShiftKey(g,y):C.bindControlKey(g,y):t?C.bindShiftKey(g,y):C.bindKey(g,y))});var d=this,f=C.escape;C.escape=function(g){f.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){m.exitGroup()});C.bindControlShiftKey(35,function(){m.enterGroup()});C.bindShiftKey(36,function(){m.home()});C.bindKey(35,function(){m.refresh()});C.bindAction(107,!0,"zoomIn");
C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),C.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),C.bindControlKey(13,function(){d.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"formatPanel",!0),
@@ -2274,41 +2275,41 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var m=0;m<b.length;m++)k=k.replace(new RegExp("&"+b[m][0]+";","g"),"&#"+b[m][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},k=Math.pow(2,53)-1;return function(m){var C=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,F;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(F=
-arguments[2])}var K=Number(C.length);K=isNaN(K)?0:0!==K&&isFinite(K)?(0<K?1:-1)*Math.floor(Math.abs(K)):K;K=Math.min(Math.max(K,0),k);for(var P=e(this)?Object(new this(K)):Array(K),d=0,f;d<K;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=K;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var L=Number(C.length);L=isNaN(L)?0:0!==L&&isFinite(L)?(0<L?1:-1)*Math.floor(Math.abs(L)):L;L=Math.min(Math.max(L,0),k);for(var P=e(this)?Object(new this(L)):Array(L),d=0,f;d<L;)f=C[d],P[d]=p?"undefined"===typeof F?p(f,d):p.call(F,f,d):f,d+=1;P.length=L;return P}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,K=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var X=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=X)if(this.model.isEdge(X.cell))if(F=new mxPoint(M.getGraphX(),M.getGraphY()),f=this.isCellSelected(X.cell),P=X,K=M,null!=X.text&&
-null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,M.getGraphX(),M.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ja=this.selectionCellsHandler.getHandler(X.cell);null!=ja&&null!=ja.bends&&0<ja.bends.length&&(d=ja.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(ja=this.selectionCellsHandler.getHandler(X.cell),null==ja||null==ja.getHandleForEvent(M))){var ca=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ka=mxEvent.isTouchEvent(M.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ja=ka+2;ca.grow(ka);if(this.isTableCell(X.cell)&&!this.isCellSelected(X.cell)&&!(mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()-ja)&&mxUtils.contains(X,M.getGraphX()-ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()+ja)&&mxUtils.contains(X,M.getGraphX()+ja,M.getGraphY()-ja))){var q=this.model.getParent(X.cell);ja=this.model.getParent(q);if(!this.isCellSelected(ja)){ka*=aa;var E=2*ka;if(this.model.getChildAt(ja,
-0)!=q&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y-ka,X.width,E))||this.model.getChildAt(q,0)!=X.cell&&mxUtils.intersects(ca,new mxRectangle(X.x-ka,X.y,E,X.height))||mxUtils.intersects(ca,new mxRectangle(X.x,X.y+X.height-ka,X.width,E))||mxUtils.intersects(ca,new mxRectangle(X.x+X.width-ka,X.y,E,X.height)))q=this.selectionCellsHandler.isHandled(ja),this.selectCellForEvent(ja,M.getEvent()),ja=this.selectionCellsHandler.getHandler(ja),null!=ja&&(ka=ja.getHandleForEvent(M),null!=ka&&(ja.start(M.getGraphX(),
-M.getGraphY(),ka),ja.blockDelayedSelection=!q,M.consume()))}}for(;!M.isConsumed()&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&(ja=this.getActualStartSize(X.cell),(0<ja.x||0<ja.width)&&mxUtils.intersects(ca,new mxRectangle(X.x+(ja.x-ja.width-1)*aa+(0==ja.x?X.width:0),X.y,1,X.height))||(0<ja.y||0<ja.height)&&mxUtils.intersects(ca,new mxRectangle(X.x,X.y+(ja.y-ja.height-1)*aa+(0==ja.y?X.height:0),X.width,1)))&&(this.selectCellForEvent(X.cell,
-M.getEvent()),ja=this.selectionCellsHandler.getHandler(X.cell),null!=ja&&(ka=mxEvent.CUSTOM_HANDLE-ja.customHandles.length+1,ja.start(M.getGraphX(),M.getGraphY(),ka),M.consume())),X=this.view.getState(this.model.getParent(X.cell))}}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var X in M)if(null!=M[X].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ja=
-this.tolerance;if(null!=F&&null!=P&&null!=K){if(X=P,Math.abs(F.x-aa.getGraphX())>ja||Math.abs(F.y-aa.getGraphY())>ja){var ca=this.selectionCellsHandler.getHandler(X.cell);null==ca&&this.model.isEdge(X.cell)&&(ca=this.createHandler(X));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){M=ca.getHandleForEvent(K);var ka=this.view.getEdgeStyle(X);ja=ka==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(M=d);if(ja&&0!=M&&M!=ca.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!ja||null==X.visibleSourceState&&
-null==X.visibleTargetState||(this.graphHandler.reset(),aa.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=X.visibleSourceState||M==ca.bends.length-1||null!=X.visibleTargetState)ja||M==mxEvent.LABEL_HANDLE||(ja=X.absolutePoints,null!=ja&&(null==ka&&null==M||ka==mxEdgeStyle.OrthConnector)&&(M=d,null==M&&(M=new mxRectangle(F.x,F.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,ja[0].x,ja[0].y)?M=0:mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y)?M=ca.bends.length-
-1:null!=ka&&(2==ja.length||3==ja.length&&(0==Math.round(ja[0].x-ja[1].x)&&0==Math.round(ja[1].x-ja[2].x)||0==Math.round(ja[0].y-ja[1].y)&&0==Math.round(ja[1].y-ja[2].y)))?M=2:(M=mxUtils.findNearestSegment(X,F.x,F.y),M=null==ka?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ca.start(aa.getGraphX(),aa.getGraphX(),M),aa.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(X.cell)||(this.selectionCellsHandler.handlers.put(X.cell,
-ca),this.selectCellForEvent(X.cell,aa.getEvent())):this.isCellSelected(X.cell)||ca.destroy());f=!1;F=K=P=d=null}}else if(X=aa.getState(),null!=X&&this.isCellEditable(X.cell)){ca=null;if(this.model.isEdge(X.cell)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),ja=X.absolutePoints,null!=ja)if(null!=X.text&&null!=X.text.boundingBox&&mxUtils.contains(X.text.boundingBox,aa.getGraphX(),aa.getGraphY()))ca="move";else if(mxUtils.contains(M,ja[0].x,
-ja[0].y)||mxUtils.contains(M,ja[ja.length-1].x,ja[ja.length-1].y))ca="pointer";else if(null!=X.visibleSourceState||null!=X.visibleTargetState)M=this.view.getEdgeStyle(X),ca="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(X)&&(aa=mxUtils.findNearestSegment(X,aa.getGraphX(),aa.getGraphY()),aa<ja.length-1&&0<=aa&&(ca=0==Math.round(ja[aa].x-ja[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ja=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(),
-aa.getGraphY());M.grow(ja);if(this.isTableCell(X.cell)&&(aa=this.model.getParent(X.cell),ja=this.model.getParent(aa),!this.isCellSelected(ja)))if(mxUtils.intersects(M,new mxRectangle(X.x,X.y-2,X.width,4))&&this.model.getChildAt(ja,0)!=aa||mxUtils.intersects(M,new mxRectangle(X.x,X.y+X.height-2,X.width,4)))ca="row-resize";else if(mxUtils.intersects(M,new mxRectangle(X.x-2,X.y,4,X.height))&&this.model.getChildAt(aa,0)!=X.cell||mxUtils.intersects(M,new mxRectangle(X.x+X.width-2,X.y,4,X.height)))ca="col-resize";
-for(aa=X;null==ca&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ja=this.getActualStartSize(aa.cell),ka=this.view.scale,(0<ja.x||0<ja.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(ja.x-ja.width-1)*ka+(0==ja.x?aa.width*ka:0),aa.y,1,aa.height))?ca="col-resize":(0<ja.y||0<ja.height)&&mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(ja.y-ja.height-1)*ka+(0==ja.y?aa.height:0),aa.width,1))&&(ca="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=
-ca&&X.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(M,aa){d=F=K=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(aa=1!=M.style.html?mxUtils.htmlEntities(aa,!1):M.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);
-this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(M,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=g.apply(this,arguments);
-if(this.graph.pageVisible){var aa=[],X=this.graph.pageFormat,ja=this.graph.pageScale,ca=X.width*ja;X=X.height*ja;ja=this.graph.view.translate;for(var ka=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*ca+ja.x)*ka,(q.y*X+ja.y)*ka,ca*ka,X*ka));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*ca+ja.x)*ka,((q.y+E)*X+ja.y)*ka,ca*ka,X*ka));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(M,aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=x.apply(this,arguments),X=new mxDictionary,ja=[],ca=0;ca<aa.length;ca++){var ka=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[ca])&&
-this.graph.isCellSelected(aa[ca])?this.graph.model.getParent(aa[ca]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[ca])&&this.graph.isCellSelected(aa[ca])?aa[ca]:this.graph.getCompositeParent(aa[ca]);null==ka||X.get(ka)||(X.put(ka,!0),ja.push(ka))}return ja};var y=this.graphHandler.start;this.graphHandler.start=function(M,aa,X,ja){var ca=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ca=!0:M=this.graph.model.getParent(M));ca||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||
-(M=this.graph.getCompositeParent(M));y.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var H=(new Date).getTime(),J=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;D.apply(this,arguments);M!=this.currentState?(H=(new Date).getTime(),
-J=0):J=(new Date).getTime()-H};var G=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&G.apply(this,arguments)};var W=this.isToggleEvent;this.isToggleEvent=function(M){return W.apply(this,arguments)||!mxClient.IS_CHROMEOS&&
-mxEvent.isShiftDown(M)};var T=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(M){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=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=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var X=aa?M.sourceState.cell:M.getCell();null!=X&&(X=this.getClickableLinkForCell(X),null!=X&&(this.isCustomLink(X)?
-this.customLinkClicked(X):this.openLink(X)));this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var qa=this.tooltipHandler.show;this.tooltipHandler.show=function(){qa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};
-this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var oa=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return oa.apply(this,arguments)};this.selectRegion=function(M,aa){var X=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x,
-M.y,M.width,M.height,null,null,X,function(ja){return"1"==mxUtils.getValue(ja.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(X=0;X<M.length;X++)this.selectCellForEvent(M[X],aa);else this.selectCellsForEvent(M,aa);return M};var S=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,X){return this.graph.isCellSelected(M)?!1:S.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),
-"locked","0"))return!0;M=this.model.getParent(M)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),fa=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var X=aa.getProperty("cell");null==X?(M=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(M),mxEvent.getClientY(M)),u.start(M.x,M.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(X)&&this.removeSelectionCell(X);fa=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var X=M.view.graph;return aa&&(X.isCellSelected(M.cell)||X.isTableRow(M.cell)&&X.selectionCellsHandler.isHandled(X.model.getParent(M.cell)))};
-this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var ia=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ia.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,
+Graph=function(b,e,k,m,C,p){mxGraph.call(this,b,e,k,m);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(N){N=this.getCurrentCellStyle(N);
+return null!=N?"1"==N.html||"wrap"==N[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var F=null,L=null,P=null,d=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){N=aa.getProperty("event");var V=N.getState();aa=this.view.scale;if(!mxEvent.isAltDown(N.getEvent())&&null!=V)if(this.model.isEdge(V.cell))if(F=new mxPoint(N.getGraphX(),N.getGraphY()),f=this.isCellSelected(V.cell),P=V,L=N,null!=V.text&&
+null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,N.getGraphX(),N.getGraphY()))d=mxEvent.LABEL_HANDLE;else{var ha=this.selectionCellsHandler.getHandler(V.cell);null!=ha&&null!=ha.bends&&0<ha.bends.length&&(d=ha.getHandleForEvent(N))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(N.getEvent())&&(ha=this.selectionCellsHandler.getHandler(V.cell),null==ha||null==ha.getHandleForEvent(N))){var X=new mxRectangle(N.getGraphX()-1,N.getGraphY()-1),ia=mxEvent.isTouchEvent(N.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ha=ia+2;X.grow(ia);if(this.isTableCell(V.cell)&&!this.isCellSelected(V.cell)&&!(mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()-ha)&&mxUtils.contains(V,N.getGraphX()-ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()+ha)&&mxUtils.contains(V,N.getGraphX()+ha,N.getGraphY()-ha))){var q=this.model.getParent(V.cell);ha=this.model.getParent(q);if(!this.isCellSelected(ha)){ia*=aa;var E=2*ia;if(this.model.getChildAt(ha,
+0)!=q&&mxUtils.intersects(X,new mxRectangle(V.x,V.y-ia,V.width,E))||this.model.getChildAt(q,0)!=V.cell&&mxUtils.intersects(X,new mxRectangle(V.x-ia,V.y,E,V.height))||mxUtils.intersects(X,new mxRectangle(V.x,V.y+V.height-ia,V.width,E))||mxUtils.intersects(X,new mxRectangle(V.x+V.width-ia,V.y,E,V.height)))q=this.selectionCellsHandler.isHandled(ha),this.selectCellForEvent(ha,N.getEvent()),ha=this.selectionCellsHandler.getHandler(ha),null!=ha&&(ia=ha.getHandleForEvent(N),null!=ia&&(ha.start(N.getGraphX(),
+N.getGraphY(),ia),ha.blockDelayedSelection=!q,N.consume()))}}for(;!N.isConsumed()&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ha=this.getActualStartSize(V.cell),(0<ha.x||0<ha.width)&&mxUtils.intersects(X,new mxRectangle(V.x+(ha.x-ha.width-1)*aa+(0==ha.x?V.width:0),V.y,1,V.height))||(0<ha.y||0<ha.height)&&mxUtils.intersects(X,new mxRectangle(V.x,V.y+(ha.y-ha.height-1)*aa+(0==ha.y?V.height:0),V.width,1)))&&(this.selectCellForEvent(V.cell,
+N.getEvent()),ha=this.selectionCellsHandler.getHandler(V.cell),null!=ha&&(ia=mxEvent.CUSTOM_HANDLE-ha.customHandles.length+1,ha.start(N.getGraphX(),N.getGraphY(),ia),N.consume())),V=this.view.getState(this.model.getParent(V.cell))}}}));this.addMouseListener({mouseDown:function(N,aa){},mouseMove:mxUtils.bind(this,function(N,aa){N=this.selectionCellsHandler.handlers.map;for(var V in N)if(null!=N[V].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var ha=
+this.tolerance;if(null!=F&&null!=P&&null!=L){if(V=P,Math.abs(F.x-aa.getGraphX())>ha||Math.abs(F.y-aa.getGraphY())>ha){var X=this.selectionCellsHandler.getHandler(V.cell);null==X&&this.model.isEdge(V.cell)&&(X=this.createHandler(V));if(null!=X&&null!=X.bends&&0<X.bends.length){N=X.getHandleForEvent(L);var ia=this.view.getEdgeStyle(V);ha=ia==mxEdgeStyle.EntityRelation;f||d!=mxEvent.LABEL_HANDLE||(N=d);if(ha&&0!=N&&N!=X.bends.length-1&&N!=mxEvent.LABEL_HANDLE)!ha||null==V.visibleSourceState&&null==V.visibleTargetState||
+(this.graphHandler.reset(),aa.consume());else if(N==mxEvent.LABEL_HANDLE||0==N||null!=V.visibleSourceState||N==X.bends.length-1||null!=V.visibleTargetState)ha||N==mxEvent.LABEL_HANDLE||(ha=V.absolutePoints,null!=ha&&(null==ia&&null==N||ia==mxEdgeStyle.OrthConnector)&&(N=d,null==N&&(N=new mxRectangle(F.x,F.y),N.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(N,ha[0].x,ha[0].y)?N=0:mxUtils.contains(N,ha[ha.length-1].x,ha[ha.length-1].y)?N=X.bends.length-1:null!=ia&&(2==ha.length||
+3==ha.length&&(0==Math.round(ha[0].x-ha[1].x)&&0==Math.round(ha[1].x-ha[2].x)||0==Math.round(ha[0].y-ha[1].y)&&0==Math.round(ha[1].y-ha[2].y)))?N=2:(N=mxUtils.findNearestSegment(V,F.x,F.y),N=null==ia?mxEvent.VIRTUAL_HANDLE-N:N+1))),null==N&&(N=mxEvent.VIRTUAL_HANDLE)),X.start(aa.getGraphX(),aa.getGraphX(),N),aa.consume(),this.graphHandler.reset()}null!=X&&(this.selectionCellsHandler.isHandlerActive(X)?this.isCellSelected(V.cell)||(this.selectionCellsHandler.handlers.put(V.cell,X),this.selectCellForEvent(V.cell,
+aa.getEvent())):this.isCellSelected(V.cell)||X.destroy());f=!1;F=L=P=d=null}}else if(V=aa.getState(),null!=V&&this.isCellEditable(V.cell)){X=null;if(this.model.isEdge(V.cell)){if(N=new mxRectangle(aa.getGraphX(),aa.getGraphY()),N.grow(mxEdgeHandler.prototype.handleImage.width/2),ha=V.absolutePoints,null!=ha)if(null!=V.text&&null!=V.text.boundingBox&&mxUtils.contains(V.text.boundingBox,aa.getGraphX(),aa.getGraphY()))X="move";else if(mxUtils.contains(N,ha[0].x,ha[0].y)||mxUtils.contains(N,ha[ha.length-
+1].x,ha[ha.length-1].y))X="pointer";else if(null!=V.visibleSourceState||null!=V.visibleTargetState)N=this.view.getEdgeStyle(V),X="crosshair",N!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(V)&&(aa=mxUtils.findNearestSegment(V,aa.getGraphX(),aa.getGraphY()),aa<ha.length-1&&0<=aa&&(X=0==Math.round(ha[aa].x-ha[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){ha=mxShape.prototype.svgStrokeTolerance/2;N=new mxRectangle(aa.getGraphX(),aa.getGraphY());N.grow(ha);if(this.isTableCell(V.cell)&&
+(aa=this.model.getParent(V.cell),ha=this.model.getParent(aa),!this.isCellSelected(ha)))if(mxUtils.intersects(N,new mxRectangle(V.x,V.y-2,V.width,4))&&this.model.getChildAt(ha,0)!=aa||mxUtils.intersects(N,new mxRectangle(V.x,V.y+V.height-2,V.width,4)))X="row-resize";else if(mxUtils.intersects(N,new mxRectangle(V.x-2,V.y,4,V.height))&&this.model.getChildAt(aa,0)!=V.cell||mxUtils.intersects(N,new mxRectangle(V.x+V.width-2,V.y,4,V.height)))X="col-resize";for(aa=V;null==X&&null!=aa&&(this.isTableCell(aa.cell)||
+this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&(ha=this.getActualStartSize(aa.cell),ia=this.view.scale,(0<ha.x||0<ha.width)&&mxUtils.intersects(N,new mxRectangle(aa.x+(ha.x-ha.width-1)*ia+(0==ha.x?aa.width*ia:0),aa.y,1,aa.height))?X="col-resize":(0<ha.y||0<ha.height)&&mxUtils.intersects(N,new mxRectangle(aa.x,aa.y+(ha.y-ha.height-1)*ia+(0==ha.y?aa.height:0),aa.width,1))&&(X="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=X&&V.setCursor(X)}}}),
+mouseUp:mxUtils.bind(this,function(N,aa){d=F=L=P=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(N){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);N.view.graph.isHtmlLabel(N.cell)&&(aa=1!=N.style.html?mxUtils.htmlEntities(aa,!1):N.view.graph.sanitizeHtml(aa));return aa};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=
+!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(N,aa){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var N=g.apply(this,arguments);if(this.graph.pageVisible){var aa=
+[],V=this.graph.pageFormat,ha=this.graph.pageScale,X=V.width*ha;V=V.height*ha;ha=this.graph.view.translate;for(var ia=this.graph.view.scale,q=this.graph.getPageLayout(),E=0;E<q.width;E++)aa.push(new mxRectangle(((q.x+E)*X+ha.x)*ia,(q.y*V+ha.y)*ia,X*ia,V*ia));for(E=1;E<q.height;E++)aa.push(new mxRectangle((q.x*X+ha.x)*ia,((q.y+E)*V+ha.y)*ia,X*ia,V*ia));N=aa.concat(N)}return N};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(N,aa){return null==
+N.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(N){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var x=this.graphHandler.getCells;this.graphHandler.getCells=function(N){for(var aa=x.apply(this,arguments),V=new mxDictionary,ha=[],X=0;X<aa.length;X++){var ia=this.graph.isTableCell(N)&&this.graph.isTableCell(aa[X])&&this.graph.isCellSelected(aa[X])?
+this.graph.model.getParent(aa[X]):this.graph.isTableRow(N)&&this.graph.isTableRow(aa[X])&&this.graph.isCellSelected(aa[X])?aa[X]:this.graph.getCompositeParent(aa[X]);null==ia||V.get(ia)||(V.put(ia,!0),ha.push(ia))}return ha};var y=this.graphHandler.start;this.graphHandler.start=function(N,aa,V,ha){var X=!1;this.graph.isTableCell(N)&&(this.graph.isCellSelected(N)?X=!0:N=this.graph.model.getParent(N));X||this.graph.isTableRow(N)&&this.graph.isCellSelected(N)||(N=this.graph.getCompositeParent(N));y.apply(this,
+arguments)};this.connectionHandler.createTargetVertex=function(N,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var G=(new Date).getTime(),D=0,I=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var N=this.currentState;I.apply(this,arguments);N!=this.currentState?(G=(new Date).getTime(),D=0):D=(new Date).getTime()-G};var H=this.connectionHandler.isOutlineConnectEvent;
+this.connectionHandler.isOutlineConnectEvent=function(N){return mxEvent.isShiftDown(N.getEvent())&&mxEvent.isAltDown(N.getEvent())?!1:null!=this.currentState&&N.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(N){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N)};var T=t.isForceRubberbandEvent;t.isForceRubberbandEvent=
+function(N){return T.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(N.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==N.getState()&&mxEvent.isTouchEvent(N.getEvent())};var M=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(M=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&
+(this.container.style.cursor=M)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(N){return mxEvent.isMouseEvent(N.getEvent())};var fa=this.click;this.click=function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);if(this.isEnabled()&&!aa||N.isConsumed())return fa.apply(this,arguments);var V=aa?N.sourceState.cell:N.getCell();null!=V&&(V=this.getClickableLinkForCell(V),null!=V&&(this.isCustomLink(V)?this.customLinkClicked(V):this.openLink(V)));
+this.isEnabled()&&aa&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};var la=this.tooltipHandler.show;this.tooltipHandler.show=function(){la.apply(this,arguments);if(null!=this.div)for(var N=this.div.getElementsByTagName("a"),aa=0;aa<N.length;aa++)null!=N[aa].getAttribute("href")&&null==N[aa].getAttribute("target")&&N[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(N){return N.sourceState};this.getCursorForMouseEvent=
+function(N){var aa=null==N.state&&null!=N.sourceState&&this.isCellLocked(N.sourceState.cell);return this.getCursorForCell(aa?N.sourceState.cell:N.getCell())};var ra=this.getCursorForCell;this.getCursorForCell=function(N){if(!this.isEnabled()||this.isCellLocked(N)){if(null!=this.getClickableLinkForCell(N))return"pointer";if(this.isCellLocked(N))return"default"}return ra.apply(this,arguments)};this.selectRegion=function(N,aa){var V=mxEvent.isAltDown(aa)?N:null;N=this.getCells(N.x,N.y,N.width,N.height,
+null,null,V,function(ha){return"1"==mxUtils.getValue(ha.style,"locked","0")},!0);if(this.isToggleEvent(aa))for(V=0;V<N.length;V++)this.selectCellForEvent(N[V],aa);else this.selectCellsForEvent(N,aa);return N};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(N,aa,V){return this.graph.isCellSelected(N)?!1:ba.apply(this,arguments)};this.isCellLocked=function(N){for(;null!=N;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(N),"locked","0"))return!0;
+N=this.model.getParent(N)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,aa){"mouseDown"==aa.getProperty("eventName")&&(N=aa.getProperty("event").getState(),oa=null==N||this.isSelectionEmpty()||this.isCellSelected(N.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(N,aa){if(!mxEvent.isMultiTouchEvent(aa)){N=aa.getProperty("event");var V=aa.getProperty("cell");null==V?(N=mxUtils.convertPoint(this.container,
+mxEvent.getClientX(N),mxEvent.getClientY(N)),t.start(N.x,N.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(V)&&this.removeSelectionCell(V);oa=null;aa.consume()}}));this.connectionHandler.selectCells=function(N,aa){this.graph.setSelectionCell(aa||N)};this.connectionHandler.constraintHandler.isStateIgnored=function(N,aa){var V=N.view.graph;return aa&&(V.isCellSelected(N.cell)||V.isTableRow(N.cell)&&V.selectionCellsHandler.isHandled(V.model.getParent(N.cell)))};
+this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var N=this.connectionHandler.constraintHandler;null!=N.currentFocus&&N.isStateIgnored(N.currentFocus,!0)&&(N.currentFocus=null,N.constraints=null,N.destroyIcons());N.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var na=this.updateMouseEvent;this.updateMouseEvent=function(N){N=na.apply(this,arguments);null!=N.state&&this.isCellLocked(N.getCell())&&(N.state=null);return N}}this.currentTranslate=new mxPoint(0,
0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;
Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2327,33 +2328,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),C=m.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(m.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{m=e=
-1;var F=p[0].getAttribute("width"),K=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;K=null!=K&&"%"!=K.charAt(K.length-1)?parseFloat(K):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(K)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/K)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+1;var F=p[0].getAttribute("width"),L=p[0].getAttribute("height");F=null!=F&&"%"!=F.charAt(F.length-1)?parseFloat(F):NaN;L=null!=L&&"%"!=L.charAt(L.length-1)?parseFloat(L):NaN;var P=p[0].getAttribute("viewBox");if(null!=P&&!isNaN(F)&&!isNaN(L)){var d=P.split(" ");4<=P.length&&(e=parseFloat(d[2])/F,m=parseFloat(d[3])/L)}var f=p[0].getBBox();0<f.width&&0<f.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",f.x+" "+f.y+" "+f.width+" "+f.height),k.getElementsByTagName("svg")[0].setAttribute("width",
f.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",f.height/m))}catch(g){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(g){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,K=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
-g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,K,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,F=null,L=mxUtils.bind(this,function(f){p=!0;F=new mxPoint(mxEvent.getClientX(f),mxEvent.getClientY(f))}),P=mxUtils.bind(this,function(f){p=p&&null!=F&&Math.abs(F.x-mxEvent.getClientX(f))<C&&Math.abs(F.y-mxEvent.getClientY(f))<C}),d=mxUtils.bind(this,function(f){if(p)for(var g=mxEvent.getSource(f);null!=
+g&&g!=m.node;){if("a"==g.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,g,f);break}g=g.parentNode}});mxEvent.addGestureListeners(m.node,L,P,d);mxEvent.addListener(m.node,"click",function(f){mxEvent.consume(f)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var m=mxEvent.getSource(k);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(m)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,m){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(F.style,"lineShape",null)&&(this.model.isVertex(F.cell)||"arrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(F){return!this.isSpecialColor(F.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(F){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],F)};Graph.prototype.isGlassState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"rectangle"==F||
-"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var K=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K)};Graph.prototype.isAutoSizeState=function(F){return"1"==
-mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,K){F=null!=F?F:!0;K=null!=K?K:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||K&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
-function(F){for(var K={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,K,0==P)}return K};Graph.prototype.mergeStyle=function(F,K,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==K[f]&&P?K[f]=g:K[f]!=g&&delete K[f])}for(f in K)d[f]||delete K[f]}};Graph.prototype.getStartEditingCell=function(F,K){K=this.getCellStyle(F);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&
-0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),K=this.getCellStyle(F),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==K)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(K=0;K<this.model.getChildCount(F);K++){var P=this.model.getChildAt(F,K);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,K,P){P=null!=P?P:Graph.pasteStyles;
-Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,K)};Graph.prototype.updateCellStyles=function(F,K){this.model.beginUpdate();try{for(var P=0;P<K.length;P++)if(this.model.isVertex(K[P])||this.model.isEdge(K[P])){var d=this.getCellStyle(K[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[K[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
-(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,K,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,K=K/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,K,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
-null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),u=this.getScaledCellAt(F,K,y,d,f,g);if(null!=u)return u;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(u=this.view.getState(y),null!=u&&(null==g||!g(u,F,K))&&this.intersects(u,F,K)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
-!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var K=this.getCellGeometry(F);null!=K&&K.relative;)F=this.getModel().getParent(F),K=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var K=
-new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||K.get(f)||(K.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var K=this.model.getParent(F);if(!this.model.isVertex(K))break;F=K}return F};Graph.prototype.filterSelectionCells=function(F){var K=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<K.length;d++)F(K[d])||
-P.push(K[d]);K=P}return K};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var K=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*K-P.x,(F.y+2*P.y)*K-P.y,F.width*K,F.height*K)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
-if(this.graph.useCssTransforms){var K=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+K.x)*P,(F.y+K.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};var m=
-mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var K=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||K.push(F[P]);return K};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var K=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
-"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");K!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,K=this.scale,P=this.translate;
-F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=K,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,K,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
+"internalStorage"==F||"ext"==F||"umlLifeline"==F||"swimlane"==F||"process"==F};Graph.prototype.isRoundedState=function(F){return null!=F.shape?F.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(F){var L=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(F.style,mxConstants.STYLE_CURVED,!1)&&("connector"==L||"filledEdge"==L)};Graph.prototype.isAutoSizeState=function(F){return"1"==
+mxUtils.getValue(F.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(F){F=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null);return"label"==F||"image"==F};Graph.prototype.isShadowState=function(F){return"image"!=mxUtils.getValue(F.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(F,L){F=null!=F?F:!0;L=null!=L?L:!0;var P=this.model;return P.filterDescendants(function(d){return F&&P.isVertex(d)||L&&P.isEdge(d)},P.getRoot())};Graph.prototype.getCommonStyle=
+function(F){for(var L={},P=0;P<F.length;P++){var d=this.view.getState(F[P]);this.mergeStyle(d.style,L,0==P)}return L};Graph.prototype.mergeStyle=function(F,L,P){if(null!=F){var d={},f;for(f in F){var g=F[f];null!=g&&(d[f]=!0,null==L[f]&&P?L[f]=g:L[f]!=g&&delete L[f])}for(f in L)d[f]||delete L[f]}};Graph.prototype.getStartEditingCell=function(F,L){L=this.getCellStyle(F);L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0));this.isTable(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&
+0<this.model.getChildCount(F)&&(F=this.model.getChildAt(F,0),L=this.getCellStyle(F),L=parseInt(mxUtils.getValue(L,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(F)&&(!this.isSwimlane(F)||0==L)&&""==this.getLabel(F)&&0<this.model.getChildCount(F))for(L=0;L<this.model.getChildCount(F);L++){var P=this.model.getChildAt(F,L);if(this.isCellEditable(P)){F=P;break}}return F};Graph.prototype.copyStyle=function(F){return this.getCellStyle(F,!1)};Graph.prototype.pasteStyle=function(F,L,P){P=null!=P?P:Graph.pasteStyles;
+Graph.removeKeys(F,function(d){return 0>mxUtils.indexOf(P,d)});this.updateCellStyles(F,L)};Graph.prototype.updateCellStyles=function(F,L){this.model.beginUpdate();try{for(var P=0;P<L.length;P++)if(this.model.isVertex(L[P])||this.model.isEdge(L[P])){var d=this.getCellStyle(L[P],!1),f;for(f in F){var g=F[f];d[f]!=g&&this.setCellStyles(f,g,[L[P]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
+(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(F,L,P,d,f,g){this.useCssTransforms&&(F=F/this.currentScale-this.currentTranslate.x,L=L/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(F,L,P,d,f,g){d=null!=d?d:!0;f=null!=f?f:!0;
+null==P&&(P=this.getCurrentRoot(),null==P&&(P=this.getModel().getRoot()));if(null!=P)for(var x=this.model.getChildCount(P)-1;0<=x;x--){var y=this.model.getChildAt(P,x),t=this.getScaledCellAt(F,L,y,d,f,g);if(null!=t)return t;if(this.isCellVisible(y)&&(f&&this.model.isEdge(y)||d&&this.model.isVertex(y))&&(t=this.view.getState(y),null!=t&&(null==g||!g(t,F,L))&&this.intersects(t,F,L)))return y}return null};Graph.prototype.isRecursiveVertexResize=function(F){return!this.isSwimlane(F.cell)&&0<this.model.getChildCount(F.cell)&&
+!this.isCellCollapsed(F.cell)&&"1"==mxUtils.getValue(F.style,"recursiveResize","1")&&null==mxUtils.getValue(F.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(F){for(var L=this.getCellGeometry(F);null!=L&&L.relative;)F=this.getModel().getParent(F),L=this.getCellGeometry(F);return F};Graph.prototype.isPart=function(F){return"1"==mxUtils.getValue(this.getCurrentCellStyle(F),"part","0")||this.isTableCell(F)||this.isTableRow(F)};Graph.prototype.getCompositeParents=function(F){for(var L=
+new mxDictionary,P=[],d=0;d<F.length;d++){var f=this.getCompositeParent(F[d]);this.isTableCell(f)&&(f=this.graph.model.getParent(f));this.isTableRow(f)&&(f=this.graph.model.getParent(f));null==f||L.get(f)||(L.put(f,!0),P.push(f))}return P};Graph.prototype.getCompositeParent=function(F){for(;this.isPart(F);){var L=this.model.getParent(F);if(!this.model.isVertex(L))break;F=L}return F};Graph.prototype.filterSelectionCells=function(F){var L=this.getSelectionCells();if(null!=F){for(var P=[],d=0;d<L.length;d++)F(L[d])||
+P.push(L[d]);L=P}return L};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(F){if(this.useCssTransforms){var L=this.currentScale,P=this.currentTranslate;F=new mxRectangle((F.x+2*P.x)*L-P.x,(F.y+2*P.y)*L-P.y,F.width*L,F.height*L)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(F){F=this.strokeWidth;this.graph.useCssTransforms&&(F/=this.graph.currentScale);return F};mxGraphView.prototype.getGraphBounds=function(){var F=this.graphBounds;
+if(this.graph.useCssTransforms){var L=this.graph.currentTranslate,P=this.graph.currentScale;F=new mxRectangle((F.x+L.x)*P,(F.y+L.y)*P,F.width*P,F.height*P)}return F};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(F){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(F){F=k.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};var m=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(F){F=m.apply(this,arguments);for(var L=[],P=0;P<F.length;P++)this.isTable(F[P])||this.isTableRow(F[P])||this.isTableCell(F[P])||L.push(F[P]);return L};Graph.prototype.updateCssTransform=function(){var F=this.view.getDrawPane();if(null!=F)if(F=F.parentNode,this.useCssTransforms){var L=F.getAttribute("transform");F.setAttribute("transformOrigin","0 0");var P=Math.round(100*this.currentScale)/100;F.setAttribute("transform",
+"scale("+P+","+P+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");L!=F.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",F.getAttribute("transform"))}else F.removeAttribute("transformOrigin"),F.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var F=this.graph.useCssTransforms,L=this.scale,P=this.translate;
+F&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);F&&(this.scale=L,this.translate=P)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(F,L,P){var d=this.useCssTransforms,f=this.view.scale,g=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);d&&(this.view.scale=f,this.view.translate=g,this.useCssTransforms=!0)}})();
Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else m=window.open(b,null!=e?e:"_blank"),null==m||k||(m.opener=null)}catch(p){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2367,10 +2368,10 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=m)for(var p=0;p<m.length;p++)C[m[p].nodeName]=m[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var m=this.view.getState(b[k]);if(null!=m){for(var C=this.cellRenderer.getShapesForState(m),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],m=0;m<b.length;m++){var C=this.view.getState(b[m]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,K){if(null!=b.shape){var P=[k[0]];K=F/K;e||(K=1-K);for(var d=C*K,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=K)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),m=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(F,L){if(null!=b.shape){var P=[k[0]];L=F/L;e||(L=1-L);for(var d=C*L,f=1;f<p;f++)if(d<=m[f-1]){P.push(new mxPoint(k[f-1].x+(k[f].x-k[f-1].x)*d/m[f-1],k[f-1].y+(k[f].y-k[f-1].y)*d/m[f-1]));break}else d-=m[f-1],P.push(k[f]);b.shape.points=P;b.shape.redraw();0==F&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=L)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,C){null!=b.shape&&(C=m/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var K=0;K<b.length;K++)b[K].stop();null!=e&&e()}else for(K=0;K<b.length;K++)b[K].execute(p,k);p++});C=window.setInterval(F,m);F()};
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,m){k=null!=k?k:30;m=null!=m?m:30;var C=null,p=0,F=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var L=0;L<b.length;L++)b[L].stop();null!=e&&e()}else for(L=0;L<b.length;L++)b[L].execute(p,k);p++});C=window.setInterval(F,m);F()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),m=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,m,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
m)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2380,28 +2381,28 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(D,G){D=String(D);for(G=G||2;D.length<G;)D="0"+D;return D};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var K=k?"getUTC":"get",P=b[K+"Date"](),d=b[K+"Day"](),f=b[K+"Month"](),g=b[K+"FullYear"](),x=b[K+"Hours"](),y=b[K+"Minutes"](),u=b[K+"Seconds"]();K=b[K+"Milliseconds"]();var H=k?0:b.getTimezoneOffset(),J={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
-12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:u,ss:F(u),l:F(K,3),L:F(99<K?Math.round(K/10):K),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<H?"-":"+")+F(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(D){return D in J?J[D]:D.slice(1,
-D.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function K(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,F=function(I,H){I=String(I);for(H=H||2;I.length<H;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var L=k?"getUTC":"get",P=b[L+"Date"](),d=b[L+"Day"](),f=b[L+"Month"](),g=b[L+"FullYear"](),x=b[L+"Hours"](),y=b[L+"Minutes"](),t=b[L+"Seconds"]();L=b[L+"Milliseconds"]();var G=k?0:b.getTimezoneOffset(),D={d:P,dd:F(P),ddd:m.i18n.dayNames[d],dddd:m.i18n.dayNames[d+7],m:f+1,mm:F(f+1),mmm:m.i18n.monthNames[f],mmmm:m.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:x%12||12,hh:F(x%12||12),H:x,HH:F(x),M:y,MM:F(y),s:t,ss:F(t),l:F(L,3),L:F(99<L?Math.round(L/10):L),t:12>x?"a":"p",tt:12>x?"am":"pm",T:12>x?"A":"P",TT:12>x?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<G?"-":"+")+F(100*Math.floor(Math.abs(G)/60)+Math.abs(G)%60,4),S:["th","st","nd","rd"][3<P%10?0:(10!=P%100-P%10)*P%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in D?D[I]:I.slice(1,
+I.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var m=this.getModel(),C=m.getChildCount(m.root),p=0;p<C;p++)mxUtils.bind(this,function(F){function L(){m.isVisible(F)?(f.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(d,75)):(f.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(d,25))}var P=this.convertValueToString(F)||mxResources.get("background")||"Background",d=document.createElement("div");d.style.overflow=
"hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(m.isVisible(F)?"hideIt":"show",[P]));var f=document.createElement("img");f.setAttribute("draggable","false");f.setAttribute("align","absmiddle");f.setAttribute("border","0");f.style.position="relative";f.style.width="16px";f.style.padding="0px 6px 0 4px";e&&(f.style.filter="invert(100%)",f.style.top="-2px");d.appendChild(f);mxUtils.write(d,P);k.appendChild(d);
-mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));K();null!=b&&b(F)});K()})(m.getChildAt(m.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var K=p.substring(1,p.length-1);if("id"==K)F=b.id;else if(0>K.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(K+"_"+Graph.diagramLanguage)),
-null==F&&(F=P.hasAttribute(K)?null!=P.getAttribute(K)?P.getAttribute(K):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(K));null==F&&null!=k&&(F=k[K])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
+mxEvent.addListener(d,"click",function(){m.setVisible(F,!m.isVisible(F));L();null!=b&&b(F)});L()})(m.getChildAt(m.root,p));return k};
+Graph.prototype.replacePlaceholders=function(b,e,k,m){m=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var F=null;if(match.index>C&&"%"==e.charAt(match.index-1))F=p.substring(1);else{var L=p.substring(1,p.length-1);if("id"==L)F=b.id;else if(0>L.indexOf("{"))for(var P=b;null==F&&null!=P;)null!=P.value&&"object"==typeof P.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(F=P.getAttribute(L+"_"+Graph.diagramLanguage)),
+null==F&&(F=P.hasAttribute(L)?null!=P.getAttribute(L)?P.getAttribute(L):"":null)),P=this.model.getParent(P);null==F&&(F=this.getGlobalVariable(L));null==F&&null!=k&&(F=k[L])}m.push(e.substring(C,match.index)+(null!=F?F:p));C=match.index+p.length}}m.push(e.substring(C))}return m.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var m=this.model.getCell(b[k].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),K=C.getIndex(p);p=Math.max(m,K);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,K);m<=p;m++){K=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(K,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),C=this.model.getParent(m),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=m.getIndex(b);m=C.getIndex(m);var F=p.getIndex(e),L=C.getIndex(p);p=Math.max(m,L);e=Math.min(b,F);b=Math.max(b,F);F=[];for(m=Math.min(m,L);m<=p;m++){L=this.model.getChildAt(C,m);for(var P=e;P<=b;P++)F.push(this.model.getChildAt(L,P))}0<F.length&&(1<F.length||1<this.getSelectionCount()||
!this.isCellSelected(F[0]))&&(this.setSelectionCells(F),k=!0)}}return k};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var m=b[k],C=this.getCellGeometry(m);if(null!=C){C=C.clone();if(this.getModel().isVertex(m))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(m)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(m,
C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,K){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
+Graph.prototype.connectVertex=function(b,e,k,m,C,p,F,L){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var P=this.isCloneConnectSource(b),d=P?b:this.getCompositeParent(b),f=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(d.geometry.x,d.geometry.y);e==mxConstants.DIRECTION_NORTH?(f.x+=d.geometry.width/2,f.y-=k):e==
mxConstants.DIRECTION_SOUTH?(f.x+=d.geometry.width/2,f.y+=d.geometry.height+k):(f.x=e==mxConstants.DIRECTION_WEST?f.x-k:f.x+(d.geometry.width+k),f.y+=d.geometry.height/2);var g=this.view.getState(this.model.getParent(b));k=this.view.scale;var x=this.view.translate;d=x.x*k;x=x.y*k;null!=g&&this.model.isVertex(g.cell)&&(d=g.x,x=g.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(f.x+=b.parent.geometry.x,f.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(d+f.x*k,x+f.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,u=null;if(null!=p){p=p.reverse();for(var H=0;H<p.length;H++)if(!this.isCellLocked(p[H])&&!this.model.isEdge(p[H])&&p[H]!=b)if(!this.model.isAncestor(b,p[H])&&this.isContainer(p[H])&&(null==y||p[H]==this.model.getParent(b)))y=p[H];else if(null==u&&this.isCellConnectable(p[H])&&!this.model.isAncestor(p[H],b)&&!this.isSwimlane(p[H])){var J=this.view.getState(p[H]);null==g||null==J||mxUtils.intersects(g,J)||(u=p[H])}}var D=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;D&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var G=[],W=u;u=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==u&&P){this.model.beginUpdate();try{if(null==W&&D){var Z=this.getAbsoluteParent(null!=T?T:b);Z=P?b:this.getCompositeParent(Z);W=null!=T?T:this.duplicateCells([Z],
-!1)[0];null!=T&&this.addCells([W],this.model.getParent(b),null,null,null,!0);var N=this.getCellGeometry(W);null!=N&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=N.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=N.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-N.width/2:f.x+N.width/2),N.x=f.x-N.width/2,N.y=f.y-N.height/2);null!=y?(this.addCells([W],y,null,null,null,!0),u=null):D&&!P&&this.addCells([W],this.getDefaultParent(),null,null,null,!0)}var qa=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&D||null==u&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,W,this.createCurrentEdgeStyle());if(null!=qa&&this.connectionHandler.insertBeforeSource){var oa=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=qa.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==qa.parent&&(oa=T.parent.getIndex(T),this.model.add(T.parent,qa,oa))}null==u&&null!=W&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(oa=b.parent.getIndex(b),this.model.add(b.parent,
-W,oa));null!=qa&&G.push(qa);null==u&&null!=W&&G.push(W);null==W&&null!=qa&&qa.geometry.setTerminalPoint(f,!1);null!=qa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[qa]))}finally{this.model.endUpdate()}}if(null!=K)K(G);else return G});if(null==F||null!=W||!D||null==u&&P)return C(W);F(d+f.x*k,x+f.y*k,C)};
+this.getCells(0,0,0,0,null,null,p,null,!0):null;g=this.view.getState(b);var y=null,t=null;if(null!=p){p=p.reverse();for(var G=0;G<p.length;G++)if(!this.isCellLocked(p[G])&&!this.model.isEdge(p[G])&&p[G]!=b)if(!this.model.isAncestor(b,p[G])&&this.isContainer(p[G])&&(null==y||p[G]==this.model.getParent(b)))y=p[G];else if(null==t&&this.isCellConnectable(p[G])&&!this.model.isAncestor(p[G],b)&&!this.isSwimlane(p[G])){var D=this.view.getState(p[G]);null==g||null==D||mxUtils.intersects(g,D)||(t=p[G])}}var I=
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||C;I&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?f.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=b.geometry.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-b.geometry.width/2:f.x+b.geometry.width/2);var H=[],S=t;t=y;C=mxUtils.bind(this,function(T){if(null==F||null!=T||null==t&&P){this.model.beginUpdate();try{if(null==S&&I){var M=this.getAbsoluteParent(null!=T?T:b);M=P?b:this.getCompositeParent(M);S=null!=T?T:this.duplicateCells([M],
+!1)[0];null!=T&&this.addCells([S],this.model.getParent(b),null,null,null,!0);var fa=this.getCellGeometry(S);null!=fa&&(null!=T&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?f.y-=fa.height/2:e==mxConstants.DIRECTION_SOUTH?f.y+=fa.height/2:f.x=e==mxConstants.DIRECTION_WEST?f.x-fa.width/2:f.x+fa.width/2),fa.x=f.x-fa.width/2,fa.y=f.y-fa.height/2);null!=y?(this.addCells([S],y,null,null,null,!0),t=null):I&&!P&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var la=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&I||null==t&&P?null:this.insertEdge(this.model.getParent(b),null,"",b,S,this.createCurrentEdgeStyle());if(null!=la&&this.connectionHandler.insertBeforeSource){var ra=null;for(T=b;null!=T.parent&&null!=T.geometry&&T.geometry.relative&&T.parent!=la.parent;)T=this.model.getParent(T);null!=T&&null!=T.parent&&T.parent==la.parent&&(ra=T.parent.getIndex(T),this.model.add(T.parent,la,ra))}null==t&&null!=S&&null!=b.parent&&P&&e==mxConstants.DIRECTION_WEST&&(ra=b.parent.getIndex(b),this.model.add(b.parent,
+S,ra));null!=la&&H.push(la);null==t&&null!=S&&H.push(S);null==S&&null!=la&&la.geometry.setTerminalPoint(f,!1);null!=la&&this.fireEvent(new mxEventObject("cellsInserted","cells",[la]))}finally{this.model.endUpdate()}}if(null!=L)L(H);else return H});if(null==F||null!=S||!I||null==t&&P)return C(S);F(d+f.x*k,x+f.y*k,C)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],m,C=0;C<b.length;C++)if(m=b[C],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=this.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&k.push(m);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==k&&null!=m;)null!=m.value&&"object"==typeof m.value&&(k=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2410,7 +2411,7 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,m){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,m))};Graph.prototype.getDefaultColor=function(b,e,k,m){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=m);return k};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),K=this.getCellGeometry(k[p]);if(null!=F&&null!=K){var P=Math.round(K.width-F.width/this.view.scale),d=Math.round(K.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
+Graph.prototype.foldCells=function(b,e,k,m,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var F=this.view.getState(k[p]),L=this.getCellGeometry(k[p]);if(null!=F&&null!=L){var P=Math.round(L.width-F.width/this.view.scale),d=Math.round(L.height-F.height/this.view.scale);if(0!=d||0!=P){var f=this.model.getParent(k[p]),g=this.layoutManager.getLayout(f);
null==g?null!=C&&this.isMoveCellsEvent(C,F)&&this.moveSiblings(F,f,P,d):null!=C&&mxEvent.isAltDown(C)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,P,d)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,m){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),F=this.getCellGeometry(C[e]);null!=p&&null!=F&&(F=F.clone(),F.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],F))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),F=this.view.getState(b);null!=F&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,F.width/this.view.scale-p.width):p.height+=m+Math.min(0,F.height/this.view.scale-p.height),this.model.setGeometry(b,
@@ -2448,201 +2449,201 @@ HoverIcons.prototype.click=function(b,e,k){var m=k.getEvent(),C=k.getGraphX(),p=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(K,P,d){if(null!=k){var f=new mxRectangle(P,d,K.clientWidth,K.clientHeight);mxUtils.intersects(f,k)&&(K==this.arrowUp?d-=f.y+f.height-k.y:K==this.arrowRight?P+=k.x+k.width-f.x:K==this.arrowDown?d+=k.y+k.height-f.y:K==this.arrowLeft&&(P-=f.x+f.width-k.x))}K.style.left=P+"px";K.style.top=d+"px";mxUtils.setOpacity(K,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(L,P,d){if(null!=k){var f=new mxRectangle(P,d,L.clientWidth,L.clientHeight);mxUtils.intersects(f,k)&&(L==this.arrowUp?d-=f.y+f.height-k.y:L==this.arrowRight?P+=k.x+k.width-f.x:L==this.arrowDown?d+=k.y+k.height-f.y:L==this.arrowLeft&&(P-=f.x+f.width-k.x))}L.style.left=P+"px";L.style.top=d+"px";mxUtils.setOpacity(L,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(K,P){var d=this.graph.model.isVertex(K)&&this.graph.getCellGeometry(K);null==K||this.graph.model.isAncestor(K,
-this.currentState.cell)||this.graph.isSwimlane(K)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==C&&C==b&&(b=C=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),F=mxUtils.bind(this,function(L,P){var d=this.graph.model.isVertex(L)&&this.graph.getCellGeometry(L);null==L||this.graph.model.isAncestor(L,
+this.currentState.cell)||this.graph.isSwimlane(L)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?P.style.visibility="visible":P.style.visibility="hidden"});F(e,this.arrowRight);F(m,this.arrowLeft);F(C,this.arrowUp);F(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),K=this.getCellGeometry(F);null!=K&&(K.x+=p*m,K.y+=p*C);b.insert(F)}return b};
-Graph.prototype.createTable=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;K=null!=K?K:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,K),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,m,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var F=this.cloneCell(e),L=this.getCellGeometry(F);null!=L&&(L.x+=p*m,L.y+=p*C);b.insert(F)}return b};
+Graph.prototype.createTable=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:60;m=null!=m?m:40;p=null!=p?p:30;L=null!=L?L:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";P=null!=P?P:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*m+(null!=C?p:0),null!=F?F:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,m,L),this.createVertex(null,null,"",0,0,k,m,P),e,k,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,k){for(var m=this.model.getChildCells(b,!0),C=0;C<m.length;C++)if(null!=k&&(m[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(m[C],!0),F=0;F<p.length;F++)null!=e[C][F]&&(p[F].value=e[C][F]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,K,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";K=null!=K?K:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,m,C,p,F,L,P){k=null!=k?k:120;m=null!=m?m:120;F=null!=F?F:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";L=null!=L?L:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
P=null!=P?P:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;F=this.createVertex(null,
-null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,K),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
-Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),K=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
-m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,K,P,d){e&&p.row<K-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
+null,"",0,p,e*k+p,m,F);C.insert(this.createParent(F,this.createVertex(null,null,"",p,0,k,m,L),e,k,0));return 1<b?(F.geometry.y=m+p,this.createParent(C,this.createParent(F,this.createVertex(null,null,"",p,0,k,m,P),e,k,0),b-1,0,m)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<m.length;C++){for(var p=this.getActualStartSize(m[C],!0),F=this.model.getChildCells(m[C],!0),L=this.getCellStyle(m[C],!0),P=null,d=[],f=0;f<F.length;f++){var g=this.getCellGeometry(F[f]),x={cell:F[f],rospan:1,colspan:1,row:C,col:f,geo:g};g=null!=g.alternateBounds?g.alternateBounds:g;x.point=new mxPoint(g.width+(null!=P?P.point.x:b.x+p.x),g.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));x.actual=x;null!=k&&null!=k[f]&&1<k[f].rowspan?(x.rowspan=k[f].rowspan-1,x.colspan=k[f].colspan,x.actual=k[f].actual):null!=P&&1<P.colspan?(x.rowspan=P.rowspan,x.colspan=P.colspan-1,x.actual=P.actual):(P=this.getCurrentCellStyle(F[f],!0),null!=P&&(x.rowspan=parseInt(P.rowspan||1),x.colspan=parseInt(P.colspan||1)));P=1==mxUtils.getValue(L,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(L,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(x,F.length,
+m.length,b.x+(P?p.x:0),b.y+(P?p.y:0));d.push(x);P=x}k=d}};Graph.prototype.getTableLines=function(b,e,k){var m=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,F,L,P,d){e&&p.row<L-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(P,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));k&&p.col<F-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,d)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return m.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var K=mxUtils.indexOf(F,b);if(K<F.length-1){var P=F[K+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var K=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
-g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(K||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var m=this.getModel();m.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;m.setGeometry(b,C);var p=m.getParent(b),F=m.getChildCells(p,!0);if(!k){var L=mxUtils.indexOf(F,b);if(L<F.length-1){var P=F[L+1],d=this.getCellGeometry(P);null!=d&&(d=d.clone(),d.y+=e,d.height-=e,m.setGeometry(P,d))}}var f=this.getCellGeometry(p);null!=f&&(k||(k=b==F[F.length-1]),k&&(f=f.clone(),f.height+=e,m.setGeometry(p,f)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var m=this.getModel(),C=m.getParent(b),p=m.getParent(C),F=m.getChildCells(C,!0);b=mxUtils.indexOf(F,b);var L=b==F.length-1;m.beginUpdate();try{for(var P=m.getChildCells(p,!0),d=0;d<P.length;d++){C=P[d];F=m.getChildCells(C,!0);var f=F[b],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width+=e,null!=g.alternateBounds&&(g.alternateBounds.width+=e),m.setGeometry(f,g));b<F.length-1&&(f=F[b+1],g=this.getCellGeometry(f),null!=g&&(g=g.clone(),
+g.x+=e,k||(g.width-=e,null!=g.alternateBounds&&(g.alternateBounds.width-=e)),m.setGeometry(f,g)))}if(L||k){var x=this.getCellGeometry(p);null!=x&&(x=x.clone(),x.width+=e,m.setGeometry(p,x))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var C=this.graph.getCellGeometry(b[m]);null!=C&&(k+=e?C.width:C.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-m.x-m.width;var C=[];m=m.x;for(var p=0;p<k.length;p++){var F=this.graph.getCellGeometry(k[p]);null!=F&&(m+=(null!=F.alternateBounds?F.alternateBounds.width:F.width)*e/b,C.push(Math.round(m)))}return C};
-TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,K=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-K:K+=d.width),d.alternateBounds=new mxRectangle(0,
-0,d.width,d.height),C.setGeometry(p[P],d))}return K};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),K=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
-f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var u=p?null:this.getRowLayout(f[0],d),H=[],J=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(J),J=C||m?J+y.height:J+y.height/x*P,y.height=Math.round(J)-y.y,F.setGeometry(f[g],y)),K=Math.max(K,this.layoutRow(f[g],u,y.height,d,H));m&&P<x&&(k=k.clone(),k.height=J+e.height,F.setGeometry(b,
-k));p&&d<K+Graph.minTableColumnWidth&&(k=k.clone(),k.width=K+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(D){F.setVisible(D.cell,D.actual.cell==D.cell);if(D.actual.cell!=D.cell){if(D.actual.row==D.row){var G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo;D.actual.geo.width+=G.width}D.actual.col==D.col&&(G=null!=D.geo.alternateBounds?D.geo.alternateBounds:D.geo,D.actual.geo.height+=G.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
+TableLayout.prototype.layoutRow=function(b,e,k,m){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var F=b.x,L=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var P=0;P<p.length;P++){var d=this.graph.getCellGeometry(p[P]);null!=d&&(d=d.clone(),d.y=b.y,d.height=k-b.y-b.height,null!=e?(d.x=e[P],d.width=e[P+1]-d.x,P==p.length-1&&P<e.length-2&&(d.width=m-d.x-b.x-b.width)):(d.x=F,F+=d.width,P==p.length-1?d.width=m-b.x-b.width-L:L+=d.width),d.alternateBounds=new mxRectangle(0,
+0,d.width,d.height),C.setGeometry(p[P],d))}return L};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var F=this.graph.getModel(),L=0;F.beginUpdate();try{for(var P=k.height-e.y-e.height,d=k.width-e.x-e.width,f=F.getChildCells(b,!0),g=0;g<f.length;g++)F.setVisible(f[g],!0);var x=this.getSize(f,!1);if(0<P&&0<d&&0<
+f.length&&0<x){if(C){var y=this.graph.getCellGeometry(f[f.length-1]);null!=y&&(y=y.clone(),y.height=P-x+y.height,F.setGeometry(f[f.length-1],y))}var t=p?null:this.getRowLayout(f[0],d),G=[],D=e.y;for(g=0;g<f.length;g++)y=this.graph.getCellGeometry(f[g]),null!=y&&(y=y.clone(),y.x=e.x,y.width=d,y.y=Math.round(D),D=C||m?D+y.height:D+y.height/x*P,y.height=Math.round(D)-y.y,F.setGeometry(f[g],y)),L=Math.max(L,this.layoutRow(f[g],t,y.height,d,G));m&&P<x&&(k=k.clone(),k.height=D+e.height,F.setGeometry(b,
+k));p&&d<L+Graph.minTableColumnWidth&&(k=k.clone(),k.width=L+e.width+e.x+Graph.minTableColumnWidth,F.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(I){F.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=H.width}I.actual.col==I.col&&(H=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=H.height)}}))}else for(g=0;g<f.length;g++)F.setVisible(f[g],
!1)}finally{F.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(f,g){g=null!=g?g:!0;var x=this.getState(f);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&!x.invalid&&this.updateLineJumps(x)&&this.graph.cellRenderer.redraw(x,!1,this.isRendering());x=e.apply(this,
arguments);null!=x&&g&&this.graph.model.isEdge(x.cell)&&null!=x.style&&1!=x.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(x);return x};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var f=this.node.getElementsByTagName("path");if(1<f.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&f[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var g=this.state.view.graph.getFlowAnimationStyle();null!=g&&f[1].setAttribute("class",g.getAttribute("id"))}}};var m=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(f,g){return m.apply(this,arguments)||null!=f.routedPoints&&null!=g.routedPoints&&!mxUtils.equalPoints(g.routedPoints,f.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var u=function(fa,ia,M){var aa=new mxPoint(ia,M);aa.type=fa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
-fa||aa.x!=ia||aa.y!=M},H=.5*this.scale;x=!1;y=[];for(var J=0;J<g.length-1;J++){for(var D=g[J+1],G=g[J],W=[],T=g[J+2];J<g.length-2&&mxUtils.ptSegDistSq(G.x,G.y,T.x,T.y,D.x,D.y)<1*this.scale*this.scale;)D=T,J++,T=g[J+2];x=u(0,G.x,G.y)||x;for(var Z=0;Z<this.validEdges.length;Z++){var N=this.validEdges[Z],qa=N.absolutePoints;if(null!=qa&&mxUtils.intersects(f,N)&&"1"!=N.style.noJump)for(N=0;N<qa.length-1;N++){var oa=qa[N+1],S=qa[N];for(T=qa[N+2];N<qa.length-2&&mxUtils.ptSegDistSq(S.x,S.y,T.x,T.y,oa.x,
-oa.y)<1*this.scale*this.scale;)oa=T,N++,T=qa[N+2];T=mxUtils.intersection(G.x,G.y,D.x,D.y,S.x,S.y,oa.x,oa.y);if(null!=T&&(Math.abs(T.x-G.x)>H||Math.abs(T.y-G.y)>H)&&(Math.abs(T.x-D.x)>H||Math.abs(T.y-D.y)>H)&&(Math.abs(T.x-S.x)>H||Math.abs(T.y-S.y)>H)&&(Math.abs(T.x-oa.x)>H||Math.abs(T.y-oa.y)>H)){oa=T.x-G.x;S=T.y-G.y;T={distSq:oa*oa+S*S,x:T.x,y:T.y};for(oa=0;oa<W.length;oa++)if(W[oa].distSq>T.distSq){W.splice(oa,0,T);T=null;break}null==T||0!=W.length&&W[W.length-1].x===T.x&&W[W.length-1].y===T.y||
-W.push(T)}}}for(N=0;N<W.length;N++)x=u(1,W[N].x,W[N].y)||x}T=g[g.length-1];x=u(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,u=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,D=null,G=null,W=[],T=null;f.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var N=this.state.routedPoints[Z],qa=new mxPoint(N.x/this.scale,N.y/this.scale);0==Z?qa=g[0]:Z==this.state.routedPoints.length-1&&(qa=g[g.length-1]);var oa=!1;if(null!=D&&1==N.type){var S=this.state.routedPoints[Z+1];N=S.x/this.scale-qa.x;S=S.y/this.scale-qa.y;N=
-N*N+S*S;null==T&&(T=new mxPoint(qa.x-D.x,qa.y-D.y),G=Math.sqrt(T.x*T.x+T.y*T.y),0<G?(T.x=T.x*u/G,T.y=T.y*u/G):T=null);N>u*u&&0<G&&(N=D.x-qa.x,S=D.y-qa.y,N=N*N+S*S,N>u*u&&(oa=new mxPoint(qa.x-T.x,qa.y-T.y),N=new mxPoint(qa.x+T.x,qa.y+T.y),W.push(oa),this.addPoints(f,W,x,y,!1,null,J),W=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,J=!1,"sharp"==H?(f.lineTo(oa.x-T.y*W,oa.y+T.x*W),f.lineTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x,N.y)):"line"==H?(f.moveTo(oa.x+T.y*W,oa.y-T.x*W),f.lineTo(oa.x-
-T.y*W,oa.y+T.x*W),f.moveTo(N.x-T.y*W,N.y+T.x*W),f.lineTo(N.x+T.y*W,N.y-T.x*W),f.moveTo(N.x,N.y)):"arc"==H?(W*=1.3,f.curveTo(oa.x-T.y*W,oa.y+T.x*W,N.x-T.y*W,N.y+T.x*W,N.x,N.y)):(f.moveTo(N.x,N.y),J=!0),W=[N],oa=!0))}else T=null;oa||(W.push(qa),D=qa)}this.addPoints(f,W,x,y,!1,null,J);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),
-g.getCenterY()):F.apply(this,arguments)};var K=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)K.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var u=this.getNextPoint(f,x,y),H=this.graph.isOrthogonal(f),J=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),D=new mxPoint(g.getCenterX(),g.getCenterY());if(0!=J){var G=Math.cos(-J),W=
-Math.sin(-J);u=mxUtils.getRotatedPoint(u,G,W,D)}G=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);G+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);u=this.getPerimeterPoint(g,u,0==J&&H,G);0!=J&&(G=Math.cos(J),W=Math.sin(J),u=mxUtils.getRotatedPoint(u,G,W,D));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,u),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,x,y,u){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);
-y=x=null;if(null!=f)for(var H=0;H<f.length;H++){var J=this.graph.getConnectionPoint(g,f[H]);if(null!=J){var D=(J.x-u.x)*(J.x-u.x)+(J.y-u.y)*(J.y-u.y);if(null==y||D<y)x=J,y=D}}null!=x&&(u=x)}return u};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return d.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
-mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
+function(f){C.apply(this,arguments);this.graph.model.isEdge(f.cell)&&1!=f.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(f)};mxGraphView.prototype.updateLineJumps=function(f){var g=f.absolutePoints;if(Graph.lineJumpsEnabled){var x=null!=f.routedPoints,y=null;if(null!=g&&null!=this.validEdges&&"none"!==mxUtils.getValue(f.style,"jumpStyle","none")){var t=function(oa,na,N){var aa=new mxPoint(na,N);aa.type=oa;y.push(aa);aa=null!=f.routedPoints?f.routedPoints[y.length-1]:null;return null==aa||aa.type!=
+oa||aa.x!=na||aa.y!=N},G=.5*this.scale;x=!1;y=[];for(var D=0;D<g.length-1;D++){for(var I=g[D+1],H=g[D],S=[],T=g[D+2];D<g.length-2&&mxUtils.ptSegDistSq(H.x,H.y,T.x,T.y,I.x,I.y)<1*this.scale*this.scale;)I=T,D++,T=g[D+2];x=t(0,H.x,H.y)||x;for(var M=0;M<this.validEdges.length;M++){var fa=this.validEdges[M],la=fa.absolutePoints;if(null!=la&&mxUtils.intersects(f,fa)&&"1"!=fa.style.noJump)for(fa=0;fa<la.length-1;fa++){var ra=la[fa+1],ba=la[fa];for(T=la[fa+2];fa<la.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,
+T.x,T.y,ra.x,ra.y)<1*this.scale*this.scale;)ra=T,fa++,T=la[fa+2];T=mxUtils.intersection(H.x,H.y,I.x,I.y,ba.x,ba.y,ra.x,ra.y);if(null!=T&&(Math.abs(T.x-H.x)>G||Math.abs(T.y-H.y)>G)&&(Math.abs(T.x-I.x)>G||Math.abs(T.y-I.y)>G)&&(Math.abs(T.x-ba.x)>G||Math.abs(T.y-ba.y)>G)&&(Math.abs(T.x-ra.x)>G||Math.abs(T.y-ra.y)>G)){ra=T.x-H.x;ba=T.y-H.y;T={distSq:ra*ra+ba*ba,x:T.x,y:T.y};for(ra=0;ra<S.length;ra++)if(S[ra].distSq>T.distSq){S.splice(ra,0,T);T=null;break}null==T||0!=S.length&&S[S.length-1].x===T.x&&
+S[S.length-1].y===T.y||S.push(T)}}}for(fa=0;fa<S.length;fa++)x=t(1,S[fa].x,S[fa].y)||x}T=g[g.length-1];x=t(0,T.x,T.y)||x}f.routedPoints=y;return x}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(f,g,x){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,I=null,H=null,S=[],T=null;f.begin();for(var M=0;M<this.state.routedPoints.length;M++){var fa=this.state.routedPoints[M],la=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==M?la=g[0]:M==this.state.routedPoints.length-1&&(la=g[g.length-1]);var ra=!1;if(null!=I&&1==fa.type){var ba=this.state.routedPoints[M+1];fa=ba.x/this.scale-
+la.x;ba=ba.y/this.scale-la.y;fa=fa*fa+ba*ba;null==T&&(T=new mxPoint(la.x-I.x,la.y-I.y),H=Math.sqrt(T.x*T.x+T.y*T.y),0<H?(T.x=T.x*t/H,T.y=T.y*t/H):T=null);fa>t*t&&0<H&&(fa=I.x-la.x,ba=I.y-la.y,fa=fa*fa+ba*ba,fa>t*t&&(ra=new mxPoint(la.x-T.x,la.y-T.y),fa=new mxPoint(la.x+T.x,la.y+T.y),S.push(ra),this.addPoints(f,S,x,y,!1,null,D),S=0>Math.round(T.x)||0==Math.round(T.x)&&0>=Math.round(T.y)?1:-1,D=!1,"sharp"==G?(f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.lineTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x,fa.y)):"line"==
+G?(f.moveTo(ra.x+T.y*S,ra.y-T.x*S),f.lineTo(ra.x-T.y*S,ra.y+T.x*S),f.moveTo(fa.x-T.y*S,fa.y+T.x*S),f.lineTo(fa.x+T.y*S,fa.y-T.x*S),f.moveTo(fa.x,fa.y)):"arc"==G?(S*=1.3,f.curveTo(ra.x-T.y*S,ra.y+T.x*S,fa.x-T.y*S,fa.y+T.x*S,fa.x,fa.y)):(f.moveTo(fa.x,fa.y),D=!0),S=[fa],ra=!0))}else T=null;ra||(S.push(la),I=la)}this.addPoints(f,S,x,y,!1,null,D);f.stroke()}};var F=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(f,g,x,y){return null!=g&&"centerPerimeter"==
+g.style[mxConstants.STYLE_PERIMETER]?new mxPoint(g.getCenterX(),g.getCenterY()):F.apply(this,arguments)};var L=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(f,g,x,y){if(null==g||null==f||"1"!=g.style.snapToPoint&&"1"!=f.style.snapToPoint)L.apply(this,arguments);else{g=this.getTerminalPort(f,g,y);var t=this.getNextPoint(f,x,y),G=this.graph.isOrthogonal(f),D=mxUtils.toRadians(Number(g.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(g.getCenterX(),
+g.getCenterY());if(0!=D){var H=Math.cos(-D),S=Math.sin(-D);t=mxUtils.getRotatedPoint(t,H,S,I)}H=parseFloat(f.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(f.style[y?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(g,t,0==D&&G,H);0!=D&&(H=Math.cos(D),S=Math.sin(D),t=mxUtils.getRotatedPoint(t,H,S,I));f.setAbsoluteTerminalPoint(this.snapToAnchorPoint(f,g,x,y,t),y)}};mxGraphView.prototype.snapToAnchorPoint=function(f,g,
+x,y,t){if(null!=g&&null!=f){f=this.graph.getAllConnectionConstraints(g);y=x=null;if(null!=f)for(var G=0;G<f.length;G++){var D=this.graph.getConnectionPoint(g,f[G]);if(null!=D){var I=(D.x-t.x)*(D.x-t.x)+(D.y-t.y)*(D.y-t.y);if(null==y||I<y)x=D,y=I}}null!=x&&(t=x)}return t};var P=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(f,g,x){var y=P.apply(this,arguments);"1"==f.getAttribute("placeholders")&&null!=x.state&&(y=x.state.view.graph.replacePlaceholders(x.state.cell,
+y));return y};var d=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(f){if(null!=f.style&&"undefined"!==typeof pako){var g=mxUtils.getValue(f.style,mxConstants.STYLE_SHAPE,null);if(null!=g&&"string"===typeof g&&"stencil("==g.substring(0,8))try{var x=g.substring(8,g.length-1),y=mxUtils.parseXml(Graph.decompress(x));return new mxShape(new mxStencil(y.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return d.apply(this,arguments)}})();
+mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var m=0;m<e.length;m++){var C=e[m];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(F){null!=window.console&&console.log("error in getStencil:",b,k,e,C,F)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
mxStencilRegistry.loadStencilSet=function(b,e,k,m){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(F){null!=F&&null!=F.documentElement&&(mxStencilRegistry.packages[b]=F,p=!0,mxStencilRegistry.parseStencilSet(F.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(F){null!=window.console&&console.log("error in loadStencilSet:",b,F)}null!=C&&null!=
C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,k),m=m.nextSibling;else{k=null!=k?k:!0;m=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(m));if(null!=e){var F=m.getAttribute("w"),
-K=m.getAttribute("h");F=null==F?80:parseInt(F,10);K=null==K?80:parseInt(K,10);e(C,p,b,F,K)}}m=m.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,L){switch(L){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+L=m.getAttribute("h");F=null==F?80:parseInt(F,10);L=null==L?80:parseInt(L,10);e(C,p,b,F,L)}}m=m.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var z=document.createElement("div");z.className="geHint";z.style.whiteSpace="nowrap";z.style.position="absolute";return z}function e(z,J){switch(J){case mxConstants.POINTS:return z;case mxConstants.MILLIMETERS:return(z/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(z/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(z/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return m.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var L in this.graph.currentEdgeStyle)z.style[L]=this.graph.currentEdgeStyle[L];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),L=z.getCell;z.getCell=mxUtils.bind(this,function(O){var V=L.apply(this,arguments);this.error=null;return V});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<L.length;O++)null!=this.currentEdgeStyle[L[O]]&&(z+=L[O]+"="+this.currentEdgeStyle[L[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var J in this.graph.currentEdgeStyle)z.style[J]=this.graph.currentEdgeStyle[J];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=p.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var F=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=F.apply(this,arguments),J=z.getCell;z.getCell=mxUtils.bind(this,function(O){var U=J.apply(this,arguments);this.error=null;return U});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",J="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),O=0;O<J.length;O++)null!=this.currentEdgeStyle[J[O]]&&(z+=J[O]+"="+this.currentEdgeStyle[J[O]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var O=0;O<z.length;O++){var V=z[O];L[mxObjectIdentity.get(V)]=V.getId();for(var U=this.model.getChildCount(V),
-ha=0;ha<U;ha++)this.createCellLookup([this.model.getChildAt(V,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,O){O=null!=O?O:{};for(var V in z){var U=L[V];null==O[U]&&(O[U]=z[V].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,L,O,V){L=null!=L?L:0;O=null!=O?O:0;var U=new mxCodec(z.ownerDocument),ha=new mxGraphModel;U.decode(z,ha);z=[];U={};var ma={},wa=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),U));if(null!=wa){var sa=this.createCellLookup([ha.root]);
-wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<wa.length;ha++)ya=this.model.getChildren(this.moveCells([wa[ha]],L,O,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ha.getChildren(wa[0]);null!=ya&&(z=this.moveCells(ya,L,O,!1,this.getDefaultParent()),ma[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(U,sa,ma),this.updateCustomLinks(ma,z),V)){this.isGridEnabled()&&
-(L=this.snap(L),O=this.snap(O));var Ha=this.getBoundingBoxFromGeometry(z,!0);null!=Ha&&this.moveCells(z,L-Ha.x,O-Ha.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},O=this.cloneCells(z,null,L),V=new mxDictionary,U=0;U<z.length;U++)V.put(z[U],!0);var ha=new mxCodec,ma=new mxGraphModel,wa=ma.getChildAt(ma.getRoot(),0);for(U=0;U<O.length;U++){ma.add(wa,O[U]);var sa=this.view.getState(z[U]);if(null!=sa){var ya=this.getCellGeometry(O[U]);null!=ya&&ya.relative&&
-!this.model.isEdge(z[U])&&null==V.get(this.model.getParent(z[U]))&&(ya.offset=null,ya.relative=!1,ya.x=sa.x/sa.view.scale-sa.view.translate.x,ya.y=sa.y/sa.view.scale-sa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),O);return ha.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
-"table"==O||"tableRow"==O};var K=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var O=this.getCurrentCellStyle(L);if(null!=O.expand)return"0"!=O.expand}return K.apply(this,arguments)&&(null==L||!this.isTable(L))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,O,V,U,ha,ma,wa){null==wa&&(wa=this.model.getParent(z),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(ha,ma,null,!0,!1));O=null;this.model.beginUpdate();
-try{O=P.apply(this,[z,L,O,V,U,ha,ma,wa]);this.model.setValue(O,"");var sa=this.getChildCells(O,!0);for(L=0;L<sa.length;L++){var ya=this.getCellGeometry(sa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(sa[L])}var Ha=this.getChildCells(z,!0);for(L=0;L<Ha.length;L++)ya=this.getCellGeometry(Ha[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ha[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Qa=this.model.getTerminal(O,!1);if(null!=Qa){var ua=this.getCurrentCellStyle(Qa);null!=ua&&"1"==ua.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,L,O){if(L||O)d.apply(this,arguments);else{var V=this.getSelectionCell(),U=null,ha=[],ma=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(ha.push(wa),wa==V)U=ha.length-1;else if(z&&null==V&&0<ha.length||null!=U&&z&&ha.length>U||!z&&0<U)return;for(var sa=0;sa<this.model.getChildCount(wa);sa++)ma(this.model.getChildAt(wa,sa))});ma(this.model.root);0<ha.length&&(U=null!=U?mxUtils.mod(U+(z?1:-1),ha.length):0,this.setSelectionCell(ha[U]))}};
-Graph.prototype.swapShapes=function(z,L,O,V,U,ha,ma){L=!1;if(!V&&null!=U&&1==z.length&&(V=this.view.getState(U),O=this.view.getState(z[0]),null!=V&&null!=O&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==V.style.shape&&"umlLifeline"==O.style.shape)&&(V=this.getCellGeometry(U),ha=this.getCellGeometry(z[0]),null!=V&&null!=ha))){L=V.clone();V=ha.clone();V.x=L.x;V.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();try{this.model.setGeometry(U,L),this.model.setGeometry(z[0],V)}finally{this.model.endUpdate()}L=
-!0}return L};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,O,V,U,ha,ma){if(this.swapShapes(z,L,O,V,U,ha,ma))return z;ma=null!=ma?ma:{};if(this.isTable(U)){for(var wa=[],sa=0;sa<z.length;sa++)this.isTable(z[sa])?wa=wa.concat(this.model.getChildCells(z[sa],!0).reverse()):wa.push(z[sa]);z=wa}this.model.beginUpdate();try{wa=[];for(sa=0;sa<z.length;sa++)if(null!=U&&this.isTableRow(z[sa])){var ya=this.model.getParent(z[sa]),Ha=this.getCellGeometry(z[sa]);this.isTable(ya)&&wa.push(ya);
-if(null!=ya&&null!=Ha&&this.isTable(ya)&&this.isTable(U)&&(V||ya!=U)){if(!V){var Qa=this.getCellGeometry(ya);null!=Qa&&(Qa=Qa.clone(),Qa.height-=Ha.height,this.model.setGeometry(ya,Qa))}Qa=this.getCellGeometry(U);null!=Qa&&(Qa=Qa.clone(),Qa.height+=Ha.height,this.model.setGeometry(U,Qa));var ua=this.model.getChildCells(U,!0);if(0<ua.length){z[sa]=V?this.cloneCell(z[sa]):z[sa];var za=this.model.getChildCells(z[sa],!0),Fa=this.model.getChildCells(ua[0],!0),Ba=Fa.length-za.length;if(0<Ba)for(var Ea=
-0;Ea<Ba;Ea++){var Oa=this.cloneCell(za[za.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[sa],Oa))}else if(0>Ba)for(Ea=0;Ea>Ba;Ea--)this.model.remove(za[za.length+Ea-1]);za=this.model.getChildCells(z[sa],!0);for(Ea=0;Ea<Fa.length;Ea++){var Pa=this.getCellGeometry(Fa[Ea]),bb=this.getCellGeometry(za[Ea]);null!=Pa&&null!=bb&&(bb=bb.clone(),bb.width=Pa.width,this.model.setGeometry(za[Ea],bb))}}}}var eb=f.apply(this,arguments);for(sa=0;sa<wa.length;sa++)!V&&this.model.contains(wa[sa])&&0==this.model.getChildCount(wa[sa])&&
-this.model.remove(wa[sa]);V&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var O=[];this.model.beginUpdate();try{for(var V=0;V<z.length;V++)if(this.isTableCell(z[V])){var U=this.model.getParent(z[V]),ha=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha)&&O.push(ha):
-this.labelChanged(z[V],"")}else{if(this.isTableRow(z[V])&&(ha=this.model.getParent(z[V]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(O,ha))){for(var ma=this.model.getChildCells(ha,!0),wa=0,sa=0;sa<ma.length;sa++)0<=mxUtils.indexOf(z,ma[sa])&&wa++;wa==ma.length&&O.push(ha)}O.push(z[V])}O=g.apply(this,[O,L])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,L,O){O=null!=O?O:new Graph;for(var V=0;V<L.length;V++)null!=L[V]&&O.updateCustomLinksForCell(z,L[V],O)};Graph.prototype.updateCustomLinksForCell=
-function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var O=this.model.getChildCount(L),V=0;V<O;V++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,V))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var O=JSON.parse(L);for(L=0;L<O.length;L++){var V=O[L];z.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?
-V[3]:0,4<V.length?V[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){V=z.shape.direction;L=z.shape.bounds;var U=z.shape.scale;O=L.width/U;L=L.height/U;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=O,O=L,L=V;L=z.shape.getConstraints(z.style,O,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),O=0,V=0;V<L;V++){var U=this.model.getChildAt(z,V);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,L,O){for(var V=this.getCurrentCellStyle(z),U=!0,ha=!0,ma=0;ma<L.length&&ha;ma++)U=U&&this.isTable(L[ma]),ha=ha&&this.isTableRow(L[ma]);return(1==L.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||U))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var O=this.getModel(),V=[];O.beginUpdate();try{for(var U=0;U<z.length;U++){var ha=z[U];if(O.isEdge(ha)){var ma=O.getTerminal(ha,!0),wa=O.getTerminal(ha,!1);O.setTerminal(ha,wa,!0);O.setTerminal(ha,ma,!1);var sa=O.getGeometry(ha);if(null!=sa){sa=sa.clone();null!=sa.points&&sa.points.reverse();var ya=sa.getTerminalPoint(!0),Ha=sa.getTerminalPoint(!1);
-sa.setTerminalPoint(ya,!1);sa.setTerminalPoint(Ha,!0);O.setGeometry(ha,sa);var Qa=this.view.getState(ha),ua=this.view.getState(ma),za=this.view.getState(wa);if(null!=Qa){var Fa=null!=ua?this.getConnectionConstraint(Qa,ua,!0):null,Ba=null!=za?this.getConnectionConstraint(Qa,za,!1):null;this.setConnectionConstraint(ha,ma,!0,Ba);this.setConnectionConstraint(ha,wa,!1,Fa);var Ea=mxUtils.getValue(Qa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Qa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ea,[ha])}V.push(ha)}}else if(O.isVertex(ha)&&(sa=this.getCellGeometry(ha),null!=sa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){sa=sa.clone();sa.x+=sa.width/2-sa.height/2;sa.y+=sa.height/2-sa.width/2;var Oa=sa.width;sa.width=sa.height;sa.height=Oa;O.setGeometry(ha,sa)}var Pa=this.view.getState(ha);if(null!=Pa){var bb=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Pa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,bb[mxUtils.mod(mxUtils.indexOf(bb,eb)+(L?-1:1),bb.length)],[ha])}V.push(ha)}}}finally{O.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));this.isTableRow(L)&&(L=this.model.getParent(L));var O=this.view.getState(L);null!=O&&null!=O.shape&&(this.view.invalidate(L),O.shape.bounds=null)}x.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var O=this.view.getState(z[L]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};
-Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)L(z[O])}};Graph.prototype.updateLabelElements=function(z,L,O){z=null!=z?z:this.getSelectionCells();for(var V=document.createElement("div"),
-U=0;U<z.length;U++)if(this.isHtmlLabel(z[U])){var ha=this.convertValueToString(z[U]);if(null!=ha&&0<ha.length){V.innerHTML=ha;for(var ma=V.getElementsByTagName(null!=O?O:"*"),wa=0;wa<ma.length;wa++)L(ma[wa]);V.innerHTML!=ha&&this.cellLabelChanged(z[U],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,O){L=Graph.zapGremlins(L);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var V=z.getAttribute("placeholder"),
-U=z;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(V)){this.setAttributeForCell(U,V,L);break}U=this.model.getParent(U)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var L=new mxDictionary,O=0;O<z.length;O++)L.put(z[O],!0);var V=[];for(O=0;O<z.length;O++){var U=this.model.getParent(z[O]);null==U||L.get(U)||(L.put(U,!0),V.push(U))}for(O=0;O<V.length;O++)if(U=this.view.getState(V[O]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var ha=!0,ma=0;ma<this.model.getChildCount(U.cell)&&ha;ma++)L.get(this.model.getChildAt(U.cell,ma))||(ha=!1);ha&&z.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&L.push(z[O]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,L)};Graph.prototype.getAttributeForCell=function(z,L,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,L,O){if(null!=z.value&&"object"==typeof z.value)var V=z.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),V.setAttribute("label",z.value||"");null!=O?V.setAttribute(L,O):V.removeAttribute(L);
-this.model.setValue(z,V)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,O,V){this.getModel();if(mxEvent.isAltDown(L))return null;for(var U=0;U<z.length;U++){var ha=this.model.getParent(z[U]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=y.apply(this,arguments);var ma=!0;for(U=0;U<z.length&&ma;U++)ma=ma&&this.isTableRow(z[U]);ma&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||
-(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,z,L))};Graph.prototype.insertTextForEvent=function(z,L){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var V=this.model.isEdge(L)?this.view.getState(L):
-null,U=mxEvent.getSource(z);this.firstClickState!=V||this.firstClickSource!=U||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&(mxUtils.contains(V.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(z)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(O.x,O.y))),L=this.addText(O.x,O.y,V))}return L};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),U=this.getPageSize();L=Math.max(L,V.x*U.width);O=Math.max(O,V.y*U.height)}return new mxPoint(this.snap(L+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),O=this.getInsertPoint(),V=this.snap(Math.round(Math.max(O.x,
-L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(V,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,L,O){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){V.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-V.geometry.relative=!0;V.connectable=!1;var U=this.view.getRelativePoint(O,z,L);V.geometry.x=Math.round(1E4*U.x)/1E4;V.geometry.y=Math.round(U.y);V.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(O,V.geometry);var ha=this.view.scale;V.geometry.offset=new mxPoint(Math.round((z-U.x)/ha),Math.round((L-U.y)/ha))}else U=this.view.translate,V.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(z/this.view.scale)-
-U.x-(null!=O?O.origin.x:0),V.geometry.y=Math.round(L/this.view.scale)-U.y-(null!=O?O.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(z,L,O){var V=mxUtils.bind(this,function(){var sa=this.container.getElementsByTagName("a");if(null!=sa)for(var ya=0;ya<sa.length;ya++){var Ha=
-this.getAbsoluteUrl(sa[ya].getAttribute("href"));null!=Ha&&(sa[ya].setAttribute("rel",this.linkRelation),sa[ya].setAttribute("href",Ha),null!=L&&mxEvent.addGestureListeners(sa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,V);V();var U=this.container.style.cursor,ha=this.getTolerance(),ma=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(sa){var ya=
-sa.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))sa=ma.getCellAt(sa.getGraphX(),sa.getGraphY(),null,null,null,function(Ha,Qa,ua){return null==ma.getLinkForCell(Ha.cell)}),ya=null==ya||ma.model.isAncestor(sa,ya.cell)?ma.view.getState(sa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(sa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft;
-this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(sa,ya){if(ma.isMouseDown)null!=this.currentLink&&(sa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(sa>ha||ya>ha)&&this.clear());else{for(sa=ya.getSource();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null!=sa?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&this.updateCurrentState(ya))}},mouseUp:function(sa,ya){var Ha=ya.getSource();for(sa=ya.getEvent();null!=Ha&&"a"!=Ha.nodeName.toLowerCase();)Ha=Ha.parentNode;null==Ha&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&(null==ya.sourceState||
-!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(sa)||mxEvent.isMiddleMouseButton(sa))&&!mxEvent.isPopupTrigger(sa)||mxEvent.isTouchEvent(sa))&&(null!=this.currentLink?(Ha=ma.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ha||null==L||L(sa,this.currentLink),mxEvent.isConsumed(sa)||(sa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(sa)?"_blank":Ha?ma.linkTarget:"_top",ma.openLink(this.currentLink,sa),ya.consume())):null!=O&&!ya.isConsumed()&&
-Math.abs(this.scrollLeft-ma.container.scrollLeft)<ha&&Math.abs(this.scrollTop-ma.container.scrollTop)<ha&&Math.abs(this.startX-ya.getGraphX())<ha&&Math.abs(this.startY-ya.getGraphY())<ha&&O(ya.getEvent()));this.clear()},activate:function(sa){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(sa.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(sa.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(sa))},clear:function(){null!=ma.container&&
-(ma.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(sa){};ma.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(sa){wa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
-var V=this.getModel(),U=this.gridSize,ha=[];V.beginUpdate();try{var ma={},wa=this.createCellLookup(z),sa=this.cloneCells(z,!1,ma,!0);for(O=0;O<z.length;O++){var ya=V.getParent(z[O]);if(null!=ya){var Ha=this.moveCells([sa[O]],U,U,!1)[0];ha.push(Ha);if(L)V.add(ya,sa[O]);else{var Qa=ya.getIndex(z[O]);V.add(ya,sa[O],Qa+1)}if(this.isTable(ya)){var ua=this.getCellGeometry(sa[O]),za=this.getCellGeometry(ya);null!=ua&&null!=za&&(za=za.clone(),za.height+=ua.height,V.setGeometry(ya,za))}}else ha.push(sa[O])}this.updateCustomLinks(this.createCellMapping(ma,
-wa),sa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",sa))}finally{V.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,O){if(null!=z&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),U=[],ha=0;ha<V.length;ha++)U.push(V[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==U.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=U[ha-1]){z[ha].setAttribute("width",
-L);z[ha].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),O=[],V=0;V<L.length;V++)O.push(L[V]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==O.length+1)for(V=L.length-1;0<=V;V--)if(L[V]!=O[V-1]){for(L=L[V].getElementsByTagName("a");0<L.length;){for(O=
-L[0].parentNode;null!=L[0].firstChild;)O.insertBefore(L[0].firstChild,L[0]);O.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==
-L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var O=[],V=null,U=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var ma=this.view.getState(L[ha]);if(null!=ma){var wa=z?ma.getCenterX():ma.getCenterY();V=null!=V?Math.max(V,wa):wa;U=null!=U?Math.min(U,wa):wa;O.push(ma)}}if(2<O.length){O.sort(function(Qa,ua){return z?Qa.x-ua.x:Qa.y-ua.y});ma=this.view.translate;wa=this.view.scale;U=U/wa-(z?ma.x:ma.y);V=V/wa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var sa=(V-U)/(O.length-
-1);V=U;for(ha=1;ha<O.length-1;ha++){var ya=this.view.getState(this.model.getParent(O[ha].cell)),Ha=this.getCellGeometry(O[ha].cell);V+=sa;null!=Ha&&null!=ya&&(Ha=Ha.clone(),z?Ha.x=Math.round(V-Ha.width/2)-ya.origin.x:Ha.y=Math.round(V-Ha.height/2)-ya.origin.y,this.getModel().setGeometry(O[ha].cell,Ha))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,O){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,O,V,U,ha,ma,wa,sa,ya,Ha,Qa,ua,za){var Fa=null;if(null!=za)for(Fa=new mxDictionary,Ha=0;Ha<za.length;Ha++)Fa.put(za[Ha],
-!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;O=null!=O?O:0;U=null!=U?U:!0;ha=null!=ha?ha:!0;ma=null!=ma?ma:!0;ya=null!=ya?ya:!1;var Ba="page"==ua?this.view.getBackgroundPageBounds():ha&&null==Fa||V||"diagram"==ua?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ea=this.view.scale;"diagram"==ua&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ea,(this.view.translate.y+this.backgroundImage.y)*Ea,this.backgroundImage.width*Ea,this.backgroundImage.height*Ea)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));V=L/Ea;ua=U?-.5:0;var Oa=Graph.createSvgNode(ua,ua,Math.max(1,Math.ceil(Ba.width*V)+2*O)+(ya&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*V)+2*O)+(ya&&0==O?5:0),z),Pa=Oa.ownerDocument,bb=null!=Pa.createElementNS?Pa.createElementNS(mxConstants.NS_SVG,"g"):Pa.createElement("g");Oa.appendChild(bb);var eb=this.createSvgCanvas(bb);eb.foOffset=
-U?-.5:0;eb.textOffset=U?-.5:0;eb.imageOffset=U?-.5:0;eb.translate(Math.floor(O/L-Ba.x/Ea),Math.floor(O/L-Ba.y/Ea));var db=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(db.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
-if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ea/L;var pb=this.view.translate;ua=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,ua)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(V);eb.textEnabled=
-ma;wa=null!=wa?wa:this.createSvgImageExport();var lb=wa.drawCellState,$a=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};wa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Fa?Fa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ha&&null==Fa||qb)&&null!=nb;)qb=null!=
-Fa?Fa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ha&&null==Fa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};wa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,sa,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var O=
-z.createElement("switch"),V=z.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var U=z.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK,
-"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(V);U.appendChild(z);O.appendChild(U);L.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,L,O){z=z.getElementsByTagName("a");for(var V=0;V<z.length;V++)if(null==z[V].getAttribute("target")){var U=z[V].getAttribute("href");null==U&&(U=z[V].getAttribute("xlink:href"));
-null!=U&&(null!=L&&/^https?:\/\//.test(U)?z[V].setAttribute("target",L):O&&this.isCustomLink(U)&&z[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,O){for(;null!=z&&z.nodeName!=
-L;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,O){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&L.rangeCount){var O=document.createRange();O.selectNode(z);L.removeAllRanges();L.addRange(O)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),O=L.createRange(),
-O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,L,O){var V=this.getCellGeometry(z);if(null!=V){V=V.clone();if(null!=V.points)for(var U=0;U<V.points.length;U++)L?V.points[U].x=O+(O-V.points[U].x):V.points[U].y=O+(O-V.points[U].y);U=function(ha){null!=ha&&(L?ha.x=O+(O-ha.x):ha.y=O+(O-ha.y))};U(V.getTerminalPoint(!0));U(V.getTerminalPoint(!1));this.model.setGeometry(z,V)}};Graph.prototype.flipChildren=function(z,L,O){this.model.beginUpdate();try{for(var V=this.model.getChildCount(z),
-U=0;U<V;U++){var ha=this.model.getChildAt(z,U);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,O);else{var ma=this.getCellGeometry(ha);null!=ma&&(ma=ma.clone(),L?ma.x=O+(O-ma.x-ma.width):ma.y=O+(O-ma.y-ma.height),this.model.setGeometry(ha,ma))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],V=0;V<z.length;V++)if(this.model.isEdge(z[V])){var U=this.view.getState(z[V]);null!=U&&this.flipEdgePoints(z[V],
-L,(L?U.getCenterX():U.getCenterY())/this.view.scale-(L?U.origin.x:U.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[V]);null!=ha&&this.flipChildren(z[V],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);O.push(z[V])}this.toggleCellStyles(L?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var V=0;V<z.length;V++){var U=
-this.model.getParent(z[V]);if(this.isTable(U)){var ha=this.getCellGeometry(z[V]),ma=this.getCellGeometry(U);null!=ha&&null!=ma&&(ma=ma.clone(),ma.height-=ha.height,this.model.setGeometry(U,ma))}}var wa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,L)}finally{this.model.endUpdate()}if(null!=wa)for(O=[],V=0;V<wa.length;V++)this.model.contains(wa[V])&&(this.model.isVertex(wa[V])||this.model.isEdge(wa[V]))&&O.push(wa[V])}return O};Graph.prototype.insertTableColumn=function(z,
-L){var O=this.getModel();O.beginUpdate();try{var V=z,U=0;if(this.isTableCell(z)){var ha=O.getParent(z);V=O.getParent(ha);U=mxUtils.indexOf(O.getChildCells(ha,!0),z)}else this.isTableRow(z)?V=O.getParent(z):z=O.getChildCells(V,!0)[0],L||(U=O.getChildCells(z,!0).length-1);var ma=O.getChildCells(V,!0),wa=Graph.minTableColumnWidth;for(z=0;z<ma.length;z++){var sa=O.getChildCells(ma[z],!0)[U],ya=O.cloneCell(sa,!1),Ha=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,
-"rowspan",null),"colspan",null);if(null!=Ha){null!=Ha.alternateBounds&&(Ha.width=Ha.alternateBounds.width,Ha.height=Ha.alternateBounds.height,Ha.alternateBounds=null);wa=Ha.width;var Qa=this.getCellGeometry(ma[z]);null!=Qa&&(Ha.height=Qa.height)}O.add(ma[z],ya,U+(L?0:1))}var ua=this.getCellGeometry(V);null!=ua&&(ua=ua.clone(),ua.width+=wa,O.setGeometry(V,ua))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
-z:L.getParent(z);var V=L.getChildCells(O,!0);0==V.length?L.remove(O):(O==z&&(z=V[V.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var O=this.getModel();O.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){V=z;var U=O.getChildCells(V,!0);z=U[L?0:U.length-1]}else V=O.getParent(z);var ha=V.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(V,z,ha+(L?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var O=
-this.getModel();O.beginUpdate();try{var V=z,U=z;if(this.isTableCell(z))U=O.getParent(z),V=O.getParent(U);else if(this.isTableRow(z))V=O.getParent(z);else{var ha=O.getChildCells(V,!0);U=ha[L?0:ha.length-1]}var ma=O.getChildCells(U,!0),wa=V.getIndex(U);U=O.cloneCell(U,!1);U.value=null;var sa=this.getCellGeometry(U);if(null!=sa){for(ha=0;ha<ma.length;ha++){z=O.cloneCell(ma[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);
-null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=sa.height);U.insert(z)}O.add(V,U,wa+(L?0:1));var Ha=this.getCellGeometry(V);null!=Ha&&(Ha=Ha.clone(),Ha.height+=sa.height,O.setGeometry(V,Ha))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(V=L.getParent(z));this.isTableRow(V)&&(O=L.getParent(V));var U=L.getChildCells(O,
-!0);if(0==U.length)L.remove(O);else{this.isTableRow(V)||(V=U[0]);var ha=L.getChildCells(V,!0);if(1>=ha.length)L.remove(O);else{var ma=ha.length-1;this.isTableCell(z)&&(ma=mxUtils.indexOf(ha,z));for(V=z=0;V<U.length;V++){var wa=L.getChildCells(U[V],!0)[ma];L.remove(wa);var sa=this.getCellGeometry(wa);null!=sa&&(z=Math.max(z,sa.width))}var ya=this.getCellGeometry(O);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(O,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();
-L.beginUpdate();try{var O=z,V=z;this.isTableCell(z)&&(z=V=L.getParent(z));this.isTableRow(z)&&(O=L.getParent(V));var U=L.getChildCells(O,!0);if(1>=U.length)L.remove(O);else{this.isTableRow(V)||(V=U[U.length-1]);L.remove(V);z=0;var ha=this.getCellGeometry(V);null!=ha&&(z=ha.height);var ma=this.getCellGeometry(O);null!=ma&&(ma=ma.clone(),ma.height-=z,L.setGeometry(O,ma))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var O=z.tBodies[0],V=O.rows[0].cells,U=z=0;U<V.length;U++){var ha=
-V[U].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=O.insertRow(L);for(U=0;U<z;U++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};Graph.prototype.insertColumn=function(z,L){var O=z.tHead;if(null!=O)for(var V=0;V<O.rows.length;V++){var U=document.createElement("th");O.rows[V].appendChild(U);mxUtils.br(U)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)V=z.rows[O].insertCell(L),mxUtils.br(V);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-
-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>L&&z[O].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var V;V=O.firstChild;)lastNode=z.appendChild(V);L.insertNode(z)}}else(L=document.selection)&&"Control"!=
-L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function O(U,ha){U.length>ha&&(U=U.substring(0,Math.round(ha/2))+"..."+U.substring(U.length-Math.round(ha/4)));return U}z=null!=z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var V=document.createElement("a");V.setAttribute("rel",this.linkRelation);V.setAttribute("href",this.getAbsoluteUrl(z));V.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
-null!=this.linkTarget&&V.setAttribute("target",this.linkTarget);mxUtils.write(V,O(L,40));this.isCustomLink(z)&&mxEvent.addListener(V,"click",mxUtils.bind(this,function(U){this.customLinkClicked(z);mxEvent.consume(U)}));return V};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,ma){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
-function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var ma=this.getCellAt(ha.graphX,ha.graphY);null!=ma&&this.isSwimlane(ma)&&this.hitsSwimlaneContent(ma,ha.graphX,ha.graphY)||(ha.state=this.view.getState(ma),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,O=!1,V=!1,U=this.fireMouseEvent;this.fireMouseEvent=
-function(ha,ma,wa){ha==mxEvent.MOUSE_DOWN&&(ma=this.updateMouseEvent(ma),L=this.isCellSelected(ma.getCell()),O=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ha,ma){var wa=mxEvent.isMouseEvent(ma.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ma.getState()||!ma.isSource(ma.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!wa&&(O&&null==ma.getCell()&&
-this.isSelectionEmpty()||L&&this.isCellSelected(ma.getCell())));wa=!L||wa?null:mxUtils.bind(this,function(sa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ma.getX()+ya.x+1,ma.getY()+ya.y+1,sa,ma.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,ma,wa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
-z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),O=L.getRangeAt(0),
-V="\t";if(null!=z)for(V="";0<z;)V+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(V));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);L.removeAllRanges();L.addRange(O)};mxCellEditor.prototype.alignText=function(z,L){var O=null!=L&&mxEvent.isShiftDown(L);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var V=!0;this.graph.processElements(this.textarea,function(U){O||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"),
-U.style.textAlign=null):V=!1});V&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var L=[],O=0,V=z.rangeCount;O<V;++O)L.push(z.getRangeAt(O));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var L=0,O=z.length;L<O;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(V){}};var u=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));u.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
-H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);J.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
-this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var V=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=V&&V.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var D=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(U,ha){ha.originalNode=U;U=U.firstChild;
-for(var ma=ha.firstChild;null!=U&&null!=ma;)L(U,ma),U=U.nextSibling,ma=ma.nextSibling;return ha}function O(U,ha){if(null!=U)if(ha.originalNode!=U)V(U);else for(U=U.firstChild,ha=ha.firstChild;null!=U;){var ma=U.nextSibling;null==ha?V(U):(O(U,ha),ha=ha.nextSibling);U=ma}}function V(U){for(var ha=U.firstChild;null!=ha;){var ma=ha.nextSibling;V(ha);ha=ma}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U,
-mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}D.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
-function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";sa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ma=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ma.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ma.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration=ma.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(L?wa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var sa=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(sa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(sa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=
-wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var G=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
-60*O;var V=null!=z.text?z.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,J){J=null!=J?J:{};for(var O=0;O<z.length;O++){var U=z[O];J[mxObjectIdentity.get(U)]=U.getId();for(var W=this.model.getChildCount(U),
+ea=0;ea<W;ea++)this.createCellLookup([this.model.getChildAt(U,ea)],J)}return J};Graph.prototype.createCellMapping=function(z,J,O){O=null!=O?O:{};for(var U in z){var W=J[U];null==O[W]&&(O[W]=z[U].getId()||"")}return O};Graph.prototype.importGraphModel=function(z,J,O,U){J=null!=J?J:0;O=null!=O?O:0;var W=new mxCodec(z.ownerDocument),ea=new mxGraphModel;W.decode(z,ea);z=[];W={};var ka={},xa=ea.getChildren(this.cloneCell(ea.root,this.isCloneInvalidEdges(),W));if(null!=xa){var ta=this.createCellLookup([ea.root]);
+xa=xa.slice();this.model.beginUpdate();try{if(1!=xa.length||this.isCellLocked(this.getDefaultParent()))for(ea=0;ea<xa.length;ea++)pa=this.model.getChildren(this.moveCells([xa[ea]],J,O,!1,this.model.getRoot())[0]),null!=pa&&(z=z.concat(pa));else{var pa=ea.getChildren(xa[0]);null!=pa&&(z=this.moveCells(pa,J,O,!1,this.getDefaultParent()),ka[ea.getChildAt(ea.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(W,ta,ka),this.updateCustomLinks(ka,z),U)){this.isGridEnabled()&&
+(J=this.snap(J),O=this.snap(O));var ua=this.getBoundingBoxFromGeometry(z,!0);null!=ua&&this.moveCells(z,J-ua.x,O-ua.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var J={},O=this.cloneCells(z,null,J),U=new mxDictionary,W=0;W<z.length;W++)U.put(z[W],!0);var ea=new mxCodec,ka=new mxGraphModel,xa=ka.getChildAt(ka.getRoot(),0);for(W=0;W<O.length;W++){ka.add(xa,O[W]);var ta=this.view.getState(z[W]);if(null!=ta){var pa=this.getCellGeometry(O[W]);null!=pa&&pa.relative&&
+!this.model.isEdge(z[W])&&null==U.get(this.model.getParent(z[W]))&&(pa.offset=null,pa.relative=!1,pa.x=ta.x/ta.view.scale-ta.view.translate.x,pa.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(J,this.createCellLookup(z)),O);return ea.encode(ka)};Graph.prototype.isSwimlane=function(z,J){var O=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(O=this.getCurrentCellStyle(z,J)[mxConstants.STYLE_SHAPE]);return O==mxConstants.SHAPE_SWIMLANE||
+"table"==O||"tableRow"==O};var L=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var J=this.model.getParent(z);if(null!=J){var O=this.getCurrentCellStyle(J);if(null!=O.expand)return"0"!=O.expand}return L.apply(this,arguments)&&(null==J||!this.isTable(J))};var P=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,J,O,U,W,ea,ka,xa){null==xa&&(xa=this.model.getParent(z),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ea,ka,null,!0,!1));O=null;this.model.beginUpdate();
+try{O=P.apply(this,[z,J,O,U,W,ea,ka,xa]);this.model.setValue(O,"");var ta=this.getChildCells(O,!0);for(J=0;J<ta.length;J++){var pa=this.getCellGeometry(ta[J]);null!=pa&&pa.relative&&0<pa.x&&this.model.remove(ta[J])}var ua=this.getChildCells(z,!0);for(J=0;J<ua.length;J++)pa=this.getCellGeometry(ua[J]),null!=pa&&pa.relative&&0>=pa.x&&this.model.remove(ua[J]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[O]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[O]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Da=this.model.getTerminal(O,!1);if(null!=Da){var Fa=this.getCurrentCellStyle(Da);null!=Fa&&"1"==Fa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[O]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[O]))}}finally{this.model.endUpdate()}return O};var d=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(z,J,O){if(J||O)d.apply(this,arguments);else{var U=this.getSelectionCell(),W=null,ea=[],ka=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ea.push(xa),xa==U)W=ea.length-1;else if(z&&null==U&&0<ea.length||null!=W&&z&&ea.length>W||!z&&0<W)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)ka(this.model.getChildAt(xa,ta))});ka(this.model.root);0<ea.length&&(W=null!=W?mxUtils.mod(W+(z?1:-1),ea.length):0,this.setSelectionCell(ea[W]))}};
+Graph.prototype.swapShapes=function(z,J,O,U,W,ea,ka){J=!1;if(!U&&null!=W&&1==z.length&&(U=this.view.getState(W),O=this.view.getState(z[0]),null!=U&&null!=O&&(null!=ea&&mxEvent.isShiftDown(ea)||"umlLifeline"==U.style.shape&&"umlLifeline"==O.style.shape)&&(U=this.getCellGeometry(W),ea=this.getCellGeometry(z[0]),null!=U&&null!=ea))){J=U.clone();U=ea.clone();U.x=J.x;U.y=J.y;J.x=ea.x;J.y=ea.y;this.model.beginUpdate();try{this.model.setGeometry(W,J),this.model.setGeometry(z[0],U)}finally{this.model.endUpdate()}J=
+!0}return J};var f=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,J,O,U,W,ea,ka){if(this.swapShapes(z,J,O,U,W,ea,ka))return z;ka=null!=ka?ka:{};if(this.isTable(W)){for(var xa=[],ta=0;ta<z.length;ta++)this.isTable(z[ta])?xa=xa.concat(this.model.getChildCells(z[ta],!0).reverse()):xa.push(z[ta]);z=xa}this.model.beginUpdate();try{xa=[];for(ta=0;ta<z.length;ta++)if(null!=W&&this.isTableRow(z[ta])){var pa=this.model.getParent(z[ta]),ua=this.getCellGeometry(z[ta]);this.isTable(pa)&&xa.push(pa);
+if(null!=pa&&null!=ua&&this.isTable(pa)&&this.isTable(W)&&(U||pa!=W)){if(!U){var Da=this.getCellGeometry(pa);null!=Da&&(Da=Da.clone(),Da.height-=ua.height,this.model.setGeometry(pa,Da))}Da=this.getCellGeometry(W);null!=Da&&(Da=Da.clone(),Da.height+=ua.height,this.model.setGeometry(W,Da));var Fa=this.model.getChildCells(W,!0);if(0<Fa.length){z[ta]=U?this.cloneCell(z[ta]):z[ta];var Ma=this.model.getChildCells(z[ta],!0),Qa=this.model.getChildCells(Fa[0],!0),Ba=Qa.length-Ma.length;if(0<Ba)for(var Ka=
+0;Ka<Ba;Ka++){var Oa=this.cloneCell(Ma[Ma.length-1]);null!=Oa&&(Oa.value="",this.model.add(z[ta],Oa))}else if(0>Ba)for(Ka=0;Ka>Ba;Ka--)this.model.remove(Ma[Ma.length+Ka-1]);Ma=this.model.getChildCells(z[ta],!0);for(Ka=0;Ka<Qa.length;Ka++){var Ya=this.getCellGeometry(Qa[Ka]),db=this.getCellGeometry(Ma[Ka]);null!=Ya&&null!=db&&(db=db.clone(),db.width=Ya.width,this.model.setGeometry(Ma[Ka],db))}}}}var eb=f.apply(this,arguments);for(ta=0;ta<xa.length;ta++)!U&&this.model.contains(xa[ta])&&0==this.model.getChildCount(xa[ta])&&
+this.model.remove(xa[ta]);U&&this.updateCustomLinks(this.createCellMapping(ka,this.createCellLookup(z)),eb)}finally{this.model.endUpdate()}return eb};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,J){var O=[];this.model.beginUpdate();try{for(var U=0;U<z.length;U++)if(this.isTableCell(z[U])){var W=this.model.getParent(z[U]),ea=this.model.getParent(W);1==this.model.getChildCount(W)&&1==this.model.getChildCount(ea)?0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea)&&O.push(ea):
+this.labelChanged(z[U],"")}else{if(this.isTableRow(z[U])&&(ea=this.model.getParent(z[U]),0>mxUtils.indexOf(z,ea)&&0>mxUtils.indexOf(O,ea))){for(var ka=this.model.getChildCells(ea,!0),xa=0,ta=0;ta<ka.length;ta++)0<=mxUtils.indexOf(z,ka[ta])&&xa++;xa==ka.length&&O.push(ea)}O.push(z[U])}O=g.apply(this,[O,J])}finally{this.model.endUpdate()}return O};Graph.prototype.updateCustomLinks=function(z,J,O){O=null!=O?O:new Graph;for(var U=0;U<J.length;U++)null!=J[U]&&O.updateCustomLinksForCell(z,J[U],O)};Graph.prototype.updateCustomLinksForCell=
+function(z,J){this.doUpdateCustomLinksForCell(z,J);for(var O=this.model.getChildCount(J),U=0;U<O;U++)this.updateCustomLinksForCell(z,this.model.getChildAt(J,U))};Graph.prototype.doUpdateCustomLinksForCell=function(z,J){};Graph.prototype.getAllConnectionConstraints=function(z,J){if(null!=z){J=mxUtils.getValue(z.style,"points",null);if(null!=J){z=[];try{var O=JSON.parse(J);for(J=0;J<O.length;J++){var U=O[J];z.push(new mxConnectionConstraint(new mxPoint(U[0],U[1]),2<U.length?"0"!=U[2]:!0,null,3<U.length?
+U[3]:0,4<U.length?U[4]:0))}}catch(ea){}return z}if(null!=z.shape&&null!=z.shape.bounds){U=z.shape.direction;J=z.shape.bounds;var W=z.shape.scale;O=J.width/W;J=J.height/W;if(U==mxConstants.DIRECTION_NORTH||U==mxConstants.DIRECTION_SOUTH)U=O,O=J,J=U;J=z.shape.getConstraints(z.style,O,J);if(null!=J)return J;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var J=this.getCurrentCellStyle(z);J=mxUtils.getValue(J,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,J,[z])}};Graph.prototype.isValidRoot=function(z){for(var J=this.model.getChildCount(z),O=0,U=0;U<J;U++){var W=this.model.getChildAt(z,U);this.model.isVertex(W)&&(W=this.getCellGeometry(W),null==W||W.relative||O++)}return 0<O||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,J,O){for(var U=this.getCurrentCellStyle(z),W=!0,ea=!0,ka=0;ka<J.length&&ea;ka++)W=W&&this.isTable(J[ka]),ea=ea&&this.isTableRow(J[ka]);return(1==J.length&&null!=O&&mxEvent.isShiftDown(O)&&!mxEvent.isControlDown(O)&&!mxEvent.isAltDown(O)||("1"!=mxUtils.getValue(U,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(U,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ea||W))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var J=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(J&&null!=z&&null!=this.layoutManager){var O=this.model.getParent(z);null!=O&&(O=this.layoutManager.getLayout(O),null!=O&&O.constructor==mxStackLayout&&(J=!1))}return J};Graph.prototype.getPreferredSizeForCell=function(z){var J=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=J&&(J.width+=10,J.height+=4,this.gridEnabled&&(J.width=this.snap(J.width),J.height=this.snap(J.height)));return J};Graph.prototype.turnShapes=function(z,J){var O=this.getModel(),U=[];O.beginUpdate();try{for(var W=0;W<z.length;W++){var ea=z[W];if(O.isEdge(ea)){var ka=O.getTerminal(ea,!0),xa=O.getTerminal(ea,!1);O.setTerminal(ea,xa,!0);O.setTerminal(ea,ka,!1);var ta=O.getGeometry(ea);if(null!=ta){ta=ta.clone();null!=ta.points&&ta.points.reverse();var pa=ta.getTerminalPoint(!0),ua=ta.getTerminalPoint(!1);
+ta.setTerminalPoint(pa,!1);ta.setTerminalPoint(ua,!0);O.setGeometry(ea,ta);var Da=this.view.getState(ea),Fa=this.view.getState(ka),Ma=this.view.getState(xa);if(null!=Da){var Qa=null!=Fa?this.getConnectionConstraint(Da,Fa,!0):null,Ba=null!=Ma?this.getConnectionConstraint(Da,Ma,!1):null;this.setConnectionConstraint(ea,ka,!0,Ba);this.setConnectionConstraint(ea,xa,!1,Qa);var Ka=mxUtils.getValue(Da.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Da.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ea]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[ea])}U.push(ea)}}else if(O.isVertex(ea)&&(ta=this.getCellGeometry(ea),null!=ta)){if(!(this.isTable(ea)||this.isTableRow(ea)||this.isTableCell(ea)||this.isSwimlane(ea))){ta=ta.clone();ta.x+=ta.width/2-ta.height/2;ta.y+=ta.height/2-ta.width/2;var Oa=ta.width;ta.width=ta.height;ta.height=Oa;O.setGeometry(ea,ta)}var Ya=this.view.getState(ea);if(null!=Ya){var db=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],eb=mxUtils.getValue(Ya.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,db[mxUtils.mod(mxUtils.indexOf(db,eb)+(J?-1:1),db.length)],[ea])}U.push(ea)}}}finally{O.endUpdate()}return U};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var x=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var J=z.cell;this.isTableCell(J)&&(J=this.model.getParent(J));this.isTableRow(J)&&(J=this.model.getParent(J));var O=this.view.getState(J);null!=O&&null!=O.shape&&(this.view.invalidate(J),O.shape.bounds=null)}x.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var J=0;J<z.length;J++){var O=this.view.getState(z[J]);null!=O&&null!=O.shape&&null!=O.shape.stencil&&this.stencilHasPlaceholders(O.shape.stencil)?this.removeStateForCell(z[J]):this.isReplacePlaceholders(z[J])&&this.view.invalidate(z[J],!1,!1)}};
+Graph.prototype.replaceElement=function(z,J){J=z.ownerDocument.createElement(null!=J?J:"span");for(var O=Array.prototype.slice.call(z.attributes);attr=O.pop();)J.setAttribute(attr.nodeName,attr.nodeValue);J.innerHTML=z.innerHTML;z.parentNode.replaceChild(J,z)};Graph.prototype.processElements=function(z,J){if(null!=z){z=z.getElementsByTagName("*");for(var O=0;O<z.length;O++)J(z[O])}};Graph.prototype.updateLabelElements=function(z,J,O){z=null!=z?z:this.getSelectionCells();for(var U=document.createElement("div"),
+W=0;W<z.length;W++)if(this.isHtmlLabel(z[W])){var ea=this.convertValueToString(z[W]);if(null!=ea&&0<ea.length){U.innerHTML=ea;for(var ka=U.getElementsByTagName(null!=O?O:"*"),xa=0;xa<ka.length;xa++)J(ka[xa]);U.innerHTML!=ea&&this.cellLabelChanged(z[W],U.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,J,O){J=Graph.zapGremlins(J);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var U=z.getAttribute("placeholder"),
+W=z;null!=W;){if(W==this.model.getRoot()||null!=W.value&&"object"==typeof W.value&&W.hasAttribute(U)){this.setAttributeForCell(W,U,J);break}W=this.model.getParent(W)}var ea=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ea.hasAttribute("label_"+Graph.diagramLanguage)?ea.setAttribute("label_"+Graph.diagramLanguage,J):ea.setAttribute("label",J);J=ea}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var J=new mxDictionary,O=0;O<z.length;O++)J.put(z[O],!0);var U=[];for(O=0;O<z.length;O++){var W=this.model.getParent(z[O]);null==W||J.get(W)||(J.put(W,!0),U.push(W))}for(O=0;O<U.length;O++)if(W=this.view.getState(U[O]),null!=W&&(this.model.isEdge(W.cell)||this.model.isVertex(W.cell))&&this.isCellDeletable(W.cell)&&this.isTransparentState(W)){for(var ea=!0,ka=0;ka<this.model.getChildCount(W.cell)&&ea;ka++)J.get(this.model.getChildAt(W.cell,ka))||(ea=!1);ea&&z.push(W.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var J=[],O=0;O<z.length;O++)this.isCellDeletable(z[O])&&this.isTransparentState(this.view.getState(z[O]))&&J.push(z[O]);z=J;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,J){this.setAttributeForCell(z,"link",J)};Graph.prototype.setTooltipForCell=function(z,J){var O="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(O="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,O,J)};Graph.prototype.getAttributeForCell=function(z,J,O){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(J):null;return null!=z?z:O};Graph.prototype.setAttributeForCell=function(z,J,O){if(null!=z.value&&"object"==typeof z.value)var U=z.value.cloneNode(!0);else U=mxUtils.createXmlDocument().createElement("UserObject"),U.setAttribute("label",z.value||"");null!=O?U.setAttribute(J,O):U.removeAttribute(J);
+this.model.setValue(z,U)};var y=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,J,O,U){this.getModel();if(mxEvent.isAltDown(J))return null;for(var W=0;W<z.length;W++){var ea=this.model.getParent(z[W]);if(this.model.isEdge(ea)&&0>mxUtils.indexOf(z,ea))return null}ea=y.apply(this,arguments);var ka=!0;for(W=0;W<z.length&&ka;W++)ka=ka&&this.isTableRow(z[W]);ka&&(this.isTableCell(ea)&&(ea=this.model.getParent(ea)),this.isTableRow(ea)&&(ea=this.model.getParent(ea)),this.isTable(ea)||
+(ea=null));return ea};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,J){this.isEnabled()&&(J=this.insertTextForEvent(z,J),mxGraph.prototype.dblClick.call(this,z,J))};Graph.prototype.insertTextForEvent=function(z,J){var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(J)){var U=this.model.isEdge(J)?this.view.getState(J):
+null,W=mxEvent.getSource(z);this.firstClickState!=U||this.firstClickSource!=W||null!=U&&null!=U.text&&null!=U.text.node&&null!=U.text.boundingBox&&(mxUtils.contains(U.text.boundingBox,O.x,O.y)||mxUtils.isAncestorNode(U.text.node,mxEvent.getSource(z)))||(null!=U||this.isCellLocked(this.getDefaultParent()))&&(null==U||this.isCellLocked(U.cell))||!(null!=U||mxClient.IS_SVG&&W==this.view.getCanvas().ownerSVGElement)||(null==U&&(U=this.view.getState(this.getCellAt(O.x,O.y))),J=this.addText(O.x,O.y,U))}return J};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),J=this.container.scrollLeft/this.view.scale-this.view.translate.x,O=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var U=this.getPageLayout(),W=this.getPageSize();J=Math.max(J,U.x*W.width);O=Math.max(O,U.y*W.height)}return new mxPoint(this.snap(J+z),this.snap(O+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,J=this.getGraphBounds(),O=this.getInsertPoint(),U=this.snap(Math.round(Math.max(O.x,
+J.x/z.scale-z.translate.x+(0==J.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(O.y,(J.y+J.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(U,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,J,O){var U=new mxCell;U.value="Text";U.geometry=new mxGeometry(0,0,0,0);U.vertex=!0;if(null!=O&&this.model.isEdge(O.cell)){U.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+U.geometry.relative=!0;U.connectable=!1;var W=this.view.getRelativePoint(O,z,J);U.geometry.x=Math.round(1E4*W.x)/1E4;U.geometry.y=Math.round(W.y);U.geometry.offset=new mxPoint(0,0);W=this.view.getPoint(O,U.geometry);var ea=this.view.scale;U.geometry.offset=new mxPoint(Math.round((z-W.x)/ea),Math.round((J-W.y)/ea))}else W=this.view.translate,U.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",U.geometry.width=40,U.geometry.height=20,U.geometry.x=Math.round(z/this.view.scale)-
+W.x-(null!=O?O.origin.x:0),U.geometry.y=Math.round(J/this.view.scale)-W.y-(null!=O?O.origin.y:0),U.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([U],null!=O?O.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[U])),this.autoSizeCell(U)}finally{this.getModel().endUpdate()}return U};Graph.prototype.addClickHandler=function(z,J,O){var U=mxUtils.bind(this,function(){var ta=this.container.getElementsByTagName("a");if(null!=ta)for(var pa=0;pa<ta.length;pa++){var ua=
+this.getAbsoluteUrl(ta[pa].getAttribute("href"));null!=ua&&(ta[pa].setAttribute("rel",this.linkRelation),ta[pa].setAttribute("href",ua),null!=J&&mxEvent.addGestureListeners(ta[pa],null,null,J))}});this.model.addListener(mxEvent.CHANGE,U);U();var W=this.container.style.cursor,ea=this.getTolerance(),ka=this,xa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ka,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ta){var pa=
+ta.sourceState;if(null==pa||null==ka.getLinkForCell(pa.cell))ta=ka.getCellAt(ta.getGraphX(),ta.getGraphY(),null,null,null,function(ua,Da,Fa){return null==ka.getLinkForCell(ua.cell)}),pa=null==pa||ka.model.isAncestor(ta,pa.cell)?ka.view.getState(ta):null;pa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=pa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ta,pa){this.startX=pa.getGraphX();this.startY=pa.getGraphY();this.scrollLeft=ka.container.scrollLeft;
+this.scrollTop=ka.container.scrollTop;null==this.currentLink&&"auto"==ka.container.style.overflow&&(ka.container.style.cursor="move");this.updateCurrentState(pa)},mouseMove:function(ta,pa){if(ka.isMouseDown)null!=this.currentLink&&(ta=Math.abs(this.startX-pa.getGraphX()),pa=Math.abs(this.startY-pa.getGraphY()),(ta>ea||pa>ea)&&this.clear());else{for(ta=pa.getSource();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null!=ta?this.clear():(null!=ka.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&ka.tooltipHandler.reset(pa,!0,this.currentState),(null==this.currentState||pa.getState()!=this.currentState&&null!=pa.sourceState||!ka.intersects(this.currentState,pa.getGraphX(),pa.getGraphY()))&&this.updateCurrentState(pa))}},mouseUp:function(ta,pa){var ua=pa.getSource();for(ta=pa.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&(null==pa.sourceState||
+!pa.isSource(pa.sourceState.control))&&((mxEvent.isLeftMouseButton(ta)||mxEvent.isMiddleMouseButton(ta))&&!mxEvent.isPopupTrigger(ta)||mxEvent.isTouchEvent(ta))&&(null!=this.currentLink?(ua=ka.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==J||J(ta,this.currentLink),mxEvent.isConsumed(ta)||(ta=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ta)?"_blank":ua?ka.linkTarget:"_top",ka.openLink(this.currentLink,ta),pa.consume())):null!=O&&!pa.isConsumed()&&
+Math.abs(this.scrollLeft-ka.container.scrollLeft)<ea&&Math.abs(this.scrollTop-ka.container.scrollTop)<ea&&Math.abs(this.startX-pa.getGraphX())<ea&&Math.abs(this.startY-pa.getGraphY())<ea&&O(pa.getEvent()));this.clear()},activate:function(ta){this.currentLink=ka.getAbsoluteUrl(ka.getLinkForCell(ta.cell));null!=this.currentLink&&(this.currentTarget=ka.getLinkTargetForCell(ta.cell),ka.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ta))},clear:function(){null!=ka.container&&
+(ka.container.style.cursor=W);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ka.tooltipHandler&&ka.tooltipHandler.hide()}};ka.click=function(ta){};ka.addMouseListener(xa);mxEvent.addListener(document,"mouseleave",function(ta){xa.clear()})};Graph.prototype.duplicateCells=function(z,J){z=null!=z?z:this.getSelectionCells();J=null!=J?J:!0;for(var O=0;O<z.length;O++)this.isTableCell(z[O])&&(z[O]=this.model.getParent(z[O]));z=this.model.getTopmostCells(z);
+var U=this.getModel(),W=this.gridSize,ea=[];U.beginUpdate();try{var ka={},xa=this.createCellLookup(z),ta=this.cloneCells(z,!1,ka,!0);for(O=0;O<z.length;O++){var pa=U.getParent(z[O]);if(null!=pa){var ua=this.moveCells([ta[O]],W,W,!1)[0];ea.push(ua);if(J)U.add(pa,ta[O]);else{var Da=pa.getIndex(z[O]);U.add(pa,ta[O],Da+1)}if(this.isTable(pa)){var Fa=this.getCellGeometry(ta[O]),Ma=this.getCellGeometry(pa);null!=Fa&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Fa.height,U.setGeometry(pa,Ma))}}else ea.push(ta[O])}this.updateCustomLinks(this.createCellMapping(ka,
+xa),ta,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ta))}finally{U.endUpdate()}return ea};Graph.prototype.insertImage=function(z,J,O){if(null!=z&&null!=this.cellEditor.textarea){for(var U=this.cellEditor.textarea.getElementsByTagName("img"),W=[],ea=0;ea<U.length;ea++)W.push(U[ea]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==W.length+1)for(ea=z.length-1;0<=ea;ea--)if(0==ea||z[ea]!=W[ea-1]){z[ea].setAttribute("width",
+J);z[ea].setAttribute("height",O);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var J=this.cellEditor.textarea.getElementsByTagName("a"),O=[],U=0;U<J.length;U++)O.push(J[U]);document.execCommand("createlink",!1,mxUtils.trim(z));J=this.cellEditor.textarea.getElementsByTagName("a");if(J.length==O.length+1)for(U=J.length-1;0<=U;U--)if(J[U]!=O[U-1]){for(J=J[U].getElementsByTagName("a");0<J.length;){for(O=
+J[0].parentNode;null!=J[0].firstChild;)O.insertBefore(J[0].firstChild,J[0]);O.removeChild(J[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var J=mxGraph.prototype.isCellResizable.apply(this,arguments),O=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(J||"0"!=mxUtils.getValue(O,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==O[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,J){null==
+J&&(J=this.getSelectionCells());if(null!=J&&1<J.length){for(var O=[],U=null,W=null,ea=0;ea<J.length;ea++)if(this.getModel().isVertex(J[ea])){var ka=this.view.getState(J[ea]);if(null!=ka){var xa=z?ka.getCenterX():ka.getCenterY();U=null!=U?Math.max(U,xa):xa;W=null!=W?Math.min(W,xa):xa;O.push(ka)}}if(2<O.length){O.sort(function(Da,Fa){return z?Da.x-Fa.x:Da.y-Fa.y});ka=this.view.translate;xa=this.view.scale;W=W/xa-(z?ka.x:ka.y);U=U/xa-(z?ka.x:ka.y);this.getModel().beginUpdate();try{var ta=(U-W)/(O.length-
+1);U=W;for(ea=1;ea<O.length-1;ea++){var pa=this.view.getState(this.model.getParent(O[ea].cell)),ua=this.getCellGeometry(O[ea].cell);U+=ta;null!=ua&&null!=pa&&(ua=ua.clone(),z?ua.x=Math.round(U-ua.width/2)-pa.origin.x:ua.y=Math.round(U-ua.height/2)-pa.origin.y,this.getModel().setGeometry(O[ea].cell,ua))}}finally{this.getModel().endUpdate()}}}return J};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(J,O){return this.getLinkForCell(J.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var J=null;null!=z&&0<z.length&&(z=JSON.parse(z),J=new mxImage(z.src,z.width,z.height));return J};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,J,O,U,W,ea,ka,xa,ta,pa,ua,Da,Fa,Ma){var Qa=null;if(null!=Ma)for(Qa=new mxDictionary,ua=0;ua<Ma.length;ua++)Qa.put(Ma[ua],
+!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{J=null!=J?J:1;O=null!=O?O:0;W=null!=W?W:!0;ea=null!=ea?ea:!0;ka=null!=ka?ka:!0;pa=null!=pa?pa:!1;var Ba="page"==Fa?this.view.getBackgroundPageBounds():ea&&null==Qa||U||"diagram"==Fa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Fa&&null!=this.backgroundImage&&(Ba=mxRectangle.fromRectangle(Ba),Ba.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ba)throw Error(mxResources.get("drawingEmpty"));U=J/Ka;Fa=W?-.5:0;var Oa=Graph.createSvgNode(Fa,Fa,Math.max(1,Math.ceil(Ba.width*U)+2*O)+(pa&&0==O?5:0),Math.max(1,Math.ceil(Ba.height*U)+2*O)+(pa&&0==O?5:0),z),Ya=Oa.ownerDocument,db=null!=Ya.createElementNS?Ya.createElementNS(mxConstants.NS_SVG,"g"):Ya.createElement("g");Oa.appendChild(db);var eb=this.createSvgCanvas(db);eb.foOffset=
+W?-.5:0;eb.textOffset=W?-.5:0;eb.imageOffset=W?-.5:0;eb.translate(Math.floor(O/J-Ba.x/Ka),Math.floor(O/J-Ba.y/Ka));var cb=document.createElement("div"),ub=eb.getAlternateText;eb.getAlternateText=function(ab,ib,gb,qb,nb,mb,Bb,wb,rb,vb,kb,hb,tb){if(null!=mb&&0<this.state.fontSize)try{mxUtils.isNode(mb)?mb=mb.innerText:(cb.innerHTML=mb,mb=mxUtils.extractTextWithWhitespace(cb.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,ob=0;(0==Cb||zb<Cb)&&ob<mb.length;){var yb=mb.charCodeAt(ob);
+if(10==yb||13==yb){if(0<zb)break}else xb.push(mb.charAt(ob)),255>yb&&zb++;ob++}xb.length<mb.length&&1<mb.length-xb.length&&(mb=mxUtils.trim(xb.join(""))+"...");return mb}catch(Ab){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=Ka/J;var pb=this.view.translate;Fa=new mxRectangle((fb.x+pb.x)*z,(fb.y+pb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ba,Fa)&&eb.image(fb.x+pb.x,fb.y+pb.y,fb.width,fb.height,fb.src,!0)}eb.scale(U);eb.textEnabled=
+ka;xa=null!=xa?xa:this.createSvgImageExport();var lb=xa.drawCellState,$a=xa.getLinkForCellState;xa.getLinkForCellState=function(ab,ib){var gb=$a.apply(this,arguments);return null==gb||ab.view.graph.isCustomLink(gb)?null:gb};xa.getLinkTargetForCellState=function(ab,ib){return ab.view.graph.getLinkTargetForCell(ab.cell)};xa.drawCellState=function(ab,ib){for(var gb=ab.view.graph,qb=null!=Qa?Qa.get(ab.cell):gb.isCellSelected(ab.cell),nb=gb.model.getParent(ab.cell);!(ea&&null==Qa||qb)&&null!=nb;)qb=null!=
+Qa?Qa.get(nb):gb.isCellSelected(nb),nb=gb.model.getParent(nb);if(ea&&null==Qa||qb)gb.view.redrawEnumerationState(ab),lb.apply(this,arguments),this.doDrawShape(ab.secondLabel,ib)};xa.drawState(this.getView().getState(this.model.root),eb);this.updateSvgLinks(Oa,ta,!0);this.addForeignObjectWarning(eb,Oa);return Oa}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,J){if("0"!=urlParams["svg-warning"]&&0<J.getElementsByTagName("foreignObject").length){var O=
+z.createElement("switch"),U=z.createElement("g");U.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var W=z.createElement("a");W.setAttribute("transform","translate(0,-5)");null==W.setAttributeNS||J.ownerDocument!=document&&null==document.documentMode?(W.setAttribute("xlink:href",Graph.foreignObjectWarningLink),W.setAttribute("target","_blank")):(W.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),W.setAttributeNS(mxConstants.NS_XLINK,
+"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);O.appendChild(U);W.appendChild(z);O.appendChild(W);J.appendChild(O)}};Graph.prototype.updateSvgLinks=function(z,J,O){z=z.getElementsByTagName("a");for(var U=0;U<z.length;U++)if(null==z[U].getAttribute("target")){var W=z[U].getAttribute("href");null==W&&(W=z[U].getAttribute("xlink:href"));
+null!=W&&(null!=J&&/^https?:\/\//.test(W)?z[U].setAttribute("target",J):O&&this.isCustomLink(W)&&z[U].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var J=window.getSelection();J.getRangeAt&&J.rangeCount&&(z=J.getRangeAt(0).commonAncestorContainer)}else document.selection&&
+(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,J,O){for(;null!=z&&z.nodeName!=
+J;){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,J,O){for(;null!=z&&!(0<=mxUtils.indexOf(J,z.nodeName));){if(z==O)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var J=null;if(window.getSelection){if(J=window.getSelection(),J.getRangeAt&&J.rangeCount){var O=document.createRange();O.selectNode(z);J.removeAllRanges();J.addRange(O)}}else(J=document.selection)&&"Control"!=J.type&&(z=J.createRange(),z.collapse(!0),O=J.createRange(),
+O.setEndPoint("StartToStart",z),O.select())};Graph.prototype.flipEdgePoints=function(z,J,O){var U=this.getCellGeometry(z);if(null!=U){U=U.clone();if(null!=U.points)for(var W=0;W<U.points.length;W++)J?U.points[W].x=O+(O-U.points[W].x):U.points[W].y=O+(O-U.points[W].y);W=function(ea){null!=ea&&(J?ea.x=O+(O-ea.x):ea.y=O+(O-ea.y))};W(U.getTerminalPoint(!0));W(U.getTerminalPoint(!1));this.model.setGeometry(z,U)}};Graph.prototype.flipChildren=function(z,J,O){this.model.beginUpdate();try{for(var U=this.model.getChildCount(z),
+W=0;W<U;W++){var ea=this.model.getChildAt(z,W);if(this.model.isEdge(ea))this.flipEdgePoints(ea,J,O);else{var ka=this.getCellGeometry(ea);null!=ka&&(ka=ka.clone(),J?ka.x=O+(O-ka.x-ka.width):ka.y=O+(O-ka.y-ka.height),this.model.setGeometry(ea,ka))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,J){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var O=[],U=0;U<z.length;U++)if(this.model.isEdge(z[U])){var W=this.view.getState(z[U]);null!=W&&this.flipEdgePoints(z[U],
+J,(J?W.getCenterX():W.getCenterY())/this.view.scale-(J?W.origin.x:W.origin.y)-(J?this.view.translate.x:this.view.translate.y))}else{var ea=this.getCellGeometry(z[U]);null!=ea&&this.flipChildren(z[U],J,J?ea.getCenterX()-ea.x:ea.getCenterY()-ea.y);O.push(z[U])}this.toggleCellStyles(J?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,O)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,J){var O=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var U=0;U<z.length;U++){var W=
+this.model.getParent(z[U]);if(this.isTable(W)){var ea=this.getCellGeometry(z[U]),ka=this.getCellGeometry(W);null!=ea&&null!=ka&&(ka=ka.clone(),ka.height-=ea.height,this.model.setGeometry(W,ka))}}var xa=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,J)}finally{this.model.endUpdate()}if(null!=xa)for(O=[],U=0;U<xa.length;U++)this.model.contains(xa[U])&&(this.model.isVertex(xa[U])||this.model.isEdge(xa[U]))&&O.push(xa[U])}return O};Graph.prototype.insertTableColumn=function(z,
+J){var O=this.getModel();O.beginUpdate();try{var U=z,W=0;if(this.isTableCell(z)){var ea=O.getParent(z);U=O.getParent(ea);W=mxUtils.indexOf(O.getChildCells(ea,!0),z)}else this.isTableRow(z)?U=O.getParent(z):z=O.getChildCells(U,!0)[0],J||(W=O.getChildCells(z,!0).length-1);var ka=O.getChildCells(U,!0),xa=Graph.minTableColumnWidth;for(z=0;z<ka.length;z++){var ta=O.getChildCells(ka[z],!0)[W],pa=O.cloneCell(ta,!1),ua=this.getCellGeometry(pa);pa.value=null;pa.style=mxUtils.setStyle(mxUtils.setStyle(pa.style,
+"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);xa=ua.width;var Da=this.getCellGeometry(ka[z]);null!=Da&&(ua.height=Da.height)}O.add(ka[z],pa,W+(J?0:1))}var Fa=this.getCellGeometry(U);null!=Fa&&(Fa=Fa.clone(),Fa.width+=xa,O.setGeometry(U,Fa))}finally{O.endUpdate()}};Graph.prototype.deleteLane=function(z){var J=this.getModel();J.beginUpdate();try{var O=null;O="stackLayout"==this.getCurrentCellStyle(z).childLayout?
+z:J.getParent(z);var U=J.getChildCells(O,!0);0==U.length?J.remove(O):(O==z&&(z=U[U.length-1]),J.remove(z))}finally{J.endUpdate()}};Graph.prototype.insertLane=function(z,J){var O=this.getModel();O.beginUpdate();try{var U=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){U=z;var W=O.getChildCells(U,!0);z=W[J?0:W.length-1]}else U=O.getParent(z);var ea=U.getIndex(z);z=O.cloneCell(z,!1);z.value=null;O.add(U,z,ea+(J?0:1))}finally{O.endUpdate()}};Graph.prototype.insertTableRow=function(z,J){var O=
+this.getModel();O.beginUpdate();try{var U=z,W=z;if(this.isTableCell(z))W=O.getParent(z),U=O.getParent(W);else if(this.isTableRow(z))U=O.getParent(z);else{var ea=O.getChildCells(U,!0);W=ea[J?0:ea.length-1]}var ka=O.getChildCells(W,!0),xa=U.getIndex(W);W=O.cloneCell(W,!1);W.value=null;var ta=this.getCellGeometry(W);if(null!=ta){for(ea=0;ea<ka.length;ea++){z=O.cloneCell(ka[ea],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var pa=this.getCellGeometry(z);
+null!=pa&&(null!=pa.alternateBounds&&(pa.width=pa.alternateBounds.width,pa.height=pa.alternateBounds.height,pa.alternateBounds=null),pa.height=ta.height);W.insert(z)}O.add(U,W,xa+(J?0:1));var ua=this.getCellGeometry(U);null!=ua&&(ua=ua.clone(),ua.height+=ta.height,O.setGeometry(U,ua))}}finally{O.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var J=this.getModel();J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(U=J.getParent(z));this.isTableRow(U)&&(O=J.getParent(U));var W=J.getChildCells(O,
+!0);if(0==W.length)J.remove(O);else{this.isTableRow(U)||(U=W[0]);var ea=J.getChildCells(U,!0);if(1>=ea.length)J.remove(O);else{var ka=ea.length-1;this.isTableCell(z)&&(ka=mxUtils.indexOf(ea,z));for(U=z=0;U<W.length;U++){var xa=J.getChildCells(W[U],!0)[ka];J.remove(xa);var ta=this.getCellGeometry(xa);null!=ta&&(z=Math.max(z,ta.width))}var pa=this.getCellGeometry(O);null!=pa&&(pa=pa.clone(),pa.width-=z,J.setGeometry(O,pa))}}}finally{J.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var J=this.getModel();
+J.beginUpdate();try{var O=z,U=z;this.isTableCell(z)&&(z=U=J.getParent(z));this.isTableRow(z)&&(O=J.getParent(U));var W=J.getChildCells(O,!0);if(1>=W.length)J.remove(O);else{this.isTableRow(U)||(U=W[W.length-1]);J.remove(U);z=0;var ea=this.getCellGeometry(U);null!=ea&&(z=ea.height);var ka=this.getCellGeometry(O);null!=ka&&(ka=ka.clone(),ka.height-=z,J.setGeometry(O,ka))}}finally{J.endUpdate()}};Graph.prototype.insertRow=function(z,J){for(var O=z.tBodies[0],U=O.rows[0].cells,W=z=0;W<U.length;W++){var ea=
+U[W].getAttribute("colspan");z+=null!=ea?parseInt(ea):1}J=O.insertRow(J);for(W=0;W<z;W++)mxUtils.br(J.insertCell(-1));return J.cells[0]};Graph.prototype.deleteRow=function(z,J){z.tBodies[0].deleteRow(J)};Graph.prototype.insertColumn=function(z,J){var O=z.tHead;if(null!=O)for(var U=0;U<O.rows.length;U++){var W=document.createElement("th");O.rows[U].appendChild(W);mxUtils.br(W)}z=z.tBodies[0];for(O=0;O<z.rows.length;O++)U=z.rows[O].insertCell(J),mxUtils.br(U);return z.rows[0].cells[0<=J?J:z.rows[0].cells.length-
+1]};Graph.prototype.deleteColumn=function(z,J){if(0<=J){z=z.tBodies[0].rows;for(var O=0;O<z.length;O++)z[O].cells.length>J&&z[O].deleteCell(J)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var J=window.getSelection();if(J.getRangeAt&&J.rangeCount){J=J.getRangeAt(0);J.deleteContents();var O=document.createElement("div");O.innerHTML=z;z=document.createDocumentFragment();for(var U;U=O.firstChild;)lastNode=z.appendChild(U);J.insertNode(z)}}else(J=document.selection)&&"Control"!=
+J.type&&J.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,J){function O(W,ea){W.length>ea&&(W=W.substring(0,Math.round(ea/2))+"..."+W.substring(W.length-Math.round(ea/4)));return W}z=null!=z?z:"javascript:void(0);";if(null==J||0==J.length)J=this.isCustomLink(z)?this.getLinkTitle(z):z;var U=document.createElement("a");U.setAttribute("rel",this.linkRelation);U.setAttribute("href",this.getAbsoluteUrl(z));U.setAttribute("title",O(this.isCustomLink(z)?this.getLinkTitle(z):z,80));
+null!=this.linkTarget&&U.setAttribute("target",this.linkTarget);mxUtils.write(U,O(J,40));this.isCustomLink(z)&&mxEvent.addListener(U,"click",mxUtils.bind(this,function(W){this.customLinkClicked(z);mxEvent.consume(W)}));return U};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ea,ka){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=
+function(ea){ea=z.apply(this,arguments);if(mxEvent.isTouchEvent(ea.getEvent())&&null==ea.getState()){var ka=this.getCellAt(ea.graphX,ea.graphY);null!=ka&&this.isSwimlane(ka)&&this.hitsSwimlaneContent(ka,ea.graphX,ea.graphY)||(ea.state=this.view.getState(ka),null!=ea.state&&null!=ea.state.shape&&(this.container.style.cursor=ea.state.shape.node.style.cursor))}null==ea.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ea};var J=!1,O=!1,U=!1,W=this.fireMouseEvent;this.fireMouseEvent=
+function(ea,ka,xa){ea==mxEvent.MOUSE_DOWN&&(ka=this.updateMouseEvent(ka),J=this.isCellSelected(ka.getCell()),O=this.isSelectionEmpty(),U=this.popupMenuHandler.isMenuShowing());W.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ea,ka){var xa=mxEvent.isMouseEvent(ka.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ka.getState()||!ka.isSource(ka.getState().control))&&(this.popupMenuHandler.popupTrigger||!U&&!xa&&(O&&null==ka.getCell()&&
+this.isSelectionEmpty()||J&&this.isCellSelected(ka.getCell())));xa=!J||xa?null:mxUtils.bind(this,function(ta){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var pa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ka.getX()+pa.x+1,ka.getY()+pa.y+1,ta,ka.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ea,ka,xa])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==
+z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var J=this.textarea.ownerDocument.defaultView.getSelection(),O=J.getRangeAt(0),
+U="\t";if(null!=z)for(U="";0<z;)U+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(U));O.insertNode(z);O.setStartAfter(z);O.setEndAfter(z);J.removeAllRanges();J.addRange(O)};mxCellEditor.prototype.alignText=function(z,J){var O=null!=J&&mxEvent.isShiftDown(J);if(O||null!=window.getSelection&&null!=window.getSelection().containsNode){var U=!0;this.graph.processElements(this.textarea,function(W){O||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),
+W.style.textAlign=null):U=!1});U&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var J=[],O=0,U=z.rangeCount;O<U;++O)J.push(z.getRangeAt(O));return J}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=
+window.getSelection();sel.removeAllRanges();for(var J=0,O=z.length;J<O;++J)sel.addRange(z[J])}else document.selection&&z.select&&z.select()}catch(U){}};var t=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));t.apply(this,arguments)};var G=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,J){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?
+G.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,J){z=this.graph.getStartEditingCell(z,J);D.apply(this,arguments);var O=this.graph.view.getState(z);this.textarea.className=null!=O&&1==O.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";
+this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);O=this.graph.getModel().getParent(z);var U=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(O)&&null!=U&&U.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var I=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function J(W,ea){ea.originalNode=W;W=W.firstChild;
+for(var ka=ea.firstChild;null!=W&&null!=ka;)J(W,ka),W=W.nextSibling,ka=ka.nextSibling;return ea}function O(W,ea){if(null!=W)if(ea.originalNode!=W)U(W);else for(W=W.firstChild,ea=ea.firstChild;null!=W;){var ka=W.nextSibling;null==ea?U(W):(O(W,ea),ea=ea.nextSibling);W=ka}}function U(W){for(var ea=W.firstChild;null!=ea;){var ka=ea.nextSibling;U(ea);ea=ka}1==W.nodeType&&("BR"===W.nodeName||null!=W.firstChild)||3==W.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(W)).length?(3==W.nodeType&&mxUtils.setTextContent(W,
+mxUtils.getTextContent(W).replace(/\n|\r/g,"")),1==W.nodeType&&(W.removeAttribute("style"),W.removeAttribute("class"),W.removeAttribute("width"),W.removeAttribute("cellpadding"),W.removeAttribute("cellspacing"),W.removeAttribute("border"))):W.parentNode.removeChild(W)}I.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(W){var ea=J(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,
+function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var J=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){xa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
+0<xa.length&&"\n"==xa.charAt(xa.length-1)&&(xa=xa.substring(0,xa.length-1));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"<br/>"):xa,!0);this.textarea.className="mxCellEditor geContentEditable";ta=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);J=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),W=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ea=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ka=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ka.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ka.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration=ka.join(" ");this.textarea.style.fontWeight=W?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=J;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=xa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
+0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var xa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(xa=mxUtils.replaceTrailingNewlines(xa,"<div><br></div>"));xa=this.graph.sanitizeHtml(J?xa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):xa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ta=mxConstants.DEFAULT_FONTSIZE;
+this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ta*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ta)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=xa&&(this.textarea.innerHTML=
+xa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,J){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var O=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=
+60*O;var U=null!=z.text?z.text.margin:null;null==U&&(U=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",G.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,L){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,L);"1"==mxUtils.getValue(z.style,"nl2Br",
-"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(z.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var W=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();W.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,L){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
-this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
-null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(z){var L=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=
-function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){Z.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var V=this.graph.model.getParent(z),U=null!=V?this.graph.getCellGeometry(V):null;if(null!=U&&(O=this.graph.getCellStyle(V),"stackLayout"==O.childLayout)){var ha=parseFloat(mxUtils.getValue(O,
-"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ma=this.graph.getActualStartSize(V);U=U.clone();O?U.height=L.height+ma.y+ma.height+2*ha:U.width=L.width+ma.x+ma.width+2*ha;this.graph.model.setGeometry(V,U)}}};var N=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(wa){O.get(wa)||(O.put(wa,!0),U.push(wa))}for(var L=N.apply(this,arguments),O=new mxDictionary,V=
-this.graph.model,U=[],ha=0;ha<L.length;ha++){var ma=L[ha];this.graph.isTableCell(ma)?z(V.getParent(V.getParent(ma))):this.graph.isTableRow(ma)&&z(V.getParent(ma));z(ma)}return U};var qa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=qa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var oa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=
-oa.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var S=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return S.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 fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ia=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||ia.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=X.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var L=function(Fa,Ba,Ea){for(var Oa=[],Pa=0;Pa<Fa.length;Pa++){var bb=Fa[Pa];Oa.push(null==bb?null:new mxPoint((sa+bb.x+Ba)*ha,(ya+bb.y+Ea)*ha))}return Oa},O=this,V=this.graph,U=V.model,ha=V.view.scale,ma=this.state,wa=this.selectionBorder,sa=this.state.origin.x+V.view.translate.x,ya=this.state.origin.y+V.view.translate.y;null==z&&(z=[]);var Ha=V.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ha.length){var Qa=U.getChildCells(Ha[0].cell,!0),ua=
-V.getTableLines(this.state.cell,!1,!0),za=V.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ha.length;U++)mxUtils.bind(this,function(Fa){var Ba=Ha[Fa],Ea=Fa<Ha.length-1?Ha[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea.cell):null;var Oa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=za[Fa]?new aa(za[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ea);Ba.tableHandle=!0;var Pa=
-0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(za[Fa],0,Pa),this.shape.updateBoundsFromLine();else{var eb=V.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Pa*ha;this.shape.bounds.x=ma.x+(Fa==Ha.length-1?0:eb.x*ha);this.shape.bounds.width=ma.width-(Fa==Ha.length-
-1?0:eb.width+eb.x+ha)}this.shape.redraw()}};var bb=!1;Ba.setPosition=function(eb,db,ub){Pa=Math.max(Graph.minTableRowHeight-eb.height,db.y-eb.y-eb.height);bb=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&bb&&(Pa=Math.min(Pa,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Pa)V.setTableRowHeight(this.state.cell,Pa,!bb);else if(!O.blockDelayedSelection){var db=V.getCellAt(eb.getGraphX(),eb.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(db,eb)}Pa=0};Ba.reset=function(){Pa=0};
-z.push(Ba)})(U);for(U=0;U<Qa.length;U++)mxUtils.bind(this,function(Fa){var Ba=V.view.getState(Qa[Fa]),Ea=V.getCellGeometry(Qa[Fa]),Oa=null!=Ea.alternateBounds?Ea.alternateBounds:Ea;null==Ba&&(Ba=new mxCellState(V.view,Qa[Fa],V.getCellStyle(Qa[Fa])),Ba.x=ma.x+Ea.x*ha,Ba.y=ma.y+Ea.y*ha,Ba.width=Oa.width*ha,Ba.height=Oa.height*ha,Ba.updateCachedBounds());Ea=Fa<Qa.length-1?Qa[Fa+1]:null;Ea=null!=Ea?V.getCellGeometry(Ea):null;var Pa=null!=Ea&&null!=Ea.alternateBounds?Ea.alternateBounds:Ea;Ea=null!=ua[Fa]?
-new aa(ua[Fa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ea.isDashed=wa.isDashed;Ea.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ea);Ba.tableHandle=!0;var bb=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==bb?mxConstants.NONE:wa.stroke;if(this.shape.constructor==aa)this.shape.line=L(ua[Fa],bb,0),this.shape.updateBoundsFromLine();else{var db=V.getActualStartSize(ma.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+bb)*ha;this.shape.bounds.y=ma.y+(Fa==Qa.length-1?0:db.y*ha);this.shape.bounds.height=ma.height-(Fa==Qa.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(db,ub,fb){bb=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-db.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Pa||eb||(bb=Math.min(bb,Pa.width-Graph.minTableColumnWidth))};Ba.execute=function(db){if(0!=bb)V.setTableColumnWidth(this.state.cell,
-bb,eb);else if(!O.blockDelayedSelection){var ub=V.getCellAt(db.getGraphX(),db.getGraphY())||ma.cell;V.graphHandler.selectCellForEvent(ub,db)}bb=0};Ba.positionChanged=function(){};Ba.reset=function(){bb=0};z.push(Ba)})(U)}}return null!=z?z.reverse():null};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ja.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";
-if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var V=mxUtils.createImage(Editor.rowMoveImage);
-V.style.position="absolute";V.style.cursor="pointer";V.style.width="7px";V.style.height="4px";V.style.padding="4px 2px 4px 2px";V.rowState=O;mxEvent.addGestureListeners(V,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),O.cell,U),mxEvent.consume(U))}));this.moveHandles.push(V);this.graph.container.appendChild(V)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
-0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ca=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var U=this.customHandles[V].shape.bounds,ha=U.getCenterX(),ma=U.getCenterY();if(Math.abs(this.state.x-ha)<U.width/2||Math.abs(this.state.y-ma)<U.height/2||Math.abs(this.state.x+this.state.width-ha)<U.width/2||Math.abs(this.state.y+this.state.height-ma)<U.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=
-2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ca.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var ka=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){ka.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,V=this.graph.view.scale,U=this.roundLength(L.x/V-O.x);O=this.roundLength(L.y/V-O.y);V=this.graph.view.unit;this.hint.innerHTML=e(U,V)+", "+e(O,V);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,J){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(z.cell,J);"1"==mxUtils.getValue(z.style,"nl2Br",
+"1")&&(O=O.replace(/\n/g,"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var J=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return J="1"==mxUtils.getValue(z.style,"nl2Br","1")?J.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):J.replace(/\r\n/g,"").replace(/\n/g,"")};var S=
+mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var T=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,J){this.graph.getModel().beginUpdate();try{T.apply(this,arguments),""==J&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&
+this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,
+null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getBorderColor=function(z){var J=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=J&&J!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(J=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));J==mxConstants.NONE&&(J=null);return J};mxCellEditor.prototype.getMinimumSize=
+function(z){var J=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*J+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,J){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(J.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var J=this.graph.view.translate,O=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/O-J.x);J=this.roundLength((this.bounds.y+this.currentDy)/O-J.y);O=this.graph.view.unit;this.hint.innerHTML=e(z,O)+", "+e(J,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var M=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,J){M.apply(this,arguments);var O=this.graph.getCellStyle(z);if(null==O.childLayout){var U=this.graph.model.getParent(z),W=null!=U?this.graph.getCellGeometry(U):null;if(null!=W&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,
+"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var ka=this.graph.getActualStartSize(U);W=W.clone();O?W.height=J.height+ka.y+ka.height+2*ea:W.width=J.width+ka.x+ka.width+2*ea;this.graph.model.setGeometry(U,W)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(xa){O.get(xa)||(O.put(xa,!0),W.push(xa))}for(var J=fa.apply(this,arguments),O=new mxDictionary,
+U=this.graph.model,W=[],ea=0;ea<J.length;ea++){var ka=J[ea];this.graph.isTableCell(ka)?z(U.getParent(U.getParent(ka))):this.graph.isTableRow(ka)&&z(U.getParent(ka));z(ka)}return W};var la=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var J=la.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};var ra=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var J=
+ra.apply(this,arguments);J.stroke="#C0C0C0";J.strokewidth=1;return J};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,J){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(J.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
+function(z,J){return mxEvent.isControlDown(J.getEvent())||mxEvent.isMetaDown(J.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
+this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var na=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||na.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var N=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return N.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,V=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var z=V.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var J=function(Qa,Ba,Ka){for(var Oa=[],Ya=0;Ya<Qa.length;Ya++){var db=Qa[Ya];Oa.push(null==db?null:new mxPoint((ta+db.x+Ba)*ea,(pa+db.y+Ka)*ea))}return Oa},O=this,U=this.graph,W=U.model,ea=U.view.scale,ka=this.state,xa=this.selectionBorder,ta=this.state.origin.x+U.view.translate.x,pa=this.state.origin.y+U.view.translate.y;null==z&&(z=[]);var ua=U.view.getCellStates(W.getChildCells(this.state.cell,!0));if(0<ua.length){var Da=W.getChildCells(ua[0].cell,!0),Fa=
+U.getTableLines(this.state.cell,!1,!0),Ma=U.getTableLines(this.state.cell,!0,!1);for(W=0;W<ua.length;W++)mxUtils.bind(this,function(Qa){var Ba=ua[Qa],Ka=Qa<ua.length-1?ua[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka.cell):null;var Oa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new aa(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"row-resize",null,Ka);Ba.tableHandle=!0;var Ya=
+0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Ma[Qa],0,Ya),this.shape.updateBoundsFromLine();else{var eb=U.getActualStartSize(ka.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ya*ea;this.shape.bounds.x=ka.x+(Qa==ua.length-1?0:eb.x*ea);this.shape.bounds.width=ka.width-(Qa==ua.length-
+1?0:eb.width+eb.x+ea)}this.shape.redraw()}};var db=!1;Ba.setPosition=function(eb,cb,ub){Ya=Math.max(Graph.minTableRowHeight-eb.height,cb.y-eb.y-eb.height);db=mxEvent.isShiftDown(ub.getEvent());null!=Oa&&db&&(Ya=Math.min(Ya,Oa.height-Graph.minTableRowHeight))};Ba.execute=function(eb){if(0!=Ya)U.setTableRowHeight(this.state.cell,Ya,!db);else if(!O.blockDelayedSelection){var cb=U.getCellAt(eb.getGraphX(),eb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(cb,eb)}Ya=0};Ba.reset=function(){Ya=0};
+z.push(Ba)})(W);for(W=0;W<Da.length;W++)mxUtils.bind(this,function(Qa){var Ba=U.view.getState(Da[Qa]),Ka=U.getCellGeometry(Da[Qa]),Oa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ba&&(Ba=new mxCellState(U.view,Da[Qa],U.getCellStyle(Da[Qa])),Ba.x=ka.x+Ka.x*ea,Ba.y=ka.y+Ka.y*ea,Ba.width=Oa.width*ea,Ba.height=Oa.height*ea,Ba.updateCachedBounds());Ka=Qa<Da.length-1?Da[Qa+1]:null;Ka=null!=Ka?U.getCellGeometry(Ka):null;var Ya=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Fa[Qa]?
+new aa(Fa[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=xa.isDashed;Ka.svgStrokeTolerance++;Ba=new mxHandle(Ba,"col-resize",null,Ka);Ba.tableHandle=!0;var db=0;Ba.shape.node.parentNode.insertBefore(Ba.shape.node,Ba.shape.node.parentNode.firstChild);Ba.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:xa.stroke;if(this.shape.constructor==aa)this.shape.line=J(Fa[Qa],db,0),this.shape.updateBoundsFromLine();else{var cb=U.getActualStartSize(ka.cell,
+!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Oa.width+db)*ea;this.shape.bounds.y=ka.y+(Qa==Da.length-1?0:cb.y*ea);this.shape.bounds.height=ka.height-(Qa==Da.length-1?0:(cb.height+cb.y)*ea)}this.shape.redraw()}};var eb=!1;Ba.setPosition=function(cb,ub,fb){db=Math.max(Graph.minTableColumnWidth-Oa.width,ub.x-cb.x-Oa.width);eb=mxEvent.isShiftDown(fb.getEvent());null==Ya||eb||(db=Math.min(db,Ya.width-Graph.minTableColumnWidth))};Ba.execute=function(cb){if(0!=db)U.setTableColumnWidth(this.state.cell,
+db,eb);else if(!O.blockDelayedSelection){var ub=U.getCellAt(cb.getGraphX(),cb.getGraphY())||ka.cell;U.graphHandler.selectCellForEvent(ub,cb)}db=0};Ba.positionChanged=function(){};Ba.reset=function(){db=0};z.push(Ba)})(W)}}return null!=z?z.reverse():null};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){ha.apply(this,arguments);if(null!=this.moveHandles)for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].style.visibility=z?"":"hidden";
+if(null!=this.cornerHandles)for(J=0;J<this.cornerHandles.length;J++)this.cornerHandles[J].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var J=0;J<this.moveHandles.length;J++)this.moveHandles[J].parentNode.removeChild(this.moveHandles[J]);this.moveHandles=null}this.moveHandles=[];for(J=0;J<z.getChildCount(this.state.cell);J++)mxUtils.bind(this,function(O){if(null!=O&&z.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
+U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),
+this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),O.cell,W),mxEvent.consume(W))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(z.getChildAt(this.state.cell,J)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=
+0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),J=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var W=this.customHandles[U].shape.bounds,ea=W.getCenterX(),ka=W.getCenterY();if(Math.abs(this.state.x-ea)<W.width/2||Math.abs(this.state.y-ka)<W.height/2||Math.abs(this.state.x+this.state.width-ea)<W.width/2||Math.abs(this.state.y+this.state.height-ka)<W.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(J/=
+2,this.graph.isTable(this.state.cell)&&(J+=7),z.x=this.sizers[0].bounds.width+J,z.y=this.sizers[0].bounds.height+J):z=X.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var J=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
+z),J)+" x "+e(this.roundLength(this.bounds.height/z),J)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.display="")};var ia=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,J){ia.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,J){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
+"")};mxEdgeHandler.prototype.updateHint=function(z,J){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,W=this.roundLength(J.x/U-O.x);O=this.roundLength(J.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(W,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(W=this.constraintHandler.currentConstraint.point,
+this.hint.innerHTML="["+Math.round(100*W.x)+"%, "+Math.round(100*W.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),J.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2652,318 +2653,318 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(z,L){E.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,V=null,U=null,ha=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,U=this.first.y,z=(this.currentX-V)/this.graph.view.scale,ha=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(O){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(V,U,this.graph.getDefaultParent(),
-!0,!0);for(O=0;O<ma.length;O++)if(this.graph.isCellMovable(ma[O])){var wa=this.graph.view.getState(ma[O]),sa=this.graph.getCellGeometry(ma[O]);null!=wa&&null!=sa&&(sa=sa.clone(),sa.translate(z,ha),this.graph.model.setGeometry(ma[O],sa))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=L.getX()+O.x;O=L.getY()+O.y;var V=this.first.x-z,U=this.first.y-O,ha=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ha||Math.abs(U)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(L)?(z=this.x+this.width,O=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(J)||mxEvent.isPopupTrigger(J)&&(null==z.getState()||mxEvent.isControlDown(J)||mxEvent.isShiftDown(J))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(z,J){E.apply(this,arguments);mxEvent.isTouchEvent(J.getEvent())&&this.graph.isCellSelected(J.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var J=z.getEvent();return mxEvent.isLeftMouseButton(J)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(J)&&!mxEvent.isShiftDown(J))||this.usePopupTrigger&&mxEvent.isPopupTrigger(J)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,J){if(this.cancelled)this.cancelled=!1,J.consume();else{var O=null!=this.div&&"none"!=this.div.style.display,U=null,W=null,ea=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(U=this.first.x,W=this.first.y,z=(this.currentX-U)/this.graph.view.scale,ea=(this.currentY-W)/this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(z=this.graph.snap(z),ea=this.graph.snap(ea),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ea)<this.graph.tolerance&&(ea=0))));this.reset();if(O){if(this.isSpaceEvent(J)){this.graph.model.beginUpdate();try{var ka=this.graph.getCellsBeyond(U,W,this.graph.getDefaultParent(),
+!0,!0);for(O=0;O<ka.length;O++)if(this.graph.isCellMovable(ka[O])){var xa=this.graph.view.getState(ka[O]),ta=this.graph.getCellGeometry(ka[O]);null!=xa&&null!=ta&&(ta=ta.clone(),ta.translate(z,ea),this.graph.model.setGeometry(ka[O],ta))}}finally{this.graph.model.endUpdate()}}else ka=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ka,J.getEvent());J.consume()}}};mxRubberband.prototype.mouseMove=function(z,J){if(!J.isConsumed()&&null!=this.first){var O=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);O.x-=z.x;O.y-=z.y;z=J.getX()+O.x;O=J.getY()+O.y;var U=this.first.x-z,W=this.first.y-O,ea=this.graph.tolerance;if(null!=this.div||Math.abs(U)>ea||Math.abs(W)>ea)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,O),this.isSpaceEvent(J)?(z=this.x+this.width,O=this.y+this.height,U=this.graph.view.scale,mxEvent.isAltDown(J.getEvent())||(this.width=this.graph.snap(this.width/U)*U,this.height=this.graph.snap(this.height/U)*U,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=O-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
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)),L.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,ba=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,O,V){ba.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
-R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,O){L=null!=z&&0==z;var V=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,V,L):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=V?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
-new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ra=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,O){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return ra.apply(this,arguments)};var ta=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),O=L.getParent(z[0]),V=this.graph.getCellGeometry(z[0]);if(L.isEdge(O)&&null!=V&&V.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return ta.apply(this,arguments)};var la=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=la.apply(this,arguments),L=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&L.push(z[O]);return L};var pa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),O=L.getParent(z.cell),V=this.graph.getCellGeometry(z.cell);return L.isEdge(O)&&null!=V&&V.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):pa.apply(this,arguments)};var xa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var O=this.graph.getModel(),V=O.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!O.isEdge(V)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&xa.apply(this,arguments)};
-mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ca.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 Ia=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Ia.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 Aa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Aa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var V=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(U,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));V()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-L=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(L,O);if(null!=L||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),J.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var Y=(new Date).getTime(),R=0,Z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,J,O,U){Z.apply(this,arguments);O!=this.currentTerminalState?(Y=(new Date).getTime(),
+R=0):R=(new Date).getTime()-Y;this.currentTerminalState=O};var da=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&da.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,J,O){J=null!=z&&0==z;var U=this.state.getVisibleTerminalState(J);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,U,J):null;O=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(J),z):null)?O?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=U?O?this.endTerminalHandleImage:this.terminalHandleImage:O?this.endHandleImage:this.handleImage;if(null!=O)return O=
+new mxImageShape(new mxRectangle(0,0,O.width,O.height),O.src),O.preserveImageAspect=!1,O;O=mxConstants.HANDLE_SIZE;this.preferHtml&&--O;return new mxRectangleShape(new mxRectangle(0,0,O,O),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var qa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,J,O){this.handleImage=J==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:J==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var J=this.graph.getModel(),O=J.getParent(z[0]),U=this.graph.getCellGeometry(z[0]);if(J.isEdge(O)&&null!=U&&U.relative&&(J=this.graph.view.getState(z[0]),null!=J&&2>J.width&&2>J.height&&null!=J.text&&null!=J.text.boundingBox))return mxRectangle.fromRectangle(J.text.boundingBox)}return va.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=ja.apply(this,arguments),J=[],O=0;O<z.length;O++)"1"!=mxUtils.getValue(z[O].style,"part","0")&&J.push(z[O]);return J};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var J=this.graph.getModel(),O=J.getParent(z.cell),U=this.graph.getCellGeometry(z.cell);return J.isEdge(O)&&null!=U&&U.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(J=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(J.x),Math.round(J.y),Math.round(J.width),Math.round(J.height))):sa.apply(this,arguments)};var ya=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,J){var O=this.graph.getModel(),U=O.getParent(this.state.cell),W=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(J)==mxEvent.ROTATION_HANDLE||!O.isEdge(U)||null==W||!W.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ya.apply(this,arguments)};
+mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),J=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&J==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,J){Aa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,J){Ea.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var J=0;4>J;J++){var O=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);O.dialect=mxConstants.DIALECT_SVG;O.init(this.graph.view.getOverlayPane());this.cornerHandles.push(O)}}var U=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(W,ea){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));U()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(W,ea){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+J=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(J,O);if(null!=J||null!=O&&0<O.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,J){try{if(null==z&&(null==J||0==J.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=J&&0<J.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var O=document.createElement("img");O.className="geAdaptiveAsset";O.setAttribute("src",Editor.editImage);
-O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var V=O.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-V.style.marginLeft="4px";this.linkHint.appendChild(V);mxEvent.addListener(V,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(O=0;O<L.length;O++){var U=document.createElement("div");U.style.marginTop=null!=z||0<O?"6px":"0px";U.appendChild(this.graph.createLinkForHint(L[O].getAttribute("href"),mxUtils.getTextContent(L[O])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(V,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=L||null!=O&&0<O.length)this.updateLinkHint(L,
-O),this.redrawHandles()};var Da=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,O=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-O+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-2*z;L[2].redraw();L[3].bounds.x=
-L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=L&&(O=Math.max(O,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+O.setAttribute("title",mxResources.get("editLink"));O.setAttribute("width","11");O.setAttribute("height","11");O.style.marginLeft="10px";O.style.marginBottom="-1px";O.style.cursor="pointer";this.linkHint.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(ea){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ea)}));var U=O.cloneNode(!0);U.setAttribute("src",Editor.trashImage);U.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+U.style.marginLeft="4px";this.linkHint.appendChild(U);mxEvent.addListener(U,"click",mxUtils.bind(this,function(ea){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ea)}))}if(null!=J)for(O=0;O<J.length;O++){var W=document.createElement("div");W.style.marginTop=null!=z||0<O?"6px":"0px";W.appendChild(this.graph.createLinkForHint(J[O].getAttribute("href"),mxUtils.getTextContent(J[O])));this.linkHint.appendChild(W)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ea){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var Ia=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ia.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var J=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);if(null!=J||null!=O&&0<O.length)this.updateLinkHint(J,
+O),this.redrawHandles()};var Ca=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Sa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-
+5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var J=this.cornerHandles,O=J[0].bounds.height/2;J[0].bounds.x=this.state.x-J[0].bounds.width/2+z;J[0].bounds.y=this.state.y-O+z;J[0].redraw();J[1].bounds.x=J[0].bounds.x+this.state.width-2*z;J[1].bounds.y=J[0].bounds.y;J[1].redraw();J[2].bounds.x=J[0].bounds.x;J[2].bounds.y=this.state.y+this.state.height-2*z;J[2].redraw();J[3].bounds.x=
+J[1].bounds.x;J[3].bounds.y=J[2].bounds.y;J[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Sa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+J=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),O=mxUtils.getBoundingBox(J,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=O?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,J=null!=this.state.text?this.state.text.boundingBox:null,null==O&&(O=this.state),O=O.y+O.height,null!=J&&(O=Math.max(O,J.y+J.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(O+this.verticalOffset/2+Editor.hintOffset)+"px")};var Pa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Pa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ta=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ta.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Za=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
-function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function u(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function J(){mxActor.call(this)}function D(){mxActor.call(this)}function G(){mxActor.call(this)}function W(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function qa(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,qa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,qa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,qa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,qa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,qa.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,qa.prototype.arcTo)}function oa(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ia(){mxActor.call(this)}function M(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ja(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function ka(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxShape.call(this)}function ta(){mxShape.call(this)}function la(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function xa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ia(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Da(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function V(){mxActor.call(this)}function U(){mxActor.call(this)}function ha(){mxActor.call(this)}function ma(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function sa(){mxEllipse.call(this)}
-function ya(){mxRhombus.call(this)}function Ha(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Fa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ea(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Pa(){mxConnector.call(this)}
-function bb(c,l,v,n,t,A,B,da,I,va){B+=I;var na=n.clone();n.x-=t*(2*B+I);n.y-=A*(2*B+I);t*=B+I;A*=B+I;return function(){c.ellipse(na.x-t-B,na.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var t=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==t?c.moveTo(B.x+v,B.y+n):null!=t&&c.lineTo(B.x+v,B.y+n));t=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var t=this.line[n];null!=t&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
-v,t));v=t}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,t){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?ua.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&da<t||!B&&da<n)||this.paintForeground(c,l,v,n,t)};e.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=A;A=B;B=da}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+t/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,l,v,n,t)}};e.prototype.paintTableForeground=function(c,l,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(A,t);c.lineTo(0,t-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=da&&(c.setFillAlpha(Math.abs(da)),c.setFillColor(0>da?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,t),c.lineTo(0,t-A),c.close(),c.fill()),c.begin(),c.moveTo(A,t),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),db=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
-mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,t){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(t-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/eb);c.translate((n-l)/2,(t-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(n,t/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((n-l)/2,(t-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,l,v,n,t,A){l=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,t-l),c.curveTo(n,t+l/3,0,t+l/3,0,t-l),c.close())};K.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",K);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*t);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,t-A);c.lineTo(.5*n,t);c.lineTo(0,t-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
-15;x.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,t-A),c.arcTo(.5*n,A,0,0,1,.5*n,t),c.arcTo(.5*n,A,0,0,1,0,t-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(u,mxCylinder);u.prototype.tabWidth=60;u.prototype.tabHeight=20;u.prototype.tabPosition="right";u.prototype.arcSize=.1;
-u.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),I=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(I*=Math.min(n,t));
-I=Math.min(I,.5*n,.5*(t-v));l=Math.max(l,I);l=Math.min(n-I,l);B||(I=0);c.begin();"left"==A?(c.moveTo(Math.max(I,0),v),c.lineTo(Math.max(I,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(I,0),0),c.lineTo(n-Math.max(I,0),v));B?(c.moveTo(0,I+v),c.arcTo(I,I,0,0,1,I,v),c.lineTo(n-I,v),c.arcTo(I,I,0,0,1,n,I+v),c.lineTo(n,t-I),c.arcTo(I,I,0,0,1,n-I,t),c.lineTo(I,t),c.arcTo(I,I,0,0,1,0,t-I)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,t));l=Math.min(l,.5*n,.5*t);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,t-l);c.arcTo(l,l,0,0,1,n-l,t);c.lineTo(A+l,t);c.arcTo(l,l,0,0,1,A,t-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",H);mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=
-function(c,l,v,n,t){l=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",J);mxUtils.extend(D,mxActor);D.prototype.size=.4;D.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};D.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",D);mxUtils.extend(G,mxActor);G.prototype.size=.3;G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};G.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,t-l/2);c.quadTo(3*n/4,t-1.4*l,n/2,t-l/2);c.quadTo(n/4,t-l*(1-1.4),0,t-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",G);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(W,mxActor);W.prototype.size=.2;W.prototype.fixedSize=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",W);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,l,v,n,t){c.setFillColor(null);
-l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,t/2),new mxPoint(0,t/2),new mxPoint(l,t/2),new mxPoint(l,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,l,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=n/5;c.rect(0,0,l,t);c.fillAndStroke();c.rect(2*l,0,l,t);c.fillAndStroke();c.rect(4*l,0,l,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",N);qa.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};qa.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)};
-qa.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};qa.prototype.curveTo=function(c,l,v,n,t,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=A};qa.prototype.arcTo=function(c,l,v,n,t,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};qa.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},
-n=Math.abs(c-this.lastX),t=Math.abs(l-this.lastY),A=Math.sqrt(n*n+t*t);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),da=this.defaultVariation;5>B&&(B=5,da/=3);var I=v(c-this.lastX)*n/B;v=v(l-this.lastY)*t/B;n/=A;t/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*da;this.originalLineTo.call(this.canvas,I*A+this.lastX-va*t,v*A+this.lastY-va*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};qa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new qa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=qa)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
-"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(t/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
-A,t*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+t-A),c.quadTo(l+n,v+t,l+n-A,v+t),c.lineTo(l+A,v+t),c.quadTo(l,v+t,l,v+t-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+t),c.lineTo(l,v+t),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=.1;oa.prototype.fixedSize=!1;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-oa.prototype.paintForeground=function(c,l,v,n,t){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,t*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",oa);mxCellRenderer.registerShape("process2",oa);mxUtils.extend(S,mxRectangleShape);S.prototype.paintBackground=function(c,l,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,t);c.fill()};S.prototype.paintForeground=function(c,l,v,n,t){};mxCellRenderer.registerShape("transparent",S);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,l,v,n,t){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),da=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,A+da),t-v),new mxPoint(B,t),new mxPoint(Math.max(0,A),t-v),new mxPoint(0,t-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,
-l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(0,t),new mxPoint(l,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-ia);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*t),new mxPoint(n-l,t),new mxPoint(l,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,t){var A=Math.min(n/5,t/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+t-A);c.moveTo(l+A,v+t/2);c.lineTo(l+n-A,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,t){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,t]))}};mxUtils.extend(X,mxRectangleShape);X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};X.prototype.paintForeground=function(c,l,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;t-=2*A;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var da=this.style["symbol"+A+"Align"],I=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],Ya=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-Ya,cb=this.style["symbol"+A+"ArcSpacing"];null!=cb&&(cb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Ya+=cb,jb+=cb);cb=l;var Ga=v;cb=da==mxConstants.ALIGN_CENTER?cb+(n-va)/2:da==mxConstants.ALIGN_RIGHT?cb+(n-va-Ya):cb+Ya;Ga=I==mxConstants.ALIGN_MIDDLE?Ga+(t-na)/2:I==mxConstants.ALIGN_BOTTOM?Ga+(t-na-jb):Ga+jb;c.save();da=new B;da.style=this.style;B.prototype.paintVertexShape.call(da,c,cb,Ga,va,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",X);mxUtils.extend(ja,mxCylinder);ja.prototype.redrawPath=function(c,l,v,n,t,A){A?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ja);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);
-c.moveTo(n/2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};
-mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+t);c.lineTo(l+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",
-E);mxUtils.extend(Q,mxShape);Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);
-Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,l,v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+t),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,t){var A=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(t,
-A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,t){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),da=Math.min(t,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),I=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);I!=mxConstants.NONE&&(c.setFillColor(I),c.rect(l,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,t),c.setGradient(this.fill,this.gradient,l,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,da-1.5*A));c.lineTo(l+Math.max(0,B-A),v+da);c.lineTo(l,v+da);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+t);c.lineTo(l,v+t);c.lineTo(l,v+da);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+this.changeHandler=null)}}();(function(){function b(c,l,v){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function g(){mxShape.call(this)}
+function x(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1}function y(){mxActor.call(this)}function t(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function D(){mxActor.call(this)}function I(){mxActor.call(this)}function H(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function fa(){mxActor.call(this)}function la(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,la.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,la.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,la.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,la.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,la.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,la.prototype.arcTo)}function ra(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function na(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function ha(){mxCylinder.call(this)}function X(){mxShape.call(this)}function ia(){mxShape.call(this)}function q(){mxEllipse.call(this)}function E(){mxShape.call(this)}
+function Q(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function Z(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxShape.call(this)}function ja(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);this.spacing=0}function Ia(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxActor.call(this)}function Sa(){mxRectangleShape.call(this)}function Pa(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Za(){mxActor.call(this)}function Na(){mxActor.call(this)}function z(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}
+function pa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Ba(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Oa(c,l,v,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ya(){mxConnector.call(this)}
+function db(c,l,v,n,u,A,B,ca,K,wa){B+=K;var ma=n.clone();n.x-=u*(2*B+K);n.y-=A*(2*B+K);u*=B+K;A*=B+K;return function(){c.ellipse(ma.x-u-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var v=this.line[l];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,l,v,n,u){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,v,n){if(null!=l){var u=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==u?c.moveTo(B.x+v,B.y+n):null!=u&&c.lineTo(B.x+v,B.y+n));u=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!l;n++){var u=this.line[n];null!=u&&null!=v&&(l=mxUtils.rectangleIntersectsSegment(c,
+v,u));v=u}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,v,n,u){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ca=this.getTitleSize();0==ca||this.outline?Fa.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-v));A||this.outline||!(B&&ca<u||!B&&ca<n)||this.paintForeground(c,l,v,n,u)};e.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ca=A;A=B;B=ca}c.rotate(-this.getShapeRotation(),A,B,l+n/2,v+u/2);s=this.scale;l=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;u=this.bounds.height/
+s;this.paintTableForeground(c,l,v,n,u)}};e.prototype.paintTableForeground=function(c,l,v,n,u){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(u=0;u<n.length;u++)b.prototype.paintTableLine(c,n[u],l,v)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ca=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(A,u);c.lineTo(0,u-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-A,0),c.lineTo(n,A),c.lineTo(A,A),c.close(),c.fill()),0!=ca&&(c.setFillAlpha(Math.abs(ca)),c.setFillColor(0>ca?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
+A),c.lineTo(A,u),c.lineTo(0,u-A),c.close(),c.fill()),c.begin(),c.moveTo(A,u),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(n,A),c.end(),c.stroke())};m.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",m);var eb=Math.tan(mxUtils.toRadians(30)),cb=(.5-eb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
+mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,l,v,n,u){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-A),v+.5*(u-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/eb);c.translate((n-l)/2,(u-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*cb);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-cb)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(n,u/(.5+eb));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-cb)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-cb)*l),c.lineTo(.5*l,(1-cb)*l)):(c.translate((n-l)/2,(u-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*cb),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-cb)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,l,v,n,u,A){l=Math.min(u/2,Math.round(u/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),A||(c.stroke(),c.begin()),c.translate(0,
+-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,u-l),c.curveTo(n,u+l/3,0,u+l/3,0,u-l),c.close())};L.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",L);mxUtils.extend(P,mxCylinder);P.prototype.size=30;P.prototype.darkOpacity=0;P.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,v);c.begin();c.moveTo(0,0);c.lineTo(n-A,0);c.lineTo(n,A);c.lineTo(n,u);c.lineTo(0,u);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),c.close(),c.fill()),c.begin(),c.moveTo(n-A,0),c.lineTo(n-A,A),c.lineTo(n,A),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",P);mxUtils.extend(d,P);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(n*Math.tan(A),.5*u);c.translate(l,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,A);c.lineTo(n,u-A);c.lineTo(.5*n,u);c.lineTo(0,u-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*n,2*A);c.lineTo(n,A);c.moveTo(.5*n,2*A);c.lineTo(.5*n,u);c.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(g,mxShape);g.prototype.size=15;g.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*
+u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",g);mxUtils.extend(x,mxCylinder);x.prototype.size=
+15;x.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,v);0==A?(c.rect(0,0,n,u),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*n,A,0,0,1,.5*n,0),c.arcTo(.5*n,A,0,0,1,n,A)):(c.moveTo(0,0),c.arcTo(.5*n,A,0,0,0,.5*n,A),c.arcTo(.5*n,A,0,0,0,n,0)),c.lineTo(n,u-A),c.arcTo(.5*n,A,0,0,1,.5*n,u),c.arcTo(.5*n,A,0,0,1,0,u-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
+B&&(c.begin(),c.moveTo(n,A),c.arcTo(.5*n,A,0,0,1,.5*n,2*A),c.arcTo(.5*n,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",x);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n/2,.5*u,n,0);c.quadTo(.5*n,u/2,n,u);c.quadTo(n/2,.5*u,0,u);c.quadTo(.5*n,u/2,0,0);c.end()};mxCellRenderer.registerShape("switch",y);mxUtils.extend(t,mxCylinder);t.prototype.tabWidth=60;t.prototype.tabHeight=20;t.prototype.tabPosition="right";t.prototype.arcSize=.1;
+t.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ca=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ca||(K*=Math.min(n,u));
+K=Math.min(K,.5*n,.5*(u-v));l=Math.max(l,K);l=Math.min(n-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),v),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,v)):(c.moveTo(n-l,v),c.lineTo(n-l,0),c.lineTo(n-Math.max(K,0),0),c.lineTo(n-Math.max(K,0),v));B?(c.moveTo(0,K+v),c.arcTo(K,K,0,0,1,K,v),c.lineTo(n-K,v),c.arcTo(K,K,0,0,1,n,K+v),c.lineTo(n,u-K),c.arcTo(K,K,0,0,1,n-K,u),c.lineTo(K,u),c.arcTo(K,K,0,0,1,0,u-K)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,u),c.lineTo(0,u));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",t);t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-
+l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(n,u));l=Math.min(l,.5*n,.5*u);A||(l=0);A=0;null!=v&&(A=10);c.begin();c.moveTo(A,
+l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,u-l);c.arcTo(l,l,0,0,1,n-l,u);c.lineTo(A+l,u);c.arcTo(l,l,0,0,1,A,u-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,u-20,10,10,3,3),c.stroke(),c.roundrect(n-20,u-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,u-15),c.lineTo(n-20,u-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+v&&(c.ellipse(0,.5*u-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*u-5),c.lineTo(15,.5*u+5),c.moveTo(15,.5*u-5),c.lineTo(5,.5*u+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
+function(c,l,v,n,u){l=Math.max(0,Math.min(n,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(I,mxActor);I.prototype.size=.4;I.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};I.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+n,new mxRectangle(c.x,c.y+l,v,n-2*l);l*=v;return new mxRectangle(c.x+l,c.y,v-2*l,n)}return c};mxCellRenderer.registerShape("tape",I);mxUtils.extend(H,mxActor);H.prototype.size=.3;H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};H.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,u-l/2);c.quadTo(3*n/4,u-1.4*l,n/2,u-l/2);c.quadTo(n/4,u-l*(1-1.4),0,u-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",H);var ub=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,v,n){var u=mxUtils.getValue(this.style,"size");return null!=u?n*Math.max(0,Math.min(1,u)):ub.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};x.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};t.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),u=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));n||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-v),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",S);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",T);mxUtils.extend(M,mxActor);M.prototype.size=.5;M.prototype.redrawPath=function(c,l,v,n,u){c.setFillColor(null);
+l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,u/2),new mxPoint(0,u/2),new mxPoint(l,u/2),new mxPoint(l,u),new mxPoint(n,u)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",M);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(c,l,v,n,u){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=n/5;c.rect(0,0,l,u);c.fillAndStroke();c.rect(2*l,0,l,u);c.fillAndStroke();c.rect(4*l,0,l,u);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);la.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};la.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
+la.prototype.quadTo=function(c,l,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};la.prototype.curveTo=function(c,l,v,n,u,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=A};la.prototype.arcTo=function(c,l,v,n,u,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};la.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),u=Math.abs(l-this.lastY),A=Math.sqrt(n*n+u*u);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ca=this.defaultVariation;5>B&&(B=5,ca/=3);var K=v(c-this.lastX)*n/B;v=v(l-this.lastY)*u/B;n/=A;u/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ca;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*u,v*A+this.lastY-wa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};la.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new la(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var lb=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&lb.apply(this,arguments)};var $a=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,v,n,u){if(null==c.handJiggle||c.handJiggle.constructor!=la)$a.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(n/2,Math.min(u/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(n*
+A,u*A)),c.moveTo(l+A,v),c.lineTo(l+n-A,v),c.quadTo(l+n,v,l+n,v+A),c.lineTo(l+n,v+u-A),c.quadTo(l+n,v+u,l+n-A,v+u),c.lineTo(l+A,v+u),c.quadTo(l,v+u,l,v+u-A),c.lineTo(l,v+A),c.quadTo(l,v,l+A,v)):(c.moveTo(l,v),c.lineTo(l+n,v),c.lineTo(l+n,v+u),c.lineTo(l,v+u),c.lineTo(l,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=.1;ra.prototype.fixedSize=!1;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,v=c.height;c=new mxRectangle(c.x,c.y,l,v);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*u,v*u))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ra.prototype.paintForeground=function(c,l,v,n,u){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(n,B)):n*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(n*A,u*A)));B=Math.round(B);c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.moveTo(l+n-B,v);c.lineTo(l+n-B,v+u);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ra);mxCellRenderer.registerShape("process2",ra);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,l,v,n,u){c.setFillColor(mxConstants.NONE);c.rect(l,v,n,u);c.fill()};ba.prototype.paintForeground=function(c,l,v,n,u){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,v,n,u){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ca=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u-v),new mxPoint(Math.min(n,A+ca),u-v),new mxPoint(B,u),new mxPoint(Math.max(0,A),u-v),new mxPoint(0,u-v)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,
+l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(0,u),new mxPoint(l,u/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
+na);mxUtils.extend(N,mxHexagon);N.prototype.size=.25;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(n-l,0),new mxPoint(n,.5*u),new mxPoint(n-l,u),new mxPoint(l,u),new mxPoint(0,.5*u)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",N);mxUtils.extend(aa,mxRectangleShape);aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(c,l,v,n,u){var A=Math.min(n/5,u/5)+1;c.begin();c.moveTo(l+n/2,v+A);c.lineTo(l+n/2,v+u-A);c.moveTo(l+A,v+u/2);c.lineTo(l+n-A,v+u/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",aa);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,v,n,u){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&(c.setShadow(!1),ab.apply(this,[c,l,v,n,u]))}};mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};V.prototype.paintForeground=function(c,l,v,n,u){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;v+=A;n-=2*A;u-=2*A;0<n&&0<u&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ca=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+Xa,bb=this.style["symbol"+A+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,u+this.strokewidth),Xa+=bb,jb+=bb);bb=l;var Ga=v;bb=ca==mxConstants.ALIGN_CENTER?bb+(n-wa)/2:ca==mxConstants.ALIGN_RIGHT?bb+(n-wa-Xa):bb+Xa;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(u-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(u-ma-jb):Ga+jb;c.save();ca=new B;ca.style=this.style;B.prototype.paintVertexShape.call(ca,c,bb,Ga,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",V);mxUtils.extend(ha,mxCylinder);ha.prototype.redrawPath=function(c,l,v,n,u,A){A?(c.moveTo(0,0),c.lineTo(n/2,u/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(0,u),c.close())};mxCellRenderer.registerShape("message",ha);mxUtils.extend(X,mxShape);X.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.ellipse(n/4,0,n/2,u/4);c.fillAndStroke();c.begin();c.moveTo(n/2,u/4);c.lineTo(n/2,2*u/3);c.moveTo(n/2,u/3);c.lineTo(0,u/3);c.moveTo(n/
+2,u/3);c.lineTo(n,u/3);c.moveTo(n/2,2*u/3);c.lineTo(0,u);c.moveTo(n/2,2*u/3);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",X);mxUtils.extend(ia,mxShape);ia.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ia.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,u/4);c.lineTo(0,3*u/4);c.end();c.stroke();c.begin();c.moveTo(0,u/2);c.lineTo(n/6,u/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,u);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ia);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,v+u);c.lineTo(l+7*n/8,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(E,mxShape);E.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(n,0);c.lineTo(0,u);c.moveTo(0,0);c.lineTo(n,u);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",E);mxUtils.extend(Q,mxShape);
+Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,u/8,n,7*u/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,v,n,u){c.begin();c.moveTo(3*n/8,u/8*1.1);c.lineTo(5*n/8,u/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=
+40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};Y.prototype.paintBackground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+v,n,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=Y&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,v,n,A),c.restore()));A<u&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,v+A),c.lineTo(l+n/2,v+u),c.end(),c.stroke())};Y.prototype.paintForeground=function(c,l,v,n,u){var A=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,v,n,Math.min(u,
+A))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,v,n,u){var A=this.corner,B=Math.min(n,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ca=Math.min(u,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,v,n,u),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,v,n,u),c.setGradient(this.fill,this.gradient,l,v,n,u,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,v);c.lineTo(l+B,v);c.lineTo(l+B,v+Math.max(0,ca-1.5*A));c.lineTo(l+Math.max(0,B-A),v+ca);c.lineTo(l,v+ca);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+n,v);c.lineTo(l+n,v+u);c.lineTo(l,v+u);c.lineTo(l,v+ca);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,v,n){n=Y.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;v.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,v,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",fa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?W.prototype.fixedSize:W.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da+t),new mxPoint(B+
-I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]):(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var t="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=t?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=c.x,da=c.y,I=c.width,va=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va),new mxPoint(B+
-t,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I,da),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(B+I,da),new mxPoint(B+I,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+
-I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);n&&(v.x<B||v.x>B+I?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(da,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B,da+va),new mxPoint(B+t,c),new mxPoint(B,da)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,Math.min(1,
-A)),da=[new mxPoint(B+t,da),new mxPoint(B+I,da),new mxPoint(B+I-t,c),new mxPoint(B+I,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da+t),new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va),new mxPoint(na,da+va-t),new mxPoint(B,da+va),new mxPoint(B,da+t)]):(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(B,da),new mxPoint(na,da+
-t),new mxPoint(B+I,da),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=t?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));t&&(A*=l.view.scale);var B=
-c.x,da=c.y,I=c.width,va=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),da=[new mxPoint(na,da),new mxPoint(B+I,da+t),new mxPoint(B+I,da+va-t),new mxPoint(na,da+va),new mxPoint(B,da+va-t),new mxPoint(B,da+t),new mxPoint(na,da)]):(t=t?Math.max(0,Math.min(I,A)):I*Math.max(0,
-Math.min(1,A)),da=[new mxPoint(B+t,da),new mxPoint(B+I-t,da),new mxPoint(B+I,c),new mxPoint(B+I-t,da+va),new mxPoint(B+t,da+va),new mxPoint(B,c),new mxPoint(B+t,da)]);na=new mxPoint(na,c);n&&(v.x<B||v.x>B+I?na.y=v.y:na.x=v.x);return mxUtils.getPerimeterPoint(da,na,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ba,mxShape);ba.prototype.size=10;ba.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ba);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,t);c.end();c.stroke();
-c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(ra,mxShape);ra.prototype.paintBackground=function(c,l,v,n,t){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ra);mxUtils.extend(ta,mxShape);ta.prototype.inset=2;ta.prototype.paintBackground=function(c,l,v,n,t){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,t-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ta);mxUtils.extend(la,mxCylinder);la.prototype.jettyWidth=20;la.prototype.jettyHeight=10;la.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=B/2;B=v+B/2;var da=Math.min(l,t-l),I=Math.min(da+2*l,t-l);A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("module",la);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=
-32;pa.prototype.jettyHeight=12;pa.prototype.redrawPath=function(c,l,v,n,t,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var da=.3*t-l/2,I=.7*t-l/2;A?(c.moveTo(v,da),c.lineTo(B,da),c.lineTo(B,da+l),c.lineTo(v,da+l),c.moveTo(v,I),c.lineTo(B,I),c.lineTo(B,I+l),c.lineTo(v,I+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(v,
-I),c.lineTo(v,da+l),c.lineTo(0,da+l),c.lineTo(0,da),c.lineTo(v,da),c.close());c.end()};mxCellRenderer.registerShape("component",pa);mxUtils.extend(xa,mxRectangleShape);xa.prototype.paintForeground=function(c,l,v,n,t){var A=n/2,B=t/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+t),new mxPoint(l,v+B)],this.isRounded,da,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",xa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,v,n,t){var A=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(l+A,v+A,n-2*A,t-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ia,Ca);Ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ia);mxUtils.extend(Aa,mxArrowConnector);
-Aa.prototype.defaultWidth=4;Aa.prototype.isOpenEnded=function(){return!0};Aa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Aa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Aa);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Da,mxActor);Da.prototype.size=30;Da.prototype.isRoundable=function(){return!0};Da.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Da);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,t*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
-mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
-new mxPoint(l,t),new mxPoint(0,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,t){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,t),new mxPoint((n-l)/2,t),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
-mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-
-l,t),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,t){var A=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(t-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,t/2),new mxPoint(n-l,t),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,t)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,v,n,t){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,t/2,n,t);c.lineTo(l,t);c.quadTo(l-2*l,t/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(c,
-l,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",V);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
-.8*l),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,v,n,t){l=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
-t-l),new mxPoint(n/2,t),new mxPoint(0,t-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+t);c.lineTo(l+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ma);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*t);c.lineTo(l+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*t);c.lineTo(l+.145*n,
-v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",sa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+t/2);c.lineTo(l+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ha,mxEllipse);Ha.prototype.paintVertexShape=function(c,l,v,n,t){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,v+t);c.lineTo(l+n,v+t);c.lineTo(l+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ha);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,v,n,t){var A=c.state.strokeWidth/2,B=10+2*A,da=v+t-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+t);c.moveTo(l+A,da);c.lineTo(l+A+B,da-B/2);c.moveTo(l+A,da);c.lineTo(l+A+B,da+B/2);c.moveTo(l+A,da);c.lineTo(l+n-A,da);c.moveTo(l+n,v);c.lineTo(l+n,v+t);c.moveTo(l+n-A,da);c.lineTo(l+n-B-A,da-B/2);c.moveTo(l+
-n-A,da);c.lineTo(l+n-B-A,da+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Qa);mxUtils.extend(ua,mxEllipse);ua.prototype.drawHidden=!0;ua.prototype.paintVertexShape=function(c,l,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),I="1"==mxUtils.getValue(this.style,
-"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||da||va||na||I?(c.rect(l,v,n,t),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||da?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||va?c.lineTo(l+n,v+t):c.moveTo(l+n,v+t),this.outline||na?c.lineTo(l,v+t):c.moveTo(l,v+t),(this.outline||I)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",ua);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,l,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+t)):(c.moveTo(l,v+t/2),c.lineTo(l+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Fa,mxActor);Fa.prototype.redrawPath=function(c,
-l,v,n,t){l=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Fa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(t,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(t-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
-c.lineTo(A,v);c.lineTo(A,t);c.lineTo(B,t);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ea,mxActor);Ea.prototype.size=.25;Ea.prototype.redrawPath=function(c,l,v,n,t){l=Math.min(n,t/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-l,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ea);mxUtils.extend(Oa,
+c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",oa.prototype.size))*l.view.scale))),l.style),l,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?S.prototype.fixedSize:S.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca+u),new mxPoint(B+
+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]):(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,v,n){var u="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=u?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=c.x,ca=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+
+u,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+
+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);n&&(v.x<B||v.x>B+K?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ca,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?na.prototype.fixedSize:na.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B,ca+wa),new mxPoint(B+u,c),new mxPoint(B,ca)]):l==mxConstants.DIRECTION_WEST?(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K,ca),new mxPoint(B+K-u,c),new mxPoint(B+K,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]):l==mxConstants.DIRECTION_NORTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca+u),new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa),new mxPoint(ma,ca+wa-u),new mxPoint(B,ca+wa),new mxPoint(B,ca+u)]):(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(B,ca),new mxPoint(ma,ca+
+u),new mxPoint(B+K,ca),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,v,n){var u="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=u?N.prototype.fixedSize:N.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));u&&(A*=l.view.scale);var B=
+c.x,ca=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(u=u?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ca=[new mxPoint(ma,ca),new mxPoint(B+K,ca+u),new mxPoint(B+K,ca+wa-u),new mxPoint(ma,ca+wa),new mxPoint(B,ca+wa-u),new mxPoint(B,ca+u),new mxPoint(ma,ca)]):(u=u?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ca=[new mxPoint(B+u,ca),new mxPoint(B+K-u,ca),new mxPoint(B+K,c),new mxPoint(B+K-u,ca+wa),new mxPoint(B+u,ca+wa),new mxPoint(B,c),new mxPoint(B+u,ca)]);ma=new mxPoint(ma,c);n&&(v.x<B||v.x>B+K?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ca,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Z,mxShape);Z.prototype.size=10;Z.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,v);c.ellipse((n-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(n/2,A);c.lineTo(n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Z);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,v);c.begin();c.moveTo(n/2,A+B);c.lineTo(n/2,u);c.end();c.stroke();
+c.begin();c.moveTo((n-A)/2-B,A/2);c.quadTo((n-A)/2-B,A+B,n/2,A+B);c.quadTo((n+A)/2+B,A+B,(n+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(qa,mxShape);qa.prototype.paintBackground=function(c,l,v,n,u){c.translate(l,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",qa);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,l,v,n,u){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,v);c.ellipse(0,A,n-2*A,u-2*A);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n/2,u);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(ja,mxCylinder);ja.prototype.jettyWidth=20;ja.prototype.jettyHeight=10;ja.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));v=B/2;B=v+B/2;var ca=Math.min(l,u-l),K=Math.min(ca+2*l,u-l);A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("module",ja);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
+32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,v,n,u,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=B/2;B=v+B/2;var ca=.3*u-l/2,K=.7*u-l/2;A?(c.moveTo(v,ca),c.lineTo(B,ca),c.lineTo(B,ca+l),c.lineTo(v,ca+l),c.moveTo(v,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(v,K+l)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,u),c.lineTo(v,u),c.lineTo(v,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(v,
+K),c.lineTo(v,ca+l),c.lineTo(0,ca+l),c.lineTo(0,ca),c.lineTo(v,ca),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(ya,mxRectangleShape);ya.prototype.paintForeground=function(c,l,v,n,u){var A=n/2,B=u/2,ca=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,v),new mxPoint(l+n,v+B),new mxPoint(l+A,v+u),new mxPoint(l,v+B)],this.isRounded,ca,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",ya);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,l,v,n,u){var A=Math.min(4,Math.min(n/5,u/5));0<n&&0<u&&(c.ellipse(l+A,v+A,n-2*A,u-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,v,n,u),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(za,mxArrowConnector);
+za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ia,mxArrowConnector);Ia.prototype.defaultWidth=10;Ia.prototype.defaultArrowWidth=20;Ia.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ia.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ia);mxUtils.extend(Ca,mxActor);Ca.prototype.size=30;Ca.prototype.isRoundable=function(){return!0};Ca.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,u)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ca);mxUtils.extend(Sa,mxRectangleShape);Sa.prototype.dx=20;Sa.prototype.dy=20;Sa.prototype.isHtmlAllowed=function(){return!1};Sa.prototype.paintForeground=function(c,l,v,n,u){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(n*B,u*B))}B=Math.max(A,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,v+A);c.lineTo(l+n,v+A);c.end();c.stroke();c.begin();c.moveTo(l+B,v);c.lineTo(l+B,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Sa);
+mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(l,v),
+new mxPoint(l,u),new mxPoint(0,u)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.lineTo(0,u);c.end();c.moveTo(n,0);c.lineTo(n,u);c.end();c.moveTo(0,u/2);c.lineTo(n,u/2);c.end()};mxCellRenderer.registerShape("crossbar",Ta);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,v,n,u){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));v=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+l)/2,v),new mxPoint((n+l)/2,u),new mxPoint((n-l)/2,u),new mxPoint((n-l)/2,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Za);mxUtils.extend(Na,
+mxActor);Na.prototype.arrowWidth=.3;Na.prototype.arrowSize=.2;Na.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-
+l,u),new mxPoint(n-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Na);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,v,n,u){var A=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));v=(u-A)/2;A=v+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,u/2),new mxPoint(l,0),new mxPoint(l,v),new mxPoint(n-l,v),new mxPoint(n-l,0),new mxPoint(n,u/2),new mxPoint(n-l,u),new mxPoint(n-l,A),new mxPoint(l,A),new mxPoint(l,u)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(J,mxActor);J.prototype.size=.1;J.prototype.fixedSize=20;J.prototype.redrawPath=function(c,l,v,n,u){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,u/2,n,u);c.lineTo(l,u);c.quadTo(l-2*l,u/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",J);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.close();c.end()};mxCellRenderer.registerShape("or",O);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,
+l,v,n,u){c.moveTo(0,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,0,u);c.quadTo(n/2,u/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",U);mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n/2,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,
+.8*l),new mxPoint(n,u),new mxPoint(0,u),new mxPoint(0,.8*l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",W);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,l,v,n,u){l=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,
+u-l),new mxPoint(n/2,u),new mxPoint(0,u-l)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,v+u);c.lineTo(l+n,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ka);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,v);c.lineTo(l+n/2,v+u);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",xa);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,v+.145*u);c.lineTo(l+.855*n,v+.855*u);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,v+.145*u);c.lineTo(l+.145*n,
+v+.855*u);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ta);mxUtils.extend(pa,mxRhombus);pa.prototype.paintVertexShape=function(c,l,v,n,u){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,v+u/2);c.lineTo(l+n,v+u/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",pa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,l,v,n,u){c.begin();c.moveTo(l,v);c.lineTo(l+n,v);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,v+u);c.lineTo(l+n,v+u);c.lineTo(l+n/2,v+u/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,v,n,u){var A=c.state.strokeWidth/2,B=10+2*A,ca=v+u-B/2;c.begin();c.moveTo(l,v);c.lineTo(l,v+u);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca-B/2);c.moveTo(l+A,ca);c.lineTo(l+A+B,ca+B/2);c.moveTo(l+A,ca);c.lineTo(l+n-A,ca);c.moveTo(l+n,v);c.lineTo(l+n,v+u);c.moveTo(l+n-A,ca);c.lineTo(l+n-B-A,ca-B/2);c.moveTo(l+
+n-A,ca);c.lineTo(l+n-B-A,ca+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Da);mxUtils.extend(Fa,mxEllipse);Fa.prototype.drawHidden=!0;Fa.prototype.paintVertexShape=function(c,l,v,n,u){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ca="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ca||wa||ma||K?(c.rect(l,v,n,u),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,v),this.outline||ca?c.lineTo(l+n,v):c.moveTo(l+n,v),this.outline||wa?c.lineTo(l+n,v+u):c.moveTo(l+n,v+u),this.outline||ma?c.lineTo(l,v+u):c.moveTo(l,v+u),(this.outline||K)&&c.lineTo(l,v),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,v,n,u){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,v),c.lineTo(l+n/2,v+u)):(c.moveTo(l,v+u/2),c.lineTo(l+n,v+u/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
+l,v,n,u){l=Math.min(n,u/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Ba,mxActor);Ba.prototype.size=.2;Ba.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(u,n);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(u-A)/2;v=l+A;var B=(n-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(n,l);c.lineTo(n,v);
+c.lineTo(A,v);c.lineTo(A,u);c.lineTo(B,u);c.lineTo(B,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ba);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,l,v,n,u){l=Math.min(n,u/2);v=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,u/2);c.lineTo(v,0);c.lineTo(n-l,0);c.quadTo(n,0,n,u/2);c.quadTo(n,u,n-l,u);c.lineTo(v,u);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Oa,
mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,t){c.translate(l,
-v);this.strictDrawShape(c,0,0,n,t)};Oa.prototype.strictDrawShape=function(c,l,v,n,t,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),I=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),na=A&&A.indent?
-A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),cb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,na)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ma=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ja=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ua=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Xa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(c,l,v,n,u){c.translate(l,
+v);this.strictDrawShape(c,0,0,n,u)};Oa.prototype.strictDrawShape=function(c,l,v,n,u,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ca=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ga=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ja=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ua=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Va=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,I));A=Oa.prototype;c.setDashed(Ya);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);I=Math.min(.5*t,.5*n,I);da||(I=Jb*Math.min(n,t)/100);I=Math.min(I,.5*Math.min(n,t));da||(na=Math.min(cb*Math.min(n,t)/100));na=Math.min(na,.5*Math.min(n,t)-I);(Ga||Ma||Ka||Ja)&&"frame"!=va&&(c.begin(),Ga?A.moveNW(c,l,v,n,t,B,Ua,I,Ja):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),Ma&&A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),Ka&&
-A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),Ja&&A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Ya=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Ya=0),c.setGradient(Db,Eb,0,0,n,t,Hb,da,Ya),c.begin(),Ga?A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja):c.moveTo(na,0),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),Ja&&Ka&&A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),Ka&&Ma&&A.paintSEInner(c,
-l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),Ma&&Ga&&A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),Ga&&Ja&&A.paintNWInner(c,l,v,n,t,B,Ua,I,na),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,t,B,Ua,Va,Wa,Xa,I,Ga,Ma,Ka,Ja),c.stroke()));Ga||Ma||Ka||!Ja?Ga||Ma||!Ka||Ja?!Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==
-va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),
-c.fillAndStroke()):Ga||!Ma||Ka||Ja?!Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,
-I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,
-l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga&&
-Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):!Ga||Ma||Ka||Ja?
-Ga&&!Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,
-l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,
-I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&!Ma&&Ka&&Ja?"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,
-I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,
-v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,
-l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):Ga&&Ma&&!Ka&&Ja?"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,
-l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,
-t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke()):Ga&&Ma&&Ka&&!Ja?"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,
-l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):
-Ga&&Ma&&Ka&&Ja&&("frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,
-B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.paintNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.paintSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.paintSW(c,l,v,n,t,B,Xa,I,Ka),
-A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),c.close(),A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintSWInner(c,l,v,n,t,B,Xa,I,na,Ka),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),A.paintSEInner(c,l,v,n,t,B,Wa,I,na),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),A.paintNEInner(c,l,v,n,t,B,Va,I,na),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),A.paintNWInner(c,l,v,n,t,B,Ua,I,na),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,
-l,v,n,t,B,Va,I,Ma),"double"==va&&(A.moveNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,t,B,Ua,I,Ja),A.paintTop(c,l,v,n,t,B,Va,I,Ma),A.lineNEInner(c,l,v,n,t,B,Va,I,na,Ma),A.paintTopInner(c,l,v,n,t,B,Ua,I,na,Ja,Ga),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),"double"==va&&(A.moveSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma)),c.stroke()):
-(c.begin(),A.moveNE(c,l,v,n,t,B,Va,I,Ga),A.paintRight(c,l,v,n,t,B,Wa,I,Ka),A.lineSEInner(c,l,v,n,t,B,Wa,I,na,Ka),A.paintRightInner(c,l,v,n,t,B,Va,I,na,Ga,Ma),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),"double"==va&&(A.moveSWInner(c,l,v,n,t,B,Xa,I,na,Ja),A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,t,B,Wa,I,Ma),A.paintBottom(c,l,v,n,t,B,Xa,I,Ja),A.lineSWInner(c,l,v,n,t,B,Xa,I,na,Ja),
-A.paintBottomInner(c,l,v,n,t,B,Wa,I,na,Ma,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),"double"==va&&(A.moveNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,t,B,Ua,I,Ka),A.paintLeft(c,l,v,n,t,B,Ua,I,Ga),A.lineNWInner(c,l,v,n,t,B,Ua,I,na,Ga,Ja),A.paintLeftInner(c,l,v,n,t,B,Xa,I,na,Ka,Ja),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,t,B,Ua,Va,
-Wa,Xa,I,Ga,Ma,Ka,Ja);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,0):c.moveTo(0,da)};Oa.prototype.moveNE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,0):c.moveTo(n-da,0)};Oa.prototype.moveSE=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(n,t):c.moveTo(n,t-da)};Oa.prototype.moveSW=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.moveTo(0,
-t):c.moveTo(da,t)};Oa.prototype.paintNW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,da,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(da,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,0):c.lineTo(n-da,0)};Oa.prototype.paintNE=
-function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n,da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,da);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(n,t):c.lineTo(n,t-da)};Oa.prototype.paintLeft=function(c,l,v,n,t,A,B,da,I){"square"==
-B||"default"==B&&"square"==A||!I?c.lineTo(0,0):c.lineTo(0,da)};Oa.prototype.paintSE=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,n-da,t)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-da,t);else c.lineTo(n,t)};Oa.prototype.paintBottom=function(c,l,v,n,t,A,B,da,I){"square"==B||"default"==B&&"square"==A||!I?c.lineTo(0,
-t):c.lineTo(da,t)};Oa.prototype.paintSW=function(c,l,v,n,t,A,B,da,I){if(I)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(da,da,0,0,l,0,t-da)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,t-da);else c.lineTo(0,t)};Oa.prototype.paintNWInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,I,.5*I+da);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,I,I+da);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(I,.5*I+da);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,I+da),c.lineTo(I,I+da)};Oa.prototype.paintTopInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(0,I):va&&!na?c.lineTo(I,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(da+.5*I,I):c.lineTo(da+I,I):c.lineTo(0,
-I):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-da-.5*I,I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-da-I,I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-da-.5*I,I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,da+I),c.lineTo(n-da-I,I)};Oa.prototype.paintRightInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n-I,0):va&&!na?c.lineTo(n,
-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):c.lineTo(n-I,da+I):c.lineTo(n-I,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,t):va&&!na?c.lineTo(0,t-I):va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):c.lineTo(I,t-da-I):
-c.lineTo(I,t):c.lineTo(0,t)};Oa.prototype.paintSEInner=function(c,l,v,n,t,A,B,da,I){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,n-I,t-da-.5*I);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(da+I,da+I,0,0,1,n-I,t-da-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-I,t-da-.5*I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-da-I,t-da-I),c.lineTo(n-I,t-da-I)};Oa.prototype.paintBottomInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(n,
-t-I):va&&!na?c.lineTo(n-I,t):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-da-.5*I,t-I):c.lineTo(n-da-I,t-I):c.lineTo(n,t)};Oa.prototype.paintSWInner=function(c,l,v,n,t,A,B,da,I,va){if(!va)c.lineTo(I,t);else if("square"==B||"default"==B&&"square"==A)c.lineTo(I,t-I);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(da-.5*I,da-.5*I,0,0,0,da+.5*I,t-I);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(da+I,da+I,0,0,1,da+I,t-I);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(da+.5*I,t-I);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(I+da,t-da-I),c.lineTo(I+da,t-I)};Oa.prototype.moveSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(I,t-da-I):
-c.moveTo(0,t-I)};Oa.prototype.lineSWInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,t-da-I):c.lineTo(0,t-I)};Oa.prototype.moveSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,t-da-I):c.moveTo(n-I,t)};Oa.prototype.lineSEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(n-I,t-I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,t-da-.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,t-da-I):
-c.lineTo(n-I,t)};Oa.prototype.moveNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-I,da+I):c.moveTo(n,I)};Oa.prototype.lineNEInner=function(c,l,v,n,t,A,B,da,I,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(n-I,I):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-I,da+I):c.lineTo(n,I)};Oa.prototype.moveNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.moveTo(I,0):va&&!na?c.moveTo(0,I):"square"==B||"default"==B&&"square"==A?c.moveTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(I,da+I):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,t,A,B,da,I,va,na){va||na?!va&&na?c.lineTo(I,0):va&&!na?c.lineTo(0,I):"square"==B||"default"==B&&"square"==A?c.lineTo(I,I):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(I,da+.5*I):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(I,da+I):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,t,A,B,da,I,va,na,Ya,jb,cb,Ga){if("fold"==
-A||"fold"==B||"fold"==da||"fold"==I||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Ya&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==da||"default"==da&&"fold"==A)&&Ya&&jb&&(c.moveTo(n-na,0),c.lineTo(n-na,na),c.lineTo(n,na)),("fold"==I||"default"==I&&"fold"==A)&&cb&&jb&&(c.moveTo(n-na,t),c.lineTo(n-na,t-na),c.lineTo(n,t-na)),("fold"==va||"default"==va&&"fold"==A)&&cb&&Ga&&(c.moveTo(0,t-na),c.lineTo(na,t-na),c.lineTo(na,t))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
-Oa.prototype.constraints=null;mxUtils.extend(Pa,mxConnector);Pa.prototype.origPaintEdgeShape=Pa.prototype.paintEdgeShape;Pa.prototype.paintEdgeShape=function(c,l,v){for(var n=[],t=0;t<l.length;t++)n.push(mxUtils.clone(l[t]));t=c.state.dashed;var A=c.state.fixDash;Pa.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,A),Pa.prototype.origPaintEdgeShape.apply(this,
-[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Pa);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();
-c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.x+na/2,cb=n.y+Ya/2;n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb-na/2-Ya/2,cb-Ya/2+na/2);c.lineTo(jb-na/2+Ya/2,cb-Ya/2-na/2);c.lineTo(jb+Ya/2-3*na/2,cb-3*Ya/2-na/2);c.lineTo(jb-Ya/2-3*na/2,cb-3*Ya/2+na/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,t,A,B,da,I,
-va){var na=t*(B+I+1),Ya=A*(B+I+1);return function(){c.begin();c.moveTo(n.x-na/2-Ya/2,n.y-Ya/2+na/2);c.lineTo(n.x+Ya/2-3*na/2,n.y-3*Ya/2-na/2);c.moveTo(n.x-na/2+Ya/2,n.y-Ya/2-na/2);c.lineTo(n.x-Ya/2-3*na/2,n.y-3*Ya/2+na/2);c.stroke()}});mxMarker.addMarker("circle",bb);mxMarker.addMarker("circlePlus",function(c,l,v,n,t,A,B,da,I,va){var na=n.clone(),Ya=bb.apply(this,arguments),jb=t*(B+2*I),cb=A*(B+2*I);return function(){Ya.apply(this,arguments);c.begin();c.moveTo(na.x-t*I,na.y-A*I);c.lineTo(na.x-2*jb+
-t*I,na.y-2*cb+A*I);c.moveTo(na.x-jb-cb+A*I,na.y-cb+jb-t*I);c.lineTo(na.x+cb-jb-A*I,na.y-cb-jb+t*I);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,t,A,B,da,I,va){var na=t*(B+I+1),Ya=A*(B+I+1),jb=n.clone();n.x-=na;n.y-=Ya;return function(){c.begin();c.moveTo(jb.x-Ya,jb.y+na);c.quadTo(n.x-Ya,n.y+na,n.x,n.y);c.quadTo(n.x+Ya,n.y-na,jb.x+Ya,jb.y-na);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,t,A,B,da,I,va){l=t*I*1.118;v=A*I*1.118;t*=B+I;A*=B+I;var na=n.clone();na.x-=l;na.y-=
-v;n.x+=-t-l;n.y+=-A-v;return function(){c.begin();c.moveTo(na.x,na.y);da?c.lineTo(na.x-t-A/2,na.y-A+t/2):c.lineTo(na.x+A/2-t,na.y-A-t/2);c.lineTo(na.x-t,na.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,t,A,B,da,I,va,na){A*=da+va;B*=da+va;var Ya=t.clone();return function(){l.begin();l.moveTo(Ya.x,Ya.y);I?l.lineTo(Ya.x-A-B/c,Ya.y-B+A/c):l.lineTo(Ya.x+B/c-A,Ya.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
-function(c,l,v){return gb(c,["width"],l,function(n,t,A,B,da){da=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,t){return hb(c,l,function(A){var B=c.absolutePoints,da=B.length-1;A=c.view.translate;var I=c.view.scale,va=v?B[0]:B[da];B=v?B[1]:B[da-1];da=B.x-va.x;var na=B.y-va.y,Ya=Math.sqrt(da*da+na*na);va=
-n.call(this,Ya,da/Ya,na/Ya,va,B);return new mxPoint(va.x/I-A.x,va.y/I-A.y)},function(A,B,da){var I=c.absolutePoints,va=I.length-1;A=c.view.translate;var na=c.view.scale,Ya=v?I[0]:I[va];I=v?I[1]:I[va-1];va=I.x-Ya.x;var jb=I.y-Ya.y,cb=Math.sqrt(va*va+jb*jb);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;t.call(this,cb,va/cb,jb/cb,Ya,I,B,da)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,t,A,B,da){da=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
-t*n/4+A*da/2,B.y+A*n/4-t*da/2)},function(n,t,A,B,da,I){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var t=[hb(n,["size"],
-function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},wb=function(c,l,v,n,t){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(da){var I=null!=t?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",I?t:c));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,va*(I?1:da.width))),da.getCenterY())},function(da,I,va){da=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?I.x-da.x:Math.max(0,Math.min(v,(I.x-da.x)/da.width));this.state.style.size=da},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var t=[hb(n,["size"],
-function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,da*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(kb(n));return t}},vb=
-function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
-t,A,B){var da=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(va){for(var na=0;na<l.length;na++)this.copyStyle(l[na]);B&&B(va)};da.getPosition=v;da.setPosition=n;da.ignoreGrid=null!=t?t:!0;if(A){var I=da.positionChanged;da.positionChanged=function(){I.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return da},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
-B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,A,B,da){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,A,B,da,
-I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,A,B,da){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;da=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+t*(da+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(da+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,A,B,da,I,va){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,da.x,da.y,I.x,I.y));t=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-t,I.x,I.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;
-c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n=
-t.getSwimlaneDirection(c.style);var A=t.model.getParent(c.cell);A=t.model.getChildCells(A,!0);for(var B=[],da=0;da<A.length;da++)A[da]!=c.cell&&t.isSwimlane(A[da])&&t.getSwimlaneDirection(t.getCurrentCellStyle(A[da]))==n&&B.push(A[da]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
+Jb=Math.max(0,Math.min(50,K));A=Oa.prototype;c.setDashed(Xa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);K=Math.min(.5*u,.5*n,K);ca||(K=Jb*Math.min(n,u)/100);K=Math.min(K,.5*Math.min(n,u));ca||(ma=Math.min(bb*Math.min(n,u)/100));ma=Math.min(ma,.5*Math.min(n,u)-K);(Ga||La||Ja||Ha)&&"frame"!=wa&&(c.begin(),Ga?A.moveNW(c,l,v,n,u,B,Ra,K,Ha):c.moveTo(0,0),Ga&&A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),La&&A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),Ja&&
+A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),Ha&&A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Xa=ca=Ib,"none"==Db&&(ca=0),"none"==Eb&&(Xa=0),c.setGradient(Db,Eb,0,0,n,u,Hb,ca,Xa),c.begin(),Ga?A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),Ja&&La&&A.paintSEInner(c,
+l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),La&&Ga&&A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),Ga&&Ha&&A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),c.fill(),"none"==Fb&&(c.begin(),A.paintFolds(c,l,v,n,u,B,Ra,Ua,Va,Wa,K,Ga,La,Ja,Ha),c.stroke()));Ga||La||Ja||!Ha?Ga||La||!Ja||Ha?!Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==
+wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),
+c.fillAndStroke()):Ga||!La||Ja||Ha?!Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,
+K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,
+l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga&&
+La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):!Ga||La||Ja||Ha?
+Ga&&!La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,
+l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,
+K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&!La&&Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,
+K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,
+v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,
+l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ga&&La&&!Ja&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,
+l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,
+u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ga&&La&&Ja&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,
+l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):
+Ga&&La&&Ja&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,
+B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.paintNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.paintSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.paintSW(c,l,v,n,u,B,Wa,K,Ja),
+A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintSWInner(c,l,v,n,u,B,Wa,K,ma,Ja),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),A.paintSEInner(c,l,v,n,u,B,Va,K,ma),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),A.paintNEInner(c,l,v,n,u,B,Ua,K,ma),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),A.paintNWInner(c,l,v,n,u,B,Ra,K,ma),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,
+l,v,n,u,B,Ua,K,La),"double"==wa&&(A.moveNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveNW(c,l,v,n,u,B,Ra,K,Ha),A.paintTop(c,l,v,n,u,B,Ua,K,La),A.lineNEInner(c,l,v,n,u,B,Ua,K,ma,La),A.paintTopInner(c,l,v,n,u,B,Ra,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),"double"==wa&&(A.moveSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,v,n,u,B,Ua,K,Ga),A.paintRight(c,l,v,n,u,B,Va,K,Ja),A.lineSEInner(c,l,v,n,u,B,Va,K,ma,Ja),A.paintRightInner(c,l,v,n,u,B,Ua,K,ma,Ga,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),"double"==wa&&(A.moveSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja)),c.stroke()):(c.begin(),A.moveSE(c,l,v,n,u,B,Va,K,La),A.paintBottom(c,l,v,n,u,B,Wa,K,Ha),A.lineSWInner(c,l,v,n,u,B,Wa,K,ma,Ha),
+A.paintBottomInner(c,l,v,n,u,B,Va,K,ma,La,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),"double"==wa&&(A.moveNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,v,n,u,B,Ra,K,Ja),A.paintLeft(c,l,v,n,u,B,Ra,K,Ga),A.lineNWInner(c,l,v,n,u,B,Ra,K,ma,Ga,Ha),A.paintLeftInner(c,l,v,n,u,B,Wa,K,ma,Ja,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,v,n,u,B,Ra,Ua,
+Va,Wa,K,Ga,La,Ja,Ha);c.stroke()};Oa.prototype.moveNW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ca)};Oa.prototype.moveNE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,0):c.moveTo(n-ca,0)};Oa.prototype.moveSE=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(n,u):c.moveTo(n,u-ca)};Oa.prototype.moveSW=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+u):c.moveTo(ca,u)};Oa.prototype.paintNW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,ca,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ca,0);else c.lineTo(0,0)};Oa.prototype.paintTop=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,0):c.lineTo(n-ca,0)};Oa.prototype.paintNE=
+function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n,ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n,ca);else c.lineTo(n,0)};Oa.prototype.paintRight=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(n,u):c.lineTo(n,u-ca)};Oa.prototype.paintLeft=function(c,l,v,n,u,A,B,ca,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ca)};Oa.prototype.paintSE=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,n-ca,u)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-ca,u);else c.lineTo(n,u)};Oa.prototype.paintBottom=function(c,l,v,n,u,A,B,ca,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+u):c.lineTo(ca,u)};Oa.prototype.paintSW=function(c,l,v,n,u,A,B,ca,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ca,ca,0,0,l,0,u-ca)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,u-ca);else c.lineTo(0,u)};Oa.prototype.paintNWInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,K,.5*K+ca);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,K,K+ca);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ca);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,K+ca),c.lineTo(K,K+ca)};Oa.prototype.paintTopInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ca+.5*K,K):c.lineTo(ca+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};Oa.prototype.paintNEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-ca-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-ca-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-ca-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,ca+K),c.lineTo(n-ca-K,K)};Oa.prototype.paintRightInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n-K,0):wa&&!ma?c.lineTo(n,
+K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):c.lineTo(n-K,ca+K):c.lineTo(n-K,0):c.lineTo(n,0)};Oa.prototype.paintLeftInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,u):wa&&!ma?c.lineTo(0,u-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):c.lineTo(K,u-ca-K):
+c.lineTo(K,u):c.lineTo(0,u)};Oa.prototype.paintSEInner=function(c,l,v,n,u,A,B,ca,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,n-K,u-ca-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ca+K,ca+K,0,0,1,n-K,u-ca-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(n-K,u-ca-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(n-ca-K,u-ca-K),c.lineTo(n-K,u-ca-K)};Oa.prototype.paintBottomInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(n,
+u-K):wa&&!ma?c.lineTo(n-K,u):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-ca-.5*K,u-K):c.lineTo(n-ca-K,u-K):c.lineTo(n,u)};Oa.prototype.paintSWInner=function(c,l,v,n,u,A,B,ca,K,wa){if(!wa)c.lineTo(K,u);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,u-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ca-.5*K,ca-.5*K,0,0,0,ca+.5*K,u-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ca+K,ca+K,0,0,1,ca+K,u-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ca+.5*K,u-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ca,u-ca-K),c.lineTo(K+ca,u-K)};Oa.prototype.moveSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,u-ca-K):
+c.moveTo(0,u-K)};Oa.prototype.lineSWInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,u-ca-K):c.lineTo(0,u-K)};Oa.prototype.moveSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,u-ca-K):c.moveTo(n-K,u)};Oa.prototype.lineSEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(n-K,u-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,u-ca-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,u-ca-K):
+c.lineTo(n-K,u)};Oa.prototype.moveNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(n-K,ca+K):c.moveTo(n,K)};Oa.prototype.lineNEInner=function(c,l,v,n,u,A,B,ca,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(n-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(n-K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(n-K,ca+K):c.lineTo(n,K)};Oa.prototype.moveNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ca+K):c.moveTo(0,0)};Oa.prototype.lineNWInner=function(c,l,v,n,u,A,B,ca,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ca+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ca+K):c.lineTo(0,0)};Oa.prototype.paintFolds=function(c,l,v,n,u,A,B,ca,K,wa,ma,Xa,jb,bb,Ga){if("fold"==
+A||"fold"==B||"fold"==ca||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ga&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ca||"default"==ca&&"fold"==A)&&Xa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==K||"default"==K&&"fold"==A)&&bb&&jb&&(c.moveTo(n-ma,u),c.lineTo(n-ma,u-ma),c.lineTo(n,u-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&bb&&Ga&&(c.moveTo(0,u-ma),c.lineTo(ma,u-ma),c.lineTo(ma,u))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);
+Oa.prototype.constraints=null;mxUtils.extend(Ya,mxConnector);Ya.prototype.origPaintEdgeShape=Ya.prototype.paintEdgeShape;Ya.prototype.paintEdgeShape=function(c,l,v){for(var n=[],u=0;u<l.length;u++)n.push(mxUtils.clone(l[u]));u=c.state.dashed;var A=c.state.fixDash;Ya.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(u,A),Ya.prototype.origPaintEdgeShape.apply(this,
+[c,l,v])))};mxCellRenderer.registerShape("filledEdge",Ya);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==l.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.x+ma/2,bb=n.y+Xa/2;n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb-ma/2-Xa/2,bb-Xa/2+ma/2);c.lineTo(jb-ma/2+Xa/2,bb-Xa/2-ma/2);c.lineTo(jb+Xa/2-3*ma/2,bb-3*Xa/2-ma/2);c.lineTo(jb-Xa/2-3*ma/2,bb-3*Xa/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,v,n,u,A,B,ca,K,
+wa){var ma=u*(B+K+1),Xa=A*(B+K+1);return function(){c.begin();c.moveTo(n.x-ma/2-Xa/2,n.y-Xa/2+ma/2);c.lineTo(n.x+Xa/2-3*ma/2,n.y-3*Xa/2-ma/2);c.moveTo(n.x-ma/2+Xa/2,n.y-Xa/2-ma/2);c.lineTo(n.x-Xa/2-3*ma/2,n.y-3*Xa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",db);mxMarker.addMarker("circlePlus",function(c,l,v,n,u,A,B,ca,K,wa){var ma=n.clone(),Xa=db.apply(this,arguments),jb=u*(B+2*K),bb=A*(B+2*K);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(ma.x-u*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+u*K,ma.y-2*bb+A*K);c.moveTo(ma.x-jb-bb+A*K,ma.y-bb+jb-u*K);c.lineTo(ma.x+bb-jb-A*K,ma.y-bb-jb+u*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,v,n,u,A,B,ca,K,wa){var ma=u*(B+K+1),Xa=A*(B+K+1),jb=n.clone();n.x-=ma;n.y-=Xa;return function(){c.begin();c.moveTo(jb.x-Xa,jb.y+ma);c.quadTo(n.x-Xa,n.y+ma,n.x,n.y);c.quadTo(n.x+Xa,n.y-ma,jb.x+Xa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,v,n,u,A,B,ca,K,wa){l=u*K*1.118;v=A*K*1.118;u*=B+K;A*=B+K;var ma=n.clone();ma.x-=l;ma.y-=
+v;n.x+=-u-l;n.y+=-A-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ca?c.lineTo(ma.x-u-A/2,ma.y-A+u/2):c.lineTo(ma.x+A/2-u,ma.y-A-u/2);c.lineTo(ma.x-u,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,v,n,u,A,B,ca,K,wa,ma){A*=ca+wa;B*=ca+wa;var Xa=u.clone();return function(){l.begin();l.moveTo(Xa.x,Xa.y);K?l.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):l.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var ib=
+function(c,l,v){return gb(c,["width"],l,function(n,u,A,B,ca){ca=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(B.x+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));c.style.width=Math.round(2*n)/c.view.scale-v})},gb=function(c,l,v,n,u){return hb(c,l,function(A){var B=c.absolutePoints,ca=B.length-1;A=c.view.translate;var K=c.view.scale,wa=v?B[0]:B[ca];B=v?B[1]:B[ca-1];ca=B.x-wa.x;var ma=B.y-wa.y,Xa=Math.sqrt(ca*ca+ma*ma);wa=
+n.call(this,Xa,ca/Xa,ma/Xa,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,ca){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,Xa=v?K[0]:K[wa];K=v?K[1]:K[wa-1];wa=K.x-Xa.x;var jb=K.y-Xa.y,bb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;u.call(this,bb,wa/bb,jb/bb,Xa,K,B,ca)})},qb=function(c,l){return function(v){return[gb(v,["startWidth"],!0,function(n,u,A,B,ca){ca=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+l;return new mxPoint(B.x+
+u*n/4+A*ca/2,B.y+A*n/4-u*ca/2)},function(n,u,A,B,ca,K){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));v.style.startWidth=Math.round(2*n)/v.view.scale-l})]}},nb=function(c){return function(l){return[hb(l,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Na.prototype.arrowWidth))),u=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Na.prototype.arrowSize)));return new mxPoint(v.x+(1-u)*v.width,v.y+(1-n)*v.height/
+2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},mb=function(c){return function(l){return[hb(l,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},Bb=function(c,l,v){return function(n){var u=[hb(n,["size"],
+function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},wb=function(c,l,v,n,u){v=null!=v?v:.5;return function(A){var B=[hb(A,["size"],function(ca){var K=null!=u?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?u:c));return new mxPoint(ca.x+Math.max(0,Math.min(.5*ca.width,wa*(K?1:ca.width))),ca.getCenterY())},function(ca,K,wa){ca=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ca.x:Math.max(0,Math.min(v,(K.x-ca.x)/ca.width));this.state.style.size=ca},!1,n)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},rb=function(c,l,v){c=null!=c?c:.5;return function(n){var u=[hb(n,["size"],
+function(A){var B=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?v:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ca*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&u.push(kb(n));return u}},vb=
+function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return hb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=l?l:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var u=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,u),v.y+n)}u=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*u),v.y+n)},function(v,n,u){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},hb=function(c,l,v,n,
+u,A,B){var ca=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ca.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};ca.getPosition=v;ca.setPosition=n;ca.ignoreGrid=null!=u?u:!0;if(A){var K=ca.positionChanged;ca.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ca},tb={link:function(c){return[ib(c,!0,10),ib(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,v=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,
+B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,u,A,B,ca){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)+A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)-u*n/2)},function(n,u,A,B,ca,
+K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(gb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(gb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,u,A,B,ca){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ca=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+u*(ca+c.shape.strokewidth*c.view.scale)-A*n/2,B.y+A*(ca+c.shape.strokewidth*c.view.scale)+u*n/2)},function(n,u,A,B,ca,K,wa){n=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ca.x,ca.y,K.x,K.y));u=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-u,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(u-c.shape.strokewidth)/3)/100/c.view.scale;
+c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
+parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,v/2))}l.push(hb(c,[mxConstants.STYLE_STARTSIZE],function(n){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,u))):new mxPoint(n.x+Math.max(0,Math.min(n.width,u)),n.getCenterY())},function(n,u){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,u.y-n.y))):Math.round(Math.max(0,Math.min(n.width,u.x-n.x)))},!1,null,function(n){var u=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(u.isTableRow(c.cell)||u.isTableCell(c.cell))){n=
+u.getSwimlaneDirection(c.style);var A=u.model.getParent(c.cell);A=u.model.getChildCells(A,!0);for(var B=[],ca=0;ca<A.length;ca++)A[ca]!=c.cell&&u.isSwimlane(A[ca])&&u.getSwimlaneDirection(u.getCurrentCellStyle(A[ca]))==n&&B.push(A[ca]);u.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:vb(),ext:vb(),rectangle:vb(),triangle:vb(),rhombus:vb(),umlLifeline:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,
"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},umlFrame:function(c){return[hb(c,["width","height"],function(l){var v=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),n=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+v,l.y+n)},function(l,
-v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
+v){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,v.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,v.y-l.y)))},!1)]},process:function(c){var l=[hb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size));return n?new mxPoint(v.x+u,v.y+v.height/4):new mxPoint(v.x+v.width*u,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[hb(c,["size"],function(l){var v=Math.min(l.width,l.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ba.prototype.size)))*v/2;return new mxPoint(l.getCenterX()-v,l.getCenterY()-v)},function(l,v){var n=Math.min(l.width,l.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-v.y)/n*2,Math.max(0,l.getCenterX()-v.x)/n*2)))})]},note:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},note2:function(c){return[hb(c,["size"],function(l){var v=
-Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Da.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?L.prototype.fixedSize:L.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,"base",fa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",fa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",fa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",fa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+A),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",la.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",la.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
-2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
+Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size)))));return new mxPoint(l.x+l.width-v,l.y+v)},function(l,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-v.x),Math.min(l.height,v.y-l.y))))})]},manualInput:function(c){var l=[hb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Ca.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[hb(c,["size"],function(l){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?J.prototype.fixedSize:J.prototype.size));return new mxPoint(l.x+l.width-n*(v?1:l.width),l.getCenterY())},function(l,v){l="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-v.x)):Math.max(0,Math.min(1,(l.x+l.width-v.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[hb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));mxUtils.getValue(this.state.style,"base",oa.prototype.base);return new mxPoint(v.x+u*v.width,v.y+v.height-
+n)},function(v,n){mxUtils.getValue(this.state.style,"base",oa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),hb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",oa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-v.x)/v.width)))/100},!1),hb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",oa.prototype.size))),u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position))),A=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",oa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,u*v.width+A),v.y+v.height-n)},function(v,n){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",oa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-u*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[hb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Sa.prototype.dx))),u=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Sa.prototype.dy)));return new mxPoint(v.x+n,v.y+u)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[hb(c,["jettyWidth","jettyHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",ja.prototype.jettyHeight)));return new mxPoint(l.x+v/2,l.y+
+2*n)},function(l,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,v.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y))/2)})]},corner:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Pa.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Pa.prototype.dy)));return new mxPoint(l.x+v,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,
Math.min(l.width,v.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},tee:function(c){return[hb(c,["dx","dy"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(l.x+(l.width+v)/2,l.y+n)},function(l,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,v.x-l.x-l.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",u.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",u.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",u.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",G.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
-["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
+Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},singleArrow:nb(1),doubleArrow:nb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[hb(c,["tabWidth","tabHeight"],function(l){var v=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",t.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",t.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=l.width-v);return new mxPoint(l.x+v,l.y+n)},function(l,v){var n=Math.max(0,Math.min(l.width,v.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",t.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,v.y-l.y)))},!1)]},document:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",H.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},tape:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",I.prototype.size))));return new mxPoint(l.getCenterX(),l.y+v*l.height/2)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[hb(c,
+["isoAngle"],function(l){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(v),.5*l.height))},function(l,v){this.state.style.isoAngle=Math.max(0,50*(v.y-l.y)/l.height)},!0)]},cylinder2:mb(g.prototype.size),cylinder3:mb(x.prototype.size),offPageConnector:function(c){return[hb(c,["size"],function(l){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-v)*l.height)},function(l,v){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-v.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:wb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:wb(Z.prototype.size,!1),display:wb(Ea.prototype.size,!1),cube:Bb(1,
-m.prototype.size,!1),card:Bb(.5,J.prototype.size,!0),loopLimit:Bb(.5,U.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,W.prototype.size,W.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});l.push(c);return l},step:wb(na.prototype.size,!0,null,!0,na.prototype.fixedSize),hexagon:wb(N.prototype.size,!0,.5,!0,N.prototype.fixedSize),curlyBracket:wb(M.prototype.size,!1),display:wb(Ka.prototype.size,!1),cube:Bb(1,
+m.prototype.size,!1),card:Bb(.5,D.prototype.size,!0),loopLimit:Bb(.5,W.prototype.size,!0),trapezoid:rb(.5,T.prototype.size,T.prototype.fixedSize),parallelogram:rb(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=hb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=tb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=tb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,t){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,da=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
-null==da&&null!=l&&(da=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var I=xb.x,va=xb.y,na=zb.x,Ya=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=da){c=function(Ga,Ma,Ka){Ga-=cb.x;var Ja=Ma-cb.y;Ma=(Ya*Ga-na*Ja)/(I*Ya-va*na);Ga=(va*Ga-I*Ja)/(va*na-I*Ya);jb?(Ka&&(cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma),t.push(cb)),cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga)):(Ka&&(cb=new mxPoint(cb.x+na*Ga,cb.y+Ya*Ga),t.push(cb)),
-cb=new mxPoint(cb.x+I*Ma,cb.y+va*Ma));t.push(cb)};var cb=da;null==n&&(n=new mxPoint(da.x+(B.x-da.x)/2,da.y+(B.y-da.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(ob),Math.sin(ob));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,v,n,u){var A=c.view;n=null!=n&&0<n.length?n[0]:null;var B=c.absolutePoints,ca=B[0];B=B[B.length-1];null!=n&&(n=A.transformControlPoint(c,n));
+null==ca&&null!=l&&(ca=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=v&&(B=new mxPoint(v.getCenterX(),v.getCenterY()));var K=xb.x,wa=xb.y,ma=zb.x,Xa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ca){c=function(Ga,La,Ja){Ga-=bb.x;var Ha=La-bb.y;La=(Xa*Ga-ma*Ha)/(K*Xa-wa*ma);Ga=(wa*Ga-K*Ha)/(wa*ma-K*Xa);jb?(Ja&&(bb=new mxPoint(bb.x+K*La,bb.y+wa*La),u.push(bb)),bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga)):(Ja&&(bb=new mxPoint(bb.x+ma*Ga,bb.y+Xa*Ga),u.push(bb)),
+bb=new mxPoint(bb.x+K*La,bb.y+wa*La));u.push(bb)};var bb=ca;null==n&&(n=new mxPoint(ca.x+(B.x-ca.x)/2,ca.y+(B.y-ca.y)/2));c(n.x,n.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];F.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),u=(.5-n)/2;n=Math.min(l,v/(.5+n));l=(l-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+n*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,v+(1-u)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,v+.75*n));return c};f.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};fa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};oa.prototype.getConstraints=function(c,l,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var u=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!1,null,l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
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))];ua.prototype.constraints=mxRectangleShape.prototype.constraints;
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};J.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};D.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};m.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,Math.min(v,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};x.prototype.getConstraints=function(c,l,v){c=[];l=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};u.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;
-sa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Da.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.constraints=mxRectangleShape.prototype.constraints;Ea.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),t=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};la.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",la.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",la.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,l+.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-l-.5*(.5*v-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};t.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,u)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(v-u)+u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Sa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;xa.prototype.constraints=mxEllipse.prototype.constraints;
+ta.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,l,v){c=[];var n=Math.min(l,v/2),u=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(u+l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};ja.prototype.getConstraints=function(c,l,v){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};U.prototype.constraints=mxRectangleShape.prototype.constraints;ha.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)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};W.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];D.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)];ia.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
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)];W.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ra.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];S.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(l+n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*u));return c};Pa.prototype.getConstraints=function(c,l,v){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),u=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+u)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};Ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Na.prototype.getConstraints=
-function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),t=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ba.prototype.getConstraints=
-function(c,l,v){c=[];var n=Math.min(v,l),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var A=n+t,B=(l-t)/2;t=B+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+t),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-u),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};z.prototype.getConstraints=function(c,l,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Na.prototype.arrowWidth)))),u=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Na.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));return c};Ba.prototype.getConstraints=
+function(c,l,v){c=[];var n=Math.min(v,l),u=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-u)/2;var A=n+u,B=(l-u)/2;u=B+u;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+u),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,n));return c};Y.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];V.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)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var u=y.getCellGeometry(d);null!=u&&g&&x&&(g/=x,u=u.clone(),1<g?u.height=u.width/g:u.width=u.height*g,y.getModel().setGeometry(d,
-u));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
+Actions.prototype.init=function(){function b(d){p.escape();d=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),d);null!=d&&p.setSelectionCells(d)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var d=p.getSelectionCells(),f=0;f<d.length;f++)p.cellLabelChanged(d[f],"")}finally{p.getModel().endUpdate()}}}function k(d,f,g,x,y){y.getModel().beginUpdate();try{var t=y.getCellGeometry(d);null!=t&&g&&x&&(g/=x,t=t.clone(),1<g?t.height=t.width/g:t.width=t.height*g,y.getModel().setGeometry(d,
+t));y.setCellStyles(mxConstants.STYLE_CLIP_PATH,f,[d]);y.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[d])}finally{y.getModel().endUpdate()}}var m=this.editorUi,C=m.editor,p=C.graph,F=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var d=p.view.scale,
f=p.view.translate.x,g=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(d-p.view.scale)&&f==p.view.translate.x&&g==p.view.translate.y&&m.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));
window.openFile.setConsumer(mxUtils.bind(this,function(d,f){try{var g=mxUtils.parseXml(d);C.graph.setSelectionCells(C.graph.importGraphModel(g.documentElement))}catch(x){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+x.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=F;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=F;this.addAction("saveAs...",function(){m.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=F;this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var d=new EditDiagramDialog(m);m.showDialog(d.container,620,420,!0,!1);d.init()});this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=F;this.addAction("print...",function(){m.showDialog((new PrintDialog(m)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var d=null;try{d=m.copyXml(),null!=d&&p.removeCells(d,!1)}catch(f){}null==d&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(d){}try{mxClipboard.copy(p)}catch(d){m.handleError(d)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,u=0;u<
-x.length&&y;u++)y=y&&p.model.isEdge(x[u]);var H=p.view.translate;u=p.view.scale;var J=H.x,D=H.y;H=null;if(1==x.length&&y){var G=p.getCellGeometry(x[0]);null!=G&&(H=G.getTerminalPoint(!0))}H=null!=H?H:p.getBoundingBoxFromGeometry(x,y);null!=H&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/u-J)),u=Math.round(p.snap(p.popupMenuHandler.triggerY/u-D)),p.cellsMoved(x,y-H.x,u-H.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){p.getModel().beginUpdate();try{m.pasteXml(f,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),d=!0)}catch(f){}d||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(d){function f(x){if(null!=x){for(var y=!0,t=0;t<
+x.length&&y;t++)y=y&&p.model.isEdge(x[t]);var G=p.view.translate;t=p.view.scale;var D=G.x,I=G.y;G=null;if(1==x.length&&y){var H=p.getCellGeometry(x[0]);null!=H&&(G=H.getTerminalPoint(!0))}G=null!=G?G:p.getBoundingBoxFromGeometry(x,y);null!=G&&(y=Math.round(p.snap(p.popupMenuHandler.triggerX/t-D)),t=Math.round(p.snap(p.popupMenuHandler.triggerY/t-I)),p.cellsMoved(x,y-G.x,t-G.y))}}function g(){p.getModel().beginUpdate();try{f(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){d=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(x){if(null!=x){p.getModel().beginUpdate();try{f(m.pasteXml(x,!0))}finally{p.getModel().endUpdate()}}else g()}),d=!0)}catch(x){}d||g()}});this.addAction("copySize",function(){var d=p.getSelectionCell();p.isEnabled()&&null!=d&&p.getModel().isVertex(d)&&(d=p.getCellGeometry(d),null!=d&&(m.copiedSize=new mxRectangle(d.x,d.y,d.width,d.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var d=p.getResizableCells(p.getSelectionCells()),f=0;f<d.length;f++)if(p.getModel().isVertex(d[f])){var g=p.getCellGeometry(d[f]);null!=g&&(g=g.clone(),g.width=m.copiedSize.width,g.height=m.copiedSize.height,p.getModel().setGeometry(d[f],g))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var d=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(u,H){var J=x.getValue(u);H=u.cloneValue(H);H.removeAttribute("placeholders");null==J||isNaN(J.nodeType)||H.setAttribute("placeholders",J.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||H.setAttribute("label",p.convertValueToString(u));x.setValue(u,H)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
+null!=d&&(d=d.cloneValue(),null==d||isNaN(d.nodeType)||(m.copiedValue=d))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(d,f){function g(t,G){var D=x.getValue(t);G=t.cloneValue(G);G.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||G.setAttribute("placeholders",D.getAttribute("placeholders"));null!=d&&mxEvent.isShiftDown(d)||G.setAttribute("label",p.convertValueToString(t));x.setValue(t,G)}d=null!=f?f:d;var x=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){x.beginUpdate();
try{var y=p.getEditableCells(p.getSelectionCells());if(0==y.length)g(x.getRoot(),m.copiedValue);else for(f=0;f<y.length;f++)g(y[f],m.copiedValue)}finally{x.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,f){d=null!=f?f:d;null!=d&&mxEvent.isShiftDown(d)?e():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||mxEvent.isAltDown(d)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(d){m.handleError(d)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var d=m.getSelectionState();if(null!=d.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",d.rowspan,[d.mergeCell]),p.setCellStyles("colspan",d.colspan,[d.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var d=m.getSelectionState();if(0<d.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,d.cells),p.setCellStyles("colspan",null,d.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(d,f){d=null!=f?f:d;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=d?mxEvent.isShiftDown(d):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2978,25 +2979,25 @@ x)});m.showDialog(f.container,320,200,!0,!0);f.init()}},null,null,"Alt+Shift+T")
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=F;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("insert"),function(d,f,g){d=mxUtils.trim(d);if(0<d.length){var x=null,y=p.getLinkTitle(d);null!=f&&0<f.length&&(x=f[0].iconUrl,
y=f[0].name||f[0].type,y=y.charAt(0).toUpperCase()+y.substring(1),30<y.length&&(y=y.substring(0,30)+"..."));f=new mxCell(y,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=x?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+x:"spacing=10;"));f.vertex=!0;x=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([f],!0));f.geometry.x=x.x;f.geometry.y=x.y;p.setAttributeForCell(f,"linkTarget",g);p.setLinkForCell(f,d);p.cellSizeUpdated(f,
!0);p.getModel().beginUpdate();try{f=p.addCell(f),p.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{p.getModel().endUpdate()}p.setSelectionCell(f);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=F;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var d=p.getSelectedElement(),f=p.getParentByName(d,"A",p.cellEditor.textarea),g="";if(null==f&&null!=d&&null!=d.getElementsByTagName)for(var x=d.getElementsByTagName("a"),
-y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var u=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(H){p.cellEditor.restoreSelection(u);null!=H&&p.insertLink(H)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
-try{for(var f=0;f<d.length;f++){var g=d[f];0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g)}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=p.getEditableCells(p.getSelectionCells()),
-g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(u.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;
-d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*
-Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-
-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/
-p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,
-300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}));var K=null;K=this.addAction("grid",
-function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.isGridEnabled()});K.setEnabled(!1);K=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});
-K.setEnabled(!1);K=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});K=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.foldingEnabled});
-K.isEnabled=F;K=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.scrollbars});K=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));K.setToggleAction(!0);K.setSelectedCallback(function(){return p.pageVisible});K=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionArrowsEnabled});K=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});K=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
-m.fireEvent(new mxEventObject("copyConnectChanged"))});K.setToggleAction(!0);K.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});K.isEnabled=F;K=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});K.setToggleAction(!0);K.setSelectedCallback(function(){return m.editor.autosave});K.isEnabled=F;K.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));K=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(y,function(H){H.style.fontWeight=null;"B"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(H){H.style.fontStyle=null;"I"==H.nodeName&&p.replaceElement(H)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(H){H.style.textDecoration=null;"U"==H.nodeName&&p.replaceElement(H)});for(var u=0;u<y.length;u++)0==p.model.getChildCount(y[u])&&p.autoSizeCell(y[u],
-!1)}finally{p.getModel().endUpdate()}}},null,null,x)});K("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");K("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");K("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+y=0;y<x.length&&null==f;y++)x[y].textContent==d.textContent&&(f=x[y]);null!=f&&"A"==f.nodeName&&(g=f.getAttribute("href")||"",p.selectNode(f));var t=p.cellEditor.saveSelection();m.showLinkDialog(g,mxResources.get("apply"),mxUtils.bind(this,function(G){p.cellEditor.restoreSelection(t);null!=G&&p.insertLink(G)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=F;this.addAction("autosize",function(){var d=p.getSelectionCells();if(null!=d){p.getModel().beginUpdate();
+try{for(var f=0;f<d.length;f++){var g=d[f];p.getModel().isVertex(g)&&(0<p.getModel().getChildCount(g)?p.updateGroupBounds([g],0,!0):p.updateCellSize(g))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var d=p.getCommonStyle(p.getSelectionCells());d="1"==mxUtils.getValue(d,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var f=
+p.getEditableCells(p.getSelectionCells()),g=0;g<f.length;g++)if(state=p.getView().getState(f[g]),null!=state){var x=mxUtils.getValue(state.style,"html","0");if("1"==x&&null==d){var y=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var t=document.createElement("div");t.innerHTML=p.sanitizeHtml(y);y=mxUtils.extractTextWithWhitespace(t.childNodes);p.cellLabelChanged(state.cell,y);p.setCellStyles("html",d,[f[g]])}else"0"==
+x&&"1"==d&&(y=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(y=y.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(y)),p.setCellStyles("html",d,[f[g]]))}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=d?d:"0"],"cells",f))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var d=p.getView().getState(p.getSelectionCell()),f="wrap";p.stopEditing();null!=d&&"wrap"==d.style[mxConstants.STYLE_WHITE_SPACE]&&
+(f=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,f)});this.addAction("rotation",function(){var d="0",f=p.getView().getState(p.getSelectionCell());null!=f&&(d=f.style[mxConstants.STYLE_ROTATION]||d);d=new FilenameDialog(m,d,mxResources.get("apply"),function(g){null!=g&&0<g.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,g)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(d.container,375,80,!0,!0);d.init()});this.addAction("resetView",function(){p.zoomTo(1);
+m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(d){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(d){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var d=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),f=p.view.translate,
+g=p.view.scale;d.x=d.x/g-f.x;d.y=d.y/g-f.y;d.width/=g;d.height/=g;null!=p.backgroundImage&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==d.width||0==d.height?(p.zoomTo(1),m.resetScrollbars()):(f=Editor.fitWindowBorders,null!=f&&(d.x-=f.x,d.y-=f.y,d.width+=f.width+f.x,d.height+=f.height+f.y),p.fitWindow(d))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+var d=p.pageFormat,f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/d.width/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=d.y*p.view.scale-1,p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();var d=p.pageFormat,
+f=p.pageScale;p.zoomTo(Math.floor(20*Math.min((p.container.clientWidth-10)/(2*d.width)/f,(p.container.clientHeight-10)/d.height/f))/20);mxUtils.hasScrollbars(p.container)&&(d=p.getPagePadding(),p.container.scrollTop=Math.min(d.y,(p.container.scrollHeight-p.container.clientHeight)/2),p.container.scrollLeft=Math.min(d.x,(p.container.scrollWidth-p.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
+p.zoomTo(Math.floor(20*(p.container.clientWidth-10)/p.pageFormat.width/p.pageScale)/20);if(mxUtils.hasScrollbars(p.container)){var d=p.getPagePadding();p.container.scrollLeft=Math.min(d.x*p.view.scale,(p.container.scrollWidth-p.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&
+0<f&&p.zoomTo(f/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(d.container,300,80,!0,!0);d.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var d=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(f){f=parseInt(f);!isNaN(f)&&0<f&&(f=new ChangePageSetup(m,null,null,null,f/100),f.ignoreColor=!0,f.ignoreImage=!0,p.model.execute(f))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(d.container,
+300,80,!0,!0);d.init()}));var L=null;L=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.isGridEnabled()});L.setEnabled(!1);L=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});L.setToggleAction(!0);
+L.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});L.setEnabled(!1);L=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});L=this.addAction("collapseExpand",function(){var d=new ChangePageSetup(m);d.ignoreColor=!0;d.ignoreImage=!0;d.foldingEnabled=!p.foldingEnabled;p.model.execute(d)});
+L.setToggleAction(!0);L.setSelectedCallback(function(){return p.foldingEnabled});L.isEnabled=F;L=this.addAction("scrollbars",function(){m.setScrollbars(!m.hasScrollbars())});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.scrollbars});L=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));L.setToggleAction(!0);L.setSelectedCallback(function(){return p.pageVisible});L=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
+m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionArrowsEnabled});L=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});L=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
+m.fireEvent(new mxEventObject("copyConnectChanged"))});L.setToggleAction(!0);L.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});L.isEnabled=F;L=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});L.setToggleAction(!0);L.setSelectedCallback(function(){return m.editor.autosave});L.isEnabled=F;L.visible=!1;this.addAction("help",function(){var d="";mxResources.isLanguageSupported(mxClient.language)&&(d="_"+mxClient.language);p.openLink(RESOURCES_PATH+
+"/help"+d+".html")});var P=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){P||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){P=!1}),P=!0)}));L=mxUtils.bind(this,function(d,f,g,x){return this.addAction(d,function(){if(null!=g&&p.cellEditor.isContentEditing())g();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var y=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,y);(f&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?p.updateLabelElements(y,function(G){G.style.fontWeight=null;"B"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(y,function(G){G.style.fontStyle=null;"I"==G.nodeName&&p.replaceElement(G)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(y,function(G){G.style.textDecoration=null;"U"==G.nodeName&&p.replaceElement(G)});for(var t=0;t<y.length;t++)0==p.model.getChildCount(y[t])&&p.autoSizeCell(y[t],
+!1)}finally{p.getModel().endUpdate()}}},null,null,x)});L("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");L("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");L("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
@@ -3005,17 +3006,17 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,g);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var d=p.view.getState(p.getSelectionCell()),f="1";null!=d&&null!=p.getFoldingImage(d)&&(f="0");p.setCellStyles("collapsible",f);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[f],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var d=p.getEditableCells(p.getSelectionCells());if(null!=d&&0<d.length){var f=p.getModel();f=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",f.getStyle(d[0])||"",function(g){null!=g&&p.setCellStyle(mxUtils.trim(g),d)},null,null,400,220);this.editorUi.showDialog(f.container,420,300,!0,!0);f.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var u=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=u;)y+=u.x,g+=u.y,d=
-p.getModel().getParent(d),u=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
-0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var u=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=u&&(u=u.clone(),u.points=null,u.x=0,u.y=0,u.offset=null,p.getModel().setGeometry(y,u))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");K=this.addAction("subscript",
-mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");K=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
-g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(u,H,J,D,G,W){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(u,H,J);else{var T=p.getSelectionCells();if(null!=u&&(0<u.length||0<T.length)){var Z=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,H,J,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var N=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=N.x;T[0].geometry.y=N.y;null!=D&&k(T[0],D,G,W,p);Z=T;p.fireEvent(new mxEventObject("cellsInserted","cells",Z))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<u.length?u:null,T);var qa=p.getCurrentCellStyle(T[0]);"image"!=qa[mxConstants.STYLE_SHAPE]&&"label"!=qa[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==u.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==D&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,T);if(null!=H&&null!=J)for(u=0;u<T.length;u++){var oa=T[u];if("0"!=p.getCurrentCellStyle(oa).expand){var S=p.getModel().getGeometry(oa);null!=S&&(S=S.clone(),S.width=H,S.height=J,p.getModel().setGeometry(oa,S))}null!=D&&k(oa,D,G,W,p)}}finally{p.getModel().endUpdate()}null!=Z&&(p.setSelectionCells(Z),p.scrollCellToVisible(Z[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,u,H){k(d,y,u,H,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;K=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
-mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
-K=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));K=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
-this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");K.setToggleAction(!0);K.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var d=p.getSelectionCell();if(null!=d&&p.getModel().isEdge(d)){var f=C.graph.selectionCellsHandler.getHandler(d);if(f instanceof mxEdgeHandler){var g=p.view.translate,x=p.view.scale,y=g.x;g=g.y;d=p.getModel().getParent(d);for(var t=p.getCellGeometry(d);p.getModel().isVertex(d)&&null!=t;)y+=t.x,g+=t.y,d=
+p.getModel().getParent(d),t=p.getCellGeometry(d);y=Math.round(p.snap(p.popupMenuHandler.triggerX/x-y));x=Math.round(p.snap(p.popupMenuHandler.triggerY/x-g));f.addPointAt(f.state,y,x)}}});this.addAction("removeWaypoint",function(){var d=m.actions.get("removeWaypoint");null!=d.handler&&d.handler.removePoint(d.handler.state,d.index)});this.addAction("clearWaypoints",function(d,f){d=null!=f?f:d;var g=p.getSelectionCells();if(null!=g){g=p.getEditableCells(p.addAllEdges(g));p.getModel().beginUpdate();try{for(var x=
+0;x<g.length;x++){var y=g[x];if(p.getModel().isEdge(y)){var t=p.getCellGeometry(y);null!=f&&mxEvent.isShiftDown(d)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[y]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[y])):null!=t&&(t=t.clone(),t.points=null,t.x=0,t.y=0,t.offset=null,p.getModel().setGeometry(y,t))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");L=this.addAction("subscript",
+mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");L=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var d=mxResources.get("image")+" ("+mxResources.get("url")+"):",f=p.getView().getState(p.getSelectionCell()),
+g="",x=null;null!=f&&(g=f.style[mxConstants.STYLE_IMAGE]||g,x=f.style[mxConstants.STYLE_CLIP_PATH]||x);var y=p.cellEditor.saveSelection();m.showImageDialog(d,g,function(t,G,D,I,H,S){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(y),p.insertImage(t,G,D);else{var T=p.getSelectionCells();if(null!=t&&(0<t.length||0<T.length)){var M=null;p.getModel().beginUpdate();try{if(0==T.length){T=[p.insertVertex(p.getDefaultParent(),null,"",0,0,G,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var fa=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(T,!0));T[0].geometry.x=fa.x;T[0].geometry.y=fa.y;null!=I&&k(T[0],I,H,S,p);M=T;p.fireEvent(new mxEventObject("cellsInserted","cells",M))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,T);var la=p.getCurrentCellStyle(T[0]);"image"!=la[mxConstants.STYLE_SHAPE]&&"label"!=la[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",T):0==t.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,T);null==I&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,T);if(null!=G&&null!=D)for(t=0;t<T.length;t++){var ra=T[t];if("0"!=p.getCurrentCellStyle(ra).expand){var ba=p.getModel().getGeometry(ra);null!=ba&&(ba=ba.clone(),ba.width=G,ba.height=D,p.getModel().setGeometry(ra,ba))}null!=I&&k(ra,I,H,S,p)}}finally{p.getModel().endUpdate()}null!=M&&(p.setSelectionCells(M),p.scrollCellToVisible(M[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,x)}}).isEnabled=F;this.addAction("crop...",function(){var d=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=p.getCurrentCellStyle(d),g=f[mxConstants.STYLE_IMAGE],x=f[mxConstants.STYLE_SHAPE];g&&"image"==x&&(f=new CropImageDialog(m,g,f[mxConstants.STYLE_CLIP_PATH],function(y,t,G){k(d,y,t,G,p)}),m.showDialog(f.container,300,390,!0,!0))}}).isEnabled=F;L=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
+L=this.addAction("formatPanel",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return 0<m.formatWidth}));L=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),
+this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");L.setToggleAction(!0);L.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var d=
p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=d){var f=new ConnectionPointsDialog(m,d);m.showDialog(f.container,350,450,!0,!1,function(){f.destroy()});f.init()}}).isEnabled=F};Actions.prototype.addAction=function(b,e,k,m,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,m,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,m,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=m;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
@@ -3024,25 +3025,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,m){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,m):this.reloadFile(b,
e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var K=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(K);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,K[0]),f=this.ui.getHashValueForPages(d,
-m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",K,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),u=this.ui.hashValue(b.getCurrentEtag()),H=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,K,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+u+"\nTo: "+H+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var J=this.sync.patchRealtime(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==J||mxUtils.isEmptyObject(J)||K.push(J)}this.patch(K,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(W){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(W);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,W);else{var D=this.getCurrentUser(),G=null!=D?D.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),G,W)}}catch(T){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,m){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),F=b.getShadowPages();if(null!=F&&0<F.length){var L=[this.ui.diffPages(null!=m?m:p,F)],P=this.ignorePatches(L);this.setShadowPages(F);if(P)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",P);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;m={};P={};var d=this.ui.patchPages(p,L[0]),f=this.ui.getHashValueForPages(d,
+m),g=this.ui.getHashValueForPages(F,P);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",L,"backup",this.backupPatch,"checksum",f,"current",g,"valid",f==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=f&&f!=g){var x=this.compressReportData(this.getAnonymizedXmlForPages(F)),y=this.compressReportData(this.getAnonymizedXmlForPages(d)),t=this.ui.hashValue(b.getCurrentEtag()),G=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,L,"Shadow Details: "+JSON.stringify(m)+"\nChecksum: "+f+"\nCurrent: "+g+"\nCurrent Details: "+JSON.stringify(P)+"\nFrom: "+t+"\nTo: "+G+"\n\nFile Data:\n"+x+"\nPatched Shadow:\n"+y,null,"mergeFile",f,g,b.getCurrentRevisionId());return}if(null!=this.sync){var D=this.sync.patchRealtime(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==D||mxUtils.isEmptyObject(D)||L.push(D)}this.patch(L,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(S){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(S);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,S);else{var I=this.getCurrentUser(),H=null!=I?I.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),H,S)}}catch(T){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var C=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,K){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(H){var J=this.compressReportData(JSON.stringify(e,null,2));H=null==H?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(H.data)),
-25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+J+(null!=H?"\n\nRemote:\n"+H:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(H){null!=H&&H.getCurrentEtag()==m?d(H):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,u=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
-u=JSON.stringify(e);u=null!=u&&250>u.length?Graph.compress(u):null}this.getLatestVersion(mxUtils.bind(this,function(H){try{var J=null!=u?"Report":"Error",D=this.ui.getHashValueForPages(H.getShadowPages());EditorUi.logError("Checksum "+J+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=u?"-json_"+u:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=K?
-"-rev_"+this.ui.hashValue(K):"")+(null!=D?"-latest_"+D:"")+(null!=H?"-latestRev_"+this.ui.hashValue(H.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(G){}}),b)}}catch(H){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),K=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+K+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,k,m,C,p,F,L){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);var d=mxUtils.bind(this,function(G){var D=this.compressReportData(JSON.stringify(e,null,2));G=null==G?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(G.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+D+(null!=G?"\n\nRemote:\n"+G:""),null,7E4)});null==m?d(null):this.getLatestVersion(mxUtils.bind(this,function(G){null!=G&&G.getCurrentEtag()==m?d(G):d(null)}),function(){})}else{var f=this.getCurrentUser(),g=null!=f?f.id:"unknown",x=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",y=JSON.stringify(e).length,t=null;if(null!=e&&this.constructor==DriveFile&&400>y){for(P=0;P<e.length;P++)this.ui.anonymizePatch(e[P]);
+t=JSON.stringify(e);t=null!=t&&250>t.length?Graph.compress(t):null}this.getLatestVersion(mxUtils.bind(this,function(G){try{var D=null!=t?"Report":"Error",I=this.ui.getHashValueForPages(G.getShadowPages());EditorUi.logError("Checksum "+D+" in "+C+" "+x,null,this.getMode()+"."+this.getId(),"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+(null!=t?"-json_"+t:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=F?"-current_"+F:"")+(null!=L?
+"-rev_"+this.ui.hashValue(L):"")+(null!=I?"-latest_"+I:"")+(null!=G?"-latestRev_"+this.ui.hashValue(G.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+x,action:C,label:"user_"+g+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+y+"-patches_"+e.length+"-size_"+this.getSize()})}catch(H){}}),b)}}catch(G){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,m){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),F=this.getCurrentUser(),L=null!=F?this.ui.hashValue(F.id):"unknown",P=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",d=this.getTitle(),f=d.lastIndexOf(".");F="xml";0<f&&(F=d.substring(f));var g=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+F+")\nUser="+L+P+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+g+"\n\nShadow:\n"+C+"\n\nData:\n"+p,m)}catch(x){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var m=this.ui.editor.graph,C=m.getSelectionCells(),p=m.getViewState(),F=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var K=this.ui.getCurrentFile();null!=K&&(K.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(F,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var L=this.ui.getCurrentFile();null!=L&&(L.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(m){null!=e&&e(m)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(m){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(m.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(m.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var K=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=K;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var m=this.ui.editor.undoManager,C=m.history.slice(),p=m.indexOfNextAdd,F=this.ui.editor.graph;F.container.style.visibility="hidden";var L=this.changeListenerEnabled;this.changeListenerEnabled=k;var P=F.foldingEnabled,d=F.mathEnabled,f=F.cellRenderer.redraw;F.cellRenderer.redraw=function(g){g.view.graph.isEditing(g.cell)&&(g.view.graph.scrollCellToVisible(g.cell),g.view.graph.cellEditor.resize());f.apply(this,arguments)};F.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{F.container.style.visibility="";F.model.endUpdate();F.cellRenderer.redraw=f;this.changeListenerEnabled=L;k||(m.history=C,m.indexOfNextAdd=p,m.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)d!=F.mathEnabled?
(this.ui.editor.updateGraphComponents(),F.refresh()):(P!=F.foldingEnabled?F.view.revalidate():F.view.validate(),F.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,m,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(F){if(null!=k)k(F);else throw F;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3089,7 +3090,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,k,m,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,m,C)}catch(P){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),K=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),K,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=m&&m(P);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,P);else{var F=this.getCurrentUser(),L=null!=F?F.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),L,P)}}catch(d){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,e,k,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==C&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(F){this.autosaveCompleted();null!=k&&k(F)}),mxUtils.bind(this,function(F){null!=m&&m(F)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -3098,10 +3099,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,m,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,m,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),P=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
function(x){this.savingFile=!1;null!=m&&m({error:x})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(x){this.fileHandle.getFile().then(mxUtils.bind(this,function(y){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[y],"conflict",this.desc.lastModified!=y.lastModified);this.desc.lastModified==y.lastModified?x.write(p?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){x.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var H=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(F,H,K,f);this.removeDraft()}catch(J){f(J)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));K()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var G=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,G,L,f);this.removeDraft()}catch(D){f(D)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(y){this.invalidFileHandle=!0;f(y)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,p?"image/png":"text/xml",p);else if(d.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));L()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){P(d)}),m,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):P(F)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -3151,45 +3152,45 @@ type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",t
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,E){var Q=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,E){return 0<q.vertices.length&&
E.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var ba=Y[R];switch(ba.type){case "path":null!=Q.stroke&&this._drawToContext(q,ba,Q);break;case "fillPath":this._drawToContext(q,ba,Q);break;case "fillSketch":this.fillSketch(q,ba,Q)}}};E.fillSketch=function(Q,Y,R){var ba=q.state.strokeColor,ea=q.state.strokeWidth,ra=q.state.strokeAlpha,ta=q.state.dashed,la=
-R.fillWeight;0>la&&(la=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(la);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(ta);q.setStrokeWidth(ea);q.setStrokeColor(ba);q.setStrokeAlpha(ra)};E._drawToContext=function(Q,Y,R){Q.begin();for(var ba=0;ba<Y.ops.length;ba++){var ea=Y.ops[ba],ra=ea.data;switch(ea.op){case "move":Q.moveTo(ra[0],ra[1]);break;case "bcurveTo":Q.curveTo(ra[0],ra[1],ra[2],ra[3],ra[4],ra[5]);break;case "lineTo":Q.lineTo(ra[0],
-ra[1])}}Q.end();"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(ba,ea,ra){this.canvas=ba;this.rc=ea;this.shape=ra;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
-this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(ba,ea){var ra=1;if(null!=this.shape.state){var ta=this.shape.state.cell.id;if(null!=ta)for(var la=0;la<ta.length;la++)ra=(ra<<5)-ra+ta.charCodeAt(la)<<0}ra={strokeWidth:this.canvas.state.strokeWidth,seed:ra,preserveVertices:!0};ta=this.rc.getDefaultOptions();ra.stroke=ba?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ba=null;(ra.filled=ea)?(ra.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ba=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ra.fill="";ra.bowing=mxUtils.getValue(this.shape.style,"bowing",ta.bowing);ra.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ta.hachureAngle);ra.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ta.curveFitting);ra.roughness=mxUtils.getValue(this.shape.style,"jiggle",ta.roughness);ra.simplification=mxUtils.getValue(this.shape.style,"simplification",ta.simplification);ra.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ta.disableMultiStroke);ra.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ta.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);ra.hachureGap="auto"==ea?-1:ea;ra.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);ra.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);ra.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);ra.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=ra.fill&&(null!=ba||null!=ea&&ra.fill==ea)?"solid":
-ta.fillStyle);ra.fillStyle=ea;return ra};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ba=2;ba<arguments.length;ba+=2)this.lastX=arguments[ba-1],this.lastY=arguments[ba],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-q.prototype.lineTo=function(ba,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ba,ea),this.lastX=ba,this.lastY=ea)};q.prototype.moveTo=function(ba,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ba,ea),this.lastX=ba,this.lastY=ea,this.firstX=ba,this.firstY=ea)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(ba,
-ea,ra,ta){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ba,ea,ra,ta),this.lastX=ra,this.lastY=ta)};q.prototype.curveTo=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ba,ea,ra,ta,la,pa),this.lastX=la,this.lastY=pa)};q.prototype.arcTo=function(ba,ea,ra,ta,la,pa,xa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,
-ba,ea,ra,ta,la,pa,xa);if(null!=Ca)for(var Ia=0;Ia<Ca.length;Ia+=6)this.curveTo(Ca[Ia],Ca[Ia+1],Ca[Ia+2],Ca[Ia+3],Ca[Ia+4],Ca[Ia+5]);this.lastX=pa;this.lastY=xa}};q.prototype.rect=function(ba,ea,ra,ta){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ba,ea,ra,ta,this.getStyle(!0,!0)))};q.prototype.ellipse=function(ba,ea,ra,ta){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ba+
-ra/2,ea+ta/2,ra,ta,this.getStyle(!0,!0)))};q.prototype.roundrect=function(ba,ea,ra,ta,la,pa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ba+la,ea),this.lineTo(ba+ra-la,ea),this.quadTo(ba+ra,ea,ba+ra,ea+pa),this.lineTo(ba+ra,ea+ta-pa),this.quadTo(ba+ra,ea+ta,ba+ra-la,ea+ta),this.lineTo(ba+la,ea+ta),this.quadTo(ba,ea+ta,ba,ea+ta-pa),this.lineTo(ba,ea+pa),this.quadTo(ba,ea,ba+la,ea))};q.prototype.drawPath=function(ba){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ba)}catch(ra){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ba)this.nextShape.options[ea]=ba[ea];ba.stroke!=mxConstants.NONE&&null!=ba.stroke||delete this.nextShape.options.stroke;ba.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
-function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
-this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ba){return new q(ba,Editor.createRoughCanvas(ba),this)};var E=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ba){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ba):this.createRoughCanvas(ba)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ba,ea,ra,ta,la){null!=ba.handJiggle&&ba.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ba){var ea=ba.addTolerance,ra=!0;null!=this.style&&(ra="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ba.handJiggle&&ba.handJiggle.constructor==q&&!this.outline){ba.save();var ta=this.fill,la=this.stroke;this.stroke=this.fill=null;var pa=this.configurePointerEvents,xa=ba.setStrokeColor;ba.setStrokeColor=function(){};var Ca=ba.setFillColor;ba.setFillColor=function(){};ra||null==ta||(this.configurePointerEvents=function(){});ba.handJiggle.passThrough=!0;Y.apply(this,
-arguments);ba.handJiggle.passThrough=!1;ba.setFillColor=Ca;ba.setStrokeColor=xa;this.configurePointerEvents=pa;this.stroke=la;this.fill=ta;ba.restore();ra&&null!=ta&&(ba.addTolerance=function(){})}Y.apply(this,arguments);ba.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ba,ea,ra,ta,la,pa){null!=ba.handJiggle&&ba.handJiggle.constructor==q?(ba.handJiggle.passThrough=!0,R.apply(this,arguments),ba.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var ba=0;ba<Y.length;ba++)if("mxgraph"==Y[ba].getAttribute("class")){R.push(Y[ba]);
-break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&
-(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),
-Y=null;0<Q.length?(q=Graph.decompress(Q,null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&
-!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,ba=[],ea=null;R<q.length;){var ra=q.charCodeAt(R);R+=1;10!=ra&&(E+=String.fromCharCode(ra));ra=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=
-0;if(19==Y){var ta=q.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ta>R){Q=q.substring(R,ta);break}}10==ra&&("endobj"==E?ea=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(ea=[],ba[E.split(" ")[0]]=ea):null!=ea&&ea.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ba));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),
-null!=E&&0<E.length&&(E=q[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,
-E){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
-q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=
-q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+
-"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");
-E.appendChild(document.createTextNode(q.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
-q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=
-q.zoomFactor&&(E=parseFloat(q.zoomFactor),!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),
-mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
-null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");
-Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
-"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+Editor.createRoughCanvas=function(q){var E=rough.canvas({getContext:function(){return q}});E.draw=function(Q){var Y=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<Y.length;R++){var Z=Y[R];switch(Z.type){case "path":null!=Q.stroke&&this._drawToContext(q,Z,Q);break;case "fillPath":this._drawToContext(q,Z,Q);break;case "fillSketch":this.fillSketch(q,Z,Q)}}};E.fillSketch=function(Q,Y,R){var Z=q.state.strokeColor,da=q.state.strokeWidth,qa=q.state.strokeAlpha,va=q.state.dashed,ja=R.fillWeight;
+0>ja&&(ja=R.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(R.fill||"");q.setStrokeWidth(ja);q.setDashed(!1);this._drawToContext(Q,Y,R);q.setDashed(va);q.setStrokeWidth(da);q.setStrokeColor(Z);q.setStrokeAlpha(qa)};E._drawToContext=function(Q,Y,R){Q.begin();for(var Z=0;Z<Y.ops.length;Z++){var da=Y.ops[Z],qa=da.data;switch(da.op){case "move":Q.moveTo(qa[0],qa[1]);break;case "bcurveTo":Q.curveTo(qa[0],qa[1],qa[2],qa[3],qa[4],qa[5]);break;case "lineTo":Q.lineTo(qa[0],qa[1])}}Q.end();
+"fillPath"===Y.type&&R.filled?Q.fill():Q.stroke()};return E};(function(){function q(Z,da,qa){this.canvas=Z;this.rc=da;this.shape=qa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
+q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(Z,da){var qa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var ja=0;ja<va.length;ja++)qa=(qa<<5)-qa+va.charCodeAt(ja)<<0}qa={strokeWidth:this.canvas.state.strokeWidth,seed:qa,preserveVertices:!0};va=this.rc.getDefaultOptions();qa.stroke=Z?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Z=null;(qa.filled=da)?(qa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Z=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):qa.fill="";qa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);qa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);qa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
+qa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);qa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);qa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);qa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);da=mxUtils.getValue(this.shape.style,"hachureGap",-1);qa.hachureGap="auto"==da?-1:da;qa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+da);qa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",da);qa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",da);da=mxUtils.getValue(this.shape.style,"fillWeight",-1);qa.fillWeight="auto"==da?-1:da;da=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==da&&(da=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),da=null!=qa.fill&&(null!=Z||null!=da&&qa.fill==da)?"solid":va.fillStyle);
+qa.fillStyle=da;return qa};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Z=2;Z<arguments.length;Z+=2)this.lastX=arguments[Z-1],this.lastY=arguments[Z],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+q.prototype.lineTo=function(Z,da){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Z,da),this.lastX=Z,this.lastY=da)};q.prototype.moveTo=function(Z,da){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Z,da),this.lastX=Z,this.lastY=da,this.firstX=Z,this.firstY=da)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(Z,da,qa,
+va){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Z,da,qa,va),this.lastX=qa,this.lastY=va)};q.prototype.curveTo=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Z,da,qa,va,ja,sa),this.lastX=ja,this.lastY=sa)};q.prototype.arcTo=function(Z,da,qa,va,ja,sa,ya){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Z,da,qa,
+va,ja,sa,ya);if(null!=Aa)for(var Ea=0;Ea<Aa.length;Ea+=6)this.curveTo(Aa[Ea],Aa[Ea+1],Aa[Ea+2],Aa[Ea+3],Aa[Ea+4],Aa[Ea+5]);this.lastX=sa;this.lastY=ya}};q.prototype.rect=function(Z,da,qa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Z,da,qa,va,this.getStyle(!0,!0)))};q.prototype.ellipse=function(Z,da,qa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Z+
+qa/2,da+va/2,qa,va,this.getStyle(!0,!0)))};q.prototype.roundrect=function(Z,da,qa,va,ja,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Z+ja,da),this.lineTo(Z+qa-ja,da),this.quadTo(Z+qa,da,Z+qa,da+sa),this.lineTo(Z+qa,da+va-sa),this.quadTo(Z+qa,da+va,Z+qa-ja,da+va),this.lineTo(Z+ja,da+va),this.quadTo(Z,da+va,Z,da+va-sa),this.lineTo(Z,da+sa),this.quadTo(Z,da,Z+ja,da))};q.prototype.drawPath=function(Z){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),
+Z)}catch(qa){}this.passThrough=!1}else if(null!=this.nextShape){for(var da in Z)this.nextShape.options[da]=Z[da];Z.stroke!=mxConstants.NONE&&null!=Z.stroke||delete this.nextShape.options.stroke;Z.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,
+arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
+this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Z){return new q(Z,Editor.createRoughCanvas(Z),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Z){return this.outline||
+null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(Z):this.createRoughCanvas(Z)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Z,da,qa,va,ja){null!=Z.handJiggle&&Z.handJiggle.passThrough||Q.apply(this,arguments)};var Y=mxShape.prototype.paint;mxShape.prototype.paint=function(Z){var da=Z.addTolerance,qa=!0;null!=this.style&&(qa="1"==
+mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Z.handJiggle&&Z.handJiggle.constructor==q&&!this.outline){Z.save();var va=this.fill,ja=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,ya=Z.setStrokeColor;Z.setStrokeColor=function(){};var Aa=Z.setFillColor;Z.setFillColor=function(){};qa||null==va||(this.configurePointerEvents=function(){});Z.handJiggle.passThrough=!0;Y.apply(this,arguments);Z.handJiggle.passThrough=!1;Z.setFillColor=Aa;Z.setStrokeColor=
+ya;this.configurePointerEvents=sa;this.stroke=ja;this.fill=va;Z.restore();qa&&null!=va&&(Z.addTolerance=function(){})}Y.apply(this,arguments);Z.addTolerance=da};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Z,da,qa,va,ja,sa){null!=Z.handJiggle&&Z.handJiggle.constructor==q?(Z.handJiggle.passThrough=!0,R.apply(this,arguments),Z.handJiggle.passThrough=!1):R.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?
+q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,E,Q){if(null!=q&&"undefined"!==typeof pako){var Y=q.ownerDocument.getElementsByTagName("div"),R=[];if(null!=Y&&0<Y.length)for(var Z=0;Z<Y.length;Z++)if("mxgraph"==Y[Z].getAttribute("class")){R.push(Y[Z]);break}0<R.length&&(Y=R[0].getAttribute("data-mxgraph"),
+null!=Y?(R=JSON.parse(Y),null!=R&&null!=R.xml&&(q=mxUtils.parseXml(R.xml),q=q.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(Y=mxUtils.getTextContent(R[0]),Y=Graph.decompress(Y,null,Q),0<Y.length&&(q=mxUtils.parseXml(Y),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(Y=q.getAttribute("content"),null!=Y&&"<"!=Y.charAt(0)&&"%"!=Y.charAt(0)&&(Y=unescape(window.atob?atob(Y):Base64.decode(cont,Y))),null!=Y&&"%"==Y.charAt(0)&&(Y=decodeURIComponent(Y)),null!=Y&&0<Y.length)q=
+mxUtils.parseXml(Y).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||E||(R=null,"diagram"==q.nodeName?R=q:"mxfile"==q.nodeName&&(Y=q.getElementsByTagName("diagram"),0<Y.length&&(R=Y[Math.max(0,Math.min(Y.length-1,urlParams.page||0))])),null!=R&&(q=Editor.parseDiagramNode(R,Q)));null==q||"mxGraphModel"==q.nodeName||E&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,E){var Q=mxUtils.trim(mxUtils.getTextContent(q)),Y=null;0<Q.length?(q=Graph.decompress(Q,
+null,E),null!=q&&0<q.length&&(Y=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(Y=mxUtils.createXmlDocument(),Y.appendChild(Y.importNode(q[0],!0)),Y=Y.documentElement));return Y};Editor.getDiagramNodeXml=function(q){var E=mxUtils.getTextContent(q),Q=null;0<E.length?Q=Graph.decompress(E):null!=q.firstChild&&(Q=mxUtils.getXml(q.firstChild));return Q};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,
+!0);if("%PDF-1.7"==q.substring(0,8)){var E=q.indexOf("EmbeddedFile");if(-1<E){var Q=q.indexOf("stream",E)+9;if(0<q.substring(E,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return E=q.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(Q,E)),{to:"string"})}return null}Q=null;E="";for(var Y=0,R=0,Z=[],da=null;R<q.length;){var qa=q.charCodeAt(R);R+=1;10!=qa&&(E+=String.fromCharCode(qa));qa=="/Subject (%3Cmxfile".charCodeAt(Y)?Y++:Y=0;if(19==Y){var va=q.indexOf("%3C%2Fmxfile%3E)",
+R)+15;R-=9;if(va>R){Q=q.substring(R,va);break}}10==qa&&("endobj"==E?da=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(da=[],Z[E.split(" ")[0]]=da):null!=da&&da.push(E),E="")}null==Q&&(Q=Editor.extractGraphModelFromXref(Z));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(q){var E=q.trailer,Q=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=q[E[1]],null!=E&&
+(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(q=q[E[1]],null!=q&&(q=q.join("\n"),Q=q.substring(1,q.length-1))))));return Q};Editor.extractParserError=function(q,E){var Q=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(Q=E||mxResources.get("invalidChars"),E=q[0].getElementsByTagName("div"),0<E.length&&(Q=mxUtils.getTextContent(E[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(q,E){null!=q&&(q=null!=q.error?q.error:
+q,null==q.retry&&(q.retry=E))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||
+StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=
+q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=
+Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var E=document.createElement("style");E.setAttribute("type","text/css");E.appendChild(document.createTextNode(q.css));
+var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(E,Q)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);
+null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(E=parseFloat(q.zoomFactor),
+!isNaN(E)&&1<E?Graph.prototype.zoomFactor=E:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(E=parseInt(q.gridSteps),!isNaN(E)&&0<E?mxGraphView.prototype.gridSteps=E:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=q.pageFormat&&(E=parseInt(q.pageFormat.width),Q=parseInt(q.pageFormat.height),!isNaN(E)&&0<E&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,E,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):
+EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&
+(E=parseInt(q.sidebarTitleSize),!isNaN(E)&&0<E?Sidebar.prototype.sidebarTitleSize=E:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(E=parseInt(q.autosaveDelay),!isNaN(E)&&0<E?DrawioFile.prototype.autosaveDelay=E:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&
+(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var Q=document.createElement("style");Q.setAttribute("type",
+"text/css");Q.appendChild(document.createTextNode(q));E.parentNode.insertBefore(Q,E);q=q.split("url(");for(Q=1;Q<q.length;Q++){var Y=q[Q].indexOf(")");Y=Editor.trimCssUrl(q[Q].substring(0,Y));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",Y);R.setAttribute("as","font");R.setAttribute("crossorigin","");E.parentNode.insertBefore(R,E)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS=
+"https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var E=[],Q=0;Q<q;Q++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var E=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==q.nodeName){E=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=
E)E!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=Q&&(Y=new mxCodec(Q.ownerDocument),Y.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var Y=new mxCodec(Q.ownerDocument);Y.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||
"1"==q.getAttribute("math");E=q.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(E=q.getAttribute("extFonts"))try{for(E=E.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<E.length;Q++)this.graph.addExtFont(E[Q].name,
@@ -3197,95 +3198,95 @@ E[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=t
this.graph.currentStyle);var Y=this.graph.getBackgroundImageObject(this.graph.backgroundImage,E);null!=Y&&Q.setAttribute("backgroundImage",JSON.stringify(Y));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Y=this.graph.extFonts.map(function(R){return R.name+"^"+R.url}),Q.setAttribute("extFonts",Y.join("|")));return Q};Editor.prototype.isDataSvg=function(q){try{var E=mxUtils.parseXml(q).documentElement.getAttribute("content");
if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var Q=mxUtils.parseXml(E).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(Y){}return!1};Editor.prototype.extractGraphModel=function(q,E,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ba){MathJax.typesetClear([R]),null!=ba.retry?ba.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+ba.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
-Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ba,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,ba;q=$jscomp.makeIterator(q);for(ba=q.next();!ba.done;ba=q.next())ba=ba.value,'"'===ba?(R&&ba===E&&(Q[Y]+=ba),R=!R):","===ba&&R?ba=Q[++Y]="":Q[Y]+=ba,E=ba;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
-E=/\.png$/i.test(q)||/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
+function(q,E){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(Z){MathJax.typesetClear([R]),null!=Z.retry?Z.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+Z.toString())}};window.MathJax=null!=E?E:{options:{skipHtmlTags:{"[+]":["text"]}},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;
+Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(Z,da){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};E=document.getElementsByTagName("script");if(null!=E&&0<E.length){var Y=document.createElement("script");Y.setAttribute("type","text/javascript");Y.setAttribute("src",q);E[0].parentNode.appendChild(Y)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var E="",Q=[""],Y=0,R=!0,Z;q=$jscomp.makeIterator(q);for(Z=q.next();!Z.done;Z=q.next())Z=Z.value,'"'===Z?(R&&Z===E&&(Q[Y]+=Z),R=!R):","===Z&&R?Z=Q[++Y]="":Q[Y]+=Z,E=Z;return Q}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var E=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);E=/\.png$/i.test(q)||
+/\.pdf$/i.test(q)||E;var Q="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+Q+(E?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var E=q.convert,Q=this;q.convert=function(Y){if(null!=Y){var R="http://"==Y.substring(0,7)||"https://"==Y.substring(0,8);R&&!navigator.onLine?Y=Editor.svgBrokenImage.src:!R||Y.substring(0,q.baseUrl.length)==q.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(Y)?"chrome-extension://"==
-Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(ba){window.clearTimeout(Y);Q&&
-E(Editor.createSvgDataUri(ba.getText()))}),function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var ba=document.createElement("canvas"),ea=ba.getContext("2d");ba.height=R.height;ba.width=R.width;ea.drawImage(R,0,0);E(ba.toDataURL())}catch(ra){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(ba){E(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,ba=Q||{};Q=mxUtils.bind(this,function(ea,ra){ea=q.getElementsByTagName(ea);for(var ta=0;ta<ea.length;ta++)mxUtils.bind(this,function(la){try{if(null!=la){var pa=Y.convert(la.getAttribute(ra));if(null!=pa&&"data:"!=pa.substring(0,5)){var xa=ba[pa];null==xa?(R++,this.convertImageToDataUri(pa,function(Ca){null!=Ca&&(ba[pa]=Ca,la.setAttribute(ra,Ca));R--;0==R&&E(q)})):la.setAttribute(ra,xa)}else null!=
-pa&&la.setAttribute(ra,pa)}}catch(Ca){}})(ea[ta])});Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,ba,ea;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}ba=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2);E+="=";break}ea=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ba&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ba&15)<<2|(ea&192)>>
-6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,ba,ea,ra){try{var ta=!ea&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var la=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(pa){if(200<=pa.getStatus()&&299>=pa.getStatus()){if(null!=E){var xa=pa.getText();if(ta){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){pa=mxUtilsBinaryToArray(pa.request.responseBody).toArray();xa=Array(pa.length);for(var Ca=0;Ca<pa.length;Ca++)xa[Ca]=String.fromCharCode(pa[Ca]);xa=xa.join("")}ba=null!=ba?ba:"data:image/png;base64,";xa=ba+Editor.base64Encode(xa)}E(xa)}}else null!=Q&&(0==pa.getStatus()?Q({message:mxResources.get("accessDenied")},pa):404==pa.getStatus()?Q({code:pa.getStatus()},pa):Q({message:mxResources.get("error")+" "+pa.getStatus()},pa))}),function(pa){null!=Q&&
-Q({message:mxResources.get("error")+" "+pa.getStatus()})},ta,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:la})},ra)});la()}catch(pa){null!=Q&&Q(pa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var ba=1;ba<Q.length;ba++)if(Y=
-Q[ba].indexOf(")"),0<Y){var ea=Editor.trimCssUrl(Q[ba].substring(0,Y));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":q)+ea);E.push('url("'+ea+'"'+Q[ba].substring(Y))}else E.push(Q[ba])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=
-q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var ta=[Q[0]],la=1;la<Q.length;la++){var pa=Q[la].indexOf(")");ta.push('url("');ta.push(this.cachedFonts[Editor.trimCssUrl(Q[la].substring(0,pa))]);ta.push('"'+Q[la].substring(pa))}E(ta.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var ba=Q[q].indexOf(")"),ea=null,ra=Q[q].indexOf("format(",ba);0<ra&&(ea=Editor.trimCssUrl(Q[q].substring(ra+7,Q[q].indexOf(")",ra))));mxUtils.bind(this,
-function(ta){if(null==this.cachedFonts[ta]){this.cachedFonts[ta]=ta;Y++;var la="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ta))la="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ta))la="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ta))la="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ta))la="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ta))la="application/vnd.ms-fontobject";else if("sfnt"==
-ea||/(\.sfnt)($|\?)/i.test(ta))la="application/font-sfnt";this.mapFontUrl(la,ta,mxUtils.bind(this,function(pa,xa){this.loadUrl(xa,mxUtils.bind(this,function(Ca){this.cachedFonts[ta]=Ca;Y--;R()}),mxUtils.bind(this,function(Ca){Y--;R()}),!0,null,"data:"+pa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,ba)),ea)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=
-E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),ba=0;ba<E.length;ba++)mxUtils.bind(this,function(ea,
-ra){Graph.isCssFontUrl(ra)?null==this.cachedGoogleFonts[ra]?(Y++,this.loadUrl(ra,mxUtils.bind(this,function(ta){this.cachedGoogleFonts[ra]=ta;Q.push(ta+"\n");Y--;R()}),mxUtils.bind(this,function(ta){Y--;Q.push("@import url("+ra+");\n");R()}))):Q.push(this.cachedGoogleFonts[ra]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+ra+'")}\n')})(E[ba].name,E[ba].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),
-Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?
-Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia,Aa,La,Da,Sa){try{ba=null!=ba?ba:!0;ea=null!=ea?ea:
-!0;xa=null!=xa?xa:this.graph;Ca=null!=Ca?Ca:0;var Ra=ta?null:xa.background;Ra==mxConstants.NONE&&(Ra=null);null==Ra&&(Ra=Y);null==Ra&&0==ta&&(Ra=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(xa.getSvg(null,null,Ca,Ia,null,ea,null,null,null,la,null,La,Da,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(Za,0,0);q(L,Ta)},0):(U.drawImage(Za,0,0),q(L,Ta))},
-L=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),V=parseInt(Ta.getAttribute("height"));ra=null!=ra?ra:1;null!=E&&(ra=ba?Math.min(1,Math.min(3*E/(4*V),E/O)):E/O);ra=this.getMaxCanvasScale(O,V,ra);O=Math.ceil(ra*O);V=Math.ceil(ra*V);L.setAttribute("width",O);L.setAttribute("height",V);var U=L.getContext("2d");null!=Ra&&(U.beginPath(),U.rect(0,0,O,V),U.fillStyle=Ra,U.fill());1!=ra&&U.scale(ra,ra);if(Aa){var ha=xa.view,ma=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));
-ha.scale=ma;wa="data:image/svg+xml;base64,"+wa;var sa=xa.gridSize*ha.gridSteps*ra,ya=xa.getGraphBounds(),Ha=ha.translate.x*ma,Qa=ha.translate.y*ma,ua=Ha+(ya.x-Ha)/ma-Ca,za=Qa+(ya.y-Qa)/ma-Ca,Fa=new Image;Fa.onload=function(){try{for(var Ba=-Math.round(sa-mxUtils.mod((Ha-ua)*ra,sa)),Ea=-Math.round(sa-mxUtils.mod((Qa-za)*ra,sa));Ba<O;Ba+=sa)for(var Oa=Ea;Oa<V;Oa+=sa)U.drawImage(Fa,Ba/ra,Oa/ra);z()}catch(Pa){null!=R&&R(Pa)}};Fa.onerror=function(Ba){null!=R&&R(Ba)};Fa.src=wa}else z()}catch(Ba){null!=
-R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};la&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(L){null!=R&&R(L)}}))}catch(z){null!=R&&R(z)}}),Q,pa)}catch(Ta){null!=R&&R(Ta)}};
-Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function ba(pa,xa){var Ca=ta;ta+=xa;return pa.substring(Ca,ta)}function ea(pa){pa=ba(pa,4);return pa.charCodeAt(3)+
-(pa.charCodeAt(2)<<8)+(pa.charCodeAt(1)<<16)+(pa.charCodeAt(0)<<24)}function ra(pa){return String.fromCharCode(pa>>24&255,pa>>16&255,pa>>8&255,pa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var ta=0;if(ba(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ba(q,4),"IHDR"!=ba(q,4))null!=R&&R();else{ba(q,17);R=q.substring(0,ta);do{var la=ea(q);if("IDAT"==ba(q,4)){R=q.substring(0,ta-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),
-Q=ra(Q)+ra(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=ra(Q.length)+E+Q+ra(Y^4294967295);R+=q.substring(ta-8,q.length);break}R+=q.substring(ta-8,ta-4+la);ba(q,la);ba(q,4)}while(la);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(q,E){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});
-if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
-null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ba=new ChangePageSetup(E);ba.ignoreColor=!0;ba.ignoreImage=!0;ba.shadowVisible=
-R;Q.model.execute(ba)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;
-if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(ea){E.editor.setAutosave(ea);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(ea){this.listener=function(){ea(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&
-"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){E.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var ba=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ba.style.position=
-"relative";ba.style.marginLeft="6px";ba.style.top="2px";R.appendChild(ba)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,E,Q){if(null!=E){var Y=function(ba){if(null!=ba)if(Q)for(var ea=0;ea<ba.length;ea++)E[ba[ea].name]=ba[ea];else for(var ra in E){var ta=!1;for(ea=0;ea<ba.length;ea++)if(ba[ea].name==ra&&ba[ea].type==E[ra].type){ta=!0;break}ta||
-delete E[ra]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(ba){}}};var y=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E={},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<
-Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(U,ha,ma,wa){xa.getModel().beginUpdate();try{var sa=[],ya=[];if(null!=ma.index){for(var Ha=[],Qa=ma.parentRow.nextSibling;Qa&&
-Qa.getAttribute("data-pName")==U;)Ha.push(Qa.getAttribute("data-pValue")),Qa=Qa.nextSibling;ma.index<Ha.length?null!=wa?Ha.splice(wa,1):Ha[ma.index]=ha:Ha.push(ha);null!=ma.size&&Ha.length>ma.size&&(Ha=Ha.slice(0,ma.size));ha=Ha.join(",");null!=ma.countProperty&&(xa.setCellStyles(ma.countProperty,Ha.length,xa.getSelectionCells()),sa.push(ma.countProperty),ya.push(Ha.length))}xa.setCellStyles(U,ha,xa.getSelectionCells());sa.push(U);ya.push(ha);if(null!=ma.dependentProps)for(U=0;U<ma.dependentProps.length;U++){var ua=
-ma.dependentPropsDefVal[U],za=ma.dependentPropsVals[U];if(za.length>ha)za=za.slice(0,ha);else for(var Fa=za.length;Fa<ha;Fa++)za.push(ua);za=za.join(",");xa.setCellStyles(ma.dependentProps[U],za,xa.getSelectionCells());sa.push(ma.dependentProps[U]);ya.push(za)}if("function"==typeof ma.onChange)ma.onChange(xa,ha);pa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",xa.getSelectionCells()))}finally{xa.getModel().endUpdate()}}function R(U,ha,ma){var wa=mxUtils.getOffset(q,
-!0),sa=mxUtils.getOffset(U,!0);ha.style.position="absolute";ha.style.left=sa.x-wa.x+"px";ha.style.top=sa.y-wa.y+"px";ha.style.width=U.offsetWidth+"px";ha.style.height=U.offsetHeight-(ma?4:0)+"px";ha.style.zIndex=5}function ba(U,ha,ma){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(pa,function(sa){this.editorUi.pickColor(ha,
-function(ya){wa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;Y(U,ya,ma)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,ha,ma,wa,sa,ya,Ha){null!=ha&&(ha=ha.split(","),Ca.push({name:U,values:ha,type:ma,defVal:wa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:Ha}));btn=mxUtils.button("+",mxUtils.bind(pa,function(Qa){for(var ua=ya,za=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")==
-U)ua=ua.nextSibling,za++;else break;var Fa={type:ma,parentRow:ya,index:za,isDeletable:!0,defVal:wa,countProperty:sa};za=la(U,"",Fa,0==za%2,Ha);Y(U,wa,Fa);ua.parentNode.insertBefore(za,ua.nextSibling);mxEvent.consume(Qa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ra(U,ha,ma,wa,sa,ya,Ha){if(0<sa){var Qa=Array(sa);ha=null!=ha?ha.split(","):[];for(var ua=0;ua<sa;ua++)Qa[ua]=null!=ha[ua]?ha[ua]:null!=wa?wa:"";Ca.push({name:U,values:Qa,type:ma,defVal:wa,
-parentRow:ya,flipBkg:Ha,size:sa})}return document.createElement("div")}function ta(U,ha,ma){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){Y(U,wa.checked?"1":"0",ma)});return wa}function la(U,ha,ma,wa,sa){var ya=ma.dispName,Ha=ma.type,Qa=document.createElement("tr");Qa.className="gePropRow"+(sa?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Qa.setAttribute("data-pName",U);Qa.setAttribute("data-pValue",ha);wa=!1;null!=ma.index&&
-(Qa.setAttribute("data-index",ma.index),ya=(null!=ya?ya:"")+"["+ma.index+"]",wa=!0);var ua=document.createElement("td");ua.className="gePropRowCell";ya=mxResources.get(ya,null,ya);mxUtils.write(ua,ya);ua.setAttribute("title",ya);wa&&(ua.style.textAlign="right");Qa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";if("color"==Ha)ua.appendChild(ba(U,ha,ma));else if("bool"==Ha||"boolean"==Ha)ua.appendChild(ta(U,ha,ma));else if("enum"==Ha){var za=ma.enumList;for(sa=0;sa<za.length;sa++)if(ya=
-za[sa],ya.val==ha){mxUtils.write(ua,mxResources.get(ya.dispName,null,ya.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(pa,function(){var Fa=document.createElement("select");R(ua,Fa);for(var Ba=0;Ba<za.length;Ba++){var Ea=za[Ba],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities(Ea.val);mxUtils.write(Oa,mxResources.get(Ea.dispName,null,Ea.dispName));Fa.appendChild(Oa)}Fa.value=ha;q.appendChild(Fa);mxEvent.addListener(Fa,"change",function(){var Pa=mxUtils.htmlEntities(Fa.value);
-Y(U,Pa,ma)});Fa.focus();mxEvent.addListener(Fa,"blur",function(){q.removeChild(Fa)})}))}else"dynamicArr"==Ha?ua.appendChild(ea(U,ha,ma.subType,ma.subDefVal,ma.countProperty,Qa,sa)):"staticArr"==Ha?ua.appendChild(ra(U,ha,ma.subType,ma.subDefVal,ma.size,Qa,sa)):"readOnly"==Ha?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ha,sa.style.width="96px",sa.style.borderWidth="0px",ua.appendChild(sa)):(ua.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(ua,
-"click",mxUtils.bind(pa,function(){function Fa(){var Ea=Ba.value;Ea=0==Ea.length&&"string"!=Ha?0:Ea;ma.allowAuto&&(null!=Ea.trim&&"auto"==Ea.trim().toLowerCase()?(Ea="auto",Ha="string"):(Ea=parseFloat(Ea),Ea=isNaN(Ea)?0:Ea));null!=ma.min&&Ea<ma.min?Ea=ma.min:null!=ma.max&&Ea>ma.max&&(Ea=ma.max);Ea=encodeURIComponent(("int"==Ha?parseInt(Ea):Ea)+"");Y(U,Ea,ma)}var Ba=document.createElement("input");R(ua,Ba,!0);Ba.value=decodeURIComponent(ha);Ba.className="gePropEditor";"int"!=Ha&&"float"!=Ha||ma.allowAuto||
-(Ba.type="number",Ba.step="int"==Ha?"1":"any",null!=ma.min&&(Ba.min=parseFloat(ma.min)),null!=ma.max&&(Ba.max=parseFloat(ma.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ea){13==Ea.keyCode&&Fa()});Ba.focus();mxEvent.addListener(Ba,"blur",function(){Fa()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(pa,function(Fa){Y(U,"",ma,ma.index);mxEvent.consume(Fa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",ua.appendChild(sa));
-Qa.appendChild(ua);return Qa}var pa=this,xa=this.editorUi.editor.graph,Ca=[];q.style.position="relative";q.style.padding="0";var Ia=document.createElement("table");Ia.className="geProperties";Ia.style.whiteSpace="nowrap";Ia.style.width="100%";var Aa=document.createElement("tr");Aa.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";La.appendChild(Da);
-mxUtils.write(La,mxResources.get("property"));Aa.style.cursor="pointer";var Sa=function(){var U=Ia.querySelectorAll(".gePropNonHeaderRow");if(pa.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ha="none";for(var ma=q.childNodes.length-1;0<=ma;ma--)try{var wa=q.childNodes[ma],sa=wa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||q.removeChild(wa)}catch(ya){}}else Da.src=Sidebar.prototype.expandedImage,ha="";for(ma=0;ma<U.length;ma++)U[ma].style.display=ha};mxEvent.addListener(Aa,
-"click",function(){pa.editorUi.propertiesCollapsed=!pa.editorUi.propertiesCollapsed;Sa()});Aa.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");Aa.appendChild(La);Ia.appendChild(Aa);var Ra=!1,Ta=!1;Aa=null;1==Q.vertices.length&&0==Q.edges.length?Aa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(Aa=Q.edges[0].id);null!=Aa&&Ia.appendChild(la("id",mxUtils.htmlEntities(Aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(Aa=
-E[Za],"function"!=typeof Aa.isVisible||Aa.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=Aa.getDefaultValue?Aa.getDefaultValue(Q,this):Aa.defVal;if("separator"==Aa.type)Ta=!Ta;else{if("staticArr"==Aa.type)Aa.size=parseInt(Q.style[Aa.sizeProperty]||E[Aa.sizeProperty].defVal)||0;else if(null!=Aa.dependentProps){var z=Aa.dependentProps,L=[],O=[];for(La=0;La<z.length;La++){var V=Q.style[z[La]];O.push(E[z[La]].subDefVal);L.push(null!=V?V.split(","):[])}Aa.dependentPropsDefVal=
-O;Aa.dependentPropsVals=L}Ia.appendChild(la(Za,Na,Aa,Ra,Ta));Ra=!Ra}}for(La=0;La<Ca.length;La++)for(Aa=Ca[La],E=Aa.parentRow,Q=0;Q<Aa.values.length;Q++)Za=la(Aa.name,Aa.values[Q],{type:Aa.type,parentRow:Aa.parentRow,isDeletable:Aa.isDeletable,index:Q,defVal:Aa.defVal,countProperty:Aa.countProperty,size:Aa.size},0==Q%2,Aa.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ia);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(Aa){mxEvent.addListener(Aa,
-"mouseenter",function(){Aa.style.opacity="1"});mxEvent.addListener(Aa,"mouseleave",function(){Aa.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var ba="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var ra=[],ta=0;ta<this.defaultColorSchemes.length;ta++){var la=document.createElement("div");la.style.display="inline-block";la.style.width="6px";la.style.height="6px";la.style.marginLeft="4px";la.style.marginRight="3px";la.style.borderRadius="3px";la.style.cursor="pointer";la.style.background="transparent";la.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(Aa){mxEvent.addListener(la,"click",mxUtils.bind(this,function(){pa(Aa)}))})(ta);ra.push(la);ea.appendChild(la)}var pa=mxUtils.bind(this,function(Aa){null!=ra[Aa]&&(null!=this.format.currentScheme&&null!=ra[this.format.currentScheme]&&(ra[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Aa,xa(this.defaultColorSchemes[this.format.currentScheme]),ra[this.format.currentScheme].style.background="#84d7ff")}),xa=mxUtils.bind(this,function(Aa){var La=mxUtils.bind(this,
-function(Sa){var Ra=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,L=0;L<z.length;L++){for(var O=Y.getModel().getStyle(z[L]),V=0;V<ba.length;V++)O=mxUtils.removeStylename(O,ba[V]);var U=Y.getModel().isVertex(z[L])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(U,
-mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[L])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,
-Sa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[L])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,
-null))));Y.getModel().setStyle(z[L],O)}}finally{Y.getModel().endUpdate()}}));Ra.className="geStyleButton";Ra.style.width="36px";Ra.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ra.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Ra.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+
-"', GradientType=0)":Ra.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Ra.style.background="url('"+Dialog.prototype.noColorImage+"')":Ra.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ra.style.border=Sa.stroke==mxConstants.NONE?
-Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Ra.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-"#000000");Ra.style.backgroundColor=Ta;Ra.style.border="1px solid "+Za}Ra.style.borderRadius="0";R.appendChild(Ra)});R.innerText="";for(var Da=0;Da<Aa.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(R),La(Aa[Da])});null==this.format.currentScheme?pa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):pa(this.format.currentScheme);ta=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ta+"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(Ca,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ia=document.createElement("div");Ia.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ta+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(Ca),q.appendChild(Ia));mxEvent.addListener(Ia,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Ca);E(Ia);xa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(ea);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
+Y.substring(0,19)||mxClient.IS_CHROMEAPP||(Y=E.apply(this,arguments)):Y=PROXY_URL+"?url="+encodeURIComponent(Y)}return Y};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,E){try{var Q=!0,Y=window.setTimeout(mxUtils.bind(this,function(){Q=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(Z){window.clearTimeout(Y);Q&&E(Editor.createSvgDataUri(Z.getText()))}),
+function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(Y);if(Q)try{var Z=document.createElement("canvas"),da=Z.getContext("2d");Z.height=R.height;Z.width=R.width;da.drawImage(R,0,0);E(Z.toDataURL())}catch(qa){E(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(Y);Q&&E(Editor.svgBrokenImage.src)};R.src=q}}catch(Z){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(q,E,Q,Y){null==Y&&(Y=this.createImageUrlConverter());var R=0,Z=Q||{};Q=mxUtils.bind(this,function(da,qa){da=q.getElementsByTagName(da);for(var va=0;va<da.length;va++)mxUtils.bind(this,function(ja){try{if(null!=ja){var sa=Y.convert(ja.getAttribute(qa));if(null!=sa&&"data:"!=sa.substring(0,5)){var ya=Z[sa];null==ya?(R++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Z[sa]=Aa,ja.setAttribute(qa,Aa));R--;0==R&&E(q)})):ja.setAttribute(qa,ya)}else null!=sa&&ja.setAttribute(qa,sa)}}catch(Aa){}})(da[va])});
+Q("image","xlink:href");Q("img","src");0==R&&E(q)};Editor.base64Encode=function(q){for(var E="",Q=0,Y=q.length,R,Z,da;Q<Y;){R=q.charCodeAt(Q++)&255;if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);E+="==";break}Z=q.charCodeAt(Q++);if(Q==Y){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&
+3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2);E+="=";break}da=q.charCodeAt(Q++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(Z&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Z&15)<<2|(da&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(da&
+63)}return E};Editor.prototype.loadUrl=function(q,E,Q,Y,R,Z,da,qa){try{var va=!da&&(Y||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));R=null!=R?R:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=E){var ya=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();
+ya=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)ya[Aa]=String.fromCharCode(sa[Aa]);ya=ya.join("")}Z=null!=Z?Z:"data:image/png;base64,";ya=Z+Editor.base64Encode(ya)}E(ya)}}else null!=Q&&(0==sa.getStatus()?Q({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?Q({code:sa.getStatus()},sa):Q({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=Q&&Q({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,
+retry:ja})},qa)});ja()}catch(sa){null!=Q&&Q(sa)}};Editor.prototype.absoluteCssFonts=function(q){var E=null;if(null!=q){var Q=q.split("url(");if(0<Q.length){E=[Q[0]];q=window.location.pathname;var Y=null!=q?q.lastIndexOf("/"):-1;0<=Y&&(q=q.substring(0,Y+1));Y=document.getElementsByTagName("base");var R=null;null!=Y&&0<Y.length&&(R=Y[0].getAttribute("href"));for(var Z=1;Z<Q.length;Z++)if(Y=Q[Z].indexOf(")"),0<Y){var da=Editor.trimCssUrl(Q[Z].substring(0,Y));this.graph.isRelativeUrl(da)&&(da=null!=R?
+R+da:window.location.protocol+"//"+window.location.hostname+("/"==da.charAt(0)?"":q)+da);E.push('url("'+da+'"'+Q[Z].substring(Y))}else E.push(Q[Z])}else E=[q]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(q,E,Q){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));Q(q,E)};Editor.prototype.embedCssFonts=function(q,E){var Q=q.split("url("),Y=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==Y){for(var va=
+[Q[0]],ja=1;ja<Q.length;ja++){var sa=Q[ja].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(Q[ja].substring(0,sa))]);va.push('"'+Q[ja].substring(sa))}E(va.join(""))}});if(0<Q.length){for(q=1;q<Q.length;q++){var Z=Q[q].indexOf(")"),da=null,qa=Q[q].indexOf("format(",Z);0<qa&&(da=Editor.trimCssUrl(Q[q].substring(qa+7,Q[q].indexOf(")",qa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;Y++;var ja="application/x-font-ttf";if("svg"==da||/(\.svg)($|\?)/i.test(va))ja=
+"image/svg+xml";else if("otf"==da||"embedded-opentype"==da||/(\.otf)($|\?)/i.test(va))ja="application/x-font-opentype";else if("woff"==da||/(\.woff)($|\?)/i.test(va))ja="application/font-woff";else if("woff2"==da||/(\.woff2)($|\?)/i.test(va))ja="application/font-woff2";else if("eot"==da||/(\.eot)($|\?)/i.test(va))ja="application/vnd.ms-fontobject";else if("sfnt"==da||/(\.sfnt)($|\?)/i.test(va))ja="application/font-sfnt";this.mapFontUrl(ja,va,mxUtils.bind(this,function(sa,ya){this.loadUrl(ya,mxUtils.bind(this,
+function(Aa){this.cachedFonts[va]=Aa;Y--;R()}),mxUtils.bind(this,function(Aa){Y--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[q].substring(0,Z)),da)}R()}else E(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&
+(q[E]=Graph.fontMapping[E]);return q};Editor.prototype.embedExtFonts=function(q){var E=this.graph.getCustomFonts();if(0<E.length){var Q=[],Y=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==Y&&this.embedCssFonts(Q.join(""),q)}),Z=0;Z<E.length;Z++)mxUtils.bind(this,function(da,qa){Graph.isCssFontUrl(qa)?null==this.cachedGoogleFonts[qa]?(Y++,this.loadUrl(qa,mxUtils.bind(this,function(va){this.cachedGoogleFonts[qa]=va;Q.push(va+
+"\n");Y--;R()}),mxUtils.bind(this,function(va){Y--;Q.push("@import url("+qa+");\n");R()}))):Q.push(this.cachedGoogleFonts[qa]+"\n"):Q.push('@font-face {font-family: "'+da+'";src: url("'+qa+'")}\n')})(E[Z].name,E[Z].url);R()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var E=document.getElementsByTagName("style"),Q=0;Q<E.length;Q++){var Y=mxUtils.getTextContent(E[Q]);0>Y.indexOf("mxPageSelector")&&0<Y.indexOf("MathJax")&&q[0].appendChild(E[Q].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(q,E){E=null!=E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var Q=q.getElementsByTagName("defs"),Y=q.ownerDocument;0==Q.length?(Q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"defs"):Y.createElement("defs"),null!=q.firstChild?q.insertBefore(Q,q.firstChild):q.appendChild(Q)):Q=Q[0];q=null!=Y.createElementNS?Y.createElementNS(mxConstants.NS_SVG,"style"):Y.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,E);Q.appendChild(q)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,E,Q){var Y=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(Y/q,Y/E))};Editor.prototype.exportToCanvas=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea,za,Ia,Ca,Sa){try{Z=null!=Z?Z:!0;da=null!=da?da:!0;ya=null!=ya?ya:this.graph;Aa=null!=Aa?Aa:0;var Pa=va?null:ya.background;Pa==mxConstants.NONE&&(Pa=null);null==Pa&&(Pa=Y);null==Pa&&0==va&&(Pa=Ia?this.graph.defaultPageBackgroundColor:
+"#ffffff");this.convertImages(ya.getSvg(null,null,Aa,Ea,null,da,null,null,null,ja,null,Ia,Ca,Sa),mxUtils.bind(this,function(Ta){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){W.drawImage(Za,0,0);q(J,Ta)},0):(W.drawImage(Za,0,0),q(J,Ta))},J=document.createElement("canvas"),O=parseInt(Ta.getAttribute("width")),U=parseInt(Ta.getAttribute("height"));qa=null!=qa?qa:1;null!=E&&(qa=Z?Math.min(1,Math.min(3*E/(4*U),E/O)):E/O);qa=
+this.getMaxCanvasScale(O,U,qa);O=Math.ceil(qa*O);U=Math.ceil(qa*U);J.setAttribute("width",O);J.setAttribute("height",U);var W=J.getContext("2d");null!=Pa&&(W.beginPath(),W.rect(0,0,O,U),W.fillStyle=Pa,W.fill());1!=qa&&W.scale(qa,qa);if(za){var ea=ya.view,ka=ea.scale;ea.scale=1;var xa=btoa(unescape(encodeURIComponent(ea.createSvgGrid(ea.gridColor))));ea.scale=ka;xa="data:image/svg+xml;base64,"+xa;var ta=ya.gridSize*ea.gridSteps*qa,pa=ya.getGraphBounds(),ua=ea.translate.x*ka,Da=ea.translate.y*ka,Fa=
+ua+(pa.x-ua)/ka-Aa,Ma=Da+(pa.y-Da)/ka-Aa,Qa=new Image;Qa.onload=function(){try{for(var Ba=-Math.round(ta-mxUtils.mod((ua-Fa)*qa,ta)),Ka=-Math.round(ta-mxUtils.mod((Da-Ma)*qa,ta));Ba<O;Ba+=ta)for(var Oa=Ka;Oa<U;Oa+=ta)W.drawImage(Qa,Ba/qa,Oa/qa);z()}catch(Ya){null!=R&&R(Ya)}};Qa.onerror=function(Ba){null!=R&&R(Ba)};Qa.src=xa}else z()}catch(Ba){null!=R&&R(Ba)}});Za.onerror=function(z){null!=R&&R(z)};ja&&this.graph.addSvgShadow(Ta);this.graph.mathEnabled&&this.addMathCss(Ta);var Na=mxUtils.bind(this,
+function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ta,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ta))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ta,z),this.loadFonts(Na)}catch(J){null!=R&&R(J)}}))}catch(z){null!=R&&R(z)}}),Q,sa)}catch(Ta){null!=R&&R(Ta)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,F=0;8>F;F++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,E,Q,
+Y){for(var R=0;R<Y;R++)q=Editor.crcTable[(q^E.charCodeAt(Q+R))&255]^q>>>8;return q};Editor.crc32=function(q){for(var E=-1,Q=0;Q<q.length;Q++)E=E>>>8^Editor.crcTable[(E^q.charCodeAt(Q))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(q,E,Q,Y,R){function Z(sa,ya){var Aa=va;va+=ya;return sa.substring(Aa,va)}function da(sa){sa=Z(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function qa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,
+sa>>8&255,sa&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var va=0;if(Z(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(Z(q,4),"IHDR"!=Z(q,4))null!=R&&R();else{Z(q,17);R=q.substring(0,va);do{var ja=da(q);if("IDAT"==Z(q,4)){R=q.substring(0,va-8);"pHYs"==E&&"dpi"==Q?(Q=Math.round(Y/.0254),Q=qa(Q)+qa(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+Y;Y=4294967295;Y=Editor.updateCRC(Y,
+E,0,4);Y=Editor.updateCRC(Y,Q,0,Q.length);R+=qa(Q.length)+E+Q+qa(Y^4294967295);R+=q.substring(va-8,q.length);break}R+=q.substring(va-8,va-4+ja);Z(q,ja);Z(q,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var L=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,E){L.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()};var P=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){P.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,E){var Q=null;null!=q.editor.graph.getModel().getParent(E)?Q=E.getId():null!=q.currentPage&&(Q=q.currentPage.getId());return Q});if(null!=window.StyleFormatPanel){var d=Format.prototype.init;Format.prototype.init=function(){d.apply(this,arguments);
+this.editorUi.editor.addListener("fileLoaded",this.update)};var f=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?f.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var g=DiagramFormatPanel.prototype.addView;
+DiagramFormatPanel.prototype.addView=function(q){q=g.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,Q=E.editor.graph,Y=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var Z=new ChangePageSetup(E);Z.ignoreColor=!0;Z.ignoreImage=!0;Z.shadowVisible=R;Q.model.execute(Z)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},
+destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||(Y.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Y,60));q.appendChild(Y)}return q};var x=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=x.apply(this,arguments);var E=this.editorUi,Q=E.editor.graph;if(Q.isEnabled()){var Y=E.getCurrentFile();if(null!=Y&&Y.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},
+function(da){E.editor.setAutosave(da);E.editor.autosave&&Y.isModified()&&Y.fileChanged()},{install:function(da){this.listener=function(){da(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});q.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(da){E.actions.get("mathematicalTypesetting").funct()},
+{install:function(da){this.listener=function(){da(Q.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});R.style.paddingTop="5px";q.appendChild(R);var Z=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";Z.style.top="2px";R.appendChild(Z)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
+defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
+dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
+min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
+[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
+[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
+type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
+type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(q,E,Q){if(null!=E){var Y=function(Z){if(null!=Z)if(Q)for(var da=0;da<Z.length;da++)E[Z[da].name]=Z[da];else for(var qa in E){var va=!1;for(da=0;da<Z.length;da++)if(Z[da].name==qa&&Z[da].type==E[qa].type){va=!0;break}va||delete E[qa]}},R=this.editorUi.editor.graph.view.getState(q);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),Y(R.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{Y(JSON.parse(q))}catch(Z){}}};var y=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));y.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},Q=q.vertices,Y=q.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],E,0==R);for(R=0;R<Y.length;R++)this.findCommonProperties(Y[R],E,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,q))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,E,Q){function Y(W,ea,ka,xa){ya.getModel().beginUpdate();try{var ta=[],pa=[];if(null!=ka.index){for(var ua=[],Da=ka.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==W;)ua.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;ka.index<ua.length?null!=xa?ua.splice(xa,1):ua[ka.index]=ea:ua.push(ea);null!=ka.size&&ua.length>ka.size&&(ua=ua.slice(0,ka.size));ea=ua.join(",");null!=ka.countProperty&&(ya.setCellStyles(ka.countProperty,ua.length,
+ya.getSelectionCells()),ta.push(ka.countProperty),pa.push(ua.length))}ya.setCellStyles(W,ea,ya.getSelectionCells());ta.push(W);pa.push(ea);if(null!=ka.dependentProps)for(W=0;W<ka.dependentProps.length;W++){var Fa=ka.dependentPropsDefVal[W],Ma=ka.dependentPropsVals[W];if(Ma.length>ea)Ma=Ma.slice(0,ea);else for(var Qa=Ma.length;Qa<ea;Qa++)Ma.push(Fa);Ma=Ma.join(",");ya.setCellStyles(ka.dependentProps[W],Ma,ya.getSelectionCells());ta.push(ka.dependentProps[W]);pa.push(Ma)}if("function"==typeof ka.onChange)ka.onChange(ya,
+ea);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",pa,"cells",ya.getSelectionCells()))}finally{ya.getModel().endUpdate()}}function R(W,ea,ka){var xa=mxUtils.getOffset(q,!0),ta=mxUtils.getOffset(W,!0);ea.style.position="absolute";ea.style.left=ta.x-xa.x+"px";ea.style.top=ta.y-xa.y+"px";ea.style.width=W.offsetWidth+"px";ea.style.height=W.offsetHeight-(ka?4:0)+"px";ea.style.zIndex=5}function Z(W,ea,ka){var xa=document.createElement("div");xa.style.width="32px";xa.style.height=
+"4px";xa.style.margin="2px";xa.style.border="1px solid black";xa.style.background=ea&&"none"!=ea?ea:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ta){this.editorUi.pickColor(ea,function(pa){xa.style.background="none"==pa?"url('"+Dialog.prototype.noColorImage+"')":pa;Y(W,pa,ka)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(xa);return btn}function da(W,ea,ka,xa,ta,pa,ua){null!=ea&&(ea=ea.split(","),
+Aa.push({name:W,values:ea,type:ka,defVal:xa,countProperty:ta,parentRow:pa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Da){for(var Fa=pa,Ma=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==W)Fa=Fa.nextSibling,Ma++;else break;var Qa={type:ka,parentRow:pa,index:Ma,isDeletable:!0,defVal:xa,countProperty:ta};Ma=ja(W,"",Qa,0==Ma%2,ua);Y(W,xa,Qa);Fa.parentNode.insertBefore(Ma,Fa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function qa(W,ea,ka,xa,ta,pa,ua){if(0<ta){var Da=Array(ta);ea=null!=ea?ea.split(","):[];for(var Fa=0;Fa<ta;Fa++)Da[Fa]=null!=ea[Fa]?ea[Fa]:null!=xa?xa:"";Aa.push({name:W,values:Da,type:ka,defVal:xa,parentRow:pa,flipBkg:ua,size:ta})}return document.createElement("div")}function va(W,ea,ka){var xa=document.createElement("input");xa.type="checkbox";xa.checked="1"==ea;mxEvent.addListener(xa,"change",function(){Y(W,xa.checked?"1":"0",ka)});return xa}function ja(W,
+ea,ka,xa,ta){var pa=ka.dispName,ua=ka.type,Da=document.createElement("tr");Da.className="gePropRow"+(ta?"Dark":"")+(xa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",W);Da.setAttribute("data-pValue",ea);xa=!1;null!=ka.index&&(Da.setAttribute("data-index",ka.index),pa=(null!=pa?pa:"")+"["+ka.index+"]",xa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";pa=mxResources.get(pa,null,pa);mxUtils.write(Fa,pa);Fa.setAttribute("title",pa);xa&&(Fa.style.textAlign="right");
+Da.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";if("color"==ua)Fa.appendChild(Z(W,ea,ka));else if("bool"==ua||"boolean"==ua)Fa.appendChild(va(W,ea,ka));else if("enum"==ua){var Ma=ka.enumList;for(ta=0;ta<Ma.length;ta++)if(pa=Ma[ta],pa.val==ea){mxUtils.write(Fa,mxResources.get(pa.dispName,null,pa.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){var Qa=document.createElement("select");R(Fa,Qa);for(var Ba=0;Ba<Ma.length;Ba++){var Ka=Ma[Ba],Oa=
+document.createElement("option");Oa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Oa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Oa)}Qa.value=ea;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var Ya=mxUtils.htmlEntities(Qa.value);Y(W,Ya,ka)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==ua?Fa.appendChild(da(W,ea,ka.subType,ka.subDefVal,ka.countProperty,Da,ta)):"staticArr"==ua?Fa.appendChild(qa(W,ea,ka.subType,ka.subDefVal,
+ka.size,Da,ta)):"readOnly"==ua?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=ea,ta.style.width="96px",ta.style.borderWidth="0px",Fa.appendChild(ta)):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ea)),mxEvent.addListener(Fa,"click",mxUtils.bind(sa,function(){function Qa(){var Ka=Ba.value;Ka=0==Ka.length&&"string"!=ua?0:Ka;ka.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",ua="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ka.min&&Ka<
+ka.min?Ka=ka.min:null!=ka.max&&Ka>ka.max&&(Ka=ka.max);Ka=encodeURIComponent(("int"==ua?parseInt(Ka):Ka)+"");Y(W,Ka,ka)}var Ba=document.createElement("input");R(Fa,Ba,!0);Ba.value=decodeURIComponent(ea);Ba.className="gePropEditor";"int"!=ua&&"float"!=ua||ka.allowAuto||(Ba.type="number",Ba.step="int"==ua?"1":"any",null!=ka.min&&(Ba.min=parseFloat(ka.min)),null!=ka.max&&(Ba.max=parseFloat(ka.max)));q.appendChild(Ba);mxEvent.addListener(Ba,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Ba.focus();mxEvent.addListener(Ba,
+"blur",function(){Qa()})})));ka.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(sa,function(Qa){Y(W,"",ka,ka.index);mxEvent.consume(Qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",Fa.appendChild(ta));Da.appendChild(Fa);return Da}var sa=this,ya=this.editorUi.editor.graph,Aa=[];q.style.position="relative";q.style.padding="0";var Ea=document.createElement("table");Ea.className="geProperties";Ea.style.whiteSpace="nowrap";Ea.style.width="100%";var za=
+document.createElement("tr");za.className="gePropHeader";var Ia=document.createElement("th");Ia.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Ia.appendChild(Ca);mxUtils.write(Ia,mxResources.get("property"));za.style.cursor="pointer";var Sa=function(){var W=Ea.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ea="none";for(var ka=q.childNodes.length-
+1;0<=ka;ka--)try{var xa=q.childNodes[ka],ta=xa.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||q.removeChild(xa)}catch(pa){}}else Ca.src=Sidebar.prototype.expandedImage,ea="";for(ka=0;ka<W.length;ka++)W[ka].style.display=ea};mxEvent.addListener(za,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Sa()});za.appendChild(Ia);Ia=document.createElement("th");Ia.className="gePropHeaderCell";Ia.innerHTML=mxResources.get("value");za.appendChild(Ia);Ea.appendChild(za);var Pa=
+!1,Ta=!1;za=null;1==Q.vertices.length&&0==Q.edges.length?za=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(za=Q.edges[0].id);null!=za&&Ea.appendChild(ja("id",mxUtils.htmlEntities(za),{dispName:"ID",type:"readOnly"},!0,!1));for(var Za in E)if(za=E[Za],"function"!=typeof za.isVisible||za.isVisible(Q,this)){var Na=null!=Q.style[Za]?mxUtils.htmlEntities(Q.style[Za]+""):null!=za.getDefaultValue?za.getDefaultValue(Q,this):za.defVal;if("separator"==za.type)Ta=!Ta;else{if("staticArr"==za.type)za.size=
+parseInt(Q.style[za.sizeProperty]||E[za.sizeProperty].defVal)||0;else if(null!=za.dependentProps){var z=za.dependentProps,J=[],O=[];for(Ia=0;Ia<z.length;Ia++){var U=Q.style[z[Ia]];O.push(E[z[Ia]].subDefVal);J.push(null!=U?U.split(","):[])}za.dependentPropsDefVal=O;za.dependentPropsVals=J}Ea.appendChild(ja(Za,Na,za,Pa,Ta));Pa=!Pa}}for(Ia=0;Ia<Aa.length;Ia++)for(za=Aa[Ia],E=za.parentRow,Q=0;Q<za.values.length;Q++)Za=ja(za.name,za.values[Q],{type:za.type,parentRow:za.parentRow,isDeletable:za.isDeletable,
+index:Q,defVal:za.defVal,countProperty:za.countProperty,size:za.size},0==Q%2,za.flipBkg),E.parentNode.insertBefore(Za,E.nextSibling),E=Za;q.appendChild(Ea);Sa();return q};StyleFormatPanel.prototype.addStyles=function(q){function E(za){mxEvent.addListener(za,"mouseenter",function(){za.style.opacity="1"});mxEvent.addListener(za,"mouseleave",function(){za.style.opacity="0.5"})}var Q=this.editorUi,Y=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
+R.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(R);var Z="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),da=document.createElement("div");da.style.whiteSpace="nowrap";da.style.position="relative";da.style.textAlign="center";da.style.width="210px";for(var qa=[],va=0;va<this.defaultColorSchemes.length;va++){var ja=
+document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(za){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){sa(za)}))})(va);qa.push(ja);da.appendChild(ja)}var sa=mxUtils.bind(this,function(za){null!=qa[za]&&(null!=this.format.currentScheme&&
+null!=qa[this.format.currentScheme]&&(qa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=za,ya(this.defaultColorSchemes[this.format.currentScheme]),qa[this.format.currentScheme].style.background="#84d7ff")}),ya=mxUtils.bind(this,function(za){var Ia=mxUtils.bind(this,function(Sa){var Pa=mxUtils.button("",mxUtils.bind(this,function(Na){Y.getModel().beginUpdate();try{for(var z=Q.getSelectionState().cells,J=0;J<z.length;J++){for(var O=Y.getModel().getStyle(z[J]),U=
+0;U<Z.length;U++)O=mxUtils.removeStylename(O,Z[U]);var W=Y.getModel().isVertex(z[J])?Y.defaultVertexStyle:Y.defaultEdgeStyle;null!=Sa?(mxEvent.isShiftDown(Na)||(O=""==Sa.fill?mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,Sa.fill||mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,null)),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,Sa.gradient||mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(Na)||!Y.getModel().isVertex(z[J])||(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,Sa.font||mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(O=""==Sa.stroke?mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(O,mxConstants.STYLE_STROKECOLOR,Sa.stroke||mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,null)))):(O=mxUtils.setStyle(O,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FILLCOLOR,"#ffffff")),O=mxUtils.setStyle(O,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(W,mxConstants.STYLE_STROKECOLOR,"#000000")),O=mxUtils.setStyle(O,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_GRADIENTCOLOR,null)),Y.getModel().isVertex(z[J])&&(O=mxUtils.setStyle(O,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(W,mxConstants.STYLE_FONTCOLOR,null))));Y.getModel().setStyle(z[J],O)}}finally{Y.getModel().endUpdate()}}));Pa.className="geStyleButton";Pa.style.width="36px";Pa.style.height=10>=this.defaultColorSchemes.length?
+"24px":"30px";Pa.style.margin="0px 6px 6px 0px";if(null!=Sa){var Ta="1"==urlParams.sketch?"2px solid":"1px solid";null!=Sa.border&&(Ta=Sa.border);null!=Sa.gradient?mxClient.IS_IE&&10>document.documentMode?Pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Sa.fill+"', EndColorStr='"+Sa.gradient+"', GradientType=0)":Pa.style.backgroundImage="linear-gradient("+Sa.fill+" 0px,"+Sa.gradient+" 100%)":Sa.fill==mxConstants.NONE?Pa.style.background="url('"+Dialog.prototype.noColorImage+
+"')":Pa.style.backgroundColor=""==Sa.fill?mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Sa.fill||mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Pa.style.border=Sa.stroke==mxConstants.NONE?Ta+" transparent":""==Sa.stroke?Ta+" "+mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ta+" "+(Sa.stroke||mxUtils.getValue(Y.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Sa.title&&Pa.setAttribute("title",Sa.title)}else{Ta=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Za=mxUtils.getValue(Y.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Pa.style.backgroundColor=Ta;Pa.style.border="1px solid "+Za}Pa.style.borderRadius="0";R.appendChild(Pa)});R.innerText="";for(var Ca=0;Ca<za.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(R),Ia(za[Ca])});
+null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ea=document.createElement("div");Ea.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(q.appendChild(Aa),q.appendChild(Ea));mxEvent.addListener(Ea,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(Aa);E(Ea);ya(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(da);return q};StyleFormatPanel.prototype.addEditOps=function(q){var E=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,Y=null;1==E.cells.length&&(Y=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),Y.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Y.style.width="210px",Y.style.marginBottom="2px",q.appendChild(Y));Q=1==E.cells.length?Q.view.getState(E.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
mxResources.get("editShape")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),q.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==Y?E.style.width="210px":(Y.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
q.appendChild(E));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
@@ -3293,53 +3294,53 @@ E){var Q=Graph.fontMapping[E];null==Q&&Graph.isCssFontUrl(E)?(q=document.createE
Y){var R=Graph.customFontElements[Y];null!=R&&R.url!=E&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=E,"http:"==E.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(E)),R={name:q,url:E,elt:Graph.createFontElement(q,R)},Graph.customFontElements[Y]=R,Graph.recentCustomFonts[Y]=R,E=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=E&&E.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
return q};Graph.getFontUrl=function(q,E){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(E=q.url);return E};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var E=0;E<q.length;E++){var Q=q[E].getAttribute("data-font-src");if(null!=Q){var Y="FONT"==q[E].nodeName?q[E].getAttribute("face"):q[E].style.fontFamily;null!=Y&&Graph.addFont(Y,Q)}}};Graph.processFontStyle=function(q){if(null!=q){var E=mxUtils.getValue(q,"fontSource",null);if(null!=E){var Q=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
null);null!=Q&&Graph.addFont(Q,decodeURIComponent(E))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ba=this.graph.getCellStyle(R);if(null!=ba&&"rack"==ba.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ba.rackUnitSize?parseFloat(ba.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ba.marginLeft||0;ea.marginRight=ba.marginRight||0;ea.marginTop=ba.marginTop||
-0;ea.marginBottom=ba.marginBottom||0;ea.allowGaps=ba.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ba,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var J=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(J.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,ba,ea,ra,ta,la,
-pa){D.apply(this,arguments);Graph.processFontAttributes(pa)};var G=mxText.prototype.redraw;mxText.prototype.redraw=function(){G.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var Aa=ea.getSelectionCells(),La=[],Da=0;Da<Aa.length;Da++)ea.isCellVisible(Aa[Da])&&La.push(Aa[Da]);ea.setSelectionCells(La)}function R(Aa){ea.setHiddenTags(Aa?[]:ra.slice());Y();ea.refresh()}function ba(Aa,
-La){la.innerText="";if(0<Aa.length){var Da=document.createElement("table");Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Sa=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var Ra=0;Ra<Aa.length;Ra++)(function(Ta){var Za=0>mxUtils.indexOf(ea.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var L=document.createElement("img");L.setAttribute("src",
-Za?Editor.visibleImage:Editor.hiddenImage);L.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(L,Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";z.appendChild(L);mxEvent.addListener(L,"click",function(V){mxEvent.isShiftDown(V)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ta)):(ea.toggleHiddenTag(Ta),Y(),ea.refresh());mxEvent.consume(V)});Na.appendChild(z);z=document.createElement("td");
-z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(V){if(mxEvent.isShiftDown(V)){R(!0);var U=ea.getCellsForTags([Ta],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(Za&&
-0<ea.hiddenTags.length)R(!0);else{U=ra.slice();var ha=mxUtils.indexOf(U,Ta);U.splice(ha,1);ea.setHiddenTags(U);Y();ea.refresh()}mxEvent.consume(V)});Na.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==La){z.style.align="center";z.style.width="16px";L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(L,
-Za?75:25);L.style.verticalAlign="middle";L.style.cursor="pointer";L.style.width="16px";if(E||Editor.isDarkMode())L.style.filter="invert(100%)";mxEvent.addListener(L,"click",function(V){var U=mxUtils.indexOf(ra,Ta);0<=U&&ra.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ta]);ea.refresh();mxEvent.consume(V)});z.appendChild(L)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-Ta);O.checked=O.defaultChecked;O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(V){O.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ta]):ea.removeTagsForCells(ea.getSelectionCells(),[Ta]);mxEvent.consume(V)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(Aa[Ra]);Da.appendChild(Sa);la.appendChild(Da)}}var ea=this,ra=ea.hiddenTags.slice(),ta=document.createElement("div");ta.style.userSelect=
-"none";ta.style.overflow="hidden";ta.style.padding="10px";ta.style.height="100%";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.borderRadius="4px";la.style.userSelect="none";la.style.overflow="auto";la.style.position="absolute";la.style.left="10px";la.style.right="10px";la.style.top="10px";la.style.border=ea.isEnabled()?"1px solid #808080":"none";la.style.bottom=ea.isEnabled()?"48px":"10px";ta.appendChild(la);var pa=mxUtils.button(mxResources.get("reset"),function(Aa){ea.setHiddenTags([]);
-mxEvent.isShiftDown(Aa)||(ra=ea.hiddenTags.slice());Y();ea.refresh()});pa.setAttribute("title",mxResources.get("reset"));pa.className="geBtn";pa.style.margin="0 4px 0 0";var xa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(ra,function(Aa){ra=Aa;Ca()})});xa.setAttribute("title",mxResources.get("add"));xa.className="geBtn";xa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){ra=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(Aa,La){if(q()){Aa=ea.getAllTags();for(La=0;La<
-Aa.length;La++)0>mxUtils.indexOf(ra,Aa[La])&&ra.push(Aa[La]);ra.sort();ea.isSelectionEmpty()?ba(ra):ba(ra,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ia=document.createElement("div");Ia.style.boxSizing="border-box";Ia.style.whiteSpace="nowrap";Ia.style.position="absolute";Ia.style.overflow="hidden";Ia.style.bottom="0px";Ia.style.height="42px";Ia.style.right="10px";
-Ia.style.left="10px";ea.isEnabled()&&(Ia.appendChild(pa),Ia.appendChild(xa),ta.appendChild(Ia));return{div:ta,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,
-E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var W=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return W.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=q)for(var E in q)this.globalVars[E]=q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var Z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,ba,ea,ra,ta,la,pa,xa,Ca,Ia){var Aa=null,La=null,Da=null;xa||null==this.themes||"darkTheme"!=this.defaultThemeName||(Aa=this.stylesheet,La=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=Z.apply(this,arguments),Ra=this.getCustomFonts();if(pa&&0<Ra.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",L=0;L<Ra.length;L++){var O=
-Ra[L].name,V=Ra[L].url;Graph.isCssFontUrl(V)?Na+="@import url("+V+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+V+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=Aa&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=La,this.stylesheet=Aa,this.refresh());return Sa};var N=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(q){N.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var qa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){qa.apply(this,arguments);this.enumerationState=0};var oa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return oa.apply(this,
-arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var G=Graph.prototype.init;Graph.prototype.init=function(){function q(R){E=R}G.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(R){E=null});this.isMouseInsertPoint=function(){return null!=E};var Q=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):Q.apply(this,arguments)};var Y=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var Z=this.graph.getCellStyle(R);if(null!=Z&&"rack"==Z.childLayout){var da=new mxStackLayout(this.graph,!1);da.gridSize=null!=Z.rackUnitSize?parseFloat(Z.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;da.marginLeft=Z.marginLeft||0;da.marginRight=Z.marginRight||0;da.marginTop=Z.marginTop||0;da.marginBottom=
+Z.marginBottom||0;da.allowGaps=Z.allowGaps||0;da.horizontal="1"==mxUtils.getValue(Z,"horizontalRack","0");da.resizeParent=!1;da.fill=!0;return da}return Y.apply(this,arguments)};this.updateGlobalUrlVariables()};var D=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,E){return Graph.processFontStyle(D.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa){I.apply(this,arguments);
+Graph.processFontAttributes(sa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,E,Q){function Y(){for(var za=da.getSelectionCells(),Ia=[],Ca=0;Ca<za.length;Ca++)da.isCellVisible(za[Ca])&&Ia.push(za[Ca]);da.setSelectionCells(Ia)}function R(za){da.setHiddenTags(za?[]:qa.slice());Y();da.refresh()}function Z(za,Ia){ja.innerText="";if(0<
+za.length){var Ca=document.createElement("table");Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Sa=document.createElement("tbody");if(null!=za&&0<za.length)for(var Pa=0;Pa<za.length;Pa++)(function(Ta){var Za=0>mxUtils.indexOf(da.hiddenTags,Ta),Na=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var J=document.createElement("img");J.setAttribute("src",Za?Editor.visibleImage:
+Editor.hiddenImage);J.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign="middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";z.appendChild(J);mxEvent.addListener(J,"click",function(U){mxEvent.isShiftDown(U)?R(0<=mxUtils.indexOf(da.hiddenTags,Ta)):(da.toggleHiddenTag(Ta),Y(),da.refresh());mxEvent.consume(U)});Na.appendChild(z);z=document.createElement("td");z.style.overflow="hidden";
+z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ta);a=document.createElement("a");mxUtils.write(a,Ta);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Za?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(U){if(mxEvent.isShiftDown(U)){R(!0);var W=da.getCellsForTags([Ta],null,null,!0);da.isEnabled()?da.setSelectionCells(W):da.highlightCells(W)}else if(Za&&0<da.hiddenTags.length)R(!0);
+else{W=qa.slice();var ea=mxUtils.indexOf(W,Ta);W.splice(ea,1);da.setHiddenTags(W);Y();da.refresh()}mxEvent.consume(U)});Na.appendChild(z);if(da.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Ia){z.style.align="center";z.style.width="16px";J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("removeIt",[Ta]));mxUtils.setOpacity(J,Za?75:25);J.style.verticalAlign=
+"middle";J.style.cursor="pointer";J.style.width="16px";if(E||Editor.isDarkMode())J.style.filter="invert(100%)";mxEvent.addListener(J,"click",function(U){var W=mxUtils.indexOf(qa,Ta);0<=W&&qa.splice(W,1);da.removeTagsForCells(da.model.getDescendants(da.model.getRoot()),[Ta]);da.refresh();mxEvent.consume(U)});z.appendChild(J)}else{var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px";O.defaultChecked=null!=Ia&&0<=mxUtils.indexOf(Ia,Ta);O.checked=O.defaultChecked;
+O.style.background="transparent";O.setAttribute("title",mxResources.get(O.defaultChecked?"removeIt":"add",[Ta]));mxEvent.addListener(O,"change",function(U){O.checked?da.addTagsForCells(da.getSelectionCells(),[Ta]):da.removeTagsForCells(da.getSelectionCells(),[Ta]);mxEvent.consume(U)});z.appendChild(O)}Na.appendChild(z)}Sa.appendChild(Na)})(za[Pa]);Ca.appendChild(Sa);ja.appendChild(Ca)}}var da=this,qa=da.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow=
+"hidden";va.style.padding="10px";va.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=da.isEnabled()?"1px solid #808080":"none";ja.style.bottom=da.isEnabled()?"48px":"10px";va.appendChild(ja);var sa=mxUtils.button(mxResources.get("reset"),function(za){da.setHiddenTags([]);mxEvent.isShiftDown(za)||
+(qa=da.hiddenTags.slice());Y();da.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var ya=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(qa,function(za){qa=za;Aa()})});ya.setAttribute("title",mxResources.get("add"));ya.className="geBtn";ya.style.margin="0";da.addListener(mxEvent.ROOT,function(){qa=da.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(za,Ia){if(q()){za=da.getAllTags();for(Ia=0;Ia<za.length;Ia++)0>mxUtils.indexOf(qa,
+za[Ia])&&qa.push(za[Ia]);qa.sort();da.isSelectionEmpty()?Z(qa):Z(qa,da.getCommonTagsForCells(da.getSelectionCells()))}});da.selectionModel.addListener(mxEvent.CHANGE,Aa);da.model.addListener(mxEvent.CHANGE,Aa);da.addListener(mxEvent.REFRESH,Aa);var Ea=document.createElement("div");Ea.style.boxSizing="border-box";Ea.style.whiteSpace="nowrap";Ea.style.position="absolute";Ea.style.overflow="hidden";Ea.style.bottom="0px";Ea.style.height="42px";Ea.style.right="10px";Ea.style.left="10px";da.isEnabled()&&
+(Ea.appendChild(sa),Ea.appendChild(ya),va.appendChild(Ea));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var E in Graph.customFontElements){var Q=Graph.customFontElements[E];q.push({name:Q.name,url:Q.url})}return q};Graph.prototype.setFont=function(q,E){Graph.addFont(q,E);document.execCommand("fontname",!1,q);if(null!=E){var Q=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(q,E);for(var Y=0;Y<Q.length;Y++)Q[Y].getAttribute("face")==
+q&&Q[Y].getAttribute("data-font-src")!=E&&Q[Y].setAttribute("data-font-src",E)}};var S=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return S.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var E in q)this.globalVars[E]=
+q[E]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var T=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var E=T.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[q]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,E,Q,Y,R,Z,da,qa,va,ja,sa,ya,Aa,Ea){var za=null,Ia=null,Ca=null;ya||null==this.themes||"darkTheme"!=this.defaultThemeName||(za=this.stylesheet,Ia=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Sa=M.apply(this,arguments),Pa=this.getCustomFonts();if(sa&&0<Pa.length){var Ta=Sa.ownerDocument,Za=null!=Ta.createElementNS?Ta.createElementNS(mxConstants.NS_SVG,"style"):Ta.createElement("style");null!=Ta.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var Na="",z="",J=0;J<Pa.length;J++){var O=Pa[J].name,U=Pa[J].url;Graph.isCssFontUrl(U)?
+Na+="@import url("+U+");\n":z+='@font-face {\nfont-family: "'+O+'";\nsrc: url("'+U+'");\n}\n'}Za.appendChild(Ta.createTextNode(Na+z));Sa.getElementsByTagName("defs")[0].appendChild(Za)}this.mathEnabled&&(document.body.appendChild(Sa),Editor.MathJaxRender(Sa),Sa.parentNode.removeChild(Sa));null!=za&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Ia,this.stylesheet=za,this.refresh());return Sa};var fa=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){fa.apply(this,
+arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var la=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){la.apply(this,arguments);this.enumerationState=0};var ra=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ra.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var E="1"==mxUtils.getValue(q.style,"enumerate",0);E&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):E||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);E=q.secondLabel;if(null!=E){var Q=q.view.scale,Y=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*Q,q.y+4*Q,0,0):mxRectangle.fromPoint(q.view.getPoint(q));E.bounds.equals(q)&&E.value==Y&&E.scale==Q||(E.bounds=q,E.value=Y,E.scale=
-Q,E.redraw())}};var S=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){S.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var fa=Graph.prototype.refresh;Graph.prototype.refresh=function(){fa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ia=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ia.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,ba=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),ra=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&ta()}),ta=mxUtils.bind(this,function(){if(R<q.length){var la=this.stoppingCustomActions,pa=q[R++],xa=[];if(null!=pa.open)if(ea(),this.isCustomLink(pa.open)){if(!this.customLinkClicked(pa.open))return}else this.openLink(pa.open);null==pa.wait||la||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ra()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=pa.wait?parseInt(pa.wait):1E3),ea());null!=pa.opacity&&null!=pa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(pa.opacity,!0)),pa.opacity.value);null!=pa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeIn,!0)),0,1,ra,la?0:pa.fadeIn.delay));null!=pa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(pa.fadeOut,!0)),1,0,ra,la?0:pa.fadeOut.delay));null!=pa.wipeIn&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeIn,
-!0),!0)));null!=pa.wipeOut&&(xa=xa.concat(this.createWipeAnimations(this.getCellsForAction(pa.wipeOut,!0),!1)));null!=pa.toggle&&(ba(),this.toggleCells(this.getCellsForAction(pa.toggle,!0)));if(null!=pa.show){ba();var Ca=this.getCellsForAction(pa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=pa.hide&&(ba(),Ca=this.getCellsForAction(pa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=pa.toggleStyle&&
-null!=pa.toggleStyle.key&&(ba(),this.toggleCellStyles(pa.toggleStyle.key,null!=pa.toggleStyle.defaultValue?pa.toggleStyle.defaultValue:"0",this.getCellsForAction(pa.toggleStyle,!0)));null!=pa.style&&null!=pa.style.key&&(ba(),this.setCellStyles(pa.style.key,pa.style.value,this.getCellsForAction(pa.style,!0)));Ca=[];null!=pa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(pa.select),this.setSelectionCells(Ca));null!=pa.highlight&&(Ca=this.getCellsForAction(pa.highlight),this.highlightCells(Ca,
-pa.highlight.color,pa.highlight.duration,pa.highlight.opacity));null!=pa.scroll&&(Ca=this.getCellsForAction(pa.scroll));null!=pa.viewbox&&this.fitWindow(pa.viewbox,pa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=pa.tags){Ca=[];null!=pa.tags.hidden&&(Ca=Ca.concat(pa.tags.hidden));if(null!=pa.tags.visible)for(var Ia=this.getAllTags(),Aa=0;Aa<Ia.length;Aa++)0>mxUtils.indexOf(pa.tags.visible,Ia[Aa])&&0>mxUtils.indexOf(Ca,Ia[Aa])&&Ca.push(Ia[Aa]);this.setHiddenTags(Ca);this.refresh()}0<
-xa.length&&(Y++,this.executeAnimations(xa,ra,la?1:pa.steps,la?0:pa.delay));0==Y?ta():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=E&&E()});ta()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),
-ba=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(q,Q)),ba=!0);ba&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
-E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var ba=q[E[Q][R]];null!=ba?""!=ba&&Y.push(ba):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=
-q.excludeCells){for(var Q=[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(ba){return ba!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
+Q,E.redraw())}};var ba=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ba.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var oa=Graph.prototype.refresh;Graph.prototype.refresh=function(){oa.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,Y=0,R=0,Z=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,
+function(){Q&&(Q=!1,this.model.endUpdate())}),qa=mxUtils.bind(this,function(){0<Y&&Y--;0==Y&&va()}),va=mxUtils.bind(this,function(){if(R<q.length){var ja=this.stoppingCustomActions,sa=q[R++],ya=[];if(null!=sa.open)if(da(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;qa()}),Y++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=sa.wait?parseInt(sa.wait):1E3),da());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,qa,ja?0:sa.fadeIn.delay));null!=sa.fadeOut&&(Y++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,qa,ja?0:sa.fadeOut.delay));null!=sa.wipeIn&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
+!0),!0)));null!=sa.wipeOut&&(ya=ya.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Z(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Z();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Z(),Aa=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=
+sa.toggleStyle.key&&(Z(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Z(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,
+sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ea=this.getAllTags(),za=0;za<Ea.length;za++)0>mxUtils.indexOf(sa.tags.visible,Ea[za])&&0>mxUtils.indexOf(Aa,Ea[za])&&Aa.push(Ea[za]);this.setHiddenTags(Aa);this.refresh()}0<ya.length&&
+(Y++,this.executeAnimations(ya,qa,ja?1:sa.steps,ja?0:sa.delay));0==Y?va():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(q,Q));if(this.isHtmlLabel(E)){var Y=document.createElement("div");Y.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var R=Y.getElementsByTagName("a"),Z=
+!1,da=0;da<R.length;da++)Q=R[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[da].setAttribute("href",this.updateCustomLink(q,Q)),Z=!0);Z&&this.labelChanged(E,Y.innerHTML)}};Graph.prototype.updateCustomLink=function(q,E){if("data:action/json,"==E.substring(0,17))try{var Q=JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(q,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Y){}return E};Graph.prototype.updateCustomLinkActions=function(q,
+E){for(var Q=0;Q<E.length;Q++){var Y=E[Q],R;for(R in Y)this.updateCustomLinkAction(q,Y[R],"cells"),this.updateCustomLinkAction(q,Y[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,E,Q){if(null!=E&&null!=E[Q]){for(var Y=[],R=0;R<E[Q].length;R++)if("*"==E[Q][R])Y.push(E[Q][R]);else{var Z=q[E[Q][R]];null!=Z?""!=Z&&Y.push(Z):Y.push(E[Q][R])}E[Q]=Y}};Graph.prototype.getCellsForAction=function(q,E){E=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,E));if(null!=q.excludeCells){for(var Q=
+[],Y=0;Y<E.length;Y++)0>q.excludeCells.indexOf(E[Y].id)&&Q.push(E[Y]);E=Q}return E};Graph.prototype.getCellsById=function(q){var E=[];if(null!=q)for(var Q=0;Q<q.length;Q++)if("*"==q[Q]){var Y=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Z){return Z!=Y},Y))}else{var R=this.model.getCell(q[Q]);null!=R&&E.push(R)}return E};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};
Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var E=mxUtils.indexOf(this.hiddenTags,q);0>E?this.hiddenTags.push(q):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var E=0;E<q.length;E++)if(0>
-mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var ba=0,ea={},ra=0;ra<q.length;ra++)0<q[ra].length&&(ea[q[ra]]=!0,ba++);for(ra=0;ra<E.length;ra++)if(Q&&this.model.getParent(E[ra])==this.model.root||this.model.isVertex(E[ra])||this.model.isEdge(E[ra])){var ta=this.getTagsForCell(E[ra]),la=!1;if(0<ta.length&&(ta=ta.split(" "),ta.length>=q.length)){for(var pa=
-la=0;pa<ta.length&&la<ba;pa++)null!=ea[ta[pa]]&&la++;la=la==ba}la&&(1!=Y||this.isCellVisible(E[ra]))&&R.push(E[ra])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var ba={},ea=0;ea<R.length;ea++)if(null==E||null!=E[R[ea]])ba[R[ea]]=!0,Q.push(R[ea]);E=ba}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var ba=0;ba<R.length;ba++)null==Q[R[ba]]&&(Q[R[ba]]=!0,E.push(R[ba]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),ba=
-!1,ea=0;ea<E.length;ea++){var ra=mxUtils.trim(E[ea]);""!=ra&&0>mxUtils.indexOf(R,ra)&&(Y=0<Y.length?Y+" "+ra:ra,ba=!0)}ba&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),ba=!1,ea=0;ea<E.length;ea++){var ra=mxUtils.indexOf(R,E[ea]);0<=ra&&(R.splice(ra,1),ba=!0)}ba&&this.setAttributeForCell(q[Q],
+mxUtils.indexOf(this.hiddenTags,q[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,E,Q,Y){var R=[];if(null!=q){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Z=0,da={},qa=0;qa<q.length;qa++)0<q[qa].length&&(da[q[qa]]=!0,Z++);for(qa=0;qa<E.length;qa++)if(Q&&this.model.getParent(E[qa])==this.model.root||this.model.isVertex(E[qa])||this.model.isEdge(E[qa])){var va=this.getTagsForCell(E[qa]),ja=!1;if(0<va.length&&(va=va.split(" "),va.length>=q.length)){for(var sa=
+ja=0;sa<va.length&&ja<Z;sa++)null!=da[va[sa]]&&ja++;ja=ja==Z}ja&&(1!=Y||this.isCellVisible(E[qa]))&&R.push(E[qa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var E=null,Q=[],Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);Q=[];if(0<R.length){R=R.split(" ");for(var Z={},da=0;da<R.length;da++)if(null==E||null!=E[R[da]])Z[R[da]]=!0,Q.push(R[da]);E=Z}else return[]}return Q};
+Graph.prototype.getTagsForCells=function(q){for(var E=[],Q={},Y=0;Y<q.length;Y++){var R=this.getTagsForCell(q[Y]);if(0<R.length){R=R.split(" ");for(var Z=0;Z<R.length;Z++)null==Q[R[Z]]&&(Q[R[Z]]=!0,E.push(R[Z]))}}return E};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){for(var Y=this.getTagsForCell(q[Q]),R=Y.split(" "),Z=!1,da=
+0;da<E.length;da++){var qa=mxUtils.trim(E[da]);""!=qa&&0>mxUtils.indexOf(R,qa)&&(Y=0<Y.length?Y+" "+qa:qa,Z=!0)}Z&&this.setAttributeForCell(q[Q],"tags",Y)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,E){if(0<q.length&&0<E.length){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++){var Y=this.getTagsForCell(q[Q]);if(0<Y.length){for(var R=Y.split(" "),Z=!1,da=0;da<E.length;da++){var qa=mxUtils.indexOf(R,E[da]);0<=qa&&(R.splice(qa,1),Z=!0)}Z&&this.setAttributeForCell(q[Q],
"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var E=0;E<q.length;E++)this.model.setVisible(q[E],!this.model.isVisible(q[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,E){this.model.beginUpdate();try{for(var Q=0;Q<q.length;Q++)this.model.setVisible(q[Q],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,E,Q,Y){for(var R=0;R<q.length;R++)this.highlightCell(q[R],
-E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var ba=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ba=new mxCellHighlight(this,E,R,!1),null!=Y&&(ba.opacity=Y),ba.highlight(q),window.setTimeout(function(){null!=ba.shape&&(mxUtils.setPrefixedStyle(ba.shape.node.style,"transition","all 1200ms ease-in-out"),ba.shape.node.style.opacity=0);window.setTimeout(function(){ba.destroy()},
-1200)},Q));return ba};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,ba=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ba.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ba.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ba.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ba.appendChild(ea);
-ea=q.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=ea[0];R.appendChild(ba);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
-6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return ba};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+E,Q,Y)};Graph.prototype.highlightCell=function(q,E,Q,Y,R){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;q=this.view.getState(q);var Z=null;null!=q&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+R),Z=new mxCellHighlight(this,E,R,!1),null!=Y&&(Z.opacity=Y),Z.highlight(q),window.setTimeout(function(){null!=Z.shape&&(mxUtils.setPrefixedStyle(Z.shape.node.style,"transition","all 1200ms ease-in-out"),Z.shape.node.style.opacity=0);window.setTimeout(function(){Z.destroy()},
+1200)},Q));return Z};Graph.prototype.addSvgShadow=function(q,E,Q,Y){Q=null!=Q?Q:!1;Y=null!=Y?Y:!0;var R=q.ownerDocument,Z=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");Z.setAttribute("id",this.shadowId);var da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");da.setAttribute("in","SourceAlpha");da.setAttribute("stdDeviation",this.svgShadowBlur);da.setAttribute("result","blur");Z.appendChild(da);
+da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");da.setAttribute("in","blur");da.setAttribute("dx",this.svgShadowSize);da.setAttribute("dy",this.svgShadowSize);da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");da.setAttribute("flood-color",this.svgShadowColor);da.setAttribute("flood-opacity",this.svgShadowOpacity);da.setAttribute("result",
+"offsetColor");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");da.setAttribute("in","offsetColor");da.setAttribute("in2","offsetBlur");da.setAttribute("operator","in");da.setAttribute("result","offsetBlur");Z.appendChild(da);da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");da.setAttribute("in","SourceGraphic");da.setAttribute("in2","offsetBlur");Z.appendChild(da);da=
+q.getElementsByTagName("defs");0==da.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=q.firstChild?q.insertBefore(R,q.firstChild):q.appendChild(R)):R=da[0];R.appendChild(Z);Q||(E=null!=E?E:q.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&Y&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+
+6),E=q.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,q.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Z};Graph.prototype.setShadowVisible=function(q,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),E=0;do var Q=this.model.getChildAt(this.model.root,E);while(E++<q&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
@@ -3352,160 +3353,160 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(q){var E=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?E="mxgraph.er":"sysML"==q.substring(0,5)&&(E="mxgraph.sysml"));return E};var aa=mxMarker.createMarker;mxMarker.createMarker=
-function(q,E,Q,Y,R,ba,ea,ra,ta,la){if(null!=Q&&null==mxMarker.markers[Q]){var pa=this.getPackageForType(Q);null!=pa&&mxStencilRegistry.getStencil(pa)}return aa.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,ba){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Ca.value=
-Math.max(1,Math.min(ra,Math.max(parseInt(Ca.value),parseInt(xa.value))));xa.value=Math.max(1,Math.min(ra,Math.min(parseInt(Ca.value),parseInt(xa.value))))}function Y(ya){function Ha($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=wa.get(),hb=
-1/$a.pageScale,tb=Sa.checked;if(tb){hb=parseInt(ha.value);var Cb=parseInt(ma.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Da.value)/(100*$a.pageScale),isNaN(hb)&&(Qa=1/$a.pageScale,Da.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Qa);kb.height=Math.ceil(kb.height*Qa);hb*=Qa;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,
-hb,kb,0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ia.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),
-ob.writeln(q.editor.fontCss),ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;
-ab.renderPage=function(ob,yb,Ab,c,l,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,
-null,ib,!0);R.enableFlowAnimation=kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Qa=parseInt(sa.value)/100;isNaN(Qa)&&(Qa=1,sa.value="100 %");Qa*=.75;var ua=null,za=R.shapeForegroundColor,Fa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(ua=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=xa.value,Ea=Ca.value,Oa=!la.checked,Pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,la.checked,Ba,Ea,Sa.checked,ha.value,ma.value,parseInt(Da.value)/100,parseInt(sa.value)/100,wa.get());else{Oa&&(Oa=Ia.checked||Ba==ta&&Ea==ta);if(!Oa&&null!=q.pages&&q.pages.length){var bb=0;Oa=q.pages.length-1;la.checked||(bb=parseInt(Ba)-1,
-Oa=parseInt(Ea)-1);for(var eb=bb;eb<=Oa;eb++){var db=q.pages[eb];Ba=db==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ea=!0;bb=!1;var ub=null,fb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ea=db.viewState.pageVisible,bb=db.viewState.mathEnabled,ub=db.viewState.background,fb=db.viewState.backgroundImage,Ba.extFonts=db.viewState.extFonts);null!=
-fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,db));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ea;Ba.mathEnabled=bb;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*
-gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=function($a){return"page"==$a?db.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(db);Ba.model.setRoot(db.root)}Pa=Ha(Ba,Pa,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Pa=Ha(R);null==Pa?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Pa.mathEnabled&&(Oa=Pa.wnd.document,
-ya&&(Pa.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Pa.closeDocument(),!Pa.mathEnabled&&ya&&PrintDialog.printPreview(Pa));null!=ua&&(R.shapeForegroundColor=za,R.shapeBackgroundColor=Fa,R.stylesheet=ua,R.refresh())}}var R=q.editor.graph,ba=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,E||mxResources.get("print"));
-ba.appendChild(ea);var ra=1,ta=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var la=document.createElement("input");la.style.cssText="margin-right:8px;margin-bottom:8px;";la.setAttribute("value","all");la.setAttribute("type","radio");la.setAttribute("name","pages-printdialog");ea.appendChild(la);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));ea.appendChild(E);mxUtils.br(ea);var pa=
-la.cloneNode(!0);la.setAttribute("checked","checked");pa.setAttribute("value","range");ea.appendChild(pa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");ea.appendChild(E);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","1");xa.setAttribute("type","number");xa.setAttribute("min","1");xa.style.width="50px";ea.appendChild(xa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));ea.appendChild(E);
-var Ca=xa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(xa,"focus",function(){pa.checked=!0});mxEvent.addListener(Ca,"focus",function(){pa.checked=!0});mxEvent.addListener(xa,"change",Q);mxEvent.addListener(Ca,"change",Q);if(null!=q.pages&&(ra=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){ta=E+1;xa.value=ta;Ca.value=ta;break}xa.setAttribute("max",ra);Ca.setAttribute("max",ra);q.isPagesEnabled()?1<ra&&(ba.appendChild(ea),pa.checked=!0):pa.checked=
-!0;mxUtils.br(ea);var Ia=document.createElement("input");Ia.setAttribute("value","all");Ia.setAttribute("type","radio");Ia.style.marginRight="8px";R.isSelectionEmpty()&&Ia.setAttribute("disabled","disabled");var Aa=document.createElement("div");Aa.style.marginBottom="10px";1==ra?(Ia.setAttribute("type","checkbox"),Ia.style.marginBottom="12px",Aa.appendChild(Ia)):(Ia.setAttribute("name","pages-printdialog"),Ia.style.marginBottom="8px",ea.appendChild(Ia));E=document.createElement("span");mxUtils.write(E,
-mxResources.get("selectionOnly"));Ia.parentNode.appendChild(E);1==ra&&mxUtils.br(Ia.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");Aa.appendChild(La);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));Aa.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width=
-"50px";Aa.appendChild(Da);mxEvent.addListener(Da,"focus",function(){La.checked=!0});ba.appendChild(Aa);ea=ea.cloneNode(!1);var Sa=La.cloneNode(!0);Sa.setAttribute("value","fit");La.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);ea.appendChild(E);Aa=document.createElement("table");Aa.style.display="inline-block";var Ra=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),
-Na=document.createElement("td"),z=Na.cloneNode(!0),L=Na.cloneNode(!0),O=Na.cloneNode(!0),V=Na.cloneNode(!0),U=Na.cloneNode(!0);Na.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min","1");ha.setAttribute("type","number");ha.style.width="40px";z.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));
-L.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ma=ha.cloneNode(!0);V.appendChild(ma);mxEvent.addListener(ha,"focus",function(){Sa.checked=!0});mxEvent.addListener(ma,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));U.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(L);Za.appendChild(O);Za.appendChild(V);Za.appendChild(U);Ra.appendChild(Ta);Ra.appendChild(Za);Aa.appendChild(Ra);ea.appendChild(Aa);
-ba.appendChild(ea);ea=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));ea.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));ea.appendChild(E);var sa=
-document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";ea.appendChild(sa);ba.appendChild(ea);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});ea.className="geBtn";q.editor.cancelFirst&&E.appendChild(ea);q.isOffline()||(Aa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-Aa.className="geBtn",E.appendChild(Aa));PrintDialog.previewEnabled&&(Aa=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();Y(!1)}),Aa.className="geBtn",E.appendChild(Aa));Aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});Aa.className="geBtn gePrimaryBtn";E.appendChild(Aa);q.editor.cancelFirst||E.appendChild(ea);ba.appendChild(E);this.container=ba};var ja=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
-function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else ja.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 ca=document.createElement("canvas"),ka=new Image;ka.onload=function(){try{ca.getContext("2d").drawImage(ka,
-0,0);var q=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};ka.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
+function(q,E,Q,Y,R,Z,da,qa,va,ja){if(null!=Q&&null==mxMarker.markers[Q]){var sa=this.getPackageForType(Q);null!=sa&&mxStencilRegistry.getStencil(sa)}return aa.apply(this,arguments)};var V=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,E,Q,Y,R,Z){"1"==mxUtils.getValue(E.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return V.apply(this,arguments)};PrintDialog.prototype.create=function(q,E){function Q(){Aa.value=Math.max(1,
+Math.min(qa,Math.max(parseInt(Aa.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(qa,Math.min(parseInt(Aa.value),parseInt(ya.value))))}function Y(pa){function ua($a,ab,ib){var gb=$a.useCssTransforms,qb=$a.currentTranslate,nb=$a.currentScale,mb=$a.view.translate,Bb=$a.view.scale;$a.useCssTransforms&&($a.useCssTransforms=!1,$a.currentTranslate=new mxPoint(0,0),$a.currentScale=1,$a.view.translate=new mxPoint(0,0),$a.view.scale=1);var wb=$a.getGraphBounds(),rb=0,vb=0,kb=xa.get(),hb=1/$a.pageScale,
+tb=Sa.checked;if(tb){hb=parseInt(ea.value);var Cb=parseInt(ka.value);hb=Math.min(kb.height*Cb/(wb.height/$a.view.scale),kb.width*hb/(wb.width/$a.view.scale))}else hb=parseInt(Ca.value)/(100*$a.pageScale),isNaN(hb)&&(Da=1/$a.pageScale,Ca.value="100 %");kb=mxRectangle.fromRectangle(kb);kb.width=Math.ceil(kb.width*Da);kb.height=Math.ceil(kb.height*Da);hb*=Da;!tb&&$a.pageVisible?(wb=$a.getPageLayout(),rb-=wb.x*kb.width,vb-=wb.y*kb.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview($a,hb,kb,
+0,rb,vb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Ea.checked&&(ab.isCellVisible=function(ob){return $a.isCellSelected(ob)});rb=q.getCurrentFile();null!=rb&&(ab.title=rb.getTitle());var xb=ab.writeHead;ab.writeHead=function(ob){xb.apply(this,arguments);mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ob.writeln("}"),ob.writeln("</style>"));null!=q.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(q.editor.fontCss),
+ob.writeln("</style>"));for(var yb=$a.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,l=yb[Ab].url;Graph.isCssFontUrl(l)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var zb=ab.renderPage;ab.renderPage=function(ob,yb,
+Ab,c,l,v){var n=mxClient.NO_FO,u=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:u.className="geDisableMathJax";return u}}rb=null;vb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;kb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(rb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());ab.open(null,null,ib,!0);R.enableFlowAnimation=
+kb;null!=rb&&(R.shapeForegroundColor=vb,R.shapeBackgroundColor=tb,R.stylesheet=rb,R.refresh())}else{kb=$a.background;if(null==kb||""==kb||kb==mxConstants.NONE)kb="#ffffff";ab.backgroundColor=kb;ab.autoOrigin=tb;ab.appendGraph($a,hb,rb,vb,ib,!0);ib=$a.getCustomFonts();if(null!=ab.wnd)for(rb=0;rb<ib.length;rb++)vb=ib[rb].name,tb=ib[rb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(ab.wnd.document.writeln('<style type="text/css">'),
+ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(vb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}gb&&($a.useCssTransforms=gb,$a.currentTranslate=qb,$a.currentScale=nb,$a.view.translate=mb,$a.view.scale=Bb);return ab}var Da=parseInt(ta.value)/100;isNaN(Da)&&(Da=1,ta.value="100 %");Da*=.75;var Fa=null,Ma=R.shapeForegroundColor,Qa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(Fa=R.stylesheet,R.stylesheet=
+R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Ba=ya.value,Ka=Aa.value,Oa=!ja.checked,Ya=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,ja.checked,Ba,Ka,Sa.checked,ea.value,ka.value,parseInt(Ca.value)/100,parseInt(ta.value)/100,xa.get());else{Oa&&(Oa=Ea.checked||Ba==va&&Ka==va);if(!Oa&&null!=q.pages&&q.pages.length){var db=0;Oa=q.pages.length-1;ja.checked||(db=parseInt(Ba)-1,Oa=parseInt(Ka)-1);for(var eb=db;eb<=Oa;eb++){var cb=
+q.pages[eb];Ba=cb==q.currentPage?R:null;if(null==Ba){Ba=q.createTemporaryGraph(R.stylesheet);Ba.shapeForegroundColor=R.shapeForegroundColor;Ba.shapeBackgroundColor=R.shapeBackgroundColor;Ka=!0;db=!1;var ub=null,fb=null;null==cb.viewState&&null==cb.root&&q.updatePageRoot(cb);null!=cb.viewState&&(Ka=cb.viewState.pageVisible,db=cb.viewState.mathEnabled,ub=cb.viewState.background,fb=cb.viewState.backgroundImage,Ba.extFonts=cb.viewState.extFonts);null!=fb&&null!=fb.originalSrc&&(fb=q.createImageForPageLink(fb.originalSrc,
+cb));Ba.background=ub;Ba.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Ba.pageVisible=Ka;Ba.mathEnabled=db;var pb=Ba.getGraphBounds;Ba.getGraphBounds=function(){var $a=pb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var ib=this.view.translate,gb=this.view.scale;$a=mxRectangle.fromRectangle($a);$a.add(new mxRectangle((ib.x+ab.x)*gb,(ib.y+ab.y)*gb,ab.width*gb,ab.height*gb))}return $a};var lb=Ba.getGlobalVariable;Ba.getGlobalVariable=
+function($a){return"page"==$a?cb.getName():"pagenumber"==$a?eb+1:"pagecount"==$a?null!=q.pages?q.pages.length:1:lb.apply(this,arguments)};document.body.appendChild(Ba.container);q.updatePageRoot(cb);Ba.model.setRoot(cb.root)}Ya=ua(Ba,Ya,eb!=Oa);Ba!=R&&Ba.container.parentNode.removeChild(Ba.container)}}else Ya=ua(R);null==Ya?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ya.mathEnabled&&(Oa=Ya.wnd.document,pa&&(Ya.wnd.IMMEDIATE_PRINT=!0),Oa.writeln('<script type="text/javascript" src="'+
+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ya.closeDocument(),!Ya.mathEnabled&&pa&&PrintDialog.printPreview(Ya));null!=Fa&&(R.shapeForegroundColor=Ma,R.shapeBackgroundColor=Qa,R.stylesheet=Fa,R.refresh())}}var R=q.editor.graph,Z=document.createElement("div"),da=document.createElement("h3");da.style.width="100%";da.style.textAlign="center";da.style.marginTop="0px";mxUtils.write(da,E||mxResources.get("print"));Z.appendChild(da);var qa=1,va=1;da=document.createElement("div");da.style.cssText=
+"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");da.appendChild(ja);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));da.appendChild(E);mxUtils.br(da);var sa=ja.cloneNode(!0);ja.setAttribute("checked","checked");sa.setAttribute("value","range");
+da.appendChild(sa);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");da.appendChild(E);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="50px";da.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));da.appendChild(E);var Aa=ya.cloneNode(!0);da.appendChild(Aa);mxEvent.addListener(ya,"focus",function(){sa.checked=
+!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(ya,"change",Q);mxEvent.addListener(Aa,"change",Q);if(null!=q.pages&&(qa=q.pages.length,null!=q.currentPage))for(E=0;E<q.pages.length;E++)if(q.currentPage==q.pages[E]){va=E+1;ya.value=va;Aa.value=va;break}ya.setAttribute("max",qa);Aa.setAttribute("max",qa);q.isPagesEnabled()?1<qa&&(Z.appendChild(da),sa.checked=!0):sa.checked=!0;mxUtils.br(da);var Ea=document.createElement("input");Ea.setAttribute("value","all");Ea.setAttribute("type",
+"radio");Ea.style.marginRight="8px";R.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");var za=document.createElement("div");za.style.marginBottom="10px";1==qa?(Ea.setAttribute("type","checkbox"),Ea.style.marginBottom="12px",za.appendChild(Ea)):(Ea.setAttribute("name","pages-printdialog"),Ea.style.marginBottom="8px",da.appendChild(Ea));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));Ea.parentNode.appendChild(E);1==qa&&mxUtils.br(Ea.parentNode);var Ia=document.createElement("input");
+Ia.style.marginRight="8px";Ia.setAttribute("value","adjust");Ia.setAttribute("type","radio");Ia.setAttribute("name","printZoom");za.appendChild(Ia);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));za.appendChild(E);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";za.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Ia.checked=!0});Z.appendChild(za);da=da.cloneNode(!1);var Sa=Ia.cloneNode(!0);
+Sa.setAttribute("value","fit");Ia.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Sa);da.appendChild(E);za=document.createElement("table");za.style.display="inline-block";var Pa=document.createElement("tbody"),Ta=document.createElement("tr"),Za=Ta.cloneNode(!0),Na=document.createElement("td"),z=Na.cloneNode(!0),J=Na.cloneNode(!0),O=Na.cloneNode(!0),U=Na.cloneNode(!0),W=Na.cloneNode(!0);Na.style.textAlign=
+"right";O.style.textAlign="right";mxUtils.write(Na,mxResources.get("fitTo"));var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","1");ea.setAttribute("min","1");ea.setAttribute("type","number");ea.style.width="40px";z.appendChild(ea);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));J.appendChild(E);mxUtils.write(O,mxResources.get("fitToBy"));var ka=ea.cloneNode(!0);U.appendChild(ka);mxEvent.addListener(ea,"focus",
+function(){Sa.checked=!0});mxEvent.addListener(ka,"focus",function(){Sa.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));W.appendChild(E);Ta.appendChild(Na);Ta.appendChild(z);Ta.appendChild(J);Za.appendChild(O);Za.appendChild(U);Za.appendChild(W);Pa.appendChild(Ta);Pa.appendChild(Za);za.appendChild(Pa);da.appendChild(za);Z.appendChild(da);da=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom=
+"12px";mxUtils.write(E,mxResources.get("paperSize"));da.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var xa=PageSetupDialog.addPageFormatPanel(E,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);da.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));da.appendChild(E);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";
+da.appendChild(ta);Z.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});da.className="geBtn";q.editor.cancelFirst&&E.appendChild(da);q.isOffline()||(za=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),za.className="geBtn",E.appendChild(za));PrintDialog.previewEnabled&&(za=mxUtils.button(mxResources.get("preview"),
+function(){q.hideDialog();Y(!1)}),za.className="geBtn",E.appendChild(za));za=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();Y(!0)});za.className="geBtn gePrimaryBtn";E.appendChild(za);q.editor.cancelFirst||E.appendChild(da);Z.appendChild(E);this.container=Z};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ha.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&
+(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var X=document.createElement("canvas"),ia=new Image;ia.onload=function(){try{X.getContext("2d").drawImage(ia,0,0);var q=X.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(E){}};
+ia.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,u,H){u=null!=u?u:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var J=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=J+"/log?severity="+u+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
-encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(D){}try{H||null==window.console||console.error(u,d,f,g,x,y)}catch(D){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,x,y,t,G){t=null!=t?t:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(d);(new Image).src=D+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=x?":colno:"+
+encodeURIComponent(x):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(I){}try{G||null==window.console||console.error(t,d,f,g,x,y)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(u){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(t){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var x=f.toDataURL("image/jpeg");
EditorUi.prototype.jpgSupported=null!==x.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),u=y.spin;y.spin=function(J,D){var G=!1;this.active||(u.call(this,J),this.active=!0,null!=D&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
-G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),G.innerHTML=D,J.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var W=function(){};this.active&&(W=mxUtils.bind(this,function(){this.spin(J,D)}));this.stop();return W}),G=!0);return G};var H=y.stop;y.stop=function(){H.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
+EditorUi.prototype.createSpinner=function(d,f,g){var x=null==d||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=y.spin;y.spin=function(D,I){var H=!1;this.active||(t.call(this,D),this.active=!0,null!=I&&(x&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),
+H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0,d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),H.innerHTML=I,D.appendChild(H),y.status=H),this.pause=mxUtils.bind(this,function(){var S=function(){};this.active&&(S=mxUtils.bind(this,function(){this.spin(D,I)}));this.stop();return S}),H=!0);return H};var G=y.stop;y.stop=function(){G.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
return y};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(x){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(u){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var H=y.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<H&&y.movePage(H,H-1)};if(38==u.keyCode)return function(){0<H&&y.movePage(H,0)};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,
-H+1)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.movePage(H,y.pages.length-1)}}else if(mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)){if(37==u.keyCode)return function(){0<H&&y.selectNextPage(!1)};if(38==u.keyCode)return function(){0<H&&y.selectPage(y.pages[0])};if(39==u.keyCode)return function(){H<y.pages.length-1&&y.selectNextPage(!0)};if(40==u.keyCode)return function(){H<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=u.keyCode&&90>=u.keyCode)||
-x.isSelectionEmpty()||mxEvent.isAltDown(u)||mxEvent.isShiftDown(u)||mxEvent.isControlDown(u)||mxClient.IS_MAC&&mxEvent.isMetaDown(u)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(d),u=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=u?mxUtils.getXml(u):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
-d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var u=this.updatePageRoot(new DiagramPage(x[y]));null==u.getName()&&
-u.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,u,0==y?u:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,u,H,J,D,G,W){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;D=null!=D?D:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else T=Z=x;if(null==d)return"";var N=d;if("mxfile"!=N.nodeName.toLowerCase()){if(W){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());
-qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));N=Graph.compress(qa);if(Graph.decompress(N)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,N)}N=d.ownerDocument.createElement("mxfile");N.appendChild(qa)}G?(N=N.cloneNode(!0),N.removeAttribute("modified"),N.removeAttribute("host"),N.removeAttribute("agent"),N.removeAttribute("etag"),N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),
-N.removeAttribute("type")):(N.removeAttribute("userAgent"),N.removeAttribute("version"),N.removeAttribute("editor"),N.removeAttribute("pages"),N.removeAttribute("type"),mxClient.IS_CHROMEAPP?N.setAttribute("host","Chrome"):EditorUi.isElectronApp?N.setAttribute("host","Electron"):N.setAttribute("host",window.location.hostname),N.setAttribute("modified",(new Date).toISOString()),N.setAttribute("agent",navigator.appVersion),N.setAttribute("version",EditorUi.VERSION),N.setAttribute("etag",Editor.guid()),
-d=null!=g?g.getMode():this.mode,null!=d&&N.setAttribute("type",d),1<N.getElementsByTagName("diagram").length&&null!=this.pages&&N.setAttribute("pages",this.pages.length));W=W?mxUtils.getPrettyXml(N):mxUtils.getXml(N);if(!u&&!y&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))W=this.getHtml2(mxUtils.getXml(N),f,null!=g?g.getTitle():null,Z,T);else if(u||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),W=this.getEmbeddedSvg(W,f,
-x,null,J,D,T);return W};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&D.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?D=
-D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,Graph.compressNode(G)));y.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var u=this.pages[f],H=u.node;if(u!=this.currentPage)if(u.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,
-J,null,x);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(J));delete u.needsUpdate}else x&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&
-null!=u.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,J,null,x),H=H.cloneNode(!1),mxUtils.setTextContent(H,Graph.compressNode(J))));d(H)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,x=this.editor.graph,y=this;f.getFunction=function(t){if(x.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var G=y.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<G&&y.movePage(G,G-1)};if(38==t.keyCode)return function(){0<G&&y.movePage(G,0)};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,
+G+1)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.movePage(G,y.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<G&&y.selectNextPage(!1)};if(38==t.keyCode)return function(){0<G&&y.selectPage(y.pages[0])};if(39==t.keyCode)return function(){G<y.pages.length-1&&y.selectNextPage(!0)};if(40==t.keyCode)return function(){G<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
+x.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var x=d.lastIndexOf("&lt;/mxfile&gt;");x>g&&(f=d.substring(g,x+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var y=mxUtils.parseXml(d),t=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=t?mxUtils.getXml(t):""}}catch(G){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,x=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<x.length||1==x.length&&x[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var y=x.length-1;0<=y;y--){var t=this.updatePageRoot(new DiagramPage(x[y]));null==t.getName()&&
+t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,0==y?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,x,y,t,G,D,I,H,S){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;I=null!=I?I:!0;var T=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var M="_blank";else T=M=x;if(null==d)return"";var fa=d;if("mxfile"!=fa.nodeName.toLowerCase()){if(S){var la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());
+la.appendChild(d)}else{la=Graph.zapGremlins(mxUtils.getXml(d));fa=Graph.compress(la);if(Graph.decompress(fa)!=la)return la;la=d.ownerDocument.createElement("diagram");la.setAttribute("id",Editor.guid());mxUtils.setTextContent(la,fa)}fa=d.ownerDocument.createElement("mxfile");fa.appendChild(la)}H?(fa=fa.cloneNode(!0),fa.removeAttribute("modified"),fa.removeAttribute("host"),fa.removeAttribute("agent"),fa.removeAttribute("etag"),fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),
+fa.removeAttribute("type")):(fa.removeAttribute("userAgent"),fa.removeAttribute("version"),fa.removeAttribute("editor"),fa.removeAttribute("pages"),fa.removeAttribute("type"),mxClient.IS_CHROMEAPP?fa.setAttribute("host","Chrome"):EditorUi.isElectronApp?fa.setAttribute("host","Electron"):fa.setAttribute("host",window.location.hostname),fa.setAttribute("modified",(new Date).toISOString()),fa.setAttribute("agent",navigator.appVersion),fa.setAttribute("version",EditorUi.VERSION),fa.setAttribute("etag",
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&fa.setAttribute("type",d),1<fa.getElementsByTagName("diagram").length&&null!=this.pages&&fa.setAttribute("pages",this.pages.length));S=S?mxUtils.getPrettyXml(fa):mxUtils.getXml(fa);if(!t&&!y&&(G||null!=g&&/(\.html)$/i.test(g.getTitle())))S=this.getHtml2(mxUtils.getXml(fa),f,null!=g?g.getTitle():null,M,T);else if(t||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(x=null),S=this.getEmbeddedSvg(S,
+f,x,null,D,I,T);return S};EditorUi.prototype.getXmlFileData=function(d,f,g,x){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(d,x);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var H=I.getElementsByTagName("mxGraphModel");H=0<H.length?H[0]:null;null==H&&g?(H=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<H.length&&(H=Graph.decompress(H),null!=H&&0<H.length&&I.appendChild(mxUtils.parseXml(H).documentElement))):null==H||g?
+I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(H)));y.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var t=this.pages[f],G=t.node;if(t!=this.currentPage)if(t.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,
+D,null,x);EditorUi.removeChildNodes(G);mxUtils.setTextContent(G,Graph.compressNode(D));delete t.needsUpdate}else x&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&
+null!=t.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,D,null,x),G=G.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(D))));d(G)}return y};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],x=0;x<d.length;x++){var y=d.charAt(x);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(u){d[EditorUi.DIFF_INSERT][f].data=u.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(u){var H=y.cells[u];if(null!=H){for(var J in H)null!=H[J].value&&(H[J].value="["+H[J].value.length+"]"),null!=H[J].xmlValue&&(H[J].xmlValue="["+H[J].xmlValue.length+"]"),null!=H[J].style&&(H[J].style=
-"["+H[J].style.length+"]"),mxUtils.isEmptyObject(H[J])&&delete H[J];mxUtils.isEmptyObject(H)&&delete y.cells[u]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(t){d[EditorUi.DIFF_INSERT][f].data=t.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var x in d[EditorUi.DIFF_UPDATE]){var y=d[EditorUi.DIFF_UPDATE][x];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(t){var G=y.cells[t];if(null!=G){for(var D in G)null!=G[D].value&&(G[D].value="["+G[D].value.length+"]"),null!=G[D].xmlValue&&(G[D].xmlValue="["+G[D].xmlValue.length+"]"),null!=G[D].style&&(G[D].style=
+"["+G[D].style.length+"]"),mxUtils.isEmptyObject(G[D])&&delete G[D];mxUtils.isEmptyObject(G)&&delete y.cells[t]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete d[EditorUi.DIFF_UPDATE][x]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,u,H,
-J,D,G,W){y=null!=y?y:!0;u=null!=u?u:!1;var T=this.editor.graph;if(f||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var Z=null!=T.themes&&"darkTheme"==T.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var N=T.getGlobalVariable;T=this.createTemporaryGraph(Z?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?T.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=qa.viewState&&null!=qa.viewState&&T.setBackgroundImage(qa.viewState.backgroundImage);T.getGlobalVariable=function(oa){return"page"==oa?qa.getName():"pagenumber"==oa?1:N.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(qa.root)}}H=null!=H?H:this.getXmlFileData(y,u,G,W);D=null!=D?D:this.getCurrentFile();d=this.createFileData(H,T,D,window.location.href,d,f,g,x,y,J,G);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
-function(d,f,g,x,y,u){u=null!=u?u:!0;var H=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=u?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var D=f.view.scale;u=Math.floor(H.x/D-f.view.translate.x);D=Math.floor(H.y/D-f.view.translate.y);H=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(J=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",u);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,x,y,t,G,
+D,I,H,S){y=null!=y?y:!0;t=null!=t?t:!1;var T=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var M=null!=T.themes&&"darkTheme"==T.defaultThemeName;H=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var fa=T.getGlobalVariable;T=this.createTemporaryGraph(M?T.getDefaultStylesheet():T.getStylesheet());T.setBackgroundImage=this.editor.graph.setBackgroundImage;T.background=this.editor.graph.background;var la=this.pages[0];this.currentPage==la?T.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=la.viewState&&null!=la.viewState&&T.setBackgroundImage(la.viewState.backgroundImage);T.getGlobalVariable=function(ra){return"page"==ra?la.getName():"pagenumber"==ra?1:fa.apply(this,arguments)};document.body.appendChild(T.container);T.model.setRoot(la.root)}}G=null!=G?G:this.getXmlFileData(y,t,H,S);I=null!=I?I:this.getCurrentFile();d=this.createFileData(G,T,I,window.location.href,d,f,g,x,y,D,H);T!=this.editor.graph&&T.container.parentNode.removeChild(T.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,x,y,t){t=null!=t?t:!0;var G=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){G=t?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;t=Math.floor(G.x/I-f.view.translate.x);I=Math.floor(G.y/I-f.view.translate.y);G=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",t);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=x&&d.setAttribute("edit",x));null!=y&&(y=y.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";x=Graph.compress(d);Graph.decompress(x)!=d&&(x=encodeURIComponent(d));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=G&&G!=mxConstants.NONE?' style="background-color:'+G+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+x+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,x,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var x=0;x<d.length;x++)null==
d[x].getAttribute("id")&&d[x].setAttribute("id",x),f=new DiagramPage(d[x]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[x+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var u=this.editor.graph.getModel(),H=u.getChildren(u.root);for(x=0;x<H.length;x++){var J=H[x];u.setVisible(J,f[J.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(x=0;x<y.length;x++)f[y[x]]=!0;var t=this.editor.graph.getModel(),G=t.getChildren(t.root);for(x=0;x<G.length;x++){var D=G[x];t.setVisible(D,f[D.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=
this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,x,y,u,H,J,D,G,W,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!y),N=Z+("xml"==d||"pdf"==d&&W?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(N,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,Z),this.saveData(N,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
-d)N=Z+".png";else if("jpeg"==d)N=Z+".jpg";else if("remoteSvg"==d){N=Z+".svg";d="svg";var oa=parseInt(D);"string"===typeof J&&0<J.indexOf("%")&&(J=parseInt(J)/100);if(0<oa){var S=this.editor.graph,fa=S.getGraphBounds();var ia=Math.ceil(fa.width*J/S.view.scale+2*oa);var M=Math.ceil(fa.height*J/S.view.scale+2*oa)}}this.saveRequest(N,d,mxUtils.bind(this,function(ka,q){try{var E=this.editor.graph.pageVisible;0==u&&(this.editor.graph.pageVisible=u);var Q=this.createDownloadRequest(ka,d,x,q,H,y,J,D,G,W,
-T,ia,M);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,X=mxUtils.bind(this,function(ka){ka.length<=MAX_REQUEST_SIZE?this.saveData(N,"svg",ka,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ja=this.editor.graph.background;if(H||ja==mxConstants.NONE)ja=null;var ca=this.editor.graph.getSvg(ja,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(ca);
-this.editor.convertImages(ca,mxUtils.bind(this,mxUtils.bind(this,function(ka){this.spinner.stop();X(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ka))})))}else N=Z+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ka){this.spinner.stop();X(ka)}),x)}}catch(ka){this.handleError(ka)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){var N=this.editor.graph,qa=N.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=f,null,
-null,null,!1,"pdf"==f);var oa="",S="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=W?S="&from="+W.from+"&to="+W.to:0==u&&(S="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){oa="&from="+u;break}u=N.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=u&&u!=mxConstants.NONE||(u=
-"#ffffff"):u=mxConstants.NONE;y={globalVars:N.getExportVariables()};D&&(y.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+oa+S+"&bg="+(null!=u?u:mxConstants.NONE)+"&base64="+x+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=H?"&scale="+H:"")+(null!=J?"&border="+J:"")+
-(T&&isFinite(T)?"&w="+T:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(H){var J=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<J.length&&(J+="\n"),J+=H);H=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return x};this.fileLoaded(H);
-"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Z){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,W=mxUtils.bind(this,function(){var Z=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){Z===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),T()):
-this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(W,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();W()}));T();W()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var u=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(u,mxUtils.bind(this,function(H){y(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else y("")};
-EditorUi.prototype.updateDiagram=function(d){function f(M){var aa=new mxCellOverlay(M.image||y.warningImage,M.tooltip,M.align,M.valign,M.offset);aa.addListener(mxEvent.CLICK,function(X,ja){x.alert(M.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,u=y.getModel();u.beginUpdate();var H=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=u.getCell(d.getAttribute("id"));
-if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))u.setValue(J,G);else for(var W=G.attributes,T=0;T<W.length;T++)y.setAttributeForCell(J,W[T].nodeName,0<W[T].nodeValue.length?W[T].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+J.id+": "+M)}try{var Z=d.getAttribute("style");null!=Z&&y.model.setStyle(J,Z)}catch(M){null!=window.console&&console.log("Error in style for "+
-J.id+": "+M)}try{var N=d.getAttribute("icon");if(null!=N){var qa=0<N.length?JSON.parse(N):null;null!=qa&&qa.append||y.removeCellOverlays(J);null!=qa&&y.addCellOverlay(J,f(qa))}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}try{var oa=d.getAttribute("geometry");if(null!=oa){oa=JSON.parse(oa);var S=y.getCellGeometry(J);if(null!=S){S=S.clone();for(key in oa){var fa=parseFloat(oa[key]);"dx"==key?S.x+=fa:"dy"==key?S.y+=fa:"dw"==key?S.width+=fa:"dh"==key?S.height+=fa:S[key]=
-parseFloat(oa[key])}y.model.setGeometry(J,S)}}}catch(M){null!=window.console&&console.log("Error in icon for "+J.id+": "+M)}}}else if("model"==d.nodeName){for(var ia=d.firstChild;null!=ia&&ia.nodeType!=mxConstants.NODETYPE_ELEMENT;)ia=ia.nextSibling;null!=ia&&(new mxCodec(d.firstChild)).decode(ia,u)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
-0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{u.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var u=
-y.getDate(),H=y.getHours(),J=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+u+"-"+H+"-"+J+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
+function(d,f,g,x,y,t,G,D,I,H,S,T){try{x=null!=x?x:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!y),fa=M+("xml"==d||"pdf"==d&&S?".drawio":"")+"."+d;if("xml"==d){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,x,y,null,null,null,f);this.saveData(fa,d,la,"text/xml")}else if("html"==d)la=this.getHtml2(this.getFileData(!0),this.editor.graph,M),this.saveData(fa,d,la,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==
+d)fa=M+".png";else if("jpeg"==d)fa=M+".jpg";else if("remoteSvg"==d){fa=M+".svg";d="svg";var ra=parseInt(I);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var ba=this.editor.graph,oa=ba.getGraphBounds();var na=Math.ceil(oa.width*D/ba.view.scale+2*ra);var N=Math.ceil(oa.height*D/ba.view.scale+2*ra)}}this.saveRequest(fa,d,mxUtils.bind(this,function(ia,q){try{var E=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var Q=this.createDownloadRequest(ia,d,x,q,G,y,
+D,I,H,S,T,na,N);this.editor.graph.pageVisible=E;return Q}catch(Y){this.handleError(Y)}}))}else{var aa=null,V=mxUtils.bind(this,function(ia){ia.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",ia,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});if("svg"==d){var ha=this.editor.graph.background;if(G||ha==mxConstants.NONE)ha=null;var X=this.editor.graph.getSvg(ha,null,null,null,null,x);g&&this.editor.graph.addSvgShadow(X);
+this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(ia){this.spinner.stop();V(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(ia))})))}else fa=M+".svg",aa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(ia){this.spinner.stop();V(ia)}),x)}}catch(ia){this.handleError(ia)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,x,y,t,G,D,I,H,S,T,M){var fa=this.editor.graph,la=fa.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==t?!1:"xmlpng"!=f,null,
+null,null,!1,"pdf"==f);var ra="",ba="";if(la.width*la.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};H=H?"1":"0";"pdf"==f&&(null!=S?ba="&from="+S.from+"&to="+S.to:0==t&&(ba="&allPages=1"));"xmlpng"==f&&(H="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){ra="&from="+t;break}t=fa.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?y||null!=t&&t!=mxConstants.NONE||
+(t="#ffffff"):t=mxConstants.NONE;y={globalVars:fa.getExportVariables()};I&&(y.grid={size:fa.gridSize,steps:fa.view.gridSteps,color:fa.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+ba+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+x+"&embedXml="+H+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=G?"&scale="+G:"")+(null!=D?"&border="+
+D:"")+(T&&isFinite(T)?"&w="+T:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var x=window.location.hash,y=mxUtils.bind(this,function(G){var D=null!=d.data?d.data:"";null!=G&&0<G.length&&(0<D.length&&(D+="\n"),D+=G);G=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);G.getHash=function(){return x};this.fileLoaded(G);
+"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(M){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var I=null!=d.interval?parseInt(d.interval):6E4,H=null,S=mxUtils.bind(this,function(){var M=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(fa){M===this.currentPage&&(200<=fa.getStatus()&&300>=fa.getStatus()?(this.updateDiagram(fa.getText()),
+T()):this.handleError({message:mxResources.get("error")+" "+fa.getStatus()}))}),mxUtils.bind(this,function(fa){this.handleError(fa)}))}),T=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(S,I)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){T();S()}));T();S()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var t=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(t,mxUtils.bind(this,function(G){y(G)}),mxUtils.bind(this,function(G){null!=g&&g(G)}))}else y("")};
+EditorUi.prototype.updateDiagram=function(d){function f(N){var aa=new mxCellOverlay(N.image||y.warningImage,N.tooltip,N.align,N.valign,N.offset);aa.addListener(mxEvent.CLICK,function(V,ha){x.alert(N.tooltip)});return aa}var g=null,x=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var y=this.editor.graph,t=y.getModel();t.beginUpdate();var G=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var D=t.getCell(d.getAttribute("id"));
+if(null!=D){try{var I=d.getAttribute("value");if(null!=I){var H=mxUtils.parseXml(I).documentElement;if(null!=H)if("1"==H.getAttribute("replace-value"))t.setValue(D,H);else for(var S=H.attributes,T=0;T<S.length;T++)y.setAttributeForCell(D,S[T].nodeName,0<S[T].nodeValue.length?S[T].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+D.id+": "+N)}try{var M=d.getAttribute("style");null!=M&&y.model.setStyle(D,M)}catch(N){null!=window.console&&console.log("Error in style for "+
+D.id+": "+N)}try{var fa=d.getAttribute("icon");if(null!=fa){var la=0<fa.length?JSON.parse(fa):null;null!=la&&la.append||y.removeCellOverlays(D);null!=la&&y.addCellOverlay(D,f(la))}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var ba=y.getCellGeometry(D);if(null!=ba){ba=ba.clone();for(key in ra){var oa=parseFloat(ra[key]);"dx"==key?ba.x+=oa:"dy"==key?ba.y+=oa:"dw"==key?ba.width+=oa:"dh"==key?ba.height+=
+oa:ba[key]=parseFloat(ra[key])}y.model.setGeometry(D,ba)}}}catch(N){null!=window.console&&console.log("Error in icon for "+D.id+": "+N)}}}else if("model"==d.nodeName){for(var na=d.firstChild;null!=na&&na.nodeType!=mxConstants.NODETYPE_ELEMENT;)na=na.nextSibling;null!=na&&(new mxCodec(d.firstChild)).decode(na,t)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(y.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))y.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||
+0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(G=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{t.endUpdate()}null!=G&&this.chromelessResize&&this.chromelessResize(!0,G)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var x=g.lastIndexOf(".");0<=x&&(d=g.substring(x),g=g.substring(0,x));if(f){f=g;var y=new Date;g=y.getFullYear();x=y.getMonth()+1;var t=
+y.getDate(),G=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+x+"-"+t+"-"+G+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var x=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var y=mxUtils.bind(this,
function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&
"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&
d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-x=!0;if(!this.isOffline()&&null!=d.getMode()){var u="1"==urlParams.sketch?"sketch":uiTheme;if(null==u)u="default";else if("sketch"==u||"min"==u)u+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+u})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(J){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(J){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var u=0;u<d.length;u++){this.updatePageRoot(d[u]);var H=
-d[u].node.cloneNode(!1);H.removeAttribute("name");x.root=d[u].root;var J=y.encode(x);this.editor.graph.saveViewState(d[u].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(H,function(D,G,W,T){return!T||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?T&&"mxCell"==D.nodeName&&"previous"==
-G?null:W:Math.round(W)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var u=d.attributes[y].name,H=null!=f?f(d,u,d.attributes[y].value,!0):d.attributes[y].value;null!=H&&(x^=this.hashValue(u,
-f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,u,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+x=!0;if(!this.isOffline()&&null!=d.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(G){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(G){}}catch(G){this.fileLoadedError=G;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+G.message,label:"stack_"+G.stack})}catch(D){}d=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?d():this.handleError(G,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else y();return x};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,x=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var t=0;t<d.length;t++){this.updatePageRoot(d[t]);var G=
+d[t].node.cloneNode(!1);G.removeAttribute("name");x.root=d[t].root;var D=y.encode(x);this.editor.graph.saveViewState(d[t].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");G.appendChild(D);null!=f&&(f.eltCount+=G.getElementsByTagName("*").length,f.nodeCount+=G.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(G,function(I,H,S,T){return!T||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=H&&"y"!=H&&"width"!=H&&"height"!=H?T&&"mxCell"==I.nodeName&&"previous"==
+H?null:S:Math.round(S)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var x=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(x^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var y=0;y<d.attributes.length;y++){var t=d.attributes[y].name,G=null!=f?f(d,t,d.attributes[y].value,!0):d.attributes[y].value;null!=G&&(x^=this.hashValue(t,
+f,g)+this.hashValue(G,f,g))}}if(null!=d.childNodes)for(y=0;y<d.childNodes.length;y++)x=(x<<5)-x+this.hashValue(d.childNodes[y],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(y=0;y<d.length;y++)f=(f<<5)-f+d.charCodeAt(y)<<0;x^=f}return x};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,x,y,t,G){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var x=g.previousSibling;f.insertBefore(g,d);f.insertBefore(x,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var x=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,x,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var u=null,H=mxUtils.bind(this,function(ia,M){0==ia.length&&d.isEditable()?
-(null==u&&(u=document.createElement("div"),u.className="geDropTarget",mxUtils.write(u,mxResources.get("dragElementsHere"))),M.appendChild(u)):this.addLibraryEntries(ia,M)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var J=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(ia){H(f,ia)}));this.repositionLibrary(y);var D=J.parentNode.previousSibling;x=D.getAttribute("title");
-null!=x&&0<x.length&&".scratchpad"!=d.title&&D.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";D.style.position="relative";var W=document.createElement("img");W.className="geAdaptiveAsset";W.setAttribute("src",Editor.crossImage);W.setAttribute("title",mxResources.get("close"));W.setAttribute("valign","absmiddle");W.setAttribute("border",
-"0");W.style.position="relative";W.style.top="2px";W.style.width="14px";W.style.cursor="pointer";W.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(W),mxEvent.addListener(W,"click",mxUtils.bind(this,function(ia){if(!mxEvent.isConsumed(ia)){var M=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(ia)}}));if(d.isEditable()){var Z=
-this.editor.graph,N=null,qa=mxUtils.bind(this,function(ia){this.showLibraryDialog(d.getTitle(),J,f,d,d.getMode());mxEvent.consume(ia)}),oa=mxUtils.bind(this,function(ia){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=W.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",G.insertBefore(N,G.firstChild),D.style.paddingRight=18*G.childNodes.length+
-"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&(N.parentNode.removeChild(N),D.style.paddingRight=18*G.childNodes.length+"px")})):null==T&&(T=W.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),G.insertBefore(T,G.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==T||d.isModified()||(D.style.paddingRight=
-18*G.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(M)})),D.style.paddingRight=18*G.childNodes.length+"px")}),S=mxUtils.bind(this,function(ia,M,aa,X){ia=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(ia)));for(var ja=0;ja<ia.length;ja++){var ca=Z.getCellGeometry(ia[ja]);null!=ca&&ca.translate(-M.x,-M.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ia,M.width,M.height,X||"",!0,null,!1));ia={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ia))),
-w:M.width,h:M.height};null!=X&&(ia.title=X);f.push(ia);oa(aa);null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)}),fa=mxUtils.bind(this,function(ia){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(ia),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Z.getSelectionCells(),aa=Z.view.getBounds(M),X=Z.view.scale;aa.x/=X;aa.y/=X;aa.width/=X;aa.height/=X;aa.x-=
-Z.view.translate.x;aa.y-=Z.view.translate.y;S(M,aa)}mxEvent.consume(ia)});mxEvent.addGestureListeners(J,function(){},mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="#f1f3f4",J.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(ia))}),mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.panningManager&&
-null!=Z.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,fa(ia),mxEvent.consume(ia))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ia){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ia){J.style.backgroundColor="#f1f3f4";ia.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ia){J.style.cursor="";J.style.backgroundColor="";0<ia.dataTransfer.files.length&&this.importFiles(ia.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,aa,X,ja,ca,ka,q,E,Q){if(null!=M&&"image/"==aa.substring(0,
-6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,ca,ka),M)],M[0].vertex=!0,S(M,new mxRectangle(0,0,ca,ka),ia,mxEvent.isAltDown(ia)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null);else{var Y=!1,R=mxUtils.bind(this,function(ba,ea){null!=ba&&"application/pdf"==ea&&(ea=Editor.extractGraphModelFromPdf(ba),null!=
-ea&&0<ea.length&&(ba=ea));if(null!=ba)if(ba=mxUtils.parseXml(ba),"mxlibrary"==ba.documentElement.nodeName)try{var ra=JSON.parse(mxUtils.getTextContent(ba.documentElement));H(ra,J);f=f.concat(ra);oa(ia);this.spinner.stop();Y=!0}catch(xa){}else if("mxfile"==ba.documentElement.nodeName)try{var ta=ba.documentElement.getElementsByTagName("diagram");for(ra=0;ra<ta.length;ra++){var la=this.stringToCells(Editor.getDiagramNodeXml(ta[ra])),pa=this.editor.graph.getBoundingBoxFromGeometry(la);S(la,new mxRectangle(0,
-0,pa.width,pa.height),ia)}Y=!0}catch(xa){null!=window.console&&console.log("error in drop handler:",xa)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=u&&null!=u.parentNode&&0<f.length&&(u.parentNode.removeChild(u),u=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(ba){R(ba,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,q)&&null!=Q?this.isExternalDataComms()?
-this.parseFile(Q,mxUtils.bind(this,function(ba){4==ba.readyState&&(this.spinner.stop(),200<=ba.status&&299>=ba.status?R(ba.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ba.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(M,aa)}}));ia.stopPropagation();ia.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ia){J.style.cursor=
-"";J.style.backgroundColor="";ia.stopPropagation();ia.preventDefault()}));W=W.cloneNode(!1);W.setAttribute("src",Editor.editImage);W.setAttribute("title",mxResources.get("edit"));G.insertBefore(W,G.firstChild);mxEvent.addListener(W,"click",qa);mxEvent.addListener(J,"dblclick",function(ia){mxEvent.getSource(ia)==J&&qa(ia)});x=W.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));G.insertBefore(x,G.firstChild);mxEvent.addListener(x,"click",fa);this.isOffline()||
-".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(ia){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ia)})),G.insertBefore(x,G.firstChild))}D.appendChild(G);D.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=
-function(d,f){for(var g=0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(u+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(u+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=
-function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,x){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var y=this.sidebar.palettes[d.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var t=null,G=mxUtils.bind(this,function(na,N){0==na.length&&d.isEditable()?
+(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),N.appendChild(t)):this.addLibraryEntries(na,N)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=x?x:!0,mxUtils.bind(this,function(na){G(f,na)}));this.repositionLibrary(y);var I=D.parentNode.previousSibling;x=I.getAttribute("title");
+null!=x&&0<x.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+x);var H=document.createElement("div");H.style.position="absolute";H.style.right="0px";H.style.top="0px";H.style.padding="8px";H.style.backgroundColor="inherit";I.style.position="relative";var S=document.createElement("img");S.className="geAdaptiveAsset";S.setAttribute("src",Editor.crossImage);S.setAttribute("title",mxResources.get("close"));S.setAttribute("valign","absmiddle");S.setAttribute("border",
+"0");S.style.position="relative";S.style.top="2px";S.style.width="14px";S.style.cursor="pointer";S.style.margin="0 3px";var T=null;if(".scratchpad"!=d.title||this.closableScratchpad)H.appendChild(S),mxEvent.addListener(S,"click",mxUtils.bind(this,function(na){if(!mxEvent.isConsumed(na)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=T?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(na)}}));if(d.isEditable()){var M=
+this.editor.graph,fa=null,la=mxUtils.bind(this,function(na){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(na)}),ra=mxUtils.bind(this,function(na){d.setModified(!0);d.isAutosave()?(null!=fa&&null!=fa.parentNode&&fa.parentNode.removeChild(fa),fa=S.cloneNode(!1),fa.setAttribute("src",Editor.spinImage),fa.setAttribute("title",mxResources.get("saving")),fa.style.cursor="default",fa.style.marginRight="2px",fa.style.marginTop="-2px",H.insertBefore(fa,H.firstChild),I.style.paddingRight=
+18*H.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=fa&&null!=fa.parentNode&&(fa.parentNode.removeChild(fa),I.style.paddingRight=18*H.childNodes.length+"px")})):null==T&&(T=S.cloneNode(!1),T.setAttribute("src",Editor.saveImage),T.setAttribute("title",mxResources.get("save")),H.insertBefore(T,H.firstChild),mxEvent.addListener(T,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+T||d.isModified()||(I.style.paddingRight=18*H.childNodes.length+"px",T.parentNode.removeChild(T),T=null)});mxEvent.consume(N)})),I.style.paddingRight=18*H.childNodes.length+"px")}),ba=mxUtils.bind(this,function(na,N,aa,V){na=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(na)));for(var ha=0;ha<na.length;ha++){var X=M.getCellGeometry(na[ha]);null!=X&&X.translate(-N.x,-N.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(na,N.width,N.height,V||"",!0,null,!1));na={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(na))),
+w:N.width,h:N.height};null!=V&&(na.title=V);f.push(na);ra(aa);null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)}),oa=mxUtils.bind(this,function(na){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(na),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=M.getSelectionCells(),aa=M.view.getBounds(N),V=M.view.scale;aa.x/=V;aa.y/=V;aa.width/=V;aa.height/=V;aa.x-=
+M.view.translate.x;aa.y-=M.view.translate.y;ba(N,aa)}mxEvent.consume(na)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(na))}),mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.panningManager&&
+null!=M.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=!1,M.autoScroll=!0,oa(na),mxEvent.consume(na))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(na){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&
+(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(na){D.style.backgroundColor="#f1f3f4";na.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(na){D.style.cursor="";D.style.backgroundColor="";0<na.dataTransfer.files.length&&this.importFiles(na.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,aa,V,ha,X,ia,q,E,Q){if(null!=N&&"image/"==aa.substring(0,
+6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,ia),N)],N[0].vertex=!0,ba(N,new mxRectangle(0,0,X,ia),na,mxEvent.isAltDown(na)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null);else{var Y=!1,R=mxUtils.bind(this,function(Z,da){null!=Z&&"application/pdf"==da&&(da=Editor.extractGraphModelFromPdf(Z),null!=
+da&&0<da.length&&(Z=da));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(Z.documentElement));G(qa,D);f=f.concat(qa);ra(na);this.spinner.stop();Y=!0}catch(ya){}else if("mxfile"==Z.documentElement.nodeName)try{var va=Z.documentElement.getElementsByTagName("diagram");for(qa=0;qa<va.length;qa++){var ja=this.stringToCells(Editor.getDiagramNodeXml(va[qa])),sa=this.editor.graph.getBoundingBoxFromGeometry(ja);ba(ja,new mxRectangle(0,
+0,sa.width,sa.height),na)}Y=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<f.length&&(t.parentNode.removeChild(t),t=null)});null!=Q&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(Q,function(Z){R(Z,"text/xml")},null,q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,q)&&null!=Q?this.isExternalDataComms()?
+this.parseFile(Q,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?R(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):R(N,aa)}}));na.stopPropagation();na.preventDefault()})),mxEvent.addListener(D,"dragleave",function(na){D.style.cursor="";D.style.backgroundColor=
+"";na.stopPropagation();na.preventDefault()}));S=S.cloneNode(!1);S.setAttribute("src",Editor.editImage);S.setAttribute("title",mxResources.get("edit"));H.insertBefore(S,H.firstChild);mxEvent.addListener(S,"click",la);mxEvent.addListener(D,"dblclick",function(na){mxEvent.getSource(na)==D&&la(na)});x=S.cloneNode(!1);x.setAttribute("src",Editor.plusImage);x.setAttribute("title",mxResources.get("add"));H.insertBefore(x,H.firstChild);mxEvent.addListener(x,"click",oa);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(x=document.createElement("span"),x.setAttribute("title",mxResources.get("help")),x.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(x,"?"),mxEvent.addGestureListeners(x,mxUtils.bind(this,function(na){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(na)})),H.insertBefore(x,H.firstChild))}I.appendChild(H);I.style.paddingRight=18*H.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+0;g<d.length;g++){var x=d[g],y=x.data;if(null!=y){y=this.convertDataUri(y);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==x.aspect&&(t+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(t+"image="+y,x.w,x.h,"",x.title||"",!1,null,!0))}else null!=x.xml&&(y=this.stringToCells(Graph.decompress(x.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,x.w,x.h,x.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
+d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,u,H){d=new ImageDialog(this,d,f,g,x,y,u,H);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
+new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,x,y,t,G){d=new ImageDialog(this,d,f,g,x,y,t,G);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,x){x||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
+400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,x,y){d=new LibraryDialog(this,d,f,g,x,y);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,u,H){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(N){}if(null!=D||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),W=null;f=null!=f?f:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),W=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){H=403==D.code?
-null!=D.message?mxUtils.htmlEntities(D.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=u?u:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==D.code||404==D.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),W,mxResources.get("changeUser"),mxUtils.bind(this,function(){function N(){fa.innerText="";for(var ia=
-0;ia<qa.length;ia++){var M=document.createElement("option");mxUtils.write(M,qa[ia].displayName);M.value=ia;fa.appendChild(M);M=document.createElement("option");M.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(M,"<"+qa[ia].email+">");M.setAttribute("disabled","disabled");fa.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=qa.length;fa.appendChild(M)}var qa=this.drive.getUsersList(),oa=document.createElement("div"),S=document.createElement("span");
-S.style.marginTop="6px";mxUtils.write(S,mxResources.get("changeUser")+": ");oa.appendChild(S);var fa=document.createElement("select");fa.style.width="200px";N();mxEvent.addListener(fa,"change",mxUtils.bind(this,function(){var ia=fa.value,M=qa.length!=ia;M&&this.drive.setUser(qa[ia]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(qa=this.drive.getUsersList(),N())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));oa.appendChild(fa);oa=new CustomDialog(this,oa,mxUtils.bind(this,
-function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(oa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?H=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?H=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):
-D.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(H=mxUtils.htmlEntities(D)))}var Z=u=null;null!=D&&null!=D.helpLink?(u=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail&&(u=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+u+": "+D.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(f,
-H,G,g,W,null,null,u,Z,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,u){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},x,y,null,null,null,null,
-J);this.showDialog(d.container,340,46+J,!0,u);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var u=document.createElement("div");u.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(u.style,
-"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");u.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";u.appendChild(y);y=document.createElement("img");y.setAttribute("src",
-Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";u.appendChild(y);mxUtils.write(u,f);document.body.appendChild(u);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var H=document.createElement("input");H.setAttribute("type","checkbox");
-H.setAttribute("id","geDoNotShowAgainCheckbox");H.style.marginRight="6px";if(!x){f.appendChild(H);var J=document.createElement("label");J.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(J,mxResources.get("doNotShowAgain"));f.appendChild(J);u.style.paddingBottom="30px";u.appendChild(f)}var D=mxUtils.bind(this,function(){null!=u.parentNode&&(u.parentNode.removeChild(u),this.bannerShowing=!1,H.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(W){mxEvent.consume(W);D()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});mxEvent.addListener(u,"click",mxUtils.bind(this,function(W){var T=mxEvent.getSource(W);T!=H&&T!=J?(null!=g&&g(),D(),mxEvent.consume(W)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(u.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
-0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var u="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+u;d=this.createImageDataUri(d,f,g,y);this.saveData(x,u,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
-9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,u){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
-(f=f+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var H=
-document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(J?parseInt(J[2],10):!1)?!1:u}if(u||this.isOffline()){H.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));u?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},
-2E4),H.click(),H.parentNode.removeChild(H)}catch(D){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,u){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=u?"&base64="+u:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
-u=0;u<x;++u){for(var H=1024*u,J=Math.min(H+1024,g),D=Array(J-H),G=0;H<J;++G,++H)D[G]=d[H].charCodeAt(0);y[u]=new Uint8Array(D)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,u,H,J){u=null!=u?u:!1;H=null!=H?H:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(u);isLocalStorage&&y++;var D=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,W){try{if("_blank"==W)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
-g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else W==App.MODE_DEVICE||"download"==W?this.doSaveLocalFile(d,G,g,x,null,J):null!=G&&0<G.length&&this.pickFolder(W,mxUtils.bind(this,function(N){try{this.exportFile(d,G,g,x,W,N)}catch(qa){this.handleError(qa)}}))}catch(N){this.handleError(N)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,u,H,null,1<y,D,d,g,x);u=this.isServices(y)?y>D?390:280:160;this.showDialog(f.container,420,u,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(x){this.actions.get("shapes").funct();mxEvent.consume(x)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,x,y,t,G){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
+d.message)try{G?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(fa){}if(null!=I||null!=f){G=mxUtils.htmlEntities(mxResources.get("unknownError"));var H=mxResources.get("ok"),S=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(H=mxResources.get("cancel"),S=function(){D();I.retry()});if(404==I.code||404==I.status||403==I.code){G=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var T=null!=y?null:null!=t?t:window.location.hash;if(null!=T&&("#G"==T.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==T.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){T="#U"==T.substring(0,2)?T.substring(45,T.lastIndexOf("%26ex")):T.substring(2);this.showError(f,G,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+T);this.handleError(d,f,g,x,y)}),S,mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){oa.innerText="";for(var na=
+0;na<la.length;na++){var N=document.createElement("option");mxUtils.write(N,la[na].displayName);N.value=na;oa.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(N,"<"+la[na].email+">");N.setAttribute("disabled","disabled");oa.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=la.length;oa.appendChild(N)}var la=this.drive.getUsersList(),ra=document.createElement("div"),ba=document.createElement("span");
+ba.style.marginTop="6px";mxUtils.write(ba,mxResources.get("changeUser")+": ");ra.appendChild(ba);var oa=document.createElement("select");oa.style.width="200px";fa();mxEvent.addListener(oa,"change",mxUtils.bind(this,function(){var na=oa.value,N=la.length!=na;N&&this.drive.setUser(la[na]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(la=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(aa){this.handleError(aa)}),!0)}));ra.appendChild(oa);ra=new CustomDialog(this,ra,mxUtils.bind(this,
+function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?G=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?G=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?G=mxUtils.htmlEntities(mxResources.get("timeout")):
+I.code==App.ERROR_BUSY?G=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof I&&0<I.length&&(G=mxUtils.htmlEntities(I)))}var M=t=null;null!=I&&null!=I.helpLink?(t=mxResources.get("help"),M=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(t=mxResources.get("contactOwner"),G+=mxUtils.htmlEntities(" ("+t+": "+I.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,
+G,H,g,S,null,null,t,M,null,null,null,x?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,x,y,t){var G=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){G();null!=f&&f()},function(){G();null!=g&&g()},x,y,null,null,null,null,
+D);this.showDialog(d.container,340,46+D,!0,t);d.init()};EditorUi.prototype.showBanner=function(d,f,g,x){var y=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var t=document.createElement("div");t.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(t.style,
+"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.className="geBtn gePrimaryBtn";y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";t.appendChild(y);y=document.createElement("img");y.setAttribute("src",
+Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(x?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(y);mxUtils.write(t,f);document.body.appendChild(t);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var G=document.createElement("input");G.setAttribute("type","checkbox");
+G.setAttribute("id","geDoNotShowAgainCheckbox");G.style.marginRight="6px";if(!x){f.appendChild(G);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);t.style.paddingBottom="30px";t.appendChild(f)}var I=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,G.checked||x)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(S){mxEvent.consume(S);I()}));var H=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(S){var T=mxEvent.getSource(S);T!=G&&T!=D?(null!=g&&g(),I(),mxEvent.consume(S)):H()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,
+"transform","translate(-50%,0%)")}),500);window.setTimeout(H,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,x){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),
+0<x&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",x));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,x,y){var t="jpeg"==g?"jpg":g;x=this.getBaseFilename(x)+(null!=f?".drawio":"")+"."+t;d=this.createImageDataUri(d,f,g,y);this.saveData(x,t,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&
+9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,x,y,t){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||
+(f=f+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=x?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,x);else{var G=
+document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof G.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(D?parseInt(D[2],10):!1)?!1:t}if(t||this.isOffline()){G.href=URL.createObjectURL(x?this.base64ToBlob(d,g):new Blob([d],{type:g}));t?G.download=f:G.setAttribute("target","_blank");document.body.appendChild(G);try{window.setTimeout(function(){URL.revokeObjectURL(G.href)},
+2E4),G.click(),G.parentNode.removeChild(G)}catch(I){}}else this.createEchoRequest(d,f,g,x,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,x,y,t){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=t?"&base64="+t:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(x?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,x=Math.ceil(g/1024),y=Array(x),
+t=0;t<x;++t){for(var G=1024*t,D=Math.min(G+1024,g),I=Array(D-G),H=0;G<D;++H,++G)I[H]=d[G].charCodeAt(0);y[t]=new Uint8Array(I)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,x,y,t,G,D){t=null!=t?t:!1;G=null!=G?G:"vsdx"!=y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(t);isLocalStorage&&y++;var I=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(H,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,
+g,x);else if(null!=g&&"text/html"==g.substring(0,9)){var T=new EmbedDialog(this,d);this.showDialog(T.container,450,240,!0,!0);T.init()}else{var M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,H,g,x,null,D):null!=H&&0<H.length&&this.pickFolder(S,mxUtils.bind(this,function(fa){try{this.exportFile(d,H,g,x,S,fa)}catch(la){this.handleError(la)}}))}catch(fa){this.handleError(fa)}}),
+mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,G,null,1<y,I,d,g,x);t=this.isServices(y)?y>I?390:280:160;this.showDialog(f.container,420,t,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var x=window.open("about:blank");null==x||null==x.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),x.document.write('<html><img style="max-width:100%;" src="data:'+
f+";base64,"+d+'"/></html>')):x.document.write("<html>"+d+"</html>"):x.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),x.document.close())};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=
this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding=
"4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,
@@ -3513,173 +3514,200 @@ this.tagsComponent=null;var f=d(mxUtils.bind(this,function(x){null==this.tagsCom
4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(x)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var x=this.editor.graph.getAllTags();f.style.display=0<x.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var u=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
-this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=u.zIndex;var H=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});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(J){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight=
-"140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(u,H){return this.createEchoRequest(g,u,x,y,f,H)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,u,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;
-var J=this.getServiceCount(!1);isLocalStorage&&J++;var D=4>=J?2:6<J?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,W){if("_blank"==W||null!=G&&0<G.length){var T=g("_blank"==W?null:G,W==App.MODE_DEVICE||"download"==W||null==W||"_blank"==W?"0":"1");null!=T&&(W==App.MODE_DEVICE||"download"==W||"_blank"==W?T.simulate(document,"_blank"):this.pickFolder(W,mxUtils.bind(this,function(Z){u=null!=u?u:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),G,u,!0,W,Z)}catch(N){this.handleError(N)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(N){this.spinner.stop();this.handleError(N)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<J,D,x,u,y);J=this.isServices(J)?4<J?390:280:160;this.showDialog(d.container,
-420,J,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,u){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var oa=f?null:this.editor.graph.background;oa==
-mxConstants.NONE&&(oa=null);null==oa&&0==f&&(oa=W?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var S=this.editor.graph.getSvg(oa,d,H,J,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,W,T);x&&this.editor.graph.addSvgShadow(S);var fa=this.getBaseFilename()+(y?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(fa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var ia=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));N(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var M=mxUtils.bind(this,function(aa){u?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
-ia,this.thumbImageCache)):ia(aa)});Z?this.embedFonts(S,M):(this.editor.addFontCss(S),M(S))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,u,H){return this.addCheckbox(d,g,x,y,u,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();D.id=H;null!=J&&D.setAttribute("name",J);g&&
-(D.setAttribute("checked","checked"),D.defaultChecked=!0);x&&D.setAttribute("disabled","disabled");u&&(d.appendChild(D),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),y||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
-var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));u.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");u.appendChild(x);d.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==
-u.value){var H=new FilenameDialog(this,y,mxResources.get("ok"),function(J){null!=J?y=J:u.value="blank"},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":y:null},getEditInput:function(){return g},
-getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=u):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(J)}mxUtils.write(d,mxResources.get("links")+
+function(x){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var t=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=t.zIndex;var G=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});G.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){G.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight=
+"140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));D.setAttribute("border","0");D.setAttribute("src",I);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(x)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,x,y){this.isLocalFileSave()?this.saveLocalFile(g,d,x,y,f):this.saveRequest(d,f,mxUtils.bind(this,function(t,G){return this.createEchoRequest(g,t,x,y,f,G)}),g,y,x)};EditorUi.prototype.saveRequest=function(d,f,g,x,y,t,G){G=null!=G?G:!mxClient.IS_IOS||!navigator.standalone;
+var D=this.getServiceCount(!1);isLocalStorage&&D++;var I=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(H,S){if("_blank"==S||null!=H&&0<H.length){var T=g("_blank"==S?null:H,S==App.MODE_DEVICE||"download"==S||null==S||"_blank"==S?"0":"1");null!=T&&(S==App.MODE_DEVICE||"download"==S||"_blank"==S?T.simulate(document,"_blank"):this.pickFolder(S,mxUtils.bind(this,function(M){t=null!=t?t:"pdf"==f?"application/pdf":"image/"+f;if(null!=x)try{this.exportFile(x,H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&T.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=T.getStatus()&&299>=T.getStatus())try{this.exportFile(T.getText(),H,t,!0,S,M)}catch(fa){this.handleError(fa)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(fa){this.spinner.stop();this.handleError(fa)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,G,null,1<D,I,x,t,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,
+420,D,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,x,y,t){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa){if(this.spinner.spin(document.body,mxResources.get("export")))try{var la=this.editor.graph.isSelectionEmpty();g=null!=g?g:la;var ra=f?null:this.editor.graph.background;ra==
+mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=S?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var ba=this.editor.graph.getSvg(ra,d,G,D,null,g,null,null,"blank"==H?"_blank":"self"==H?"_top":null,null,!M,S,T);x&&this.editor.graph.addSvgShadow(ba);var oa=this.getBaseFilename()+(y?".drawio":"")+".svg";fa=null!=fa?fa:mxUtils.bind(this,function(aa){this.isLocalFileSave()||aa.length<=MAX_REQUEST_SIZE?this.saveData(oa,"svg",aa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(aa)}))});var na=mxUtils.bind(this,function(aa){this.spinner.stop();y&&aa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));fa(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(aa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(ba);var N=mxUtils.bind(this,function(aa){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(aa,
+na,this.thumbImageCache)):na(aa)});M?this.embedFonts(ba,N):(this.editor.addFontCss(ba),N(ba))}catch(aa){this.handleError(aa)}};EditorUi.prototype.addRadiobox=function(d,f,g,x,y,t,G){return this.addCheckbox(d,g,x,y,t,G,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",G?"radio":"checkbox");G="geCheckbox-"+Editor.guid();I.id=G;null!=D&&I.setAttribute("name",D);
+g&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);x&&I.setAttribute("disabled","disabled");t&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",G),d.appendChild(g),y||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var x=this.getCurrentFile(),y="";null!=x&&x.getMode()!=App.MODE_DEVICE&&x.getMode()!=App.MODE_BROWSER&&(y=window.location.href);
+var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("makeCopy"));t.appendChild(x);x=document.createElement("option");x.setAttribute("value","custom");mxUtils.write(x,mxResources.get("custom")+"...");t.appendChild(x);d.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==
+t.value){var G=new FilenameDialog(this,y,mxResources.get("ok"),function(D){null!=D?y=D:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(G.container,300,80,!0,!1);G.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===t.value?"_blank":y:null},getEditInput:function(){return g},
+getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=t):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");G.innerText="";G.appendChild(D)}mxUtils.write(d,mxResources.get("links")+
":");var x=document.createElement("select");x.style.width="100px";x.style.padding="0px";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));x.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,
-mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var u="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(J)}));g();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
-H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";d.appendChild(H);mxUtils.br(d);return{getColor:function(){return u},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,u,H){H=null!=H?H:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||H.push("lightbox=1"),
-"auto"!=d&&H.push("target="+d),null!=f&&f!=mxConstants.NONE&&H.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&H.push("edit="+encodeURIComponent(y)),u&&H.push("layers=1"),this.editor.graph.foldingEnabled&&H.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&H.push("page-id="+this.currentPage.getId());return H};EditorUi.prototype.createLink=function(d,f,g,x,y,u,H,J,D,G){D=this.createUrlParameters(d,f,g,x,y,u,D);d=this.getCurrentFile();
-f=!0;null!=H?g="#U"+encodeURIComponent(H):(d=this.getCurrentFile(),J||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,u,H,J,D,G,W,T){this.getBasenames();var Z={};""!=y&&y!=mxConstants.NONE&&(Z.highlight=y);"auto"!==x&&(Z.target=x);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];H&&(g.push("pages"),Z.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);J&&g.push("layers");D&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=W&&0<W.length&&(Z.edit=W);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
-"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,
-mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(u);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");u=J.cloneNode(!0);u.setAttribute("value",
-"copy");H.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(D);mxUtils.br(H);H.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));H.appendChild(D);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),H.appendChild(D),
-mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));u.setAttribute("checked","checked");null==g&&J.setAttribute("disabled","disabled");y.appendChild(H);var W=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");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%";y.appendChild(Z);var N=this.addCheckbox(y,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(y,mxResources.get("allPages"),H,!H),oa=this.addCheckbox(y,mxResources.get("layers"),!0),S=this.addCheckbox(y,mxResources.get("tags"),!0),fa=this.addCheckbox(y,mxResources.get("lightbox"),!0),ia=null;H=380;if(EditorUi.enableHtmlEditOption){ia=this.addEditButton(y,fa);var M=ia.getEditInput();M.style.marginBottom="16px";H+=50;mxEvent.addListener(fa,"change",function(){fa.checked?
-M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&fa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(J.checked?g:null,T.checked,Z.value,W.getTarget(),W.getColor(),N.checked,qa.checked,oa.checked,S.checked,fa.checked,null!=ia?ia.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,
-f,g,x,y,u,H,J){var D=document.createElement("div");D.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(G);var W=this.getCurrentFile();d=0;if(null==W||W.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
-G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));G.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(W.getId())}));T.style.marginTop="12px";T.className="geBtn";G.appendChild(T);D.appendChild(G);T=document.createElement("a");
-T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));G.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,
-300,80,!0,!1);X.init()}))}))}var Z=null,N=null;if(null!=g||null!=x)d+=30,mxUtils.write(D,mxResources.get("width")+":"),Z=document.createElement("input"),Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",D.appendChild(Z),mxUtils.write(D,mxResources.get("height")+":"),N=document.createElement("input"),N.setAttribute("type","text"),N.style.width="50px",N.style.marginLeft="6px",N.style.marginBottom=
-"10px",N.value=x+"px",D.appendChild(N),mxUtils.br(D);var qa=this.addLinkSection(D,u);g=null!=this.pages&&1<this.pages.length;var oa=null;if(null==W||W.constructor!=window.DriveFile||f)oa=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var S=this.addCheckbox(D,mxResources.get("lightbox"),!0,null,null,!u),fa=this.addEditButton(D,S),ia=fa.getEditInput();u&&(ia.style.marginLeft=S.style.marginLeft,S.style.display="none",d-=20);var M=this.addCheckbox(D,mxResources.get("layers"),!0);M.style.marginLeft=
-ia.style.marginLeft;M.style.marginTop="8px";var aa=this.addCheckbox(D,mxResources.get("tags"),!0);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?(M.removeAttribute("disabled"),ia.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&S.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});
-f=new CustomDialog(this,D,mxUtils.bind(this,function(){y(qa.getTarget(),qa.getColor(),null==oa?!0:oa.checked,S.checked,fa.getLink(),M.checked,null!=Z?Z.value:null,null!=N?N.value:null,aa.checked)}),null,mxResources.get("create"),H,J);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var u=document.createElement("div");
-u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";u.appendChild(H);if(y){mxUtils.write(u,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";u.appendChild(J);mxUtils.write(u,
-mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var G=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),W=x?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var T=x?null:this.addCheckbox(u,mxResources.get("transparentBackground"),
-H.background==mxConstants.NONE||null==H.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,u,mxUtils.bind(this,function(){var Z=parseInt(J.value)/100||1,N=parseInt(D.value)||0;g(!G.checked,null!=W?W.checked:!1,null!=T?T.checked:!1,Z,N)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,u,H,J,D){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";
-var W=this.editor.graph,T="jpeg"==J?220:300,Z=document.createElement("h3");mxUtils.write(Z,d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);mxUtils.write(G,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";G.appendChild(N);mxUtils.write(G,mxResources.get("borderWidth")+
-":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight="16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var oa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,W.isSelectionEmpty()),S=document.createElement("input");S.style.marginTop="16px";S.style.marginRight="8px";S.style.marginLeft="24px";S.setAttribute("disabled","disabled");S.setAttribute("type","checkbox");var fa=document.createElement("select");
-fa.style.marginTop="16px";fa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ia={};for(Z=0;Z<d.length;Z++)if(!W.isSelectionEmpty()||"selectionOnly"!=d[Z]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Z]));M.setAttribute("value",d[Z]);fa.appendChild(M);ia[d[Z]]=M}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(fa),mxUtils.br(G),T+=26,mxEvent.addListener(fa,"change",function(){"selectionOnly"==fa.value&&(oa.checked=!0)})):u&&(G.appendChild(S),
-mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),T+=30,mxEvent.addListener(oa,"change",function(){oa.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")}));W.isSelectionEmpty()?D&&(oa.style.display="none",oa.nextSibling.style.display="none",oa.nextSibling.nextSibling.style.display="none",T-=30):(fa.value="diagram",S.setAttribute("checked","checked"),S.defaultChecked=!0,mxEvent.addListener(oa,"change",function(){fa.value=oa.checked?"selectionOnly":"diagram"}));var aa=
-this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(G,mxResources.get("dark"),!0),T+=26);var ja=this.addCheckbox(G,mxResources.get("shadow"),W.shadowVisible),ca=null;if("png"==J||"jpeg"==J)ca=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ka=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=J);ka.style.marginBottom="16px";var q=document.createElement("input");
-q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";u=document.createElement("option");u.setAttribute("value","none");mxUtils.write(u,mxResources.get("noChange"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value",
-"embedFonts");mxUtils.write(u,mxResources.get("embedFonts"));E.appendChild(u);u=document.createElement("option");u.setAttribute("value","lblToSvg");mxUtils.write(u,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(u);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),ia.page.style.display="none","page"==fa.value&&(fa.value="diagram"),ja.checked=!1,ja.setAttribute("disabled","disabled"),
-Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ja.removeAttribute("disabled"),ia.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(G.appendChild(q),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(E),mxUtils.br(G),T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";
-Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));
-Y.style.margin="7px";Y.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(Q),G.appendChild(Y),mxUtils.br(G),mxUtils.br(G),T+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=N.value;y(N.value,aa.checked,!oa.checked,ja.checked,ka.checked,q.checked,qa.value,S.checked,!1,Q.value,null!=ca?ca.checked:null,null!=X?X.checked:null,fa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,
-340,T,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var u=document.createElement("div");u.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var J=document.createElement("h3");mxUtils.write(J,f);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(J)}var D=this.addCheckbox(u,mxResources.get("fit"),
-!0),G=this.addCheckbox(u,mxResources.get("shadow"),H.shadowVisible&&x,!x),W=this.addCheckbox(u,g),T=this.addCheckbox(u,mxResources.get("lightbox"),!0),Z=this.addEditButton(u,T),N=Z.getEditInput(),qa=1<H.model.getChildCount(H.model.getRoot()),oa=this.addCheckbox(u,mxResources.get("layers"),qa,!qa);oa.style.marginLeft=N.style.marginLeft;oa.style.marginBottom="12px";oa.style.marginTop="8px";mxEvent.addListener(T,"change",function(){T.checked?(qa&&oa.removeAttribute("disabled"),N.removeAttribute("disabled")):
-(oa.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&T.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,u,mxUtils.bind(this,function(){d(D.checked,G.checked,W.checked,T.checked,Z.getLink(),oa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,u,H,J){function D(N){var qa=" ",oa="";x&&(qa=
-" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=W?"&page="+W:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",oa+="cursor:pointer;");d&&(oa+="max-width:100%;");var S="";g&&(S=
-' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+N+'"'+S+(""!=oa?' style="'+oa+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),W=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var qa=x?this.getFileData(!0):null;N=this.createImageDataUri(N,qa,"png");D(N)}),null,null,null,mxUtils.bind(this,function(N){J({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);
-else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?D("data:image/png;base64,"+Z.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,x,y,u,H){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var W=D[G].getAttribute("href");null!=W&&"#"==W.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}x&&J.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(J);if(g){var T=" ",Z="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(N){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=Z?' style="'+Z+'"':"")+T+"/>")}))}else Z="",x&&(f=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),y=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),Z+="max-width:100%;max-height:"+y+"px;",J.removeAttribute("height")),""!=Z&&J.setAttribute("style",Z),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),H(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=
+mxResources.get("openInThisWindow"));x.appendChild(y);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),x.appendChild(f));d.appendChild(x);mxUtils.write(d,mxResources.get("borderColor")+":");var t="#0000ff",G=null;G=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(t||"none",function(I){t=I;g()});mxEvent.consume(D)}));g();G.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
+G.style.marginLeft="4px";G.style.height="22px";G.style.width="22px";G.style.position="relative";G.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";G.className="geColorBtn";d.appendChild(G);mxUtils.br(d);return{getColor:function(){return t},getTarget:function(){return x.value},focus:function(){x.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,x,y,t,G){G=null!=G?G:[];x&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||G.push("lightbox=1"),
+"auto"!=d&&G.push("target="+d),null!=f&&f!=mxConstants.NONE&&G.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&G.push("edit="+encodeURIComponent(y)),t&&G.push("layers=1"),this.editor.graph.foldingEnabled&&G.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&G.push("page-id="+this.currentPage.getId());return G};EditorUi.prototype.createLink=function(d,f,g,x,y,t,G,D,I,H){I=this.createUrlParameters(d,f,g,x,y,t,I);d=this.getCurrentFile();
+f=!0;null!=G?g="#U"+encodeURIComponent(G):(d=this.getCurrentFile(),D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));H&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(x&&"1"!=urlParams.dev?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,x,y,t,G,D,I,H,S,T){this.getBasenames();var M={};""!=y&&y!=mxConstants.NONE&&(M.highlight=y);"auto"!==x&&(M.target=x);H||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];G&&(g.push("pages"),M.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),M.resize=!0);D&&g.push("layers");I&&g.push("tags");0<g.length&&(H&&g.push("lightbox"),M.toolbar=g.join(" "));null!=S&&0<S.length&&(M.edit=S);null!=d?M.url=d:M.xml=this.getFileData(!0,null,null,null,null,!G);f='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):
+"";T(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,x){var y=document.createElement("div");y.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,
+mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(t);var G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");t=D.cloneNode(!0);t.setAttribute("value",
+"copy");G.appendChild(t);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));G.appendChild(I);mxUtils.br(G);G.appendChild(D);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));G.appendChild(I);var H=this.getCurrentFile();null==g&&null!=H&&H.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),G.appendChild(I),
+mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(H.getId())})));t.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(G);var S=this.addLinkSection(y),T=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=
+"100%";y.appendChild(M);var fa=this.addCheckbox(y,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var la=la=this.addCheckbox(y,mxResources.get("allPages"),G,!G),ra=this.addCheckbox(y,mxResources.get("layers"),!0),ba=this.addCheckbox(y,mxResources.get("tags"),!0),oa=this.addCheckbox(y,mxResources.get("lightbox"),!0),na=null;G=380;if(EditorUi.enableHtmlEditOption){na=this.addEditButton(y,oa);var N=na.getEditInput();N.style.marginBottom="16px";G+=50;mxEvent.addListener(oa,"change",
+function(){oa.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&oa.checked?na.getEditSelect().removeAttribute("disabled"):na.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,y,mxUtils.bind(this,function(){x(D.checked?g:null,T.checked,M.value,S.getTarget(),S.getColor(),fa.checked,la.checked,ra.checked,ba.checked,oa.checked,null!=na?na.getLink():null)}),null,d,f);this.showDialog(d.container,340,G,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=
+function(d,f,g,x,y,t,G,D){var I=document.createElement("div");I.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,d||mxResources.get("link"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(H);var S=this.getCurrentFile();d=0;if(null==S||S.constructor!=window.DriveFile||f)G=null!=G?G:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;G=null!=G?G:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
+H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var T=document.createElement("div");T.style.whiteSpace="normal";mxUtils.write(T,mxResources.get("linkAccountRequired"));H.appendChild(T);T=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(S.getId())}));T.style.marginTop="12px";T.className="geBtn";H.appendChild(T);I.appendChild(H);T=document.createElement("a");
+T.style.paddingLeft="12px";T.style.color="gray";T.style.fontSize="11px";T.style.cursor="pointer";mxUtils.write(T,mxResources.get("check"));H.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(V){this.spinner.stop();V=new ErrorDialog(this,null,mxResources.get(null!=V?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(V.container,
+300,80,!0,!1);V.init()}))}))}var M=null,fa=null;if(null!=g||null!=x)d+=30,mxUtils.write(I,mxResources.get("width")+":"),M=document.createElement("input"),M.setAttribute("type","text"),M.style.marginRight="16px",M.style.width="50px",M.style.marginLeft="6px",M.style.marginRight="16px",M.style.marginBottom="10px",M.value="100%",I.appendChild(M),mxUtils.write(I,mxResources.get("height")+":"),fa=document.createElement("input"),fa.setAttribute("type","text"),fa.style.width="50px",fa.style.marginLeft="6px",
+fa.style.marginBottom="10px",fa.value=x+"px",I.appendChild(fa),mxUtils.br(I);var la=this.addLinkSection(I,t);g=null!=this.pages&&1<this.pages.length;var ra=null;if(null==S||S.constructor!=window.DriveFile||f)ra=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var ba=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),oa=this.addEditButton(I,ba),na=oa.getEditInput();t&&(na.style.marginLeft=ba.style.marginLeft,ba.style.display="none",d-=20);var N=this.addCheckbox(I,mxResources.get("layers"),
+!0);N.style.marginLeft=na.style.marginLeft;N.style.marginTop="8px";var aa=this.addCheckbox(I,mxResources.get("tags"),!0);aa.style.marginLeft=na.style.marginLeft;aa.style.marginBottom="16px";aa.style.marginTop="16px";mxEvent.addListener(ba,"change",function(){ba.checked?(N.removeAttribute("disabled"),na.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),na.setAttribute("disabled","disabled"));na.checked&&ba.checked?oa.getEditSelect().removeAttribute("disabled"):oa.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){y(la.getTarget(),la.getColor(),null==ra?!0:ra.checked,ba.checked,oa.getLink(),N.checked,null!=M?M.value:null,null!=fa?fa.value:null,aa.checked)}),null,mxResources.get("create"),G,D);this.showDialog(f.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):la.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,x,y){var t=
+document.createElement("div");t.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,mxResources.get("image"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";t.appendChild(G);if(y){mxUtils.write(t,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";
+t.appendChild(D);mxUtils.write(t,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";t.appendChild(I);mxUtils.br(t)}var H=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),S=x?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);G=this.editor.graph;var T=
+x?null:this.addCheckbox(t,mxResources.get("transparentBackground"),G.background==mxConstants.NONE||null==G.background);null!=T&&(T.style.marginBottom="16px");d=new CustomDialog(this,t,mxUtils.bind(this,function(){var M=parseInt(D.value)/100||1,fa=parseInt(I.value)||0;g(!H.checked,null!=S?S.checked:!1,null!=T?T.checked:!1,M,fa)}),null,d,f);this.showDialog(d.container,300,(y?25:0)+(x?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,x,y,t,G,D,I){G=null!=G?G:Editor.defaultIncludeDiagram;
+var H=document.createElement("div");H.style.whiteSpace="nowrap";var S=this.editor.graph,T="jpeg"==D?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";H.appendChild(M);mxUtils.write(H,mxResources.get("zoom")+":");var fa=document.createElement("input");fa.setAttribute("type","text");fa.style.marginRight="16px";fa.style.width="60px";fa.style.marginLeft="4px";fa.style.marginRight="12px";fa.value=this.lastExportZoom||
+"100%";H.appendChild(fa);mxUtils.write(H,mxResources.get("borderWidth")+":");var la=document.createElement("input");la.setAttribute("type","text");la.style.marginRight="16px";la.style.width="60px";la.style.marginLeft="4px";la.value=this.lastExportBorder||"0";H.appendChild(la);mxUtils.br(H);var ra=this.addCheckbox(H,mxResources.get("selectionOnly"),!1,S.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled",
+"disabled");ba.setAttribute("type","checkbox");var oa=document.createElement("select");oa.style.marginTop="16px";oa.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var na={};for(M=0;M<d.length;M++)if(!S.isSelectionEmpty()||"selectionOnly"!=d[M]){var N=document.createElement("option");mxUtils.write(N,mxResources.get(d[M]));N.setAttribute("value",d[M]);oa.appendChild(N);na[d[M]]=N}I?(mxUtils.write(H,mxResources.get("size")+":"),H.appendChild(oa),mxUtils.br(H),T+=26,mxEvent.addListener(oa,
+"change",function(){"selectionOnly"==oa.value&&(ra.checked=!0)})):t&&(H.appendChild(ba),mxUtils.write(H,mxResources.get("crop")),mxUtils.br(H),T+=30,mxEvent.addListener(ra,"change",function(){ra.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));S.isSelectionEmpty()?I&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",T-=30):(oa.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(ra,
+"change",function(){oa.value=ra.checked?"selectionOnly":"diagram"}));var aa=this.addCheckbox(H,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=D),V=null;Editor.isDarkMode()&&(V=this.addCheckbox(H,mxResources.get("dark"),!0),T+=26);var ha=this.addCheckbox(H,mxResources.get("shadow"),S.shadowVisible),X=null;if("png"==D||"jpeg"==D)X=this.addCheckbox(H,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),T+=30;var ia=this.addCheckbox(H,mxResources.get("includeCopyOfMyDiagram"),
+G,null,null,"jpeg"!=D);ia.style.marginBottom="16px";var q=document.createElement("input");q.style.marginBottom="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||q.setAttribute("disabled","disabled");var E=document.createElement("select");E.style.maxWidth="260px";E.style.marginLeft="8px";E.style.marginRight="10px";E.style.marginBottom="16px";E.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,
+mxResources.get("noChange"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));E.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||E.appendChild(t);mxEvent.addListener(E,"change",mxUtils.bind(this,function(){"lblToSvg"==E.value?(q.checked=!0,q.setAttribute("disabled","disabled"),na.page.style.display=
+"none","page"==oa.value&&(oa.value="diagram"),ha.checked=!1,ha.setAttribute("disabled","disabled"),Y.style.display="inline-block",Q.style.display="none"):"disabled"==q.getAttribute("disabled")&&(q.checked=!1,q.removeAttribute("disabled"),ha.removeAttribute("disabled"),na.page.style.display="",Y.style.display="none",Q.style.display="")}));f&&(H.appendChild(q),mxUtils.write(H,mxResources.get("embedImages")),mxUtils.br(H),mxUtils.write(H,mxResources.get("txtSettings")+":"),H.appendChild(E),mxUtils.br(H),
+T+=60);var Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginRight="10px";Q.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));Q.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
+Q.appendChild(f);var Y=document.createElement("div");mxUtils.write(Y,mxResources.get("LinksLost"));Y.style.margin="7px";Y.style.display="none";"svg"==D&&(mxUtils.write(H,mxResources.get("links")+":"),H.appendChild(Q),H.appendChild(Y),mxUtils.br(H),mxUtils.br(H),T+=50);g=new CustomDialog(this,H,mxUtils.bind(this,function(){this.lastExportBorder=la.value;this.lastExportZoom=fa.value;y(fa.value,aa.checked,!ra.checked,ha.checked,ia.checked,q.checked,la.value,ba.checked,!1,Q.value,null!=X?X.checked:null,
+null!=V?V.checked:null,oa.value,"embedFonts"==E.value,"lblToSvg"==E.value)}),null,g,x);this.showDialog(g.container,340,T,!0,!0,null,null,null,null,!0);fa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?fa.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,x,y){var t=document.createElement("div");t.style.whiteSpace="nowrap";var G=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(D)}var I=this.addCheckbox(t,mxResources.get("fit"),!0),H=this.addCheckbox(t,mxResources.get("shadow"),G.shadowVisible&&x,!x),S=this.addCheckbox(t,g),T=this.addCheckbox(t,mxResources.get("lightbox"),!0),M=this.addEditButton(t,T),fa=M.getEditInput(),la=1<G.model.getChildCount(G.model.getRoot()),ra=this.addCheckbox(t,mxResources.get("layers"),la,!la);ra.style.marginLeft=fa.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop=
+"8px";mxEvent.addListener(T,"change",function(){T.checked?(la&&ra.removeAttribute("disabled"),fa.removeAttribute("disabled")):(ra.setAttribute("disabled","disabled"),fa.setAttribute("disabled","disabled"));fa.checked&&T.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,t,mxUtils.bind(this,function(){d(I.checked,H.checked,S.checked,T.checked,M.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,
+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,x,y,t,G,D){function I(fa){var la=" ",ra="";x&&(la=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=S?"&page="+S:"")+(y?"&edit=_blank":
+"")+(t?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var ba="";g&&(ba=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');G('<img src="'+fa+'"'+ba+(""!=ra?' style="'+ra+'"':"")+la+"/>")}var H=this.editor.graph.getGraphBounds(),S=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(fa){var la=x?this.getFileData(!0):null;fa=this.createImageDataUri(fa,la,"png");I(fa)}),null,null,null,mxUtils.bind(this,
+function(fa){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),H.width*H.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var T="";g&&(T="&w="+Math.round(2*H.width)+"&h="+Math.round(2*H.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(x?"1":"0")+T+"&xml="+encodeURIComponent(f));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&299>=M.getStatus()?I("data:image/png;base64,"+M.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,f,g,x,y,t,G){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=D.getElementsByTagName("a");if(null!=I)for(var H=0;H<I.length;H++){var S=I[H].getAttribute("href");null!=S&&"#"==S.charAt(0)&&"_blank"==I[H].getAttribute("target")&&I[H].removeAttribute("target")}x&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var T=" ",M="";x&&(T="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(fa){G('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(fa))+'"'+(""!=M?' style="'+M+'"':"")+T+"/>")}))}else M="",x&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),M+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+y),M+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=M&&D.setAttribute("style",M),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),G(mxUtils.getXml(D))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(u){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var u=this.editor.graph,H=null!=u.themes&&"darkTheme"==u.defaultThemeName,J=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),u),J=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(H?u.getDefaultStylesheet():u.getStylesheet());var D=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&u.setBackgroundImage(G.viewState.backgroundImage);u.getGlobalVariable=function(W){return"page"==W?G.getName():"pagenumber"==W?1:D.apply(this,
-arguments)};document.body.appendChild(u.container);u.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(W){try{null==J&&(J=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=W.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(J));d(T.substring(T.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(W){null!=f&&
-f(W)}),null,null,x,null,u.shadowVisible,null,u,y,null,null,null,"diagram",null)}catch(W){null!=f&&f(W)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){J=null!=J?J:!0;W=null!=W?W:0;H=null!=D?D:f.background;H==mxConstants.NONE&&(H=null);u=f.getSvg(H,G,W,null,null,u,null,null,null,f.shadowVisible||T,null,Z,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(u,null,null,0==W);null!=d&&u.setAttribute("content",d);null!=g&&u.setAttribute("resource",g);var N=mxUtils.bind(this,function(qa){qa=
-(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=y&&y(qa);return qa});f.mathEnabled&&this.editor.addMathCss(u);if(null!=y)this.embedFonts(u,mxUtils.bind(this,function(qa){J?this.editor.convertImages(qa,mxUtils.bind(this,function(oa){N(oa)})):N(qa)}));else return N(u)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var N=this.editor.graph.isSelectionEmpty();g=null!=g?g:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-y?this.getFileData(!0,null,null,null,g,J):null,D,null==this.pages||0==this.pages.length,W)}catch(oa){this.handleError(oa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,x,null,null,u,H,G,T,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,u,H){f=null!=f?f:0;g=null!=g?g:0;var J=
-[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var W=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=W&&"mxfile"==W.nodeName&&null!=this.pages){var T=W.getElementsByTagName("diagram");if(1==T.length&&!u){if(W=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=T[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,Z))}}else if(0<T.length){u=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),W=Editor.parseDiagramNode(T[0]),x=!1,N=1);for(;N<T.length;N++){var qa=T[N].getAttribute("id");T[N].removeAttribute("id");var oa=this.updatePageRoot(new DiagramPage(T[N]));d[qa]=T[N].getAttribute("id");var S=this.pages.length;null==oa.getName()&&oa.setName(mxResources.get("pageWithNumber",[S+1]));D.model.execute(new ChangePage(this,
-oa,oa,S,!0));u.push(oa)}this.updatePageLinks(d,u)}}if(null!=W&&"mxGraphModel"===W.nodeName){J=D.importGraphModel(W,f,g,x);if(null!=J)for(N=0;N<J.length;N++)this.updatePageLinksForCell(d,J[N]);var fa=D.parseBackgroundImage(W.getAttribute("backgroundImage"));if(null!=fa&&null!=fa.originalSrc){this.updateBackgroundPageLink(d,fa);var ia=new ChangePageSetup(this,null,fa);ia.ignoreColor=!0;D.model.execute(ia)}}H&&this.insertHandler(J,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(M){if(y)throw M;
-this.handleError(M)}return J};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var u=g.getElementsByTagName("a"),H=!1,J=0;J<u.length;J++)y=u[J].getAttribute("href"),null!=y&&(u[J].setAttribute("href",this.updatePageLink(d,y)),H=!0);H&&x.labelChanged(f,g.innerHTML)}for(J=0;J<x.model.getChildCount(f);J++)this.updatePageLinksForCell(d,x.model.getChildAt(f,J))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var u=x.actions[y];if(null!=u.open&&Graph.isPageLink(u.open)){var H=u.open.substring(u.open.indexOf(",")+1);g=d[H];null!=g?u.open="data:page/id,"+g:null==this.getPageById(H)&&delete u.open}}f="data:action/json,"+JSON.stringify(x)}}catch(J){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(x);try{var J="UNKNOWN-VISIO",D=x.lastIndexOf(".");if(0<=D&&D<x.length)J=x.substring(D+1).toUpperCase();else{var G=x.lastIndexOf("/");0<=
-G&&G<x.length&&(x=x.substring(G+1))}EditorUi.logEvent({category:J+"-MS-IMPORT-FILE",action:"filename_"+x,label:H?"remote":"local"})}catch(T){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,x);var W=new XMLHttpRequest;W.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));W.responseType="blob";this.addRemoteServiceSecurityCheck(W);
-null!=y&&W.setRequestHeader("x-convert-custom",y);W.onreadystatechange=mxUtils.bind(this,function(){if(4==W.readyState)if(200<=W.status&&299>=W.status)try{var T=W.response;if("text/xml"==T.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(N){try{f(N.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(N){g(N)}else try{""==W.responseType||"text"==W.responseType?g({message:W.responseText}):(Z=new FileReader,
-Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(W.response))}catch(N){g({})}});W.send(H)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
+d;else if("mxfile"==d.nodeName){var x=d.getElementsByTagName("diagram");if(0<x.length){g=x[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(t){return"page"==t?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:y.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}x=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(t){}finally{this.editor.graph=x}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
+d){if(d.hasAttribute("scale")){var x=parseFloat(d.getAttribute("scale"));!isNaN(x)&&0<x&&(f=x)}d.hasAttribute("border")&&(x=parseInt(d.getAttribute("border")),!isNaN(x)&&0<x&&(g=x))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,x,y){try{var t=this.editor.graph,G=null!=t.themes&&"darkTheme"==t.defaultThemeName,D=null;if(null!=g&&0<g.length)t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),t),D=g;else if(G||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(G?t.getDefaultStylesheet():t.getStylesheet());var I=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var H=this.pages[0];this.currentPage==H?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=H.viewState&&null!=H.viewState&&t.setBackgroundImage(H.viewState.backgroundImage);t.getGlobalVariable=function(S){return"page"==S?H.getName():"pagenumber"==S?1:I.apply(this,
+arguments)};document.body.appendChild(t.container);t.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(S){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var T=S.toDataURL("image/png");T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(D));d(T.substring(T.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(M){null!=f&&f(M)}}),null,null,null,mxUtils.bind(this,function(S){null!=f&&
+f(S)}),null,null,x,null,t.shadowVisible,null,t,y,null,null,null,"diagram",null)}catch(S){null!=f&&f(S)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,x,y,t,G,D,I,H,S,T,M){D=null!=D?D:!0;S=null!=S?S:0;G=null!=I?I:f.background;G==mxConstants.NONE&&(G=null);t=f.getSvg(G,H,S,null,null,t,null,null,null,f.shadowVisible||T,null,M,"diagram");(f.shadowVisible||T)&&f.addSvgShadow(t,null,null,0==S);null!=d&&t.setAttribute("content",d);null!=g&&t.setAttribute("resource",g);var fa=mxUtils.bind(this,function(la){la=
+(x?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(la);null!=y&&y(la);return la});f.mathEnabled&&this.editor.addMathCss(t);if(null!=y)this.embedFonts(t,mxUtils.bind(this,function(la){D?this.editor.convertImages(la,mxUtils.bind(this,function(ra){fa(ra)})):fa(la)}));else return fa(t)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(x){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,x,y,t,G,D,I,H,S,T,M){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var fa=this.editor.graph.isSelectionEmpty();g=null!=g?g:fa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(la){this.spinner.stop();try{this.saveCanvas(la,
+y?this.getFileData(!0,null,null,null,g,D):null,I,null==this.pages||0==this.pages.length,S)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(la){this.spinner.stop();this.handleError(la)}),null,g,d||1,f,x,null,null,t,G,H,T,M)}catch(la){this.spinner.stop(),this.handleError(la)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,x,y,t,G){f=null!=f?f:0;g=null!=g?g:0;var D=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var H=mxUtils.parseXml(d);d={};var S=this.editor.extractGraphModel(H.documentElement,null!=this.pages);if(null!=S&&"mxfile"==S.nodeName&&null!=this.pages){var T=S.getElementsByTagName("diagram");if(1==T.length&&!t){if(S=Editor.parseDiagramNode(T[0]),null!=this.currentPage&&(d[T[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=T[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,M))}}else if(0<T.length){t=[];var fa=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[T[0].getAttribute("id")]=this.pages[0].getId(),S=Editor.parseDiagramNode(T[0]),x=!1,fa=1);for(;fa<T.length;fa++){var la=T[fa].getAttribute("id");T[fa].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(T[fa]));d[la]=T[fa].getAttribute("id");var ba=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",[ba+1]));I.model.execute(new ChangePage(this,
+ra,ra,ba,!0));t.push(ra)}this.updatePageLinks(d,t)}}if(null!=S&&"mxGraphModel"===S.nodeName){D=I.importGraphModel(S,f,g,x);if(null!=D)for(fa=0;fa<D.length;fa++)this.updatePageLinksForCell(d,D[fa]);var oa=I.parseBackgroundImage(S.getAttribute("backgroundImage"));if(null!=oa&&null!=oa.originalSrc){this.updateBackgroundPageLink(d,oa);var na=new ChangePageSetup(this,null,oa);na.ignoreColor=!0;I.model.execute(na)}}G&&this.insertHandler(D,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(N){if(y)throw N;
+this.handleError(N)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(x){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),x=this.editor.graph,y=x.getLinkForCell(f);null!=y&&x.setLinkForCell(f,this.updatePageLink(d,y));if(x.isHtmlLabel(f)){g.innerHTML=x.sanitizeHtml(x.getLabel(f));for(var t=g.getElementsByTagName("a"),G=!1,D=0;D<t.length;D++)y=t[D].getAttribute("href"),null!=y&&(t[D].setAttribute("href",this.updatePageLink(d,y)),G=!0);G&&x.labelChanged(f,g.innerHTML)}for(D=0;D<x.model.getChildCount(f);D++)this.updatePageLinksForCell(d,x.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var x=JSON.parse(f.substring(17));if(null!=x.actions){for(var y=0;y<x.actions.length;y++){var t=x.actions[y];if(null!=t.open&&Graph.isPageLink(t.open)){var G=t.open.substring(t.open.indexOf(",")+1);g=d[G];null!=g?t.open="data:page/id,"+g:null==this.getPageById(G)&&delete t.open}}f="data:action/json,"+JSON.stringify(x)}}catch(D){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,x,y){x=null!=x?x:d.name;g=null!=g?g:mxUtils.bind(this,function(G){this.handleError(G)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(x);try{var D="UNKNOWN-VISIO",I=x.lastIndexOf(".");if(0<=I&&I<x.length)D=x.substring(I+1).toUpperCase();else{var H=x.lastIndexOf("/");0<=
+H&&H<x.length&&(x=x.substring(H+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+x,label:G?"remote":"local"})}catch(T){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,x);var S=new XMLHttpRequest;S.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(x)?"?stencil=1":""));S.responseType="blob";this.addRemoteServiceSecurityCheck(S);
+null!=y&&S.setRequestHeader("x-convert-custom",y);S.onreadystatechange=mxUtils.bind(this,function(){if(4==S.readyState)if(200<=S.status&&299>=S.status)try{var T=S.response;if("text/xml"==T.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(fa){try{f(fa.target.result)}catch(la){g({message:mxResources.get("errorLoadingFile")})}});M.readAsText(T)}else this.doImportVisio(T,f,g,x)}catch(fa){g(fa)}else try{""==S.responseType||"text"==S.responseType?g({message:S.responseText}):(M=new FileReader,
+M.onload=function(){g({message:JSON.parse(M.result).Message})},M.readAsText(S.response))}catch(fa){g({})}});S.send(G)}else try{this.doImportVisio(d,f,g,x)}catch(T){g(T)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});
var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=
-JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var u=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&u.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var H=0;H<y.svgThumbs.length;H++)u.push(Editor.createSvgDataUri(y.svgThumbs[H]));null!=y.thumb&&u.push(y.thumb);console.log.apply(console,u)}}catch(J){}}catch(J){null!=window.console&&console.error(J),g(J)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+JSON.parse(d);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&t.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var G=0;G<y.svgThumbs.length;G++)t.push(Editor.createSvgDataUri(y.svgThumbs[G]));null!=y.thumb&&t.push(y.thumb);console.log.apply(console,t)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(x,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x)})})})}):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,x){var y=this,u=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(H){try{if(mxClient.IS_IE||mxClient.IS_IE11)H=H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(H).getElementsByTagName("svg");
-if(0<J.length){var D=parseFloat(J[0].getAttribute("width")),G=parseFloat(J[0].getAttribute("height"));if(isNaN(D)||isNaN(G))try{var W=J[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(W[2]);G=parseFloat(W[3])}catch(T){D=D||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(H)),D,G)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(H){x(H)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?u():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-u):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=u(c1&63);r+=u(c2&63);r+=u(c3&63);return r+=u(c4&63)}function u(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+y(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+y(J.charCodeAt(i),0,0):r+y(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var W=new Image;W.onload=
-function(){try{var T=W.width,Z=W.height;if(0==T&&0==Z){var N=D.result,qa=N.indexOf(","),oa=decodeURIComponent(escape(atob(N.substring(qa+1)))),S=mxUtils.parseXml(oa).getElementsByTagName("svg");0<S.length&&(T=parseFloat(S[0].getAttribute("width")),Z=parseFloat(S[0].getAttribute("height")))}g(D.result,T,Z)}catch(fa){x(fa)}};W.src=D.result};D.onerror=function(G){x(G)}}else x(J)};H.onerror=function(J){x(J)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=null;x.getModel().beginUpdate();
-try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,u,H,J){u=null!=u?u:!0;H=null!=H?H:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Z){4==
-Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,u,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,
-f,g,u,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var W=this.importXml(G,f,g,u,!0,J);if(0<W.length)return W}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(oa,S,fa){D.setSelectionCell(D.insertVertex(null,null,
-"",D.snap(f),D.snap(g),S,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(oa)+";"))}),H,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*N);Z=Math.round(Z.height*N);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(f),D.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Z=null;D.getModel().beginUpdate();try{Z=D.insertVertex(D.getDefaultParent(),null,d,D.snap(f),D.snap(g),1,1,"text;"+(x?"html=1;":"")),D.updateCellSize(Z),D.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,u,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,u,null,J))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{D=this.editor.graph;y=null;D.getModel().beginUpdate();try{y=D.insertVertex(D.getDefaultParent(),null,"",D.snap(f),D.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");y.value=d;D.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=D.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&D.setLinkForCell(y,y.value);y.geometry.width+=D.gridSize;y.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+f,g,x){var y=this,t=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(G){try{if(mxClient.IS_IE||mxClient.IS_IE11)G=G.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(G).getElementsByTagName("svg");
+if(0<D.length){var I=parseFloat(D[0].getAttribute("width")),H=parseFloat(D[0].getAttribute("height"));if(isNaN(I)||isNaN(H))try{var S=D[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(S[2]);H=parseFloat(S[3])}catch(T){I=I||100,H=H||100}g(y.convertDataUri(Editor.createSvgDataUri(G)),I,H)}else x({message:mxResources.get("invalidInput")})}catch(T){x(T)}})}catch(G){x(G)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,x){function y(D,I,H){c1=D>>2;c2=(D&3)<<4|I>>4;c3=(I&15)<<2|H>>6;c4=H&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+D);D-=26;return 0==D?"-":1==D?"_":"?"}var G=new XMLHttpRequest;G.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(G.responseType="blob");G.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(H){var S=new Image;S.onload=
+function(){try{var T=S.width,M=S.height;if(0==T&&0==M){var fa=I.result,la=fa.indexOf(","),ra=decodeURIComponent(escape(atob(fa.substring(la+1)))),ba=mxUtils.parseXml(ra).getElementsByTagName("svg");0<ba.length&&(T=parseFloat(ba[0].getAttribute("width")),M=parseFloat(ba[0].getAttribute("height")))}g(I.result,T,M)}catch(oa){x(oa)}};S.src=I.result};I.onerror=function(H){x(H)}}else x(D)};G.onerror=function(D){x(D)};G.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var x=this.editor.graph,y=
+null;x.getModel().beginUpdate();try{y=x.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),x.updateCellSize(y,!0)}finally{x.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(d,f,g,x,y,t,G,D){t=null!=t?t:!0;G=null!=G?G:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+" "),mxUtils.bind(this,function(M){4==M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var H=Editor.extractGraphModelFromPdf(d);if(null!=H&&0<H.length)return this.importXml(H,f,g,t,!0,D)}if(Editor.isPngDataUrl(d)&&(H=Editor.extractGraphModelFromPng(d),
+null!=H&&0<H.length))return this.importXml(H,f,g,t,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{H=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(H=d.substring(d.indexOf(",")+1),H=window.atob&&!mxClient.IS_SF?atob(H):Base64.decode(H,!0)):H=decodeURIComponent(d.substring(d.indexOf(",")+1));var S=this.importXml(H,f,g,t,!0,D);if(0<S.length)return S}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,d,mxUtils.bind(this,function(ra,ba,
+oa){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),ba,oa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),G,this.maxImageSize);else{var fa=Math.min(1,Math.min(this.maxImageSize/M.width,this.maxImageSize/M.height)),la=Math.round(M.width*fa);M=Math.round(M.height*fa);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),la,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var M=null;I.getModel().beginUpdate();try{M=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(x?"html=1;":"")),I.updateCellSize(M),I.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{I.getModel().endUpdate()}I.setSelectionCell(M)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,t,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(M){this.editor.graph.setSelectionCells(this.importXml(M,f,g,t,null,D))}),mxUtils.bind(this,function(M){this.handleError(M)}));else{I=this.editor.graph;y=null;I.getModel().beginUpdate();try{y=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(x?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");y.value=d;I.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var T=I.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=T.width;y.geometry.height=T.height}Graph.isLink(y.value)&&I.setLinkForCell(y,y.value);y.geometry.width+=I.gridSize;y.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,J){StorageFile.listFiles(this,
-"F",H,J)});window.openBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.getFileContent(this,H,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(H,J,D){StorageFile.deleteFile(this,H,J,D)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(H=new Blob([H],{type:"application/octet-stream"}),
-this.importVisio(H,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,u=y.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=x;u.apply(y,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var H=0,J,D=!1;u.forEach(function(G,W){G=W.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,W.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,J=W))});0<H?J.async("string").then(function(G){(new XMLHttpRequest).upload&&
-x.isRemoteFileFormat(G,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(G,mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?f(W.responseText):g())}),d.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,u,H,J,D,G,W,T){G=null!=
-G?G:!0;var Z=!1,N=null,qa=mxUtils.bind(this,function(oa){var S=null;null!=oa&&"<mxlibrary"==oa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,oa,H)):S=this.importXml(oa,g,x,G,null,null!=T?mxEvent.isControlDown(T):null);null!=J&&J(S)});"image"==f.substring(0,5)?(D=!1,"image/png"==f.substring(0,9)&&(f=W?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(N=this.importXml(f,g,x,G,null,null!=T?mxEvent.isControlDown(T):null),D=!0)),D||(f=this.editor.graph,D=d.indexOf(";"),0<D&&(d=d.substring(0,
-D)+d.substring(d.indexOf(",",D+1))),G&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),N=[f.insertVertex(null,null,"",g,x,y,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=D&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(Z=!0,this.importVisio(D,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,y=mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status?qa(oa.responseText):null!=J&&J(null))}),null!=d?this.parseFileData(d,y,H):this.parseFile(D,y,H)):0==d.indexOf("PK")&&null!=D?(Z=!0,this.importZipFile(D,qa,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),g,x,!0,null,G);J(N)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(N=this.insertTextAt(this.validateFileData(d),
-g,x,!0,null,G,null,null!=T?mxEvent.isControlDown(T):null));Z||null==J||J(N);return N};EditorUi.prototype.importFiles=function(d,f,g,x,y,u,H,J,D,G,W,T,Z){x=null!=x?x:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var N=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var oa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var S=W||this.resampleThreshold,fa=0;fa<d.length;fa++)if("image/svg"!==d[fa].type.substring(0,9)&&"image/"===d[fa].type.substring(0,6)&&d[fa].size>S){oa=!0;break}var ia=mxUtils.bind(this,
-function(){var M=this.editor.graph,aa=M.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,ba,ea,ra,ta,la){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,ra)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,ra,!0)),null):this.importFile(E,Q,Y,R,ba,ea,ra,ta,la,N,T,Z)}catch(pa){return this.handleError(pa),null}});u=null!=u?u:mxUtils.bind(this,
-function(E){M.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=d.length,ja=X,ca=[],ka=mxUtils.bind(this,function(E,Q){ca[E]=Q;if(0==--ja){this.spinner.stop();if(null!=J)J(ca);else{var Y=[];M.getModel().beginUpdate();try{for(E=0;E<ca.length;E++){var R=ca[E]();null!=R&&(Y=Y.concat(R))}}finally{M.getModel().endUpdate()}}u(Y)}}),q=0;q<X;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
-H||H(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var ba=Graph.clipSvgDataUri(R.target.result),ea=ba.indexOf(",");ea=decodeURIComponent(escape(atob(ba.substring(ea+1))));var ra=mxUtils.parseXml(ea);ea=ra.getElementsByTagName("svg");if(0<ea.length){ea=ea[0];var ta=T?null:ea.getAttribute("content");null!=ta&&"<"!=ta.charAt(0)&&"%"!=ta.charAt(0)&&(ta=unescape(window.atob?atob(ta):Base64.decode(ta,!0)));null!=ta&&"%"==ta.charAt(0)&&(ta=decodeURIComponent(ta));null==ta||
-"<mxfile "!==ta.substring(0,8)&&"<mxGraphModel "!==ta.substring(0,14)?ka(E,mxUtils.bind(this,function(){try{if(null!=ra){var xa=ra.getElementsByTagName("svg");if(0<xa.length){var Ca=xa[0],Ia=Ca.getAttribute("width"),Aa=Ca.getAttribute("height");Ia=null!=Ia&&"%"!=Ia.charAt(Ia.length-1)?parseFloat(Ia):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var La=Ca.getAttribute("viewBox");if(null==La||0==La.length)Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);else if(isNaN(Ia)||isNaN(Aa)){var Da=
-La.split(" ");3<Da.length&&(Ia=parseFloat(Da[2]),Aa=parseFloat(Da[3]))}ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Sa=Math.min(1,Math.min(x/Math.max(1,Ia)),x/Math.max(1,Aa)),Ra=y(ba,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ia*Sa)),Math.max(1,Math.round(Aa*Sa)),Q.name);if(isNaN(Ia)||isNaN(Aa)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ia=Math.max(1,Ta.width);Aa=Math.max(1,Ta.height);Ra[0].geometry.width=Ia;Ra[0].geometry.height=Aa;Ca.setAttribute("viewBox","0 0 "+Ia+" "+Aa);
-ba=Editor.createSvgDataUri(mxUtils.getXml(Ca));var Za=ba.indexOf(";");0<Za&&(ba=ba.substring(0,Za)+ba.substring(ba.indexOf(",",Za+1)));M.setCellStyles("image",ba,[Ra[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Ca))}return Ra}}}catch(Za){}return null})):ka(E,mxUtils.bind(this,function(){return y(ta,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ka(E,mxUtils.bind(this,function(){return null}))}else{ea=!1;if("image/png"==Q.type){var la=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=
-la&&0<la.length){var pa=new Image;pa.src=R.target.result;ka(E,mxUtils.bind(this,function(){return y(la,"text/xml",f+E*aa,g+E*aa,pa.width,pa.height,Q.name)}));ea=!0}}ea||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(xa){this.resizeImage(xa,
-R.target.result,mxUtils.bind(this,function(Ca,Ia,Aa){ka(E,mxUtils.bind(this,function(){if(null!=Ca&&Ca.length<G){var La=qa&&this.isResampleImageSize(Q.size,W)?Math.min(1,Math.min(x/Ia,x/Aa)):1;return y(Ca,Q.type,f+E*aa,g+E*aa,Math.round(Ia*La),Math.round(Aa*La),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,x,W,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ba=R.target.result,y(ba,Q.type,f+
-E*aa,g+E*aa,240,160,Q.name,function(xa){ka(E,function(){return xa})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ka(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(oa){oa=[];for(fa=0;fa<d.length;fa++)oa.push(d[fa]);d=oa;this.confirmImageResize(function(M){qa=M;ia()},D)}else ia()};EditorUi.prototype.isBlankFile=function(){return null!=
-this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(u,H){if(u||f)mxSettings.setResizeImages(u?H:null),mxSettings.save();g();d(H)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
-function(u){y(u,!0)},function(u){y(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};
-EditorUi.prototype.parseFileData=function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=
-function(d,f,g,x,y,u,H){y=null!=y?y:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=H?H:f.length,u))try{var G=Math.max(J/y,D/y);if(1<G){var W=Math.round(J/G),T=Math.round(D/G),Z=document.createElement("canvas");Z.width=W;Z.height=T;Z.getContext("2d").drawImage(d,0,0,W,T);var N=Z.toDataURL();if(N.length<f.length){var qa=document.createElement("canvas");qa.width=W;qa.height=T;var oa=qa.toDataURL();N!==oa&&(f=N,J=W,D=T)}}}catch(S){}g(f,J,D)};EditorUi.prototype.extractGraphModelFromPng=
+this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(G,D){StorageFile.listFiles(this,
+"F",G,D)});window.openBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.getFileContent(this,G,D,I)});window.deleteBrowserFile=mxUtils.bind(this,function(G,D,I){StorageFile.deleteFile(this,G,D,I)});if(!f){var x=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(G){this.hideDialog(G)}));window.openFile.setConsumer(mxUtils.bind(this,function(G,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(G=new Blob([G],{type:"application/octet-stream"}),
+this.importVisio(G,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(G,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var y=this.dialog,t=y.close;this.dialog.close=mxUtils.bind(this,function(G){Editor.useLocalStorage=x;t.apply(y,arguments);G&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var x=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(t){if(mxUtils.isEmptyObject(t.files))g();else{var G=0,D,I=!1;t.forEach(function(H,S){H=S.name.toLowerCase();"diagram/diagram.xml"==H?(I=!0,S.async("string").then(function(T){0==T.indexOf("<mxfile ")?f(T):g()})):0==H.indexOf("versions/")&&(H=parseInt(H.substr(9)),H>G&&(G=H,D=S))});0<G?D.async("string").then(function(H){(new XMLHttpRequest).upload&&
+x.isRemoteFileFormat(H,d.name)?x.isOffline()?x.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):x.parseFileData(H,mxUtils.bind(this,function(S){4==S.readyState&&(200<=S.status&&299>=S.status?f(S.responseText):g())}),d.name):g()}):I||g()}},function(t){g(t)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(d,f,g,x,y,t,G,D,I,H,S,T){H=null!=
+H?H:!0;var M=!1,fa=null,la=mxUtils.bind(this,function(ra){var ba=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,G)):ba=this.importXml(ra,g,x,H,null,null!=T?mxEvent.isControlDown(T):null);null!=D&&D(ba)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=S?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(fa=this.importXml(f,g,x,H,null,null!=T?mxEvent.isControlDown(T):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
+d.substring(0,I)+d.substring(d.indexOf(",",I+1))),H&&f.isGridEnabled()&&(g=f.snap(g),x=f.snap(x)),fa=[f.insertVertex(null,null,"",g,x,y,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,la)):null!=I&&null!=G&&(/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G))?(M=!0,this.importVisio(I,la)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,G)?
+this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?la(ra.responseText):null!=D&&D(null))}),null!=d?this.parseFileData(d,y,G):this.parseFile(I,y,G)):0==d.indexOf("PK")&&null!=I?(M=!0,this.importZipFile(I,la,mxUtils.bind(this,function(){fa=this.insertTextAt(this.validateFileData(d),g,x,!0,null,H);D(fa)}))):/(\.v(sd|dx))($|\?)/i.test(G)||/(\.vs(s|x))($|\?)/i.test(G)||(fa=this.insertTextAt(this.validateFileData(d),
+g,x,!0,null,H,null,null!=T?mxEvent.isControlDown(T):null));M||null==D||D(fa);return fa};EditorUi.prototype.importFiles=function(d,f,g,x,y,t,G,D,I,H,S,T,M){x=null!=x?x:this.maxImageSize;H=null!=H?H:this.maxImageBytes;var fa=null!=f&&null!=g,la=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var ba=S||this.resampleThreshold,oa=0;oa<d.length;oa++)if("image/svg"!==d[oa].type.substring(0,9)&&"image/"===d[oa].type.substring(0,6)&&d[oa].size>ba){ra=!0;break}var na=mxUtils.bind(this,
+function(){var N=this.editor.graph,aa=N.gridSize;y=null!=y?y:mxUtils.bind(this,function(E,Q,Y,R,Z,da,qa,va,ja){try{return null!=E&&"<mxlibrary"==E.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,E,qa)),null):this.isCompatibleString(E)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,E,qa,!0)),null):this.importFile(E,Q,Y,R,Z,da,qa,va,ja,fa,T,M)}catch(sa){return this.handleError(sa),null}});t=null!=t?t:mxUtils.bind(this,
+function(E){N.setSelectionCells(E)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var V=d.length,ha=V,X=[],ia=mxUtils.bind(this,function(E,Q){X[E]=Q;if(0==--ha){this.spinner.stop();if(null!=D)D(X);else{var Y=[];N.getModel().beginUpdate();try{for(E=0;E<X.length;E++){var R=X[E]();null!=R&&(Y=Y.concat(R))}}finally{N.getModel().endUpdate()}}t(Y)}}),q=0;q<V;q++)mxUtils.bind(this,function(E){var Q=d[E];if(null!=Q){var Y=new FileReader;Y.onload=mxUtils.bind(this,function(R){if(null==
+G||G(Q))if("image/"==Q.type.substring(0,6))if("image/svg"==Q.type.substring(0,9)){var Z=Graph.clipSvgDataUri(R.target.result),da=Z.indexOf(",");da=decodeURIComponent(escape(atob(Z.substring(da+1))));var qa=mxUtils.parseXml(da);da=qa.getElementsByTagName("svg");if(0<da.length){da=da[0];var va=T?null:da.getAttribute("content");null!=va&&"<"!=va.charAt(0)&&"%"!=va.charAt(0)&&(va=unescape(window.atob?atob(va):Base64.decode(va,!0)));null!=va&&"%"==va.charAt(0)&&(va=decodeURIComponent(va));null==va||"<mxfile "!==
+va.substring(0,8)&&"<mxGraphModel "!==va.substring(0,14)?ia(E,mxUtils.bind(this,function(){try{if(null!=qa){var ya=qa.getElementsByTagName("svg");if(0<ya.length){var Aa=ya[0],Ea=Aa.getAttribute("width"),za=Aa.getAttribute("height");Ea=null!=Ea&&"%"!=Ea.charAt(Ea.length-1)?parseFloat(Ea):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ia=Aa.getAttribute("viewBox");if(null==Ia||0==Ia.length)Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);else if(isNaN(Ea)||isNaN(za)){var Ca=Ia.split(" ");
+3<Ca.length&&(Ea=parseFloat(Ca[2]),za=parseFloat(Ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(x/Math.max(1,Ea)),x/Math.max(1,za)),Pa=y(Z,Q.type,f+E*aa,g+E*aa,Math.max(1,Math.round(Ea*Sa)),Math.max(1,Math.round(za*Sa)),Q.name);if(isNaN(Ea)||isNaN(za)){var Ta=new Image;Ta.onload=mxUtils.bind(this,function(){Ea=Math.max(1,Ta.width);za=Math.max(1,Ta.height);Pa[0].geometry.width=Ea;Pa[0].geometry.height=za;Aa.setAttribute("viewBox","0 0 "+Ea+" "+za);Z=Editor.createSvgDataUri(mxUtils.getXml(Aa));
+var Za=Z.indexOf(";");0<Za&&(Z=Z.substring(0,Za)+Z.substring(Z.indexOf(",",Za+1)));N.setCellStyles("image",Z,[Pa[0]])});Ta.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Pa}}}catch(Za){}return null})):ia(E,mxUtils.bind(this,function(){return y(va,"text/xml",f+E*aa,g+E*aa,0,0,Q.name)}))}else ia(E,mxUtils.bind(this,function(){return null}))}else{da=!1;if("image/png"==Q.type){var ja=T?null:this.extractGraphModelFromPng(R.target.result);if(null!=ja&&0<ja.length){var sa=new Image;sa.src=R.target.result;
+ia(E,mxUtils.bind(this,function(){return y(ja,"text/xml",f+E*aa,g+E*aa,sa.width,sa.height,Q.name)}));da=!0}}da||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(R.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,R.target.result,mxUtils.bind(this,
+function(Aa,Ea,za){ia(E,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<H){var Ia=la&&this.isResampleImageSize(Q.size,S)?Math.min(1,Math.min(x/Ea,x/za)):1;return y(Aa,Q.type,f+E*aa,g+E*aa,Math.round(Ea*Ia),Math.round(za*Ia),Q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),la,x,S,Q.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=R.target.result,y(Z,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(ya){ia(E,
+function(){return ya})},Q)});/(\.v(dx|sdx?))($|\?)/i.test(Q.name)||/(\.vs(x|sx?))($|\?)/i.test(Q.name)?y(null,Q.type,f+E*aa,g+E*aa,240,160,Q.name,function(R){ia(E,function(){return R})},Q):"image"==Q.type.substring(0,5)||"application/pdf"==Q.type?Y.readAsDataURL(Q):Y.readAsText(Q)}})(q)});if(ra){ra=[];for(oa=0;oa<d.length;oa++)ra.push(d[oa]);d=ra;this.confirmImageResize(function(N){la=N;na()},I)}else na()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(t,G){if(t||f)mxSettings.setResizeImages(t?G:null),mxSettings.save();g();d(G)};null==x||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){y(t,!0)},function(t){y(t,
+!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,x)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var x=new FileReader;x.onload=mxUtils.bind(this,function(){this.parseFileData(x.result,f,g)});x.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,f,g){var x=new XMLHttpRequest;x.open("POST",OPEN_URL);x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");x.onreadystatechange=function(){f(x)};x.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,x,y,t,
+G){y=null!=y?y:this.maxImageSize;var D=Math.max(1,d.width),I=Math.max(1,d.height);if(x&&this.isResampleImageSize(null!=G?G:f.length,t))try{var H=Math.max(D/y,I/y);if(1<H){var S=Math.round(D/H),T=Math.round(I/H),M=document.createElement("canvas");M.width=S;M.height=T;M.getContext("2d").drawImage(d,0,0,S,T);var fa=M.toDataURL();if(fa.length<f.length){var la=document.createElement("canvas");la.width=S;la.height=T;var ra=la.toDataURL();fa!==ra&&(f=fa,D=S,I=T)}}}catch(ba){}g(f,D,I)};EditorUi.prototype.extractGraphModelFromPng=
function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var x=new Image;x.onload=function(){x.width=0<x.width?x.width:120;x.height=0<x.height?x.height:120;f(x)};null!=g&&(x.onerror=g);x.src=d}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var fa=S.getEvent();
-return null==S.getState()&&!mxEvent.isMouseEvent(fa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(fa)&&(null==S.getState()||mxEvent.isControlDown(fa)||mxEvent.isShiftDown(fa))});f.cellEditor.editPlantUmlData=function(S,fa,ia){var M=JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("plantUml")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,M.format,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-M.format)f.labelChanged(S,"<pre>"+X+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",d.convertDataUri(X),[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=ja,ka.height=ca,f.cellsResized([S],[ka],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:aa,format:M.format}))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};f.cellEditor.editMermaidData=function(S,fa,ia){var M=
-JSON.parse(ia);fa=new TextareaDialog(d,mxResources.get("mermaid")+":",M.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,M.config,function(X,ja,ca){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",X,[S]);var ka=f.model.getGeometry(S);null!=ka&&(ka=ka.clone(),ka.width=Math.max(ka.width,ja),ka.height=Math.max(ka.height,ca),f.cellsResized([S],[ka],!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:aa,
-config:M.config},null,2))}finally{f.getModel().endUpdate()}},function(X){d.handleError(X)})},null,null,400,220);d.showDialog(fa.container,420,300,!0,!0);fa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,fa){try{var ia=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=ia)this.editPlantUmlData(S,fa,ia);else if(ia=this.graph.getAttributeForCell(S,"mermaidData"),null!=ia)this.editMermaidData(S,fa,ia);else{var M=f.getCellStyle(S);"1"==mxUtils.getValue(M,"metaEdit",
-"0")?d.showDataDialog(S):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(S){return d.getLinkTitle(S)};f.customLinkClicked=function(S){var fa=!1;try{d.handleCustomLink(S),fa=!0}catch(ia){d.handleError(ia)}return fa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var fa=x.apply(this,arguments);null!=fa&&null!=fa.src&&Graph.isPageLink(fa.src)&&(fa={originalSrc:fa.src});return fa};var y=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!=
-S.originalSrc&&(S=d.createImageForPageLink(S.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(S,fa){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var ia=S.indexOf(",");if(0<ia)for(S=S.substring(ia+1),fa=fa.getProperty("patches"),
-ia=0;ia<fa.length;ia++)if(null!=fa[ia][EditorUi.DIFF_UPDATE]&&null!=fa[ia][EditorUi.DIFF_UPDATE][S]||null!=fa[ia][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(fa[ia][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var u=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,fa){var ia=u.apply(this,arguments);if(null!=ia&&null!=ia.originalSrc)if(!fa)ia={src:ia.originalSrc};else if(fa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,aa=this.shapeForegroundColor,
-X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ia=d.createImageForPageLink(ia.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=aa;this.stylesheet=M}return ia};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=f.addClickHandler;f.addClickHandler=function(S,fa,ia){var M=fa;fa=function(aa,X){if(null==X){var ja=mxEvent.getSource(aa);"a"==ja.nodeName.toLowerCase()&&(X=
-ja.getAttribute("href"))}null!=X&&f.isCustomLink(X)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(X)&&mxEvent.consume(aa);null!=M&&M(aa,X)};D.call(this,S,fa,ia)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,fa,ia){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(S,
-"delete - cut copy copyAsImage - duplicate".split(" "),null,ia)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var W=f.getExportVariables;f.getExportVariables=function(){var S=W.apply(this,arguments),fa=d.getCurrentFile();null!=fa&&(S.filename=fa.getTitle());S.pagecount=null!=d.pages?d.pages.length:1;S.page=null!=d.currentPage?d.currentPage.getName():"";
-S.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return S};var T=f.getGlobalVariable;f.getGlobalVariable=function(S){var fa=d.getCurrentFile();return"filename"==S&&null!=fa?fa.getTitle():"page"==S&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==S?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==S?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(S,
-fa,ia){var M=fa.getAttribute("href");if(null==M||!f.isCustomLink(M)||!mxEvent.isTouchEvent(ia)&&mxEvent.isPopupTrigger(ia))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(M),f.getRubberband().reset();mxEvent.consume(ia)}};this.editor.getOrCreateFilename=function(){var S=d.defaultFilename,fa=d.getCurrentFile();null!=fa&&(S=null!=fa.getTitle()?fa.getTitle():S);return S};var N=this.actions.get("print");N.setEnabled(!mxClient.IS_IOS||!navigator.standalone);
-N.visible=N.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),
-this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var fa=f.cellEditor.text2,
-ia=null;null!=fa&&(mxEvent.addListener(fa,"dragleave",function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);M.stopPropagation();M.preventDefault()}),mxEvent.addListener(fa,"dragover",mxUtils.bind(this,function(M){null==ia&&(!mxClient.IS_IE||10<document.documentMode)&&(ia=this.highlightElement(fa));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(fa,"drop",mxUtils.bind(this,function(M){null!=ia&&(ia.parentNode.removeChild(ia),ia=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,
-0,0,this.maxImageSize,function(X,ja,ca,ka,q,E){f.insertImage(X,q,E)},function(){},function(X){return"image/"==X.type.substring(0,6)},function(X){for(var ja=0;ja<X.length;ja++)X[ja]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var aa=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(X){var ja=Math.max(1,X.width);X=Math.max(1,X.height);var ca=this.maxImageSize;
-ca=Math.min(1,Math.min(ca/Math.max(1,ja)),ca/Math.max(1,X));f.insertImage(decodeURIComponent(aa),ja*ca,X*ca)})):document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&&
-(N=this.editor.graph.view,N.setUnit(mxSettings.getUnit()),N.addListener("unitChanged",function(S,fa){mxSettings.setUnit(fa.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,N.unit),this.refresh());if("1"==urlParams.styledev){N=document.getElementById("geFooter");null!=N&&(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)})),N.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(S,fa){0<this.editor.graph.getSelectionCount()?(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:qa.apply(this,arguments)}}N=document.getElementById("geInfo");null!=N&&N.parentNode.removeChild(N);if(Graph.fileSupport&&(!this.editor.chromeless||
-this.editor.editable)){var oa=null;mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=oa&&(oa.parentNode.removeChild(oa),oa=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==oa&&(!mxClient.IS_IE||10<document.documentMode)&&(oa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,
-function(S){null!=oa&&(oa.parentNode.removeChild(oa),oa=null);if(f.isEnabled()){var fa=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),ia=S.dataTransfer.files,M=f.view.translate,aa=f.view.scale,X=fa.x/aa-M.x,ja=fa.y/aa-M.y;if(0<ia.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ia,!0)):(mxEvent.isAltDown(S)&&(ja=X=null),this.importFiles(ia,X,ja,this.maxImageSize,
-null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),S));else{mxEvent.isAltDown(S)&&(ja=X=0);var ca=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;fa=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=fa)f.setSelectionCells(this.importXml(fa,X,ja,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var ka=S.dataTransfer.getData("text/html");fa=document.createElement("div");fa.innerHTML=f.sanitizeHtml(ka);
-var q=null;ia=fa.getElementsByTagName("img");null!=ia&&1==ia.length?(ka=ia[0].getAttribute("src"),null==ka&&(ka=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ka)||(q=!0)):(ia=fa.getElementsByTagName("a"),null!=ia&&1==ia.length?ka=ia[0].getAttribute("href"):(fa=fa.getElementsByTagName("pre"),null!=fa&&1==fa.length&&(ka=mxUtils.getTextContent(fa[0]))));var E=!0,Q=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ka,X,ja,!0,q,null,E,mxEvent.isControlDown(S)))});
-q&&null!=ka&&ka.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(S)):Q()}else null!=ca&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ca)?this.loadImage(decodeURIComponent(ca),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ba=this.maxImageSize;ba=Math.min(1,Math.min(ba/Math.max(1,R)),ba/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,null,"",X,ja,R*ba,Y*ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-ca+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(ca,X,ja,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),X,ja,!0))}}S.stopPropagation();S.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();N=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",
-N);this.addListener("sketchModeChanged",N);"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=
-this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){x=!0;break}if(!x){var u=g.items;for(index in u){var H=u[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(D,G,W,T,Z,N){d.insertImage(D,Z,N)},function(){},function(D){return"image/"==D.type.substring(0,
-6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect",
-"off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=
-!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var H=mxEvent.getSource(u);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||x||(g.style.left=f.container.scrollLeft+
-10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(u){var H=u.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=H&&17!=H&&91!=H&&93!=H||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,
-function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(u){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(u){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=u.clipboardData&&this.pasteCells(u,g,!0,!0),mxEvent.isConsumed(u)||window.setTimeout(mxUtils.bind(this,
-function(){this.pasteCells(u,g,!1,!0)}),0))}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(u){return mxEvent.getSource(u)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);f=f||this.doSetCurrentTheme(d);this.fireEvent(new mxEventObject("currentThemeChanged"));f||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){var f=Editor.currentTheme,g=!1;if(f!=d){if("1"==urlParams["live-ui"]){var x=
-function(y){return null==y||""==y||"dark"==y||"kennedy"==y};console.log("doSetCurrentTheme",f,d);d=x(d)?"default":d;f=x(f)?"default":f;"sketch"==f&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.sidebarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,
-this.formatWidth=EditorUi.prototype.formatWidth,g=!0):"default"==f&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.sidebarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0,g=!0);this.switchTheme(d)}Editor.currentTheme=d}return g};EditorUi.prototype.switchTheme=function(d){this.createMenubarForTheme(d);
-this.switchCssForTheme(d);"sketch"==d?(this.refresh(),this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=""):"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.formatWindow&&(this.formatWindow.destroy(),
-this.formatWindow=null)),this.refresh())};EditorUi.prototype.switchCssForTheme=function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createMenubarForTheme=
-function(d){"sketch"==d?null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;padding:6px;border:1px solid #c0c0c0;overflow:hidden;text-align:right;white-space:nowrap;user-select:none;",null!=this.switchThemeElt&&(this.switchThemeElt.style.position="relative",this.switchThemeElt.style.width="22px",this.switchThemeElt.style.height=
-"22px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="6px",this.sketchMenubarElt.appendChild(this.switchThemeElt)),this.diagramContainer.parentNode.appendChild(this.sketchMenubarElt)):(null!=this.switchThemeElt&&(this.switchThemeElt.style.position="absolute",this.switchThemeElt.style.width="19px",this.switchThemeElt.style.height="19px",this.switchThemeElt.style.top="0px",this.switchThemeElt.style.right="17px",document.body.appendChild(this.switchThemeElt)),null!=this.sketchMenubarElt&&
-(this.sketchMenubarElt.parentNode.removeChild(this.sketchMenubarElt),this.sketchMenubarElt=null))};EditorUi.prototype.addMenuToMenubar=function(d,f,g,x){var y=this.menus.get(f);d=d.addMenu(mxResources.get(f),y.funct);d.className=g;d.style.display="inline-block";d.style.boxSizing="border-box";d.style.top="6px";d.style.marginRight="6px";d.style.height="30px";d.style.paddingTop="6px";d.style.paddingBottom="6px";d.style.cursor="pointer";d.setAttribute("title",mxResources.get(f));this.menus.menuCreated(y,
-d,"geMenuItem");null!=x&&(d.style.backgroundImage="url("+x+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.width="34px",d.innerText="");return d};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d="1"==urlParams.sketch?Math.max(10,this.diagramContainer.clientWidth-241):Math.max(10,this.diagramContainer.clientWidth-248),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?
-580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
-"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(ba){var oa=ba.getEvent();
+return null==ba.getState()&&!mxEvent.isMouseEvent(oa)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(oa)&&(null==ba.getState()||mxEvent.isControlDown(oa)||mxEvent.isShiftDown(oa))});f.cellEditor.editPlantUmlData=function(ba,oa,na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(aa,N.format,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+N.format)f.labelChanged(ba,"<pre>"+V+"</pre>"),f.updateCellSize(ba,!0);else{f.setCellStyles("image",d.convertDataUri(V),[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=ha,ia.height=X,f.cellsResized([ba],[ia],!1))}f.setAttributeForCell(ba,"plantUmlData",JSON.stringify({data:aa,format:N.format}))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};f.cellEditor.editMermaidData=function(ba,oa,
+na){var N=JSON.parse(na);oa=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(aa){null!=aa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(aa,N.config,function(V,ha,X){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",V,[ba]);var ia=f.model.getGeometry(ba);null!=ia&&(ia=ia.clone(),ia.width=Math.max(ia.width,ha),ia.height=Math.max(ia.height,X),f.cellsResized([ba],[ia],!1));f.setAttributeForCell(ba,"mermaidData",JSON.stringify({data:aa,
+config:N.config},null,2))}finally{f.getModel().endUpdate()}},function(V){d.handleError(V)})},null,null,400,220);d.showDialog(oa.container,420,300,!0,!0);oa.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(ba,oa){try{var na=this.graph.getAttributeForCell(ba,"plantUmlData");if(null!=na)this.editPlantUmlData(ba,oa,na);else if(na=this.graph.getAttributeForCell(ba,"mermaidData"),null!=na)this.editMermaidData(ba,oa,na);else{var N=f.getCellStyle(ba);"1"==mxUtils.getValue(N,"metaEdit",
+"0")?d.showDataDialog(ba):g.apply(this,arguments)}}catch(aa){d.handleError(aa)}};f.getLinkTitle=function(ba){return d.getLinkTitle(ba)};f.customLinkClicked=function(ba){var oa=!1;try{d.handleCustomLink(ba),oa=!0}catch(na){d.handleError(na)}return oa};var x=f.parseBackgroundImage;f.parseBackgroundImage=function(ba){var oa=x.apply(this,arguments);null!=oa&&null!=oa.src&&Graph.isPageLink(oa.src)&&(oa={originalSrc:oa.src});return oa};var y=f.setBackgroundImage;f.setBackgroundImage=function(ba){null!=
+ba&&null!=ba.originalSrc&&(ba=d.createImageForPageLink(ba.originalSrc,d.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(ba,oa){ba=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=ba){var na=ba.indexOf(",");if(0<na)for(ba=ba.substring(na+
+1),oa=oa.getProperty("patches"),na=0;na<oa.length;na++)if(null!=oa[na][EditorUi.DIFF_UPDATE]&&null!=oa[na][EditorUi.DIFF_UPDATE][ba]||null!=oa[na][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(oa[na][EditorUi.DIFF_REMOVE],ba)){f.refreshBackgroundImage();break}}}));var t=f.getBackgroundImageObject;f.getBackgroundImageObject=function(ba,oa){var na=t.apply(this,arguments);if(null!=na&&null!=na.originalSrc)if(!oa)na={src:na.originalSrc};else if(oa&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=
+this.stylesheet,aa=this.shapeForegroundColor,V=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";na=d.createImageForPageLink(na.originalSrc);this.shapeBackgroundColor=V;this.shapeForegroundColor=aa;this.stylesheet=N}return na};var G=this.clearDefaultStyle;this.clearDefaultStyle=function(){G.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
+"https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(ba){ba=null!=ba?ba:"";"1"==urlParams.dev&&(ba+=(0<ba.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(ba,oa,na){var N=oa;oa=function(aa,V){if(null==
+V){var ha=mxEvent.getSource(aa);"a"==ha.nodeName.toLowerCase()&&(V=ha.getAttribute("href"))}null!=V&&f.isCustomLink(V)&&(mxEvent.isTouchEvent(aa)||!mxEvent.isPopupTrigger(aa))&&f.customLinkClicked(V)&&mxEvent.consume(aa);null!=N&&N(aa,V)};I.call(this,ba,oa,na)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var H=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(ba,oa,na){d.editor.graph.isSelectionEmpty()?
+H.apply(this,arguments):d.menus.addMenuItems(ba,"delete - cut copy copyAsImage - duplicate".split(" "),null,na)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=f.getExportVariables;f.getExportVariables=function(){var ba=S.apply(this,arguments),oa=d.getCurrentFile();null!=oa&&(ba.filename=oa.getTitle());ba.pagecount=null!=d.pages?d.pages.length:1;ba.page=
+null!=d.currentPage?d.currentPage.getName():"";ba.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return ba};var T=f.getGlobalVariable;f.getGlobalVariable=function(ba){var oa=d.getCurrentFile();return"filename"==ba&&null!=oa?oa.getTitle():"page"==ba&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==ba?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==ba?null!=d.pages?d.pages.length:1:T.apply(this,arguments)};
+var M=f.labelLinkClicked;f.labelLinkClicked=function(ba,oa,na){var N=oa.getAttribute("href");if(null==N||!f.isCustomLink(N)||!mxEvent.isTouchEvent(na)&&mxEvent.isPopupTrigger(na))M.apply(this,arguments);else{if(!f.isEnabled()||null!=ba&&f.isCellLocked(ba.cell))f.customLinkClicked(N),f.getRubberband().reset();mxEvent.consume(na)}};this.editor.getOrCreateFilename=function(){var ba=d.defaultFilename,oa=d.getCurrentFile();null!=oa&&(ba=null!=oa.getTitle()?oa.getTitle():ba);return ba};var fa=this.actions.get("print");
+fa.setEnabled(!mxClient.IS_IOS||!navigator.standalone);fa.visible=fa.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
+this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,
+mxUtils.bind(this,function(ba){var oa=f.cellEditor.text2,na=null;null!=oa&&(mxEvent.addListener(oa,"dragleave",function(N){null!=na&&(na.parentNode.removeChild(na),na=null);N.stopPropagation();N.preventDefault()}),mxEvent.addListener(oa,"dragover",mxUtils.bind(this,function(N){null==na&&(!mxClient.IS_IE||10<document.documentMode)&&(na=this.highlightElement(oa));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(oa,"drop",mxUtils.bind(this,function(N){null!=na&&(na.parentNode.removeChild(na),
+na=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(V,ha,X,ia,q,E){f.insertImage(V,q,E)},function(){},function(V){return"image/"==V.type.substring(0,6)},function(V){for(var ha=0;ha<V.length;ha++)V[ha]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var aa=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,
+function(V){var ha=Math.max(1,V.width);V=Math.max(1,V.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,ha)),X/Math.max(1,V));f.insertImage(decodeURIComponent(aa),ha*X,V*X)})):document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));
+N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(fa=this.editor.graph.view,fa.setUnit(mxSettings.getUnit()),fa.addListener("unitChanged",function(ba,oa){mxSettings.setUnit(oa.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,fa.unit),this.refresh());if("1"==urlParams.styledev){fa=document.getElementById("geFooter");
+null!=fa&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),fa.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ba,oa){0<this.editor.graph.getSelectionCount()?(ba=this.editor.graph.getSelectionCell(),ba=this.editor.graph.getModel().getStyle(ba),this.styleInput.value=ba||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(ba){return mxEvent.getSource(ba)==this.styleInput?!0:la.apply(this,arguments)}}fa=document.getElementById("geInfo");
+null!=fa&&fa.parentNode.removeChild(fa);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(ba){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),ba.stopPropagation(),ba.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(ba){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();
+ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(ba){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var oa=mxUtils.convertPoint(f.container,mxEvent.getClientX(ba),mxEvent.getClientY(ba)),na=ba.dataTransfer.files,N=f.view.translate,aa=f.view.scale,V=oa.x/aa-N.x,ha=oa.y/aa-N.y;if(0<na.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(ba)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),
+this.openFiles(na,!0)):(mxEvent.isAltDown(ba)&&(ha=V=null),this.importFiles(na,V,ha,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(ba),null,null,mxEvent.isShiftDown(ba),ba));else{mxEvent.isAltDown(ba)&&(ha=V=0);var X=0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")?ba.dataTransfer.getData("text/uri-list"):null;oa=this.extractGraphModelFromEvent(ba,null!=this.pages);if(null!=oa)f.setSelectionCells(this.importXml(oa,V,ha,!0));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")){var ia=
+ba.dataTransfer.getData("text/html");oa=document.createElement("div");oa.innerHTML=f.sanitizeHtml(ia);var q=null;na=oa.getElementsByTagName("img");null!=na&&1==na.length?(ia=na[0].getAttribute("src"),null==ia&&(ia=na[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ia)||(q=!0)):(na=oa.getElementsByTagName("a"),null!=na&&1==na.length?ia=na[0].getAttribute("href"):(oa=oa.getElementsByTagName("pre"),null!=oa&&1==oa.length&&(ia=mxUtils.getTextContent(oa[0]))));var E=!0,Q=mxUtils.bind(this,
+function(){f.setSelectionCells(this.insertTextAt(ia,V,ha,!0,q,null,E,mxEvent.isControlDown(ba)))});q&&null!=ia&&ia.length>this.resampleThreshold?this.confirmImageResize(function(Y){E=Y;Q()},mxEvent.isControlDown(ba)):Q()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(Y){var R=Math.max(1,Y.width);Y=Math.max(1,Y.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,R)),Z/Math.max(1,Y));f.setSelectionCell(f.insertVertex(null,
+null,"",V,ha,R*Z,Y*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(Y){f.setSelectionCells(this.insertTextAt(X,V,ha,!0))})):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(ba.dataTransfer.getData("text/plain"),V,ha,!0))}}ba.stopPropagation();ba.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
+fa=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer()});this.addListener("darkModeChanged",fa);this.addListener("sketchModeChanged",fa);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateUserElement();this.refresh()}));"dark"==uiTheme?(this.doSetDarkMode(!0),this.fireEvent(new mxEventObject("darkModeChanged"))):"min"==uiTheme&&"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&
+!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,x=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,
+5)){x=!0;break}if(!x){var t=g.items;for(index in t){var G=t[index];if("file"===G.kind){if(d.isEditing())this.importFiles([G.getAsFile()],0,0,this.maxImageSize,function(I,H,S,T,M,fa){d.insertImage(I,M,fa)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var H=0;H<I.length;H++)I[H]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([G.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position=
+"absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var x=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var G=mxEvent.getSource(t);
+null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==G.nodeName||"TEXTAREA"==G.nodeName||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||x||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",t=f.container.scrollLeft,G=f.container.scrollTop,f.container.appendChild(g),x=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=t,f.container.scrollTop=G)}));
+mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var G=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!x||224!=G&&17!=G&&91!=G&&93!=G||(x=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"cut",
+mxUtils.bind(this,function(t){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(G){this.handleError(G)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(t){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=t.clipboardData&&this.pasteCells(t,g,!0,!0),!mxEvent.isConsumed(t))){var G=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=G;f.container.scrollTop=D;
+this.pasteCells(t,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d){function f(S){return""==S||"dark"==S||"kennedy"==S||null==S}var g=Editor.currentTheme;d=f(d)?"default":d;g=f(g)?"default":g;var x=
+"sketch"==g&&"default"==d||"default"==g&&"sketch"==d;if(x&&"1"==urlParams["live-ui"]&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var y=this.editor.graph.view.translate,t=y.x,G=y.y,D=mxUtils.getOffset(this.editor.graph.container),I=this.editor.graph.container.scrollLeft-D.x,H=this.editor.graph.container.scrollTop-D.y;mxUtils.setPrefixedStyle(this.container.style,"transition","all 100ms");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,
+function(){"sketch"==g&&"default"==d?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==g&&"sketch"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display=
+"none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var S=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=I+D.x+(y.x-t)*S;this.editor.graph.container.scrollTop=
+H+D.y+(y.y-G)*S;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),100)}),100)}),100)}),0)}return x};EditorUi.prototype.switchTheme=function(d){this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display=
+"";"sketch"==d?(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%"):"default"==d&&null!=this.formatContainer&&(this.formatContainer.style.left="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&
+this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),
+this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&
+(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){this.destroyWindows();"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=
+Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif")};EditorUi.prototype.switchCssForTheme=
+function(d){"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"sketch"==d?(null==this.sketchWrapperElt&&
+(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
+EditorUi.prototype.createMainMenuForTheme=function(d){if("sketch"==d&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
+Editor.menuImage));this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));d=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",d);
+this.actions.get("redo").addListener("stateChanged",d);d();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(d){if("sketch"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:14px;bottom:14px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var t=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+x+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.zoomOutImage));g=this.createMenu("viewZoom",Editor.plusImage);g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";d.appendChild(g);mxUtils.bind(this,function(x){mxEvent.addListener(x,
+"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var y=mxUtils.bind(this,function(){x.innerText="";mxUtils.write(x,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
+y)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.zoomInImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("sketch"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var x=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);x.style.paddingLeft="12px";x.style.backgroundSize="";x.style.width="26px";x.style.height="30px";x.style.opacity="0.7";var y=this.createMenu("insert",Editor.plusImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var t=!1,G=mxUtils.bind(this,function(){f.innerText="";if(!t){var D=function(H,S,T,M){null!=S&&H.setAttribute("title",S);H.style.cursor="pointer";H.style.margin="8px 0px";
+H.style.display="block";f.appendChild(H);null!=M&&(H.style.position="relative",H.style.overflow="visible",S=document.createElement("div"),S.style.position="absolute",S.style.fontSize="8px",S.style.left="32px",S.style.top="28px",mxUtils.write(S,M),H.appendChild(S));return H};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var I=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");I.geometry.setTerminalPoint(new mxPoint(0,0),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,0),!1);I.geometry.points=
+[];I.geometry.relative=!0;I.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,I.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");I=I.clone();I.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";I.geometry.width=this.editor.graph.defaultEdgeLength+20;I.geometry.setTerminalPoint(new mxPoint(0,20),!0);I.geometry.setTerminalPoint(new mxPoint(I.geometry.width,20),!1);
+D(this.sidebar.createEdgeTemplateFromCells([I],I.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(x,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",t=!1,G()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
+G);this.addListener("sketchModeChanged",G);G();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"sketch"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:14px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt)),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="relative",d.style.height="21px",d.style.width="21px",d.style.right="0px",d.style.top="3px",this.sketchMenubarElt.appendChild(d))):(null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.right=
+"14px",d.style.top="5px",document.body.appendChild(d)))};EditorUi.prototype.createMenu=function(d,f){var g=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),g.funct);x.className="geToolbarButton";x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(g,x,"geMenuItem");null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize=
+"100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createMenuItem=function(d,f,g){var x=document.createElement("a");x.className="geToolbarButton";x.setAttribute("title",mxResources.get(d));x.style.backgroundImage="url("+f+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width="24px";x.style.height="24px";var y=this.actions.get(d);
+null!=y&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(x,"click",function(t){"disabled"!=x.getAttribute("disabled")&&y.funct(t);mxEvent.consume(t)}),g||(d=function(){y.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",d),y.addListener("stateChanged",
+d),d()));return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,function(x){x.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"sketch"==Editor.currentTheme&&
+"1"!=urlParams.embedInline?66:10,"sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,
+mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 0px 3px 1px #c0c0c0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
-"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }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); "+
-(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+
-(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
+"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
+(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#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:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);null==urlParams.dark&&(mxSettings.settings.darkMode=d,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))};var p=document.createElement("link");p.setAttribute("rel","stylesheet");p.setAttribute("href",STYLE_PATH+"/dark.css");
@@ -3687,168 +3715,168 @@ p.setAttribute("charset","UTF-8");p.setAttribute("type","text/css");EditorUi.pro
"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&
(d=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=
f.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:
-"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):null!=p.parentNode&&p.parentNode.removeChild(p)}};
-EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(x,y,u){null==
-x[y]&&(x[y]=u)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");
-f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,
-"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():
-mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
-EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],
-"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,
-function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
+"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==p.parentNode&&document.getElementsByTagName("head")[0].appendChild(p):
+null!=p.parentNode&&p.parentNode.removeChild(p)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=
+d){var f=function(x,y,t){null==x[y]&&(x[y]=t)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,
+"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),
+f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),
+f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||
+mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged",
+"keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",
+mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=
mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=
this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);
-mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var u=this.createImageDataUri(x,f,"png"),H=parseInt(y.getAttribute("width")),J=parseInt(y.getAttribute("height"));this.writeImageToClipboard(u,H,J,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,
+mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(x,y){try{this.spinner.stop();var t=this.createImageDataUri(x,f,"png"),G=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(t,G,D,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,
function(x){this.spinner.stop();this.handleError(x)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(x){this.handleError(x)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,x){var y=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](x)};
EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var x=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(x));mxUtils.setTextContent(d,encodeURIComponent(y));f?(g.removeCells(x,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;
-f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,u=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var H=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))u=this.importXml(d,H,H),y.setSelectionCells(u);else if(f&&1==y.getSelectionCount()){H=y.getStartEditingCell(y.getSelectionCell(),
-x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(H)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[H]);else{y.model.beginUpdate();try{y.labelChanged(H,d),Graph.isLink(d)&&y.setLinkForCell(H,d)}finally{y.model.endUpdate()}}y.setSelectionCell(H)}else u=y.getInsertPoint(),y.isMouseInsertPoint()&&(H=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),u=this.insertTextAt(d,u.x+H,u.y+H,!0),y.setSelectionCells(u);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
-null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return u};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,u=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var H=d.clipboardData.getData("text/plain"),J=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var D=decodeURIComponent(H);this.isCompatibleString(D)&&(J=!0,H=D)}catch(qa){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(y=
-this.parseHtmlData(J),u="text/plain"!=y.getAttribute("data-type")):null!=H&&0<H.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,J))}H=y.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(qa){var oa=this.editor.graph;oa.lastPasteXml==qa?oa.pasteCounter++:(oa.lastPasteXml=qa,oa.pasteCounter=
-0);var S=oa.pasteCounter*oa.gridSize;oa.setSelectionCells(this.importXml(qa,S,S));oa.scrollCellToVisible(oa.getSelectionCell())}),mxUtils.bind(this,function(qa){this.handleError(qa)})),mxEvent.consume(d));else{var G=u?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),W=!1;try{var T=G.lastIndexOf("%3E");0<=T&&T<G.length-3&&(G=G.substring(0,T+3))}catch(qa){}try{H=y.getElementsByTagName("span"),(D=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):
-decodeURIComponent(G))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(W=!0,G=D)}catch(qa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var Z=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,x,W,d)}catch(qa){console.log("Miro import error:",qa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Z):Z()}else this.pasteXml(G,
-x,W,d);try{mxEvent.consume(d)}catch(qa){}}else if(!g){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(qa){this.handleError(qa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
+f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,x){var y=this.editor.graph,t=null;y.lastPasteXml==d?y.pasteCounter++:(y.lastPasteXml=d,y.pasteCounter=0);var G=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(d))t=this.importXml(d,G,G),y.setSelectionCells(t);else if(f&&1==y.getSelectionCount()){G=y.getStartEditingCell(y.getSelectionCell(),
+x);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==y.getCurrentCellStyle(G)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,d,[G]);else{y.model.beginUpdate();try{y.labelChanged(G,d),Graph.isLink(d)&&y.setLinkForCell(G,d)}finally{y.model.endUpdate()}}y.setSelectionCell(G)}else t=y.getInsertPoint(),y.isMouseInsertPoint()&&(G=0,y.lastPasteXml==d&&0<y.pasteCounter&&y.pasteCounter--),t=this.insertTextAt(d,t.x+G,t.y+G,!0),y.setSelectionCells(t);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),
+null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(d,f,g,x){if(!mxEvent.isConsumed(d)){var y=f,t=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var G=d.clipboardData.getData("text/plain"),D=!1;if(null!=G&&0<G.length&&"%3CmxGraphModel%3E"==G.substring(0,18))try{var I=decodeURIComponent(G);this.isCompatibleString(I)&&(D=!0,G=I)}catch(la){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(y=
+this.parseHtmlData(D),t="text/plain"!=y.getAttribute("data-type")):null!=G&&0<G.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,D))}G=y.getElementsByTagName("span");if(null!=G&&0<G.length&&"application/vnd.lucid.chart.objects"===G[0].getAttribute("data-lucid-type"))g=G[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(la){var ra=this.editor.graph;ra.lastPasteXml==la?ra.pasteCounter++:(ra.lastPasteXml=la,ra.pasteCounter=
+0);var ba=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(la,ba,ba));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,function(la){this.handleError(la)})),mxEvent.consume(d));else{var H=t?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),S=!1;try{var T=H.lastIndexOf("%3E");0<=T&&T<H.length-3&&(H=H.substring(0,T+3))}catch(la){}try{G=y.getElementsByTagName("span"),(I=null!=G&&0<G.length?mxUtils.trim(decodeURIComponent(G[0].textContent)):
+decodeURIComponent(H))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(S=!0,H=I)}catch(la){}try{if(null!=H&&0<H.length){if(0==H.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var M=mxUtils.bind(this,function(){try{H=(new MiroImporter).importMiroJson(JSON.parse(H)),this.pasteXml(H,x,S,d)}catch(la){console.log("Miro import error:",la)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",M):M()}else this.pasteXml(H,
+x,S,d);try{mxEvent.consume(d)}catch(la){}}else if(!g){var fa=this.editor.graph;fa.lastPasteXml=null;fa.pasteCounter=0}}catch(la){this.handleError(la)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(x){null!=f&&(f.parentNode.removeChild(f),f=null);x.stopPropagation();x.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(x){(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());x.stopPropagation();x.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(x){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<x.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(x.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(x)&&
-!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var u=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?y=u.getData("Text"):(y=null,y=0<=mxUtils.indexOf(u.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=y&&0<y.length?(u=document.createElement("div"),u.innerHTML=this.editor.graph.sanitizeHtml(y),
-u=u.getElementsByTagName("img"),0<u.length&&(y=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(y=u.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&
-299>=H.getStatus()&&this.openLocalFile(H.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
-var u=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,u=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,u-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
+!mxEvent.isShiftDown(x)):this.openFiles(x.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(x);if(null==y){var t=null!=x.dataTransfer?x.dataTransfer:x.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?y=t.getData("Text"):(y=null,y=0<=mxUtils.indexOf(t.types,"text/uri-list")?x.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=y&&0<y.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(y),
+t=t.getElementsByTagName("img"),0<t.length&&(y=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(y=t.getData("text/plain"))),null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(G){200<=G.getStatus()&&
+299>=G.getStatus()&&this.openLocalFile(G.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}x.stopPropagation();x.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var x=document.body;var y=document.documentElement;
+var t=(x.clientWidth||y.clientWidth)-3;x=Math.max(x.clientHeight||0,y.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,t=d.clientWidth,x=d.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,t-3)+"px";y.style.height=Math.max(0,x-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):
document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),x=new mxGraphModel;g.decode(f,x);f=x.getChildAt(x.getRoot(),0);for(g=0;g<x.getChildCount(f);g++)d.push(x.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,x,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
-/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var u=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,J,f))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
-/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),
-200<=J.status&&299>=J.status?u(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,x)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
-null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(J){this.spinner.stop();u(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
-g.type){var H=Editor.extractGraphModelFromPdf(d);null!=H&&(y=null,x=!0,d=H)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(u){try{this.openFileHandle(u.target.result,x.name,x,f)}catch(H){this.handleError(H)}});y.onerror=mxUtils.bind(this,function(u){this.spinner.stop();
-this.handleError(u);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var u=this.getCurrentFile(),H=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(d);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==u||!u.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?H():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
-u&&u.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
-function(d,f){function g(H){if(null!=H){var J=H.lastIndexOf(".");0<J&&(H=H.substring(J+1,H.length));null==f[H]&&(f[H]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var u=0;u<y;u++)this.addBasenamesForCell(x.model.getChildAt(d,u),f)};EditorUi.prototype.setGraphEnabled=
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var t=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,x)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
+200<=D.status&&299>=D.status?t(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,x)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,x);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();t(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,x)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var G=Editor.extractGraphModelFromPdf(d);null!=G&&(y=null,x=!0,d=G)}this.spinner.stop();this.openLocalFile(d,f,x,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(x){var y=new FileReader;y.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,x.name,x,f)}catch(G){this.handleError(G)}});y.onerror=mxUtils.bind(this,function(t){this.spinner.stop();
+this.handleError(t);window.openFile=null});"image"!==x.type.substring(0,5)&&"application/pdf"!==x.type||"image/svg"===x.type.substring(0,9)?y.readAsText(x):y.readAsDataURL(x)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,x,y){var t=this.getCurrentFile(),G=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,x,y))});if(null!=d&&0<d.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)?G():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=x)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(G){if(null!=G){var D=G.lastIndexOf(".");0<D&&(G=G.substring(D+1,G.length));null==f[G]&&(f[G]=!0)}}var x=this.editor.graph,y=x.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));x.model.isEdge(d)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=x.model.getChildCount(d);for(var t=0;t<y;t++)this.addBasenamesForCell(x.model.getChildAt(d,t),f)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
-window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var u=this.editor.graph;u.setGridEnabled(!1);u.pageVisible=!1;var H=u.model.cells,J;for(J in H){var D=H[J];null!=
-D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,x,y){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var G=t.model.cells,D;for(D in G){var I=G[D];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=x?x:!1;this.updateUi();
window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var x=f.background;if(null==x||x==mxConstants.NONE)x=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,x,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,u=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==
-(window.opener||window.parent)){var G=D.data,W=null,T=mxUtils.bind(this,function(la){if(null!=la&&"function"===typeof la.charAt&&"<"!=la.charAt(0))try{Editor.isPngDataUrl(la)?la=Editor.extractGraphModelFromPng(la):"data:image/svg+xml;base64,"==la.substring(0,26)?la=atob(la.substring(26)):"data:image/svg+xml;utf8,"==la.substring(0,24)&&(la=la.substring(24)),null!=la&&("%"==la.charAt(0)?la=decodeURIComponent(la):"<"!=la.charAt(0)&&(la=Graph.decompress(la)))}catch(pa){}return la});if("json"==urlParams.proto){var Z=
-!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(la){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.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
-G.action){this.spinner.stop();var N=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(la){null!=la?H.postMessage(JSON.stringify({event:"prompt",value:la,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==G.action){var qa=T(G.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",
-[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.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();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
-"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(la){la&&this.actions.get("exit").funct()}));try{N.init()}catch(la){H.postMessage(JSON.stringify({event:"draft",error:la.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var oa=1==G.enableRecent,S=1==G.enableSearch,fa=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ia=this.getCurrentUser(),M=new TemplatesDialog(this,function(la,pa,xa){la=la||this.emptyDiagramXml;
-H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==this.emptyDiagramXml,name:pa,tempUrl:xa.url,libs:xa.libs,builtIn:null!=xa.info&&null!=xa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=ia?ia.id:null,oa?mxUtils.bind(this,function(la,pa,xa){this.remoteInvoke("getRecentDiagrams",[xa],null,la,pa)}):null,S?mxUtils.bind(this,function(la,pa,xa,Ca){this.remoteInvoke("searchDiagrams",[la,Ca],null,pa,xa)}):null,mxUtils.bind(this,
-function(la,pa,xa){this.remoteInvoke("getFileContent",[la.url],null,pa,xa)}),null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}N=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(la,pa,xa,Ca){la=la||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",xml:la,blank:la==
-this.emptyDiagramXml,name:pa,tempUrl:xa,libs:Ca,builtIn:!0,message:G}),"*"):(d(la,D,la!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,oa?mxUtils.bind(this,function(la){this.remoteInvoke("getRecentDiagrams",[null],null,la,function(){la(null,"Network Error!")})}):null,S?mxUtils.bind(this,function(la,pa){this.remoteInvoke("searchDiagrams",[la,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(la,
-pa,xa){H.postMessage(JSON.stringify({event:"template",docUrl:la,info:pa,name:xa}),"*")}),null,null,fa?mxUtils.bind(this,function(la){this.remoteInvoke("getCustomTemplates",null,null,la,function(){la({},0)})}):null,1==G.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(la){this.sidebar.hideTooltip();la&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==G.action){var aa=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",
-data:aa,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("exit"==G.action){this.actions.get("exit").funct();
-return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ja=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var ca=this.editor.graph,ka=mxUtils.bind(this,function(la){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=G.format;pa.message=G;pa.data=la;pa.xml=ja;H.postMessage(JSON.stringify(pa),"*")}),q=mxUtils.bind(this,function(la){null==la&&(la=Editor.blankImage);"xmlpng"==G.format&&(la=Editor.writeGraphModelToPng(la,"tEXt","mxfile",encodeURIComponent(ja)));ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);ka(la)}),E=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var la=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());for(var pa,xa=0;xa<this.pages.length;xa++)if(this.pages[xa].getId()==E){pa=this.updatePageRoot(this.pages[xa]);break}null==pa&&(pa=this.currentPage);ca.getGlobalVariable=function(La){return"page"==La?pa.getName():"pagenumber"==La?1:la.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}if(null!=G.layerIds){var Ca=
-ca.model,Ia=Ca.getChildCells(Ca.getRoot()),Aa={};for(xa=0;xa<G.layerIds.length;xa++)Aa[G.layerIds[xa]]=!0;for(xa=0;xa<Ia.length;xa++)Ca.setVisible(Ia[xa],Aa[Ia[xa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(La){q(La.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){q(null)}),null,null,G.scale,G.transparent,G.shadow,null,ca,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ja),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ja))).send(mxUtils.bind(this,function(la){200<=la.getStatus()&&299>=la.getStatus()?ka("data:image/png;base64,"+la.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var la=this.createLoadMessage("export");
-la.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();la.xml=mxUtils.getXml(pa);la.data=this.getFileData(null,null,!0,null,null,null,pa);la.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),la.data=this.getHtml(pa,this.editor.graph),la.xml=mxUtils.getXml(pa),la.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa==
-mxConstants.NONE&&(pa=null);la.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);la.format="svg";var xa=mxUtils.bind(this,function(Ca){this.editor.graph.setEnabled(!0);this.spinner.stop();la.data=Editor.createSvgDataUri(Ca);H.postMessage(JSON.stringify(la),"*")});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(la.xml,this.editor.graph,null,!0,xa,null,null,G.embedImages,
-pa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(Ca){G.embedImages||null==G.embedImages?this.editor.convertImages(Ca,
-mxUtils.bind(this,function(Ia){xa(mxUtils.getXml(Ia))})):xa(mxUtils.getXml(Ca))}));return}H.postMessage(JSON.stringify(la),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==G.action){Z=G.toSketch;x=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
-null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var R=Editor.sketchMode;this.doSetSketchMode(G.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(R=Editor.darkMode,this.doSetDarkMode(G.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
-null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var ba=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";W=mxUtils.bind(this,function(){var la=this.editor.graph,pa=la.maxFitScale;la.maxFitScale=G.maxFitScale;la.fit(2*ba);la.maxFitScale=pa;la.container.scrollTop-=2*ba;la.container.scrollLeft-=2*ba;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(la){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(qa=T(G.xml),null!=qa&&""!=qa&&ea.mergeFile(new LocalFile(this,qa),function(){H.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(la){H.postMessage(JSON.stringify({event:"merge",message:G,error:la}),"*")}))}else"remoteInvokeReady"==
-G.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(la){this.handleError(la)}}var ra=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ta=mxUtils.bind(this,function(la,pa){g=!0;
-try{d(la,pa,null,Z)}catch(xa){this.handleError(xa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=ra();x&&null==f&&(f=mxUtils.bind(this,function(xa,Ca){xa=ra();xa==y||g||(Ca=this.createLoadMessage("autosave"),Ca.xml=xa,(window.opener||window.parent).postMessage(JSON.stringify(Ca),"*"));y=xa}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=la,H.postMessage(JSON.stringify(pa),"*");null!=W&&W()});null!=G&&
-"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(T="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(la){ta(la,D)},mxUtils.bind(this,function(la){this.handleError(la)}),T)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
-mxUtils.bind(this,function(la){4==la.readyState&&200<=la.status&&299>=la.status&&"<mxGraphModel"==la.responseText.substring(0,13)&&ta(la.responseText,D)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(la){ta(la)}),mxUtils.bind(this,function(la){this.handleError(la)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=T(G),ta(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(la){ta(ra(),D)}),
-mxUtils.bind(this,function(la){this.handleError(la,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(u,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,W){J.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:D,target:G,allowOpener:W}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,x=!1,y=null,t=mxUtils.bind(this,function(I,H){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var H=I.data,S=null,T=mxUtils.bind(this,function(ja){if(null!=ja&&"function"===typeof ja.charAt&&"<"!=ja.charAt(0))try{Editor.isPngDataUrl(ja)?ja=Editor.extractGraphModelFromPng(ja):"data:image/svg+xml;base64,"==ja.substring(0,26)?ja=atob(ja.substring(26)):"data:image/svg+xml;utf8,"==ja.substring(0,24)&&(ja=ja.substring(24)),null!=ja&&("%"==ja.charAt(0)?ja=decodeURIComponent(ja):"<"!=ja.charAt(0)&&(ja=Graph.decompress(ja)))}catch(sa){}return ja});if("json"==urlParams.proto){var M=
+!1;try{H=JSON.parse(H),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[H])}catch(ja){H=null}try{if(null==H)return;if("dialog"==H.action){this.showError(null!=H.titleKey?mxResources.get(H.titleKey):H.title,null!=H.messageKey?mxResources.get(H.messageKey):H.message,null!=H.buttonKey?mxResources.get(H.buttonKey):H.button);null!=H.modified&&(this.editor.modified=H.modified);return}if("layout"==H.action){this.executeLayouts(this.editor.graph.createLayouts(H.layouts));return}if("prompt"==
+H.action){this.spinner.stop();var fa=new FilenameDialog(this,H.defaultValue||"",null!=H.okKey?mxResources.get(H.okKey):H.ok,function(ja){null!=ja?G.postMessage(JSON.stringify({event:"prompt",value:ja,message:H}),"*"):G.postMessage(JSON.stringify({event:"prompt-cancel",message:H}),"*")},null!=H.titleKey?mxResources.get(H.titleKey):H.title);this.showDialog(fa.container,300,80,!0,!1);fa.init();return}if("draft"==H.action){var la=T(H.xml);this.spinner.stop();fa=new DraftDialog(this,mxResources.get("draftFound",
+[H.name||this.defaultFilename]),la,mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"edit",message:H}),"*")}),mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"discard",message:H}),"*")}),H.editKey?mxResources.get(H.editKey):null,H.discardKey?mxResources.get(H.discardKey):null,H.ignore?mxUtils.bind(this,function(){this.hideDialog();G.postMessage(JSON.stringify({event:"draft",result:"ignore",message:H}),
+"*")}):null);this.showDialog(fa.container,640,480,!0,!1,mxUtils.bind(this,function(ja){ja&&this.actions.get("exit").funct()}));try{fa.init()}catch(ja){G.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:H}),"*")}return}if("template"==H.action){this.spinner.stop();var ra=1==H.enableRecent,ba=1==H.enableSearch,oa=1==H.enableCustomTemp;if("1"==urlParams.newTempDlg&&!H.templatesOnly&&null!=H.callback){var na=this.getCurrentUser(),N=new TemplatesDialog(this,function(ja,sa,ya){ja=ja||
+this.emptyDiagramXml;G.postMessage(JSON.stringify({event:"template",xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:H}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=na?na.id:null,ra?mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,ja,sa)}):null,ba?mxUtils.bind(this,function(ja,sa,ya,Aa){this.remoteInvoke("searchDiagrams",[ja,Aa],null,sa,
+ya)}):null,mxUtils.bind(this,function(ja,sa,ya){this.remoteInvoke("getFileContent",[ja.url],null,sa,ya)}),null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}fa=new NewDialog(this,!1,H.templatesOnly?!1:null!=H.callback,mxUtils.bind(this,function(ja,sa,ya,Aa){ja=ja||this.emptyDiagramXml;null!=H.callback?G.postMessage(JSON.stringify({event:"template",
+xml:ja,blank:ja==this.emptyDiagramXml,name:sa,tempUrl:ya,libs:Aa,builtIn:!0,message:H}),"*"):(d(ja,I,ja!=this.emptyDiagramXml,H.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(ja){this.remoteInvoke("getRecentDiagrams",[null],null,ja,function(){ja(null,"Network Error!")})}):null,ba?mxUtils.bind(this,function(ja,sa){this.remoteInvoke("searchDiagrams",[ja,null],null,sa,function(){sa(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(ja,sa,ya){G.postMessage(JSON.stringify({event:"template",docUrl:ja,info:sa,name:ya}),"*")}),null,null,oa?mxUtils.bind(this,function(ja){this.remoteInvoke("getCustomTemplates",null,null,ja,function(){ja({},0)})}):null,1==H.withoutType);this.showDialog(fa.container,620,460,!0,!1,mxUtils.bind(this,function(ja){this.sidebar.hideTooltip();ja&&this.actions.get("exit").funct()}));fa.init();return}if("textContent"==H.action){var aa=this.getDiagramTextContent();G.postMessage(JSON.stringify({event:"textContent",
+data:aa,message:H}),"*");return}if("status"==H.action){null!=H.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(H.messageKey))):null!=H.message&&this.editor.setStatus(mxUtils.htmlEntities(H.message));null!=H.modified&&(this.editor.modified=H.modified);return}if("spinner"==H.action){var V=null!=H.messageKey?mxResources.get(H.messageKey):H.message;null==H.show||H.show?this.spinner.spin(document.body,V):this.spinner.stop();return}if("exit"==H.action){this.actions.get("exit").funct();
+return}if("viewport"==H.action){null!=H.viewport&&(this.embedViewport=H.viewport);return}if("snapshot"==H.action){this.sendEmbeddedSvgExport(!0);return}if("export"==H.action){if("png"==H.format||"xmlpng"==H.format){if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin)){var ha=null!=H.xml?H.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,ia=mxUtils.bind(this,function(ja){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var sa=this.createLoadMessage("export");sa.format=H.format;sa.message=H;sa.data=ja;sa.xml=ha;G.postMessage(JSON.stringify(sa),"*")}),q=mxUtils.bind(this,function(ja){null==ja&&(ja=Editor.blankImage);"xmlpng"==H.format&&(ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(ha)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);ia(ja)}),E=H.pageId||(null!=this.pages?H.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Q=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=E){var ja=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var sa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==E){sa=this.updatePageRoot(this.pages[ya]);break}null==sa&&(sa=this.currentPage);X.getGlobalVariable=function(Ia){return"page"==Ia?sa.getName():"pagenumber"==Ia?1:ja.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(sa.root)}if(null!=H.layerIds){var Aa=
+X.model,Ea=Aa.getChildCells(Aa.getRoot()),za={};for(ya=0;ya<H.layerIds.length;ya++)za[H.layerIds[ya]]=!0;for(ya=0;ya<Ea.length;ya++)Aa.setVisible(Ea[ya],za[Ea[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){q(Ia.toDataURL("image/png"))}),H.width,null,H.background,mxUtils.bind(this,function(){q(null)}),null,null,H.scale,H.transparent,H.shadow,null,X,H.border,null,H.grid,H.keepTheme)});null!=H.xml&&0<H.xml.length&&(g=!0,this.setFileData(ha),g=!1);Q()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==H.format?"1":"0")+(null!=E?"&pageId="+E:"")+(null!=H.layerIds&&0<H.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:H.layerIds})):"")+(null!=H.scale?"&scale="+H.scale:"")+"&base64=1&xml="+encodeURIComponent(ha))).send(mxUtils.bind(this,function(ja){200<=ja.getStatus()&&299>=ja.getStatus()?ia("data:image/png;base64,"+ja.getText()):q(null)}),mxUtils.bind(this,function(){q(null)}))}}else if(Q=mxUtils.bind(this,function(){var ja=this.createLoadMessage("export");
+ja.message=H;if("html2"==H.format||"html"==H.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var sa=this.getXmlFileData();ja.xml=mxUtils.getXml(sa);ja.data=this.getFileData(null,null,!0,null,null,null,sa);ja.format=H.format}else if("html"==H.format)sa=this.editor.getGraphXml(),ja.data=this.getHtml(sa,this.editor.graph),ja.xml=mxUtils.getXml(sa),ja.format=H.format;else{mxSvgCanvas2D.prototype.foAltText=null;sa=null!=H.background?H.background:this.editor.graph.background;sa==
+mxConstants.NONE&&(sa=null);ja.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ja.format="svg";var ya=mxUtils.bind(this,function(Aa){this.editor.graph.setEnabled(!0);this.spinner.stop();ja.data=Editor.createSvgDataUri(Aa);G.postMessage(JSON.stringify(ja),"*")});if("xmlsvg"==H.format)(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))&&this.getEmbeddedSvg(ja.xml,this.editor.graph,null,!0,ya,null,null,H.embedImages,
+sa,H.scale,H.border,H.shadow,H.keepTheme);else if(null==H.spin&&null==H.spinKey||this.spinner.spin(document.body,null!=H.spinKey?mxResources.get(H.spinKey):H.spin))this.editor.graph.setEnabled(!1),sa=this.editor.graph.getSvg(sa,H.scale,H.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||H.shadow,null,H.keepTheme),(this.editor.graph.shadowVisible||H.shadow)&&this.editor.graph.addSvgShadow(sa),this.embedFonts(sa,mxUtils.bind(this,function(Aa){H.embedImages||null==H.embedImages?this.editor.convertImages(Aa,
+mxUtils.bind(this,function(Ea){ya(mxUtils.getXml(Ea))})):ya(mxUtils.getXml(Aa))}));return}G.postMessage(JSON.stringify(ja),"*")}),null!=H.xml&&0<H.xml.length){if(this.editor.graph.mathEnabled){var Y=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){Y.apply(this,arguments);Q()}}g=!0;this.setFileData(H.xml);g=!1;this.editor.graph.mathEnabled||Q()}else Q();return}if("load"==H.action){M=H.toSketch;x=1==H.autosave;this.hideDialog();null!=H.modified&&null==urlParams.modified&&(urlParams.modified=H.modified);
+null!=H.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=H.saveAndExit);null!=H.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=H.noSaveBtn);if(null!=H.rough){var R=Editor.sketchMode;this.doSetSketchMode(H.rough);R!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=H.dark&&(R=Editor.darkMode,this.doSetDarkMode(H.dark),R!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=H.border&&(this.embedExportBorder=H.border);
+null!=H.background&&(this.embedExportBackground=H.background);null!=H.viewport&&(this.embedViewport=H.viewport);this.embedExitPoint=null;if(null!=H.rect){var Z=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=H.rect.top+"px";this.diagramContainer.style.left=H.rect.left+"px";this.diagramContainer.style.height=H.rect.height+"px";this.diagramContainer.style.width=H.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";S=mxUtils.bind(this,function(){var ja=this.editor.graph,sa=ja.maxFitScale;ja.maxFitScale=H.maxFitScale;ja.fit(2*Z);ja.maxFitScale=sa;ja.container.scrollTop-=2*Z;ja.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[H]))})}null!=H.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=H.noExitBtn);null!=H.title&&null!=this.buttonContainer&&(la=document.createElement("span"),mxUtils.write(la,H.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(la),this.embedFilenameSpan=la);try{H.libs&&this.sidebar.showEntries(H.libs)}catch(ja){}H=null!=H.xmlpng?this.extractGraphModelFromPng(H.xmlpng):null!=H.descriptor?H.descriptor:H.xml}else{if("merge"==H.action){var da=this.getCurrentFile();null!=da&&(la=T(H.xml),null!=la&&""!=la&&da.mergeFile(new LocalFile(this,la),function(){G.postMessage(JSON.stringify({event:"merge",message:H}),"*")},function(ja){G.postMessage(JSON.stringify({event:"merge",message:H,error:ja}),"*")}))}else"remoteInvokeReady"==
+H.action?this.handleRemoteInvokeReady(G):"remoteInvoke"==H.action?this.handleRemoteInvoke(H,I.origin):"remoteInvokeResponse"==H.action?this.handleRemoteInvokeResponse(H):G.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(H)}),"*");return}}catch(ja){this.handleError(ja)}}var qa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),va=mxUtils.bind(this,function(ja,sa){g=!0;
+try{d(ja,sa,null,M)}catch(ya){this.handleError(ya)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");y=qa();x&&null==f&&(f=mxUtils.bind(this,function(ya,Aa){ya=qa();ya==y||g||(Aa=this.createLoadMessage("autosave"),Aa.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(Aa),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)sa=this.createLoadMessage("load"),sa.xml=ja,G.postMessage(JSON.stringify(sa),"*");null!=S&&S()});null!=H&&
+"function"===typeof H.substring&&"data:application/vnd.visio;base64,"==H.substring(0,34)?(T="0M8R4KGxGuE"==H.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(ja){va(ja,I)},mxUtils.bind(this,function(ja){this.handleError(ja)}),T)):null!=H&&"function"===typeof H.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(H,
+mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&"<mxGraphModel"==ja.responseText.substring(0,13)&&va(ja.responseText,I)}),""):null!=H&&"function"===typeof H.substring&&this.isLucidChartData(H)?this.convertLucidChart(H,mxUtils.bind(this,function(ja){va(ja)}),mxUtils.bind(this,function(ja){this.handleError(ja)})):null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=T(H),va(H,I)):this.loadDescriptor(H,mxUtils.bind(this,function(ja){va(qa(),I)}),
+mxUtils.bind(this,function(ja){this.handleError(ja,mxResources.get("errorLoadingFile"))}))}}));var G=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";G.postMessage(t,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(I,H,S){D.apply(this,arguments);G.postMessage(JSON.stringify({event:"openLink",href:I,target:H,allowOpener:S}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="2px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";d.style.marginRight="12px";d.style.right="atlas"==uiTheme||"1"==urlParams.atlas||"1"==urlParams["live-ui"]?"52px":"72px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):
mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,
mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",
f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f));this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?
null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],u=[],H={};if(0<g.length){var J={},D=this.editor.graph,G=null,W=null,
-T=null,Z=null,N=null,qa=null,oa=null,S="whiteSpace=wrap;html=1;",fa=null,ia=null,M="",aa="auto",X="auto",ja=!1,ca=null,ka=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(ya):(D.setSelectionCells(ya),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ba=D.getFreeInsertPoint(),ea=ba.x,ra=ba.y;ba=ra;var ta=null,la="auto";ia=null;for(var pa=[],xa=null,Ca=null,Ia=0;Ia<g.length&&"#"==
-g[Ia].charAt(0);){d=g[Ia].replace(/\r$/,"");for(Ia++;Ia<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ia].substring(1)),Ia++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var La=mxUtils.trim(d.substring(1,Aa)),Da=mxUtils.trim(d.substring(Aa+1));"label"==La?ta=D.sanitizeHtml(Da):"labelname"==La&&0<Da.length&&"-"!=Da?N=Da:"labels"==La&&0<Da.length&&"-"!=Da?oa=JSON.parse(Da):"style"==La?W=Da:"parentstyle"==La?S=Da:"unknownStyle"==La&&"-"!=
-Da?qa=Da:"stylename"==La&&0<Da.length&&"-"!=Da?Z=Da:"styles"==La&&0<Da.length&&"-"!=Da?T=JSON.parse(Da):"vars"==La&&0<Da.length&&"-"!=Da?G=JSON.parse(Da):"identity"==La&&0<Da.length&&"-"!=Da?fa=Da:"parent"==La&&0<Da.length&&"-"!=Da?ia=Da:"namespace"==La&&0<Da.length&&"-"!=Da?M=Da:"width"==La?aa=Da:"height"==La?X=Da:"collapsed"==La&&"-"!=Da?ja="true"==Da:"left"==La&&0<Da.length?ca=Da:"top"==La&&0<Da.length?ka=Da:"ignore"==La?Ca=Da.split(","):"connect"==La?pa.push(JSON.parse(Da)):"link"==La?xa=Da:"padding"==
-La?Y=parseFloat(Da):"edgespacing"==La?q=parseFloat(Da):"nodespacing"==La?E=parseFloat(Da):"levelspacing"==La?Q=parseFloat(Da):"layout"==La&&(la=Da)}}}if(null==g[Ia])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ia].replace(/\r$/,""));Aa=d=null;La=[];for(Da=0;Da<Sa.length;Da++)fa==Sa[Da]&&(d=Da),ia==Sa[Da]&&(Aa=Da),La.push(mxUtils.trim(Sa[Da]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ta&&(ta="%"+La[0]+"%");if(null!=pa)for(var Ra=
-0;Ra<pa.length;Ra++)null==J[pa[Ra].to]&&(J[pa[Ra].to]={});fa=[];for(Da=Ia+1;Da<g.length;Da++){var Ta=this.editor.csvToArray(g[Da].replace(/\r$/,""));if(null==Ta){var Za=40<g[Da].length?g[Da].substring(0,40)+"...":g[Da];throw Error(Za+" ("+Da+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&fa.push(Ta)}D.model.beginUpdate();try{for(Da=0;Da<fa.length;Da++){Ta=fa[Da];var Na=null,z=null!=d?M+Ta[d]:null;g=!1;null!=z&&(Na=D.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var L=new mxCell(ta,
-new mxGeometry(ea,ba,0,0),W||"whiteSpace=wrap;html=1;");L.collapsed=ja;L.vertex=!0;L.id=z;null==Na||g||D.model.setCollapsed(Na,ja);for(var O=0;O<Ta.length;O++)D.setAttributeForCell(L,La[O],Ta[O]),null==Na||g||D.setAttributeForCell(Na,La[O],Ta[O]);if(null!=N&&null!=oa){var V=oa[L.getAttribute(N)];null!=V&&(D.labelChanged(L,V),null==Na||g||D.cellLabelChanged(Na,V))}if(null!=Z&&null!=T){var U=T[L.getAttribute(Z)];null!=U&&(L.style=U)}D.setAttributeForCell(L,"placeholders","1");L.style=D.replacePlaceholders(L,
-L.style,G);null==Na||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[L])):(D.model.setStyle(Na,L.style),0>mxUtils.indexOf(u,Na)&&u.push(Na),D.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=L;if(!g)for(Ra=0;Ra<pa.length;Ra++)J[pa[Ra].to][Na.getAttribute(pa[Ra].to)]=Na;null!=xa&&"link"!=xa&&(D.setLinkForCell(Na,Na.getAttribute(xa)),D.setAttributeForCell(Na,xa,null));var ha=this.editor.graph.getPreferredSizeForCell(Na);ia=null!=Aa?D.model.getCell(M+Ta[Aa]):null;if(Na.vertex){Za=
-null!=ia?0:ea;Ia=null!=ia?0:ra;null!=ca&&null!=Na.getAttribute(ca)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(ca)));null!=ka&&null!=Na.getAttribute(ka)&&(Na.geometry.y=Ia+parseFloat(Na.getAttribute(ka)));var ma="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ma?ha.width+Y:parseFloat(aa);var wa="@"==X.charAt(0)?Na.getAttribute(X.substring(1)):null;Na.geometry.height=null!=wa&&"auto"!=
-wa?parseFloat(wa):"auto"==X||"auto"==wa?ha.height+Y:parseFloat(X);ba+=Na.geometry.height+E}g?(null==H[z]&&(H[z]=[]),H[z].push(Na)):(x.push(Na),null!=ia?(ia.style=D.replacePlaceholders(ia,S,G),D.addCell(Na,ia),y.push(ia)):u.push(D.addCell(Na)))}for(Da=0;Da<y.length;Da++)ma="@"==aa.charAt(0)?y[Da].getAttribute(aa.substring(1)):null,wa="@"==X.charAt(0)?y[Da].getAttribute(X.substring(1)):null,"auto"!=aa&&"auto"!=ma||"auto"!=X&&"auto"!=wa||D.updateGroupBounds([y[Da]],Y,!0);var sa=u.slice(),ya=u.slice();
-for(Ra=0;Ra<pa.length;Ra++){var Ha=pa[Ra];for(Da=0;Da<x.length;Da++){Na=x[Da];var Qa=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=J[lb.to][$a[ab]];if(null==ib&&null!=qa){ib=new mxCell($a[ab],new mxGeometry(ea,ra,0,0),qa);ib.style=D.replacePlaceholders(pb,ib.style,G);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;J[lb.to][$a[ab]]=ib;
-ib.vertex=!0;ib.id=$a[ab];u.push(D.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=D.replacePlaceholders(pb,lb.sourcelabel,G)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+D.replacePlaceholders(ib,lb.targetlabel,G));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?D.replacePlaceholders(qb,lb.style,G):D.createCurrentEdgeStyle();gb=
-D.insertEdge(null,null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=D.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,G));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?
-nb.dy:0);gb.insert(mb)}ya.push(gb);mxUtils.remove(lb.invert?fb:ib,sa)}}}});Qa(Na,Na,Ha);if(null!=H[Na.id])for(O=0;O<H[Na.id].length;O++)Qa(Na,H[Na.id][O],Ha)}}if(null!=Ca)for(Da=0;Da<x.length;Da++)for(Na=x[Da],O=0;O<Ca.length;O++)D.setAttributeForCell(Na,mxUtils.trim(Ca[O]),null);if(0<u.length){var ua=new mxParallelEdgeLayout(D);ua.spacing=q;ua.checkOverlap=!0;var za=function(){0<ua.spacing&&ua.execute(D.getDefaultParent());for(var fb=0;fb<u.length;fb++){var pb=D.getCellGeometry(u[fb]);pb.x=Math.round(D.snap(pb.x));
-pb.y=Math.round(D.snap(pb.y));"auto"==aa&&(pb.width=Math.round(D.snap(pb.width)));"auto"==X&&(pb.height=Math.round(D.snap(pb.height)))}};if("["==la.charAt(0)){var Fa=R;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(la)),function(){za();Fa()});R=null}else if("circle"==la){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ea=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ea.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){Ba.execute(D.getDefaultParent());
-za()},!0,R);R=null}else if("horizontaltree"==la||"verticaltree"==la||"auto"==la&&ya.length==2*u.length-1&&1==sa.length){D.view.validate();var Oa=new mxCompactTreeLayout(D,"horizontaltree"==la);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(D.getDefaultParent(),0<sa.length?sa[0]:null)},!0,R);R=null}else if("horizontalflow"==la||"verticalflow"==la||"auto"==la&&1==sa.length){D.view.validate();var Pa=new mxHierarchicalLayout(D,"horizontalflow"==la?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);Pa.intraCellSpacing=E;Pa.parallelEdgeSpacing=q;Pa.interRankCellSpacing=Q;Pa.disableEdgeStyle=!1;this.executeLayout(function(){Pa.execute(D.getDefaultParent(),ya);D.moveCells(ya,ea,ra)},!0,R);R=null}else if("orgchart"==la){D.view.validate();var bb=new mxOrgChartLayout(D,2,Q,E),eb=bb.isVertexIgnored;bb.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){bb.execute(D.getDefaultParent());za()},!0,R);R=null}else if("organic"==
-la||"auto"==la&&ya.length>u.length){D.view.validate();var db=new mxFastOrganicLayout(D);db.forceConstant=3*E;db.disableEdgeStyle=!1;db.resetEdges=!1;var ub=db.isVertexIgnored;db.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(u,fb)};this.executeLayout(function(){db.execute(D.getDefaultParent());za()},!0,R);R=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),x=[],y=[],t=[],G={};if(0<g.length){var D={},I=this.editor.graph,H=null,S=null,
+T=null,M=null,fa=null,la=null,ra=null,ba="whiteSpace=wrap;html=1;",oa=null,na=null,N="",aa="auto",V="auto",ha=!1,X=null,ia=null,q=40,E=40,Q=100,Y=0,R=mxUtils.bind(this,function(){null!=f?f(pa):(I.setSelectionCells(pa),I.scrollCellToVisible(I.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=I.getFreeInsertPoint(),da=Z.x,qa=Z.y;Z=qa;var va=null,ja="auto";na=null;for(var sa=[],ya=null,Aa=null,Ea=0;Ea<g.length&&"#"==g[Ea].charAt(0);){d=
+g[Ea].replace(/\r$/,"");for(Ea++;Ea<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ea].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ea].substring(1)),Ea++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ia=mxUtils.trim(d.substring(1,za)),Ca=mxUtils.trim(d.substring(za+1));"label"==Ia?va=I.sanitizeHtml(Ca):"labelname"==Ia&&0<Ca.length&&"-"!=Ca?fa=Ca:"labels"==Ia&&0<Ca.length&&"-"!=Ca?ra=JSON.parse(Ca):"style"==Ia?S=Ca:"parentstyle"==Ia?ba=Ca:"unknownStyle"==Ia&&"-"!=Ca?la=Ca:"stylename"==
+Ia&&0<Ca.length&&"-"!=Ca?M=Ca:"styles"==Ia&&0<Ca.length&&"-"!=Ca?T=JSON.parse(Ca):"vars"==Ia&&0<Ca.length&&"-"!=Ca?H=JSON.parse(Ca):"identity"==Ia&&0<Ca.length&&"-"!=Ca?oa=Ca:"parent"==Ia&&0<Ca.length&&"-"!=Ca?na=Ca:"namespace"==Ia&&0<Ca.length&&"-"!=Ca?N=Ca:"width"==Ia?aa=Ca:"height"==Ia?V=Ca:"collapsed"==Ia&&"-"!=Ca?ha="true"==Ca:"left"==Ia&&0<Ca.length?X=Ca:"top"==Ia&&0<Ca.length?ia=Ca:"ignore"==Ia?Aa=Ca.split(","):"connect"==Ia?sa.push(JSON.parse(Ca)):"link"==Ia?ya=Ca:"padding"==Ia?Y=parseFloat(Ca):
+"edgespacing"==Ia?q=parseFloat(Ca):"nodespacing"==Ia?E=parseFloat(Ca):"levelspacing"==Ia?Q=parseFloat(Ca):"layout"==Ia&&(ja=Ca)}}}if(null==g[Ea])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Ea].replace(/\r$/,""));za=d=null;Ia=[];for(Ca=0;Ca<Sa.length;Ca++)oa==Sa[Ca]&&(d=Ca),na==Sa[Ca]&&(za=Ca),Ia.push(mxUtils.trim(Sa[Ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==va&&(va="%"+Ia[0]+"%");if(null!=sa)for(var Pa=0;Pa<sa.length;Pa++)null==
+D[sa[Pa].to]&&(D[sa[Pa].to]={});oa=[];for(Ca=Ea+1;Ca<g.length;Ca++){var Ta=this.editor.csvToArray(g[Ca].replace(/\r$/,""));if(null==Ta){var Za=40<g[Ca].length?g[Ca].substring(0,40)+"...":g[Ca];throw Error(Za+" ("+Ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&oa.push(Ta)}I.model.beginUpdate();try{for(Ca=0;Ca<oa.length;Ca++){Ta=oa[Ca];var Na=null,z=null!=d?N+Ta[d]:null;g=!1;null!=z&&(Na=I.model.getCell(z),g=null==Na||0<=mxUtils.indexOf(x,Na));var J=new mxCell(va,new mxGeometry(da,
+Z,0,0),S||"whiteSpace=wrap;html=1;");J.collapsed=ha;J.vertex=!0;J.id=z;null==Na||g||I.model.setCollapsed(Na,ha);for(var O=0;O<Ta.length;O++)I.setAttributeForCell(J,Ia[O],Ta[O]),null==Na||g||I.setAttributeForCell(Na,Ia[O],Ta[O]);if(null!=fa&&null!=ra){var U=ra[J.getAttribute(fa)];null!=U&&(I.labelChanged(J,U),null==Na||g||I.cellLabelChanged(Na,U))}if(null!=M&&null!=T){var W=T[J.getAttribute(M)];null!=W&&(J.style=W)}I.setAttributeForCell(J,"placeholders","1");J.style=I.replacePlaceholders(J,J.style,
+H);null==Na||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[J])):(I.model.setStyle(Na,J.style),0>mxUtils.indexOf(t,Na)&&t.push(Na),I.fireEvent(new mxEventObject("cellsInserted","cells",[Na])));g=null!=Na;Na=J;if(!g)for(Pa=0;Pa<sa.length;Pa++)D[sa[Pa].to][Na.getAttribute(sa[Pa].to)]=Na;null!=ya&&"link"!=ya&&(I.setLinkForCell(Na,Na.getAttribute(ya)),I.setAttributeForCell(Na,ya,null));var ea=this.editor.graph.getPreferredSizeForCell(Na);na=null!=za?I.model.getCell(N+Ta[za]):null;if(Na.vertex){Za=
+null!=na?0:da;Ea=null!=na?0:qa;null!=X&&null!=Na.getAttribute(X)&&(Na.geometry.x=Za+parseFloat(Na.getAttribute(X)));null!=ia&&null!=Na.getAttribute(ia)&&(Na.geometry.y=Ea+parseFloat(Na.getAttribute(ia)));var ka="@"==aa.charAt(0)?Na.getAttribute(aa.substring(1)):null;Na.geometry.width=null!=ka&&"auto"!=ka?parseFloat(Na.getAttribute(aa.substring(1))):"auto"==aa||"auto"==ka?ea.width+Y:parseFloat(aa);var xa="@"==V.charAt(0)?Na.getAttribute(V.substring(1)):null;Na.geometry.height=null!=xa&&"auto"!=xa?
+parseFloat(xa):"auto"==V||"auto"==xa?ea.height+Y:parseFloat(V);Z+=Na.geometry.height+E}g?(null==G[z]&&(G[z]=[]),G[z].push(Na)):(x.push(Na),null!=na?(na.style=I.replacePlaceholders(na,ba,H),I.addCell(Na,na),y.push(na)):t.push(I.addCell(Na)))}for(Ca=0;Ca<y.length;Ca++)ka="@"==aa.charAt(0)?y[Ca].getAttribute(aa.substring(1)):null,xa="@"==V.charAt(0)?y[Ca].getAttribute(V.substring(1)):null,"auto"!=aa&&"auto"!=ka||"auto"!=V&&"auto"!=xa||I.updateGroupBounds([y[Ca]],Y,!0);var ta=t.slice(),pa=t.slice();for(Pa=
+0;Pa<sa.length;Pa++){var ua=sa[Pa];for(Ca=0;Ca<x.length;Ca++){Na=x[Ca];var Da=mxUtils.bind(this,function(fb,pb,lb){var $a=pb.getAttribute(lb.from);if(null!=$a&&""!=$a){$a=$a.split(",");for(var ab=0;ab<$a.length;ab++){var ib=D[lb.to][$a[ab]];if(null==ib&&null!=la){ib=new mxCell($a[ab],new mxGeometry(da,qa,0,0),la);ib.style=I.replacePlaceholders(pb,ib.style,H);var gb=this.editor.graph.getPreferredSizeForCell(ib);ib.geometry.width=gb.width+Y;ib.geometry.height=gb.height+Y;D[lb.to][$a[ab]]=ib;ib.vertex=
+!0;ib.id=$a[ab];t.push(I.addCell(ib))}if(null!=ib){gb=lb.label;null!=lb.fromlabel&&(gb=(pb.getAttribute(lb.fromlabel)||"")+(gb||""));null!=lb.sourcelabel&&(gb=I.replacePlaceholders(pb,lb.sourcelabel,H)+(gb||""));null!=lb.tolabel&&(gb=(gb||"")+(ib.getAttribute(lb.tolabel)||""));null!=lb.targetlabel&&(gb=(gb||"")+I.replacePlaceholders(ib,lb.targetlabel,H));var qb="target"==lb.placeholders==!lb.invert?ib:fb;qb=null!=lb.style?I.replacePlaceholders(qb,lb.style,H):I.createCurrentEdgeStyle();gb=I.insertEdge(null,
+null,gb||"",lb.invert?ib:fb,lb.invert?fb:ib,qb);if(null!=lb.labels)for(qb=0;qb<lb.labels.length;qb++){var nb=lb.labels[qb],mb=new mxCell(nb.label||qb,new mxGeometry(null!=nb.x?nb.x:0,null!=nb.y?nb.y:0,0,0),"resizable=0;html=1;");mb.vertex=!0;mb.connectable=!1;mb.geometry.relative=!0;null!=nb.placeholders&&(mb.value=I.replacePlaceholders("target"==nb.placeholders==!lb.invert?ib:fb,mb.value,H));if(null!=nb.dx||null!=nb.dy)mb.geometry.offset=new mxPoint(null!=nb.dx?nb.dx:0,null!=nb.dy?nb.dy:0);gb.insert(mb)}pa.push(gb);
+mxUtils.remove(lb.invert?fb:ib,ta)}}}});Da(Na,Na,ua);if(null!=G[Na.id])for(O=0;O<G[Na.id].length;O++)Da(Na,G[Na.id][O],ua)}}if(null!=Aa)for(Ca=0;Ca<x.length;Ca++)for(Na=x[Ca],O=0;O<Aa.length;O++)I.setAttributeForCell(Na,mxUtils.trim(Aa[O]),null);if(0<t.length){var Fa=new mxParallelEdgeLayout(I);Fa.spacing=q;Fa.checkOverlap=!0;var Ma=function(){0<Fa.spacing&&Fa.execute(I.getDefaultParent());for(var fb=0;fb<t.length;fb++){var pb=I.getCellGeometry(t[fb]);pb.x=Math.round(I.snap(pb.x));pb.y=Math.round(I.snap(pb.y));
+"auto"==aa&&(pb.width=Math.round(I.snap(pb.width)));"auto"==V&&(pb.height=Math.round(I.snap(pb.height)))}};if("["==ja.charAt(0)){var Qa=R;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ja)),function(){Ma();Qa()});R=null}else if("circle"==ja){var Ba=new mxCircleLayout(I);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ka=Ba.isVertexIgnored;Ba.isVertexIgnored=function(fb){return Ka.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){Ba.execute(I.getDefaultParent());
+Ma()},!0,R);R=null}else if("horizontaltree"==ja||"verticaltree"==ja||"auto"==ja&&pa.length==2*t.length-1&&1==ta.length){I.view.validate();var Oa=new mxCompactTreeLayout(I,"horizontaltree"==ja);Oa.levelDistance=E;Oa.edgeRouting=!1;Oa.resetEdges=!1;this.executeLayout(function(){Oa.execute(I.getDefaultParent(),0<ta.length?ta[0]:null)},!0,R);R=null}else if("horizontalflow"==ja||"verticalflow"==ja||"auto"==ja&&1==ta.length){I.view.validate();var Ya=new mxHierarchicalLayout(I,"horizontalflow"==ja?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);Ya.intraCellSpacing=E;Ya.parallelEdgeSpacing=q;Ya.interRankCellSpacing=Q;Ya.disableEdgeStyle=!1;this.executeLayout(function(){Ya.execute(I.getDefaultParent(),pa);I.moveCells(pa,da,qa)},!0,R);R=null}else if("orgchart"==ja){I.view.validate();var db=new mxOrgChartLayout(I,2,Q,E),eb=db.isVertexIgnored;db.isVertexIgnored=function(fb){return eb.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){db.execute(I.getDefaultParent());Ma()},!0,R);R=null}else if("organic"==
+ja||"auto"==ja&&pa.length>t.length){I.view.validate();var cb=new mxFastOrganicLayout(I);cb.forceConstant=3*E;cb.disableEdgeStyle=!1;cb.resetEdges=!1;var ub=cb.isVertexIgnored;cb.isVertexIgnored=function(fb){return ub.apply(this,arguments)||0>mxUtils.indexOf(t,fb)};this.executeLayout(function(){cb.execute(I.getDefaultParent());Ma()},!0,R);R=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=R&&R()}}catch(fb){this.handleError(fb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",x;for(x in urlParams)0>mxUtils.indexOf(d,x)&&null!=urlParams[x]&&(f+=g+x+"="+urlParams[x],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),x;for(x in urlParams)0>mxUtils.indexOf(g,
x)&&(d=0==f?d+"?":d+"&",null!=urlParams[x]&&(d+=x+"="+urlParams[x],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,x,y){d=new LinkDialog(this,d,f,g,!0,x,y);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));
this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var F=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var f=F.apply(this,arguments);
-this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
+this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),x=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(x);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
this.actions.get("guides").setEnabled(x);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(x);this.actions.get("connectionArrows").setEnabled(x);this.actions.get("connectionPoints").setEnabled(x);this.actions.get("copyStyle").setEnabled(x&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(x&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(x);this.actions.get("createRevision").setEnabled(x);
this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(x&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(x&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,u,H,J){var D=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(D.getSvg(x,y,u)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),W=D.getGraphBounds(),T=Math.floor(W.width*y/D.view.scale),Z=Math.floor(W.height*y/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&T*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var N={globalVars:D.getExportVariables()};J&&(N.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(f,g,function(qa,oa){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(oa||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<H?"&dpi="+H:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+Z+"&border="+u+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,u,!0,!1,null,J,H):d.exportImage(y,!1,!0,!1,!1,u,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var P=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);P.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,x,y,t,G,D){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
+"svg",mxUtils.getXml(I.getSvg(x,y,t)),"image/svg+xml");else{var H=d.getFileData(!0,null,null,null,null,!0),S=I.getGraphBounds(),T=Math.floor(S.width*y/I.view.scale),M=Math.floor(S.height*y/I.view.scale);if(H.length<=MAX_REQUEST_SIZE&&T*M<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var fa={globalVars:I.getExportVariables()};D&&(fa.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(la,ra){return new mxXmlRequest(EXPORT_URL,
+"format="+g+"&base64="+(ra||"0")+(null!=la?"&filename="+encodeURIComponent(la):"")+"&extras="+encodeURIComponent(JSON.stringify(fa))+(0<G?"&dpi="+G:"")+"&bg="+(null!=x?x:"none")+"&w="+T+"&h="+M+"&border="+t+"&xml="+encodeURIComponent(H))})}else"png"==g?d.exportImage(y,null==x||"none"==x,!0,!1,!1,t,!0,!1,null,D,G):d.exportImage(y,!1,!0,!1,!1,t,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var x=d;this.currentPage!=this.pages[g]&&(x=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),x.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+x.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var x=
-document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var J=H[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));
-u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var W=0;W<G.length;W++){var T=G[W];u[T.id]&&(f[T.id]=T);var Z=this.addCheckbox(y,T.title,u[T.id]);(function(N,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[N.id]=N:delete f[N.id]})})(T,Z)}},
-mxUtils.bind(this,function(G){y.innerText="";var W=document.createElement("div");W.style.padding="8px";W.style.textAlign="center";mxUtils.write(W,mxResources.get("error")+": ");mxUtils.write(W,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(W)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,W;for(W in f)null==u[W]&&(G++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
-[T.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,T))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[W]));for(W in u)f[W]||this.closeLibrary(new RemoteLibrary(this,null,u[W]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
+document.createElement("h3");mxUtils.write(x,mxUtils.htmlEntities(d));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(x);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var G=mxSettings.getCustomLibraries();for(d=0;d<G.length;d++){var D=G[d];if("R"==D.substring(0,1)){var I=JSON.parse(decodeURIComponent(D.substring(1)));
+t[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(H){y.innerText="";if(0==H.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var S=0;S<H.length;S++){var T=H[S];t[T.id]&&(f[T.id]=T);var M=this.addCheckbox(y,T.title,t[T.id]);(function(fa,la){mxEvent.addListener(la,"change",function(){this.checked?f[fa.id]=fa:delete f[fa.id]})})(T,M)}},
+mxUtils.bind(this,function(H){y.innerText="";var S=document.createElement("div");S.style.padding="8px";S.style.textAlign="center";mxUtils.write(S,mxResources.get("error")+": ");mxUtils.write(S,null!=H&&null!=H.message?H.message:mxResources.get("unknownError"));y.appendChild(S)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var H=0,S;for(S in f)null==t[S]&&(H++,mxUtils.bind(this,function(T){this.remoteInvoke("getFileContent",
+[T.downloadUrl],null,mxUtils.bind(this,function(M){H--;0==H&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,T))}catch(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){H--;0==H&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[S]));for(S in t)f[S]||this.closeLibrary(new RemoteLibrary(this,null,t[S]));0==H&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var u=
-!0,H=window.setTimeout(mxUtils.bind(this,function(){u=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(H);u&&x.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(H);u&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,W){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=W?T.error={errResp:W}:null!=G&&(T.resp=G);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var u=!1,H=0;H<y.allowedDomains.length;H++)if(f=="https://"+y.allowedDomains[H]){u=
-!0;break}if(!u){g(null,"Invalid Call: "+x+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(y.isAsync)J.push(function(){g(Array.prototype.slice.apply(arguments))}),J.push(function(G){g(null,G||"Unkown Error")}),this[x].apply(this,J);else{var D=this[x].apply(this,J);g([D])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var u=x.result;1>y.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};x.onsuccess=mxUtils.bind(this,function(y){var u=x.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if(!H||"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,W,T=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",
-!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){T++;qa()}),qa=mxUtils.bind(this,function(){try{if(T>=W.length)Z();else{var S=W[T];StorageFile.getFileContent(this,S,mxUtils.bind(this,function(fa){null==fa||".scratchpad"==S&&fa==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[S]}),"*"):N()}),N)}}catch(fa){console.log(fa)}}),
-oa=mxUtils.bind(this,function(S){try{this.setDatabaseItem(null,[{title:S.title,size:S.data.length,lastModified:Date.now(),type:S.isLib?"L":"F"},{title:S.title,data:S.data}],N,N,["filesInfo","files"])}catch(fa){console.log(fa)}});H=mxUtils.bind(this,function(S){try{if(S.source==J.contentWindow){var fa={};try{fa=JSON.parse(S.data)}catch(ia){}"init"==fa.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=fa.event||G||(D?null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?(W=fa.resp[0],D=!1,qa()):Z():null!=fa.resp&&0<fa.resp.length&&null!=fa.resp[0]?oa(fa.resp[0]):N())}}catch(ia){console.log(ia)}});window.addEventListener("message",H)}})));d(u);u.onversionchange=function(){u.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,x,y){this.openDatabase(mxUtils.bind(this,function(u){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var H=u.transaction(y,"readwrite");H.oncomplete=g;H.onerror=x;for(u=0;u<y.length;u++)H.objectStore(y[u]).put(null!=d&&null!=d[u]?{key:d[u],data:f[u]}:f[u])}catch(J){null!=x&&x(J)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
-g;for(var u=0;u<x.length;u++)y.objectStore(x[u]).delete(d[u])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var u=y.transaction([x],"readonly").objectStore(x).get(d);u.onsuccess=function(){f(u.result)};u.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-u=[];y.onsuccess=function(H){null==H.target.result?d(u):(u.push(H.target.result.value),H.target.result.continue())};y.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(u){null!=f&&f(u)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
+d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,x,y){var t=
+!0,G=window.setTimeout(mxUtils.bind(this,function(){t=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(G);t&&x.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(G);t&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(H,S){var T={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=S?T.error={errResp:S}:null!=H&&(T.resp=H);this.remoteWin.postMessage(JSON.stringify(T),"*")});try{var x=d.funtionName,y=this.remoteInvokableFns[x];if(null!=y&&"function"===typeof this[x]){if(y.allowedDomains){for(var t=!1,G=0;G<y.allowedDomains.length;G++)if(f=="https://"+y.allowedDomains[G]){t=
+!0;break}if(!t){g(null,"Invalid Call: "+x+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(H){g(null,H||"Unkown Error")}),this[x].apply(this,D);else{var I=this[x].apply(this,D);g([I])}}else g(null,"Invalid Call: "+x+" is not found.")}catch(H){g(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var x=g.open("database",2);x.onupgradeneeded=function(y){try{var t=x.result;1>y.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>y.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(G){null!=f&&f(G)}};x.onsuccess=mxUtils.bind(this,function(y){var t=x.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(G){if(!G||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var I=!0,H=!1,S,T=0,M=mxUtils.bind(this,function(){H=!0;this.setDatabaseItem(".drawioMigrated3",
+!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),fa=mxUtils.bind(this,function(){T++;la()}),la=mxUtils.bind(this,function(){try{if(T>=S.length)M();else{var ba=S[T];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(oa){null==oa||".scratchpad"==ba&&oa==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):fa()}),fa)}}catch(oa){console.log(oa)}}),
+ra=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],fa,fa,["filesInfo","files"])}catch(oa){console.log(oa)}});G=mxUtils.bind(this,function(ba){try{if(ba.source==D.contentWindow){var oa={};try{oa=JSON.parse(ba.data)}catch(na){}"init"==oa.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=oa.event||H||(I?null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?(S=oa.resp[0],I=!1,la()):M():null!=oa.resp&&0<oa.resp.length&&null!=oa.resp[0]?ra(oa.resp[0]):fa())}}catch(na){console.log(na)}});window.addEventListener("message",G)}})));d(t);t.onversionchange=function(){t.close()}});x.onerror=f;x.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
+f,g,x,y){this.openDatabase(mxUtils.bind(this,function(t){try{y=y||"objects";Array.isArray(y)||(y=[y],d=[d],f=[f]);var G=t.transaction(y,"readwrite");G.oncomplete=g;G.onerror=x;for(t=0;t<y.length;t++)G.objectStore(y[t]).put(null!=d&&null!=d[t]?{key:d[t],data:f[t]}:f[t])}catch(D){null!=x&&x(D)}}),x)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){x=x||"objects";Array.isArray(x)||(x=[x],d=[d]);y=y.transaction(x,"readwrite");y.oncomplete=f;y.onerror=
+g;for(var t=0;t<x.length;t++)y.objectStore(x[t]).delete(d[t])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,x){this.openDatabase(mxUtils.bind(this,function(y){try{x=x||"objects";var t=y.transaction([x],"readonly").objectStore(x).get(d);t.onsuccess=function(){f(t.result)};t.onerror=g}catch(G){null!=g&&g(G)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
+t=[];y.onsuccess=function(G){null==G.target.result?d(t):(t.push(G.target.result.value),G.target.result.continue())};y.onerror=f}catch(G){null!=f&&f(G)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(x){try{g=g||"objects";var y=x.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){d(y.result)};y.onerror=f}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var x=this.getCurrentFile();null!=x?x.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,x,y,u,H,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,u,H,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,u,H,J,D,G,W,T,Z,N,qa,oa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
+function(d,f,g,x,y,t,G,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,x,y,t,G,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
+f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,x,y,t,G,D,I,H,S,T,M,fa,la,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
EditorUi.prototype.convertImages=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,x)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,x){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
return Editor.updateCRC(d,f,g,x)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,x,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
localStorage.key(f),x=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<x.length){var y="<mxfile "===x.substring(0,8)||"<?xml"===x.substring(0,5)||"\x3c!--[if IE]>"===x.substring(0,12);x="<mxlibrary>"===x.substring(0,11);(y||x)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var S=G.getElementsByTagName("div"),fa=0,ia=0;ia<S.length;ia++)"none"!=S[ia].style.display&&S[ia].parentNode==G&&fa++;W.style.display=0==fa?"block":"none"}function K(S,fa,ia,M){function aa(){fa.removeChild(ca);fa.removeChild(ka);ja.style.display="block";X.style.display="block"}H={div:fa,comment:S,saveCallback:ia,deleteOnCancel:M};var X=fa.querySelector(".geCommentTxt"),ja=fa.querySelector(".geCommentActionsList"),ca=document.createElement("textarea");
-ca.className="geCommentEditTxtArea";ca.style.minHeight=X.offsetHeight+"px";ca.value=S.content;fa.insertBefore(ca,X);var ka=document.createElement("div");ka.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){M?(fa.parentNode.removeChild(fa),F()):aa();H=null});q.className="geCommentEditBtn";ka.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){X.innerText="";S.content=ca.value;mxUtils.write(X,S.content);aa();ia(S);H=null});mxEvent.addListener(ca,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ka.appendChild(E);fa.insertBefore(ka,X);ja.style.display="none";X.style.display="none";ca.focus()}function P(S,fa){fa.innerText="";S=new Date(S.modifiedDate);var ia=b.timeSince(S);null==ia&&(ia=mxResources.get("lessThanAMinute"));
-mxUtils.write(fa,mxResources.get("timeAgo",[ia],"{1} ago"));fa.setAttribute("title",S.toLocaleDateString()+" "+S.toLocaleTimeString())}function d(S){var fa=document.createElement("img");fa.className="geCommentBusyImg";fa.src=IMAGE_PATH+"/spin.gif";S.appendChild(fa);S.busyImg=fa}function f(S){S.style.border="1px solid red";S.removeChild(S.busyImg)}function g(S){S.style.border="";S.removeChild(S.busyImg)}function x(S,fa,ia,M,aa){function X(R,ba,ea){var ra=document.createElement("li");ra.className="geCommentAction";
-var ta=document.createElement("a");ta.className="geCommentActionLnk";mxUtils.write(ta,R);ra.appendChild(ta);mxEvent.addListener(ta,"click",function(la){ba(la,S);la.preventDefault();mxEvent.consume(la)});Y.appendChild(ra);ea&&(ra.style.display="none")}function ja(){function R(ra){ba.push(ea);if(null!=ra.replies)for(var ta=0;ta<ra.replies.length;ta++)ea=ea.nextSibling,R(ra.replies[ta])}var ba=[],ea=ka;R(S);return{pdiv:ea,replies:ba}}function ca(R,ba,ea,ra,ta){function la(){d(Ia);S.addReply(Ca,function(Aa){Ca.id=
-Aa;S.replies.push(Ca);g(Ia);ea&&ea()},function(Aa){pa();f(Ia);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ta)}function pa(){K(Ca,Ia,function(Aa){la()},!0)}var xa=ja().pdiv,Ca=b.newComment(R,b.getCurrentUser());Ca.pCommentId=S.id;null==S.replies&&(S.replies=[]);var Ia=x(Ca,S.replies,xa,M+1);ba?pa():la()}if(aa||!S.isResolved){W.style.display="none";var ka=document.createElement("div");ka.className="geCommentContainer";ka.setAttribute("data-commentId",
-S.id);ka.style.marginLeft=20*M+5+"px";S.isResolved&&!Editor.isDarkMode()&&(ka.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=S.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,S.user.displayName||"");E.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",S.id);P(S,Q);E.appendChild(Q);ka.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,S.content||"");ka.appendChild(q);S.isLocked&&(ka.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||S.isLocked||0!=M&&!u||X(mxResources.get("reply"),function(){ca("",
-!0)},S.isResolved);E=b.getCurrentUser();null==E||E.id!=S.user.id||y||S.isLocked||(X(mxResources.get("edit"),function(){function R(){K(S,ka,function(){d(ka);S.editComment(S.content,function(){g(ka)},function(ba){f(ka);R();b.handleError(ba,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},S.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ka);S.deleteComment(function(R){if(!0===R){R=ka.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ba=ka.querySelectorAll(".geCommentAction");for(R=0;R<ba.length;R++)ba[R].parentNode.removeChild(ba[R]);g(ka);ka.style.opacity="0.5"}else{ba=ja(S).replies;for(R=0;R<ba.length;R++)G.removeChild(ba[R]);for(R=0;R<fa.length;R++)if(fa[R]==S){fa.splice(R,1);break}W.style.display=0==G.getElementsByTagName("div").length?"block":"none"}},function(R){f(ka);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-S.isResolved));y||S.isLocked||0!=M||X(S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ba(){var ea=R.target;ea.innerText="";S.isResolved=!S.isResolved;mxUtils.write(ea,S.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=S.isResolved?"none":"",ta=ja(S).replies,la=Editor.isDarkMode()?"transparent":S.isResolved?"ghostWhite":"white",pa=0;pa<ta.length;pa++){ta[pa].style.backgroundColor=la;for(var xa=ta[pa].querySelectorAll(".geCommentAction"),
-Ca=0;Ca<xa.length;Ca++)xa[Ca]!=ea.parentNode&&(xa[Ca].style.display=ra);N||(ta[pa].style.display="none")}F()}S.isResolved?ca(mxResources.get("reOpened")+": ",!0,ba,!1,!0):ca(mxResources.get("markedAsResolved"),!1,ba,!0)});ka.appendChild(q);null!=ia?G.insertBefore(ka,ia.nextSibling):G.appendChild(ka);for(ia=0;null!=S.replies&&ia<S.replies.length;ia++)q=S.replies[ia],q.isResolved=S.isResolved,x(q,S.replies,null,M+1,aa);null!=H&&(H.comment.id==S.id?(aa=S.content,S.content=H.comment.content,K(S,ka,H.saveCallback,
-H.deleteOnCancel),S.content=aa):null==H.comment.id&&H.comment.pCommentId==S.id&&(G.appendChild(H.div),K(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ka}}var y=!b.canComment(),u=b.canReplyToReplies(),H=null,J=document.createElement("div");J.className="geCommentsWin";J.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",G=document.createElement("div");G.className="geCommentsList";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";G.style.bottom=parseInt(D)+7+"px";J.appendChild(G);var W=document.createElement("span");W.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(W,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=D;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className=
-"geButton";if(!y){var Z=D.cloneNode();Z.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(S){function fa(){K(ia,M,function(aa){d(M);b.addComment(aa,function(X){aa.id=X;qa.push(aa);g(M)},function(X){f(M);fa();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ia=b.newComment("",b.getCurrentUser()),M=x(ia,qa,null,0);fa();S.preventDefault();
-mxEvent.consume(S)});T.appendChild(Z)}Z=D.cloneNode();Z.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';Z.setAttribute("title",mxResources.get("showResolved"));Z.className="geAdaptiveAsset";var N=!1;mxEvent.addListener(Z,"click",function(S){this.className=(N=!N)?"geButton geCheckedBtn":"geButton";oa();S.preventDefault();mxEvent.consume(S)});T.appendChild(Z);b.commentsRefreshNeeded()&&(Z=D.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',
-Z.setAttribute("title",mxResources.get("refresh")),Z.className="geAdaptiveAsset",mxEvent.addListener(Z,"click",function(S){oa();S.preventDefault();mxEvent.consume(S)}),T.appendChild(Z));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),D.className="geAdaptiveAsset",mxEvent.addListener(D,"click",function(S){p();S.preventDefault();mxEvent.consume(S)}),T.appendChild(D));J.appendChild(T);
-var qa=[],oa=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var S=H.div.querySelector(".geCommentEditTxtArea"),fa=H.div.querySelector(".geCommentEditBtns");H.comment.content=S.value;S.parentNode.removeChild(S);fa.parentNode.removeChild(fa)}catch(ia){b.handleError(ia)}G.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();
-b.commentsSupported()?b.getComments(function(ia){function M(aa){if(null!=aa){aa.sort(function(ja,ca){return new Date(ja.modifiedDate)-new Date(ca.modifiedDate)});for(var X=0;X<aa.length;X++)M(aa[X].replies)}}ia.sort(function(aa,X){return new Date(aa.modifiedDate)-new Date(X.modifiedDate)});G.innerText="";G.appendChild(W);W.style.display="block";qa=ia;for(ia=0;ia<qa.length;ia++)M(qa[ia].replies),x(qa[ia],qa,null,0,N);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(G.appendChild(H.div),K(H.comment,
-H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(ia){G.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ia&&ia.message?": "+ia.message:""));this.hasError=!0})):G.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});oa();this.refreshComments=oa;T=mxUtils.bind(this,function(){function S(X){var ja=ia[X.id];if(null!=ja)for(P(X,ja),ja=0;null!=X.replies&&ja<X.replies.length;ja++)S(X.replies[ja])}if(this.window.isVisible()){for(var fa=G.querySelectorAll(".geCommentDate"),
-ia={},M=0;M<fa.length;M++){var aa=fa[M];ia[aa.getAttribute("data-commentId")]=aa}for(M=0;M<qa.length;M++)S(qa[M])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),J,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,K,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");
-d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=K&&(p.innerHTML=K+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var u=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
-k(y.checked)});d.appendChild(u);null!=F?(u.innerHTML=F+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
-x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(H){y.checked=!y.checked;mxEvent.consume(H)})):d.style.marginTop="12px";this.init=function(){u.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+var CommentsWindow=function(b,e,k,m,C,p){function F(){for(var ba=H.getElementsByTagName("div"),oa=0,na=0;na<ba.length;na++)"none"!=ba[na].style.display&&ba[na].parentNode==H&&oa++;S.style.display=0==oa?"block":"none"}function L(ba,oa,na,N){function aa(){oa.removeChild(X);oa.removeChild(ia);ha.style.display="block";V.style.display="block"}G={div:oa,comment:ba,saveCallback:na,deleteOnCancel:N};var V=oa.querySelector(".geCommentTxt"),ha=oa.querySelector(".geCommentActionsList"),X=document.createElement("textarea");
+X.className="geCommentEditTxtArea";X.style.minHeight=V.offsetHeight+"px";X.value=ba.content;oa.insertBefore(X,V);var ia=document.createElement("div");ia.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){N?(oa.parentNode.removeChild(oa),F()):aa();G=null});q.className="geCommentEditBtn";ia.appendChild(q);var E=mxUtils.button(mxResources.get("save"),function(){V.innerText="";ba.content=X.value;mxUtils.write(V,ba.content);aa();na(ba);G=null});mxEvent.addListener(X,
+"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(E.click(),mxEvent.consume(Q)):27==Q.keyCode&&(q.click(),mxEvent.consume(Q)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";ia.appendChild(E);oa.insertBefore(ia,V);ha.style.display="none";V.style.display="none";X.focus()}function P(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var na=b.timeSince(ba);null==na&&(na=mxResources.get("lessThanAMinute"));
+mxUtils.write(oa,mxResources.get("timeAgo",[na],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function d(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function f(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function g(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function x(ba,oa,na,N,aa){function V(R,Z,da){var qa=document.createElement("li");qa.className=
+"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,R);qa.appendChild(va);mxEvent.addListener(va,"click",function(ja){Z(ja,ba);ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(qa);da&&(qa.style.display="none")}function ha(){function R(qa){Z.push(da);if(null!=qa.replies)for(var va=0;va<qa.replies.length;va++)da=da.nextSibling,R(qa.replies[va])}var Z=[],da=ia;R(ba);return{pdiv:da,replies:Z}}function X(R,Z,da,qa,va){function ja(){d(Ea);ba.addReply(Aa,
+function(za){Aa.id=za;ba.replies.push(Aa);g(Ea);da&&da()},function(za){sa();f(Ea);b.handleError(za,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,va)}function sa(){L(Aa,Ea,function(za){ja()},!0)}var ya=ha().pdiv,Aa=b.newComment(R,b.getCurrentUser());Aa.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var Ea=x(Aa,ba.replies,ya,N+1);Z?sa():ja()}if(aa||!ba.isResolved){S.style.display="none";var ia=document.createElement("div");ia.className="geCommentContainer";ia.setAttribute("data-commentId",
+ba.id);ia.style.marginLeft=20*N+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(ia.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=ba.user.pictureUrl||Editor.userImage;q.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";q.appendChild(E);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,ba.user.displayName||"");E.appendChild(Q);
+Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",ba.id);P(ba,Q);E.appendChild(Q);ia.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ba.content||"");ia.appendChild(q);ba.isLocked&&(ia.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";q.appendChild(Y);y||ba.isLocked||0!=N&&!t||V(mxResources.get("reply"),function(){X("",
+!0)},ba.isResolved);E=b.getCurrentUser();null==E||E.id!=ba.user.id||y||ba.isLocked||(V(mxResources.get("edit"),function(){function R(){L(ba,ia,function(){d(ia);ba.editComment(ba.content,function(){g(ia)},function(Z){f(ia);R();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},ba.isResolved),V(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){d(ia);ba.deleteComment(function(R){if(!0===R){R=ia.querySelector(".geCommentTxt");
+R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var Z=ia.querySelectorAll(".geCommentAction");for(R=0;R<Z.length;R++)Z[R].parentNode.removeChild(Z[R]);g(ia);ia.style.opacity="0.5"}else{Z=ha(ba).replies;for(R=0;R<Z.length;R++)H.removeChild(Z[R]);for(R=0;R<oa.length;R++)if(oa[R]==ba){oa.splice(R,1);break}S.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(R){f(ia);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ba.isResolved));y||ba.isLocked||0!=N||V(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function Z(){var da=R.target;da.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(da,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var qa=ba.isResolved?"none":"",va=ha(ba).replies,ja=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=ja;for(var ya=va[sa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<ya.length;Aa++)ya[Aa]!=da.parentNode&&(ya[Aa].style.display=qa);fa||(va[sa].style.display="none")}F()}ba.isResolved?X(mxResources.get("reOpened")+": ",!0,Z,!1,!0):X(mxResources.get("markedAsResolved"),!1,Z,!0)});ia.appendChild(q);null!=na?H.insertBefore(ia,na.nextSibling):H.appendChild(ia);for(na=0;null!=ba.replies&&na<ba.replies.length;na++)q=ba.replies[na],q.isResolved=ba.isResolved,x(q,ba.replies,null,N+1,aa);null!=G&&(G.comment.id==ba.id?(aa=ba.content,ba.content=G.comment.content,L(ba,
+ia,G.saveCallback,G.deleteOnCancel),ba.content=aa):null==G.comment.id&&G.comment.pCommentId==ba.id&&(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel)));return ia}}var y=!b.canComment(),t=b.canReplyToReplies(),G=null,D=document.createElement("div");D.className="geCommentsWin";D.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var I=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(I)+7+"px";D.appendChild(H);var S=document.createElement("span");S.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(S,mxResources.get("noCommentsFound"));var T=document.createElement("div");T.className="geToolbarContainer geCommentsToolbar";T.style.height=I;T.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";I=document.createElement("a");
+I.className="geButton";if(!y){var M=I.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(M,"click",function(ba){function oa(){L(na,N,function(aa){d(N);b.addComment(aa,function(V){aa.id=V;la.push(aa);g(N)},function(V){f(N);oa();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var na=b.newComment("",b.getCurrentUser()),N=x(na,la,null,
+0);oa();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M)}M=I.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));M.className="geAdaptiveAsset";var fa=!1;mxEvent.addListener(M,"click",function(ba){this.className=(fa=!fa)?"geButton geCheckedBtn":"geButton";ra();ba.preventDefault();mxEvent.consume(ba)});T.appendChild(M);b.commentsRefreshNeeded()&&(M=I.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),M.className="geAdaptiveAsset",mxEvent.addListener(M,"click",function(ba){ra();ba.preventDefault();mxEvent.consume(ba)}),T.appendChild(M));b.commentsSaveNeeded()&&(I=I.cloneNode(),I.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',I.setAttribute("title",mxResources.get("save")),I.className="geAdaptiveAsset",mxEvent.addListener(I,"click",function(ba){p();ba.preventDefault();
+mxEvent.consume(ba)}),T.appendChild(I));D.appendChild(T);var la=[],ra=mxUtils.bind(this,function(){this.hasError=!1;if(null!=G)try{G.div=G.div.cloneNode(!0);var ba=G.div.querySelector(".geCommentEditTxtArea"),oa=G.div.querySelector(".geCommentEditBtns");G.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(na){b.handleError(na)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(na){function N(aa){if(null!=aa){aa.sort(function(ha,X){return new Date(ha.modifiedDate)-new Date(X.modifiedDate)});for(var V=0;V<aa.length;V++)N(aa[V].replies)}}na.sort(function(aa,V){return new Date(aa.modifiedDate)-new Date(V.modifiedDate)});H.innerText="";H.appendChild(S);S.style.display="block";la=na;for(na=0;na<la.length;na++)N(la[na].replies),x(la[na],la,null,0,fa);null!=G&&null==G.comment.id&&null==G.comment.pCommentId&&
+(H.appendChild(G.div),L(G.comment,G.div,G.saveCallback,G.deleteOnCancel))},mxUtils.bind(this,function(na){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(na&&na.message?": "+na.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ra();this.refreshComments=ra;T=mxUtils.bind(this,function(){function ba(V){var ha=na[V.id];if(null!=ha)for(P(V,ha),ha=0;null!=V.replies&&ha<V.replies.length;ha++)ba(V.replies[ha])}if(this.window.isVisible()){for(var oa=
+H.querySelectorAll(".geCommentDate"),na={},N=0;N<oa.length;N++){var aa=oa[N];na[aa.getAttribute("data-commentId")]=aa}for(N=0;N<la.length;N++)ba(la[N])}});setInterval(T,6E4);this.refreshCommentsTime=T;this.window=new mxWindow(mxResources.get("comments"),D,e,k,m,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,m,C,p,F,L,P,d,f){var g=document.createElement("div");g.style.textAlign="center";f=null!=f?f:44;var x=document.createElement("div");x.style.padding="6px";x.style.overflow="auto";x.style.maxHeight=f+"px";x.style.lineHeight="1.2em";mxUtils.write(x,e);g.appendChild(x);null!=d&&(x=document.createElement("div"),x.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+d),x.appendChild(e),g.appendChild(x));d=document.createElement("div");d.style.textAlign="center";d.style.whiteSpace="nowrap";var y=document.createElement("input");y.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(y.checked)});p.className="geBtn";null!=L&&(p.innerHTML=L+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&d.appendChild(p);var t=mxUtils.button(C||
+mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(y.checked)});d.appendChild(t);null!=F?(t.innerHTML=F+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(p);g.appendChild(d);P?(d.style.marginTop="10px",x=document.createElement("p"),x.style.marginTop="20px",x.style.marginBottom="0px",x.appendChild(y),C=document.createElement("span"),
+mxUtils.write(C," "+mxResources.get("rememberThisSetting")),x.appendChild(C),g.appendChild(x),mxEvent.addListener(C,"click",function(G){y.checked=!y.checked;mxEvent.consume(G)})):d.style.marginTop="12px";this.init=function(){t.focus()};this.container=g};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3858,16 +3886,16 @@ function ChangePage(b,e,k,m,C){SelectPage.call(this,b,k);this.relatedPage=e;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,k){var m=b.indexOf(","),C=null;0<m&&(m=this.getPageById(b.substring(m+1)),null!=m&&m!=e&&(C=this.getImageForPage(m,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
-EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(K){return"pagenumber"==K?p+1:"page"==K&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var m=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(L){return"pagenumber"==L?p+1:"page"==L&&null!=e?e.getName():m.apply(this,arguments)};document.body.appendChild(C.container);
this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var F=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),F.width,F.height,F.x,F.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,m=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){m();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),K=b.getAttribute("extFonts");if(K)try{K=K.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),F=this.parseBackgroundImage(b.getAttribute("backgroundImage")),L=b.getAttribute("extFonts");if(L)try{L=L.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}})}catch(P){console.log("ExtFonts format error: "+P.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:F,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(m)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:K||[]}};
+mxSettings.getPageFormat():new mxRectangle(0,0,m,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:L||[]}};
Graph.prototype.saveViewState=function(b,e,k,m){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
@@ -3887,7 +3915,7 @@ EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&nu
EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,m=this.pages[k]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var K=new mxGraphModel;K.prefix=Editor.guid()+"-";K.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},F=m.createCellLookup([m.model.root]);k=new DiagramPage(C);k.root=m.cloneCell(m.model.root,null,p);var L=new mxGraphModel;L.prefix=Editor.guid()+"-";L.setRoot(k.root);m.updateCustomLinks(m.createCellMapping(p,F),[k.root]);k.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(k);
k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(P){this.handleError(P)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -3895,200 +3923,183 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,m=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,f){this.pages[d]==this.currentPage?(f.className="geActivePage",f.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):f.className="geInactivePage";f.setAttribute("draggable","true");mxEvent.addListener(f,"dragstart",mxUtils.bind(this,function(g){b.isEnabled()?(mxClient.IS_FF&&g.dataTransfer.setData("Text","<diagram/>"),C=d):mxEvent.consume(g)}));mxEvent.addListener(f,"dragend",mxUtils.bind(this,function(g){C=null;g.stopPropagation();
g.preventDefault()}));mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(g){null!=C&&(g.dataTransfer.dropEffect="move");g.stopPropagation();g.preventDefault()}));mxEvent.addListener(f,"drop",mxUtils.bind(this,function(g){null!=C&&d!=C&&this.movePage(C,d);g.stopPropagation();g.preventDefault()}));e.appendChild(f)})(p,this.createTabForPage(this.pages[p],m,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);m=this.createPageMenuTab();this.tabContainer.appendChild(m);
-m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var K=this.createControlTab(4,"&nbsp;&#10095;");K.style.position="absolute";
-K.style.right=this.editor.chromeless?"0px":"29px";K.style.fontSize="13pt";this.tabContainer.appendChild(K);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(K,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(K,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+m=null;this.isPageInsertTabVisible()&&(m=this.createPageInsertTab(),this.tabContainer.appendChild(m));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=m&&(m.style.position="absolute",m.style.right="0px",e.style.marginRight="30px");var F=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");F.style.position="absolute";F.style.right=this.editor.chromeless?"29px":"55px";F.style.fontSize="13pt";this.tabContainer.appendChild(F);var L=this.createControlTab(4,"&nbsp;&#10095;");L.style.position="absolute";
+L.style.right=this.editor.chromeless?"0px":"29px";L.style.fontSize="13pt";this.tabContainer.appendChild(L);var P=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=P+"px";mxEvent.addListener(F,"click",mxUtils.bind(this,function(d){e.scrollLeft-=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}));mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(L,"click",mxUtils.bind(this,function(d){e.scrollLeft+=Math.max(20,P-20);mxUtils.setOpacity(F,0<e.scrollLeft?100:50);mxUtils.setOpacity(L,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(d)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){this.editor.graph.popupMenuHandler.hideMenu();
-var C=new mxPopupMenu(mxUtils.bind(this,function(K,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(u){var H=K.addItem(this.getShortPageName(this.pages[u]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[u])}),P),J=this.pages[u].getId();H.setAttribute("title",this.pages[u].getName()+" ("+(u+1)+"/"+this.pages.length+")"+(null!=J?" ["+J+"]":""));this.pages[u]==this.currentPage&&K.addCheckmark(H,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
-function(){K.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(K.addSeparator(P),f());var g=this.currentPage;if(null!=g){K.addSeparator(P);var x=this.getShortPageName(g);K.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);K.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||K.addSeparator(P);K.addItem(mxResources.get("duplicateIt",
-[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(K.addSeparator(P),f(),K.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
+var C=new mxPopupMenu(mxUtils.bind(this,function(L,P){var d=mxUtils.bind(this,function(){for(var y=0;y<this.pages.length;y++)mxUtils.bind(this,function(t){var G=L.addItem(this.getShortPageName(this.pages[t]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[t])}),P),D=this.pages[t].getId();G.setAttribute("title",this.pages[t].getName()+" ("+(t+1)+"/"+this.pages.length+")"+(null!=D?" ["+D+"]":""));this.pages[t]==this.currentPage&&L.addCheckmark(G,Editor.checkmarkImage)})(y)}),f=mxUtils.bind(this,
+function(){L.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),P)});e||d();if(this.editor.graph.isEnabled()){e||(L.addSeparator(P),f());var g=this.currentPage;if(null!=g){L.addSeparator(P);var x=this.getShortPageName(g);L.addItem(mxResources.get("removeIt",[x]),null,mxUtils.bind(this,function(){this.removePage(g)}),P);L.addItem(mxResources.get("renameIt",[x]),null,mxUtils.bind(this,function(){this.renamePage(g,g.getName())}),P);e||L.addSeparator(P);L.addItem(mxResources.get("duplicateIt",
+[x]),null,mxUtils.bind(this,function(){this.duplicatePage(g,mxResources.get("copyOf",[g.getName()]))}),P)}}e&&(L.addSeparator(P),f(),L.addSeparator(P),d())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(m),F=mxEvent.getClientY(m);C.popup(p,F,null,m);this.setCurrentMenu(C);mxEvent.consume(m)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,m){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+m+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var m=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){m=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var K=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(K,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!m){var F=new mxPopupMenu(this.createPageMenu(b));F.div.className+=" geMenubarMenu";F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(p),P=mxEvent.getClientY(p);F.popup(L,P,null,p);this.setCurrentMenu(F,e)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var m=this.getCurrentFile();if(null!=m&&m.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+m.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,m){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),m);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m);null!=this.getLinkForPage(b)&&(k.addSeparator(m),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,K,P,d,f){p=this.createUrlParameters(p,F,K,P,d,f);K||p.push("hide-pages=1");C.isSelectionEmpty()||(K=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,K.width/=d,K.height/=d,K.x=K.x/d-F.x,K.y=K.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(K.x),y:Math.round(K.y),width:Math.round(K.width),height:Math.round(K.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,F,L,P,d,f){p=this.createUrlParameters(p,F,L,P,d,f);L||p.push("hide-pages=1");C.isSelectionEmpty()||(L=C.getBoundingBox(C.getSelectionCells()),F=C.view.translate,d=C.view.scale,L.width/=d,L.height/=d,L.x=L.x/d-F.x,L.y=L.y/d-F.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(L.x),y:Math.round(L.y),width:Math.round(L.width),height:Math.round(L.height),border:100}))));
P=new EmbedDialog(this,this.getLinkForPage(b,p,P));this.showDialog(P.container,450,240,!0,!0);P.init()}))})));k.addSeparator(m);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(m),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),m))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,m){m.ui=e.ui;return k};b.afterDecode=function(e,k,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,m){m.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(m.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
m));return m};b.beforeDecode=function(e,k,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(k.getAttribute("relatedPage"));if(null==m.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));m.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(m.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(m.relatedPage.root=e.decodeCell(C,
-!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,K){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(K,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);K==C||null!=P&&!d||p.push(K);return(null==P||d)&&(K==C||!this.model.isCollapsed(K))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,K,P){return this.model.filterCells(this.getEdges(m,
-C,p,F,K,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(M){return H.isVertex(M)&&p(M)}function C(M){var aa=
-!1;null!=M&&(aa="1"==u.getCurrentCellStyle(M).treeMoving);return aa}function p(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),aa="tree"==(null!=aa?aa.style:u.getCellStyle(M)).containerType);return aa}function F(M){var aa=!1;null!=M&&(M=H.getParent(M),aa=u.view.getState(M),u.view.getState(M),aa=null!=(null!=aa?aa.style:u.getCellStyle(M)).childLayout);return aa}function K(M){M=u.view.getState(M);if(null!=M){var aa=u.getIncomingTreeEdges(M.cell);if(0<aa.length&&(aa=u.view.getState(aa[0]),
-null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==M.y&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==M.y+M.height&&Math.abs(aa.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(M,aa){aa=null!=aa?aa:!0;u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=u.cloneCells([ja[0],
-M]);u.model.setTerminal(ca[0],u.model.getTerminal(ja[0],!0),!0);var ka=K(M),q=X.geometry;ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?ca[1].geometry.x+=aa?M.geometry.width+10:-ca[1].geometry.width-10:ca[1].geometry.y+=aa?M.geometry.height+10:-ca[1].geometry.height-10;u.view.currentRoot!=X&&(ca[1].geometry.x-=q.x,ca[1].geometry.y-=q.y);var E=u.view.getState(M),Q=u.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH?
-Y.x+=(aa?M.geometry.width+10:-ca[1].geometry.width-10)*Q:Y.y+=(aa?M.geometry.height+10:-ca[1].geometry.height-10)*Q;var R=u.getOutgoingTreeEdges(u.model.getTerminal(ja[0],!0));if(null!=R){for(var ba=ka==mxConstants.DIRECTION_SOUTH||ka==mxConstants.DIRECTION_NORTH,ea=q=ja=0;ea<R.length;ea++){var ra=u.model.getTerminal(R[ea],!1);if(ka==K(ra)){var ta=u.view.getState(ra);ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,ta)&&(ja=10+
-Math.max(ja,(Math.min(Y.x+Y.width,ta.x+ta.width)-Math.max(Y.x,ta.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,ta.y+ta.height)-Math.max(Y.y,ta.y))/Q))}}ba?q=0:ja=0;for(ea=0;ea<R.length;ea++)if(ra=u.model.getTerminal(R[ea],!1),ka==K(ra)&&(ta=u.view.getState(ra),ra!=M&&null!=ta&&(ba&&aa!=ta.getCenterX()<E.getCenterX()||!ba&&aa!=ta.getCenterY()<E.getCenterY()))){var la=[];u.traverse(ta.cell,!0,function(pa,xa){var Ca=null!=xa&&u.isTreeEdge(xa);Ca&&la.push(xa);(null==xa||Ca)&&la.push(pa);return null==
-xa||Ca});u.moveCells(la,(aa?1:-1)*ja,(aa?1:-1)*q)}}}return u.addCells(ca,X)}finally{u.model.endUpdate()}}function d(M){u.model.beginUpdate();try{var aa=K(M),X=u.getIncomingTreeEdges(M),ja=u.cloneCells([X[0],M]);u.model.setTerminal(X[0],ja[1],!1);u.model.setTerminal(ja[0],ja[1],!0);u.model.setTerminal(ja[0],M,!1);var ca=u.model.getParent(M),ka=ca.geometry,q=[];u.view.currentRoot!=ca&&(ja[1].geometry.x-=ka.x,ja[1].geometry.y-=ka.y);u.traverse(M,!0,function(Y,R){var ba=null!=R&&u.isTreeEdge(R);ba&&q.push(R);
-(null==R||ba)&&q.push(Y);return null==R||ba});var E=M.geometry.width+40,Q=M.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);u.moveCells(q,E,Q);return u.addCells(ja,ca)}finally{u.model.endUpdate()}}function f(M,aa){u.model.beginUpdate();try{var X=u.model.getParent(M),ja=u.getIncomingTreeEdges(M),ca=K(M);0==ja.length&&(ja=[u.createEdge(X,null,"",null,null,u.createCurrentEdgeStyle())],
-ca=aa);var ka=u.cloneCells([ja[0],M]);u.model.setTerminal(ka[0],M,!0);if(null==u.model.getTerminal(ka[0],!1)){u.model.setTerminal(ka[0],ka[1],!1);var q=u.getCellStyle(ka[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)u.setCellStyles(Q,E[Q],[ka[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&u.setCellStyles("elbow",ca==mxConstants.DIRECTION_SOUTH||ca==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ka[0]])}catch(ta){}}ja=u.getOutgoingTreeEdges(M);var Y=X.geometry;aa=[];u.view.currentRoot==
-X&&(Y=new mxRectangle);for(q=0;q<ja.length;q++){var R=u.model.getTerminal(ja[q],!1);null!=R&&aa.push(R)}var ba=u.view.getBounds(aa),ea=u.view.translate,ra=u.view.scale;ca==mxConstants.DIRECTION_SOUTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x-Y.x+10,ka[1].geometry.y+=ka[1].geometry.height-Y.y+40):ca==mxConstants.DIRECTION_NORTH?(ka[1].geometry.x=null==ba?M.geometry.x+(M.geometry.width-ka[1].geometry.width)/2:(ba.x+ba.width)/ra-ea.x+-Y.x+
-10,ka[1].geometry.y-=ka[1].geometry.height+Y.y+40):(ka[1].geometry.x=ca==mxConstants.DIRECTION_WEST?ka[1].geometry.x-(ka[1].geometry.width+Y.x+40):ka[1].geometry.x+(ka[1].geometry.width-Y.x+40),ka[1].geometry.y=null==ba?M.geometry.y+(M.geometry.height-ka[1].geometry.height)/2:(ba.y+ba.height)/ra-ea.y+-Y.y+10);return u.addCells(ka,X)}finally{u.model.endUpdate()}}function g(M,aa,X){M=u.getOutgoingTreeEdges(M);X=u.view.getState(X);var ja=[];if(null!=X&&null!=M){for(var ca=0;ca<M.length;ca++){var ka=
-u.view.getState(u.model.getTerminal(M[ca],!1));null!=ka&&(!aa&&Math.min(ka.x+ka.width,X.x+X.width)>=Math.max(ka.x,X.x)||aa&&Math.min(ka.y+ka.height,X.y+X.height)>=Math.max(ka.y,X.y))&&ja.push(ka)}ja.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ja}function x(M,aa){var X=K(M),ja=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==ja&&X!=aa?y.actions.get("selectParent").funct():X==aa?
-(aa=u.getOutgoingTreeEdges(M),null!=aa&&0<aa.length&&u.setSelectionCell(u.model.getTerminal(aa[0],!1))):(X=u.getIncomingTreeEdges(M),null!=X&&0<X.length&&(ja=g(u.model.getTerminal(X[0],!0),ja,M),M=u.view.getState(M),null!=M&&(M=mxUtils.indexOf(ja,M),0<=M&&(M+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=ja.length-1&&u.setSelectionCell(ja[M].cell)))))}var y=this,u=y.editor.graph,H=u.getModel(),J=y.menus.createPopupMenu;y.menus.createPopupMenu=function(M,aa,X){J.apply(this,
-arguments);if(1==u.getSelectionCount()){aa=u.getSelectionCell();var ja=u.getOutgoingTreeEdges(aa);M.addSeparator();0<ja.length&&(m(u.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,X),this.addMenuItems(M,["selectDescendants"],null,X));m(u.getSelectionCell())?(M.addSeparator(),0<u.getIncomingTreeEdges(aa).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,X)):0<u.model.getEdgeCount(aa)&&this.addMenuItems(M,["selectConnections"],null,X)}};y.actions.addAction("selectChildren",
-function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getOutgoingTreeEdges(M);if(null!=M){for(var aa=[],X=0;X<M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=u.getOutgoingTreeEdges(u.model.getTerminal(M[0],!0)),null!=M)){for(var aa=[],X=0;X<
-M.length;X++)aa.push(u.model.getTerminal(M[X],!1));u.setSelectionCells(aa)}}},null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var M=u.getSelectionCell();M=u.getIncomingTreeEdges(M);null!=M&&0<M.length&&u.setSelectionCell(u.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(M,aa){M=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(M)){if(null!=aa&&mxEvent.isAltDown(aa))u.setSelectionCells(u.model.getTreeEdges(M,
-null==aa||!mxEvent.isShiftDown(aa),null==aa||!mxEvent.isControlDown(aa)));else{var X=[];u.traverse(M,!0,function(ja,ca){var ka=null!=ca&&u.isTreeEdge(ca);ka&&X.push(ca);null!=ca&&!ka||null!=aa&&mxEvent.isShiftDown(aa)||X.push(ja);return null==ca||ka})}u.setSelectionCells(X)}},null,null,"Alt+Shift+D");var D=u.removeCells;u.removeCells=function(M,aa){aa=null!=aa?aa:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));aa&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var X=[],ja=0;ja<
-M.length;ja++){var ca=M[ja];H.isEdge(ca)&&p(ca)&&(X.push(ca),ca=H.getTerminal(ca,!1));if(m(ca)){var ka=[];u.traverse(ca,!0,function(q,E){var Q=null!=E&&u.isTreeEdge(E);Q&&ka.push(E);(null==E||Q)&&ka.push(q);return null==E||Q});0<ka.length&&(X=X.concat(ka),ca=u.getIncomingTreeEdges(M[ja]),M=M.concat(ca))}else null!=ca&&X.push(M[ja])}M=X;return D.apply(this,arguments)};y.hoverIcons.getStateAt=function(M,aa,X){return m(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,X))};var G=u.duplicateCells;
-u.duplicateCells=function(M,aa){M=null!=M?M:this.getSelectionCells();for(var X=M.slice(0),ja=0;ja<X.length;ja++){var ca=u.view.getState(X[ja]);if(null!=ca&&m(ca.cell)){var ka=u.getIncomingTreeEdges(ca.cell);for(ca=0;ca<ka.length;ca++)mxUtils.remove(ka[ca],M)}}this.model.beginUpdate();try{var q=G.call(this,M,aa);if(q.length==M.length)for(ja=0;ja<M.length;ja++)if(m(M[ja])){var E=u.getIncomingTreeEdges(q[ja]);ka=u.getIncomingTreeEdges(M[ja]);if(0==E.length&&0<ka.length){var Q=this.cloneCell(ka[0]);this.addEdge(Q,
-u.getDefaultParent(),this.model.getTerminal(ka[0],!0),q[ja])}}}finally{this.model.endUpdate()}return q};var W=u.moveCells;u.moveCells=function(M,aa,X,ja,ca,ka,q){var E=null;this.model.beginUpdate();try{var Q=ca,Y=this.getCurrentCellStyle(ca);if(null!=M&&m(ca)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<M.length;R++)if(m(M[R])||u.model.isEdge(M[R])&&null==u.model.getTerminal(M[R],!0)){ca=u.model.getParent(M[R]);break}if(null!=Q&&ca!=Q&&null!=this.view.getState(M[0])){var ba=u.getIncomingTreeEdges(M[0]);
-if(0<ba.length){var ea=u.view.getState(u.model.getTerminal(ba[0],!0));if(null!=ea){var ra=u.view.getState(Q);null!=ra&&(aa=(ra.getCenterX()-ea.getCenterX())/u.view.scale,X=(ra.getCenterY()-ea.getCenterY())/u.view.scale)}}}}E=W.apply(this,arguments);if(null!=E&&null!=M&&E.length==M.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(M[R])&&(ba=u.getIncomingTreeEdges(M[R]),0<ba.length))if(!ja)m(Q)&&
-0>mxUtils.indexOf(M,this.model.getTerminal(ba[0],!0))&&this.model.setTerminal(ba[0],Q,!0);else if(0==u.getIncomingTreeEdges(E[R]).length){Y=Q;if(null==Y||Y==u.model.getParent(M[R]))Y=u.model.getTerminal(ba[0],!0);ja=this.cloneCell(ba[0]);this.addEdge(ja,u.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(M,aa,X,ja){var ca=u.model,ka=null;ca.beginUpdate();try{if(ka=T.apply(this,arguments),m(M))for(var q=
-0;q<ka.length;q++)if(ca.isEdge(ka[q])&&null==ca.getTerminal(ka[q],!0)){ca.setTerminal(ka[q],M,!0);var E=u.getCellGeometry(ka[q]);E.points=null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{ca.endUpdate()}return ka}}var Z={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},N=y.onKeyDown;y.onKeyDown=function(M){try{if(u.isEnabled()&&!u.isEditing()&&m(u.getSelectionCell())&&1==u.getSelectionCount()){var aa=
-null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==M.which?aa=mxEvent.isShiftDown(M)?d(u.getSelectionCell()):f(u.getSelectionCell()):13==M.which&&(aa=P(u.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=aa&&0<aa.length)1==aa.length&&u.model.isEdge(aa[0])?u.setSelectionCell(u.model.getTerminal(aa[0],!1)):u.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(M);
-else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var X=Z[M.keyCode];null!=X&&(X.funct(M),mxEvent.consume(M))}else 37==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(x(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(x(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(ja){y.handleError(ja)}mxEvent.isConsumed(M)||
-N.apply(this,arguments)};var qa=u.connectVertex;u.connectVertex=function(M,aa,X,ja,ca,ka,q){var E=u.getIncomingTreeEdges(M);if(m(M)){var Q=K(M),Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(M,aa):Y==R?d(M):P(M,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return qa.apply(this,arguments)};u.getSubtree=function(M){var aa=[M];!C(M)&&!m(M)||F(M)||u.traverse(M,!0,function(X,
-ja){var ca=null!=ja&&u.isTreeEdge(ja);ca&&0>mxUtils.indexOf(aa,ja)&&aa.push(ja);(null==ja||ca)&&0>mxUtils.indexOf(aa,X)&&aa.push(X);return null==ja||ca});return aa};var oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){oa.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position=
-"absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;y.hoverIcons.reset();
-mxEvent.consume(M)})))};var S=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){S.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 fa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){fa.apply(this,arguments);null!=this.moveHandle&&
-(this.moveHandle.style.display=M?"":"none")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(M,aa){ia.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",
-new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');K.vertex=
-!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(K);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var K=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};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-y.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;F.insertEdge(u,!0);y.insertEdge(u,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(u);p.insert(F);p.insert(K);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+!1),m=C.nextSibling,C.parentNode.removeChild(C),C=m;null!=C;){m=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=m}}return k};b.afterDecode=function(e,k,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,C,p,F,L){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var P=p.slice(),d=0;d<p.length;d++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[d]),"treeFolding","0")&&this.foldTreeCell(m,p[d]);p=P;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(m,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(L,P){var d=null!=P&&this.isTreeEdge(P);d&&p.push(P);L==C||null!=P&&!d||p.push(L);return(null==P||d)&&(L==C||!this.model.isCollapsed(L))}));this.model.setCollapsed(C,m);for(var F=0;F<p.length;F++)this.model.setVisible(p[F],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,C,p,F,L,P){return this.model.filterCells(this.getEdges(m,
+C,p,F,L,P),mxUtils.bind(this,function(d){return this.isTreeEdge(d)}))};Graph.prototype.getIncomingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,C){return this.getTreeEdges(m,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(N){return G.isVertex(N)&&p(N)}function C(N){var aa=
+!1;null!=N&&(aa="1"==t.getCurrentCellStyle(N).treeMoving);return aa}function p(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),aa="tree"==(null!=aa?aa.style:t.getCellStyle(N)).containerType);return aa}function F(N){var aa=!1;null!=N&&(N=G.getParent(N),aa=t.view.getState(N),t.view.getState(N),aa=null!=(null!=aa?aa.style:t.getCellStyle(N)).childLayout);return aa}function L(N){N=t.view.getState(N);if(null!=N){var aa=t.getIncomingTreeEdges(N.cell);if(0<aa.length&&(aa=t.view.getState(aa[0]),
+null!=aa&&(aa=aa.absolutePoints,null!=aa&&0<aa.length&&(aa=aa[aa.length-1],null!=aa)))){if(aa.y==N.y&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_SOUTH;if(aa.y==N.y+N.height&&Math.abs(aa.x-N.getCenterX())<N.width/2)return mxConstants.DIRECTION_NORTH;if(aa.x>N.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function P(N,aa){aa=null!=aa?aa:!0;t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=t.cloneCells([ha[0],
+N]);t.model.setTerminal(X[0],t.model.getTerminal(ha[0],!0),!0);var ia=L(N),q=V.geometry;ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?X[1].geometry.x+=aa?N.geometry.width+10:-X[1].geometry.width-10:X[1].geometry.y+=aa?N.geometry.height+10:-X[1].geometry.height-10;t.view.currentRoot!=V&&(X[1].geometry.x-=q.x,X[1].geometry.y-=q.y);var E=t.view.getState(N),Q=t.view.scale;if(null!=E){var Y=mxRectangle.fromRectangle(E);ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH?
+Y.x+=(aa?N.geometry.width+10:-X[1].geometry.width-10)*Q:Y.y+=(aa?N.geometry.height+10:-X[1].geometry.height-10)*Q;var R=t.getOutgoingTreeEdges(t.model.getTerminal(ha[0],!0));if(null!=R){for(var Z=ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NORTH,da=q=ha=0;da<R.length;da++){var qa=t.model.getTerminal(R[da],!1);if(ia==L(qa)){var va=t.view.getState(qa);qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY())&&mxUtils.intersects(Y,va)&&(ha=10+Math.max(ha,
+(Math.min(Y.x+Y.width,va.x+va.width)-Math.max(Y.x,va.x))/Q),q=10+Math.max(q,(Math.min(Y.y+Y.height,va.y+va.height)-Math.max(Y.y,va.y))/Q))}}Z?q=0:ha=0;for(da=0;da<R.length;da++)if(qa=t.model.getTerminal(R[da],!1),ia==L(qa)&&(va=t.view.getState(qa),qa!=N&&null!=va&&(Z&&aa!=va.getCenterX()<E.getCenterX()||!Z&&aa!=va.getCenterY()<E.getCenterY()))){var ja=[];t.traverse(va.cell,!0,function(sa,ya){var Aa=null!=ya&&t.isTreeEdge(ya);Aa&&ja.push(ya);(null==ya||Aa)&&ja.push(sa);return null==ya||Aa});t.moveCells(ja,
+(aa?1:-1)*ha,(aa?1:-1)*q)}}}return t.addCells(X,V)}finally{t.model.endUpdate()}}function d(N){t.model.beginUpdate();try{var aa=L(N),V=t.getIncomingTreeEdges(N),ha=t.cloneCells([V[0],N]);t.model.setTerminal(V[0],ha[1],!1);t.model.setTerminal(ha[0],ha[1],!0);t.model.setTerminal(ha[0],N,!1);var X=t.model.getParent(N),ia=X.geometry,q=[];t.view.currentRoot!=X&&(ha[1].geometry.x-=ia.x,ha[1].geometry.y-=ia.y);t.traverse(N,!0,function(Y,R){var Z=null!=R&&t.isTreeEdge(R);Z&&q.push(R);(null==R||Z)&&q.push(Y);
+return null==R||Z});var E=N.geometry.width+40,Q=N.geometry.height+40;aa==mxConstants.DIRECTION_SOUTH?E=0:aa==mxConstants.DIRECTION_NORTH?(E=0,Q=-Q):aa==mxConstants.DIRECTION_WEST?(E=-E,Q=0):aa==mxConstants.DIRECTION_EAST&&(Q=0);t.moveCells(q,E,Q);return t.addCells(ha,X)}finally{t.model.endUpdate()}}function f(N,aa){t.model.beginUpdate();try{var V=t.model.getParent(N),ha=t.getIncomingTreeEdges(N),X=L(N);0==ha.length&&(ha=[t.createEdge(V,null,"",null,null,t.createCurrentEdgeStyle())],X=aa);var ia=t.cloneCells([ha[0],
+N]);t.model.setTerminal(ia[0],N,!0);if(null==t.model.getTerminal(ia[0],!1)){t.model.setTerminal(ia[0],ia[1],!1);var q=t.getCellStyle(ia[1]).newEdgeStyle;if(null!=q)try{var E=JSON.parse(q),Q;for(Q in E)t.setCellStyles(Q,E[Q],[ia[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==E[Q]&&t.setCellStyles("elbow",X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ia[0]])}catch(va){}}ha=t.getOutgoingTreeEdges(N);var Y=V.geometry;aa=[];t.view.currentRoot==V&&(Y=new mxRectangle);for(q=
+0;q<ha.length;q++){var R=t.model.getTerminal(ha[q],!1);null!=R&&aa.push(R)}var Z=t.view.getBounds(aa),da=t.view.translate,qa=t.view.scale;X==mxConstants.DIRECTION_SOUTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x-Y.x+10,ia[1].geometry.y+=ia[1].geometry.height-Y.y+40):X==mxConstants.DIRECTION_NORTH?(ia[1].geometry.x=null==Z?N.geometry.x+(N.geometry.width-ia[1].geometry.width)/2:(Z.x+Z.width)/qa-da.x+-Y.x+10,ia[1].geometry.y-=ia[1].geometry.height+
+Y.y+40):(ia[1].geometry.x=X==mxConstants.DIRECTION_WEST?ia[1].geometry.x-(ia[1].geometry.width+Y.x+40):ia[1].geometry.x+(ia[1].geometry.width-Y.x+40),ia[1].geometry.y=null==Z?N.geometry.y+(N.geometry.height-ia[1].geometry.height)/2:(Z.y+Z.height)/qa-da.y+-Y.y+10);return t.addCells(ia,V)}finally{t.model.endUpdate()}}function g(N,aa,V){N=t.getOutgoingTreeEdges(N);V=t.view.getState(V);var ha=[];if(null!=V&&null!=N){for(var X=0;X<N.length;X++){var ia=t.view.getState(t.model.getTerminal(N[X],!1));null!=
+ia&&(!aa&&Math.min(ia.x+ia.width,V.x+V.width)>=Math.max(ia.x,V.x)||aa&&Math.min(ia.y+ia.height,V.y+V.height)>=Math.max(ia.y,V.y))&&ha.push(ia)}ha.sort(function(q,E){return aa?q.x+q.width-E.x-E.width:q.y+q.height-E.y-E.height})}return ha}function x(N,aa){var V=L(N),ha=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==ha&&V!=aa?y.actions.get("selectParent").funct():V==aa?(aa=t.getOutgoingTreeEdges(N),null!=aa&&0<aa.length&&
+t.setSelectionCell(t.model.getTerminal(aa[0],!1))):(V=t.getIncomingTreeEdges(N),null!=V&&0<V.length&&(ha=g(t.model.getTerminal(V[0],!0),ha,N),N=t.view.getState(N),null!=N&&(N=mxUtils.indexOf(ha,N),0<=N&&(N+=aa==mxConstants.DIRECTION_NORTH||aa==mxConstants.DIRECTION_WEST?-1:1,0<=N&&N<=ha.length-1&&t.setSelectionCell(ha[N].cell)))))}var y=this,t=y.editor.graph,G=t.getModel(),D=y.menus.createPopupMenu;y.menus.createPopupMenu=function(N,aa,V){D.apply(this,arguments);if(1==t.getSelectionCount()){aa=t.getSelectionCell();
+var ha=t.getOutgoingTreeEdges(aa);N.addSeparator();0<ha.length&&(m(t.getSelectionCell())&&this.addMenuItems(N,["selectChildren"],null,V),this.addMenuItems(N,["selectDescendants"],null,V));m(t.getSelectionCell())?(N.addSeparator(),0<t.getIncomingTreeEdges(aa).length&&this.addMenuItems(N,["selectSiblings","selectParent"],null,V)):0<t.model.getEdgeCount(aa)&&this.addMenuItems(N,["selectConnections"],null,V)}};y.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=
+t.getSelectionCell();N=t.getOutgoingTreeEdges(N);if(null!=N){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},null,null,"Alt+Shift+X");y.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);if(null!=N&&0<N.length&&(N=t.getOutgoingTreeEdges(t.model.getTerminal(N[0],!0)),null!=N)){for(var aa=[],V=0;V<N.length;V++)aa.push(t.model.getTerminal(N[V],!1));t.setSelectionCells(aa)}}},
+null,null,"Alt+Shift+S");y.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var N=t.getSelectionCell();N=t.getIncomingTreeEdges(N);null!=N&&0<N.length&&t.setSelectionCell(t.model.getTerminal(N[0],!0))}},null,null,"Alt+Shift+P");y.actions.addAction("selectDescendants",function(N,aa){N=t.getSelectionCell();if(t.isEnabled()&&t.model.isVertex(N)){if(null!=aa&&mxEvent.isAltDown(aa))t.setSelectionCells(t.model.getTreeEdges(N,null==aa||!mxEvent.isShiftDown(aa),null==
+aa||!mxEvent.isControlDown(aa)));else{var V=[];t.traverse(N,!0,function(ha,X){var ia=null!=X&&t.isTreeEdge(X);ia&&V.push(X);null!=X&&!ia||null!=aa&&mxEvent.isShiftDown(aa)||V.push(ha);return null==X||ia})}t.setSelectionCells(V)}},null,null,"Alt+Shift+D");var I=t.removeCells;t.removeCells=function(N,aa){aa=null!=aa?aa:!0;null==N&&(N=this.getDeletableCells(this.getSelectionCells()));aa&&(N=this.getDeletableCells(this.addAllEdges(N)));for(var V=[],ha=0;ha<N.length;ha++){var X=N[ha];G.isEdge(X)&&p(X)&&
+(V.push(X),X=G.getTerminal(X,!1));if(m(X)){var ia=[];t.traverse(X,!0,function(q,E){var Q=null!=E&&t.isTreeEdge(E);Q&&ia.push(E);(null==E||Q)&&ia.push(q);return null==E||Q});0<ia.length&&(V=V.concat(ia),X=t.getIncomingTreeEdges(N[ha]),N=N.concat(X))}else null!=X&&V.push(N[ha])}N=V;return I.apply(this,arguments)};y.hoverIcons.getStateAt=function(N,aa,V){return m(N.cell)?null:this.graph.view.getState(this.graph.getCellAt(aa,V))};var H=t.duplicateCells;t.duplicateCells=function(N,aa){N=null!=N?N:this.getSelectionCells();
+for(var V=N.slice(0),ha=0;ha<V.length;ha++){var X=t.view.getState(V[ha]);if(null!=X&&m(X.cell)){var ia=t.getIncomingTreeEdges(X.cell);for(X=0;X<ia.length;X++)mxUtils.remove(ia[X],N)}}this.model.beginUpdate();try{var q=H.call(this,N,aa);if(q.length==N.length)for(ha=0;ha<N.length;ha++)if(m(N[ha])){var E=t.getIncomingTreeEdges(q[ha]);ia=t.getIncomingTreeEdges(N[ha]);if(0==E.length&&0<ia.length){var Q=this.cloneCell(ia[0]);this.addEdge(Q,t.getDefaultParent(),this.model.getTerminal(ia[0],!0),q[ha])}}}finally{this.model.endUpdate()}return q};
+var S=t.moveCells;t.moveCells=function(N,aa,V,ha,X,ia,q){var E=null;this.model.beginUpdate();try{var Q=X,Y=this.getCurrentCellStyle(X);if(null!=N&&m(X)&&"1"==mxUtils.getValue(Y,"treeFolding","0")){for(var R=0;R<N.length;R++)if(m(N[R])||t.model.isEdge(N[R])&&null==t.model.getTerminal(N[R],!0)){X=t.model.getParent(N[R]);break}if(null!=Q&&X!=Q&&null!=this.view.getState(N[0])){var Z=t.getIncomingTreeEdges(N[0]);if(0<Z.length){var da=t.view.getState(t.model.getTerminal(Z[0],!0));if(null!=da){var qa=t.view.getState(Q);
+null!=qa&&(aa=(qa.getCenterX()-da.getCenterX())/t.view.scale,V=(qa.getCenterY()-da.getCenterY())/t.view.scale)}}}}E=S.apply(this,arguments);if(null!=E&&null!=N&&E.length==N.length)for(R=0;R<E.length;R++)if(this.model.isEdge(E[R]))m(Q)&&0>mxUtils.indexOf(E,this.model.getTerminal(E[R],!0))&&this.model.setTerminal(E[R],Q,!0);else if(m(N[R])&&(Z=t.getIncomingTreeEdges(N[R]),0<Z.length))if(!ha)m(Q)&&0>mxUtils.indexOf(N,this.model.getTerminal(Z[0],!0))&&this.model.setTerminal(Z[0],Q,!0);else if(0==t.getIncomingTreeEdges(E[R]).length){Y=
+Q;if(null==Y||Y==t.model.getParent(N[R]))Y=t.model.getTerminal(Z[0],!0);ha=this.cloneCell(Z[0]);this.addEdge(ha,t.getDefaultParent(),Y,E[R])}}finally{this.model.endUpdate()}return E};if(null!=y.sidebar){var T=y.sidebar.dropAndConnect;y.sidebar.dropAndConnect=function(N,aa,V,ha){var X=t.model,ia=null;X.beginUpdate();try{if(ia=T.apply(this,arguments),m(N))for(var q=0;q<ia.length;q++)if(X.isEdge(ia[q])&&null==X.getTerminal(ia[q],!0)){X.setTerminal(ia[q],N,!0);var E=t.getCellGeometry(ia[q]);E.points=
+null;null!=E.getTerminalPoint(!0)&&E.setTerminalPoint(null,!0)}}finally{X.endUpdate()}return ia}}var M={88:y.actions.get("selectChildren"),84:y.actions.get("selectSubtree"),80:y.actions.get("selectParent"),83:y.actions.get("selectSiblings")},fa=y.onKeyDown;y.onKeyDown=function(N){try{if(t.isEnabled()&&!t.isEditing()&&m(t.getSelectionCell())&&1==t.getSelectionCount()){var aa=null;0<t.getIncomingTreeEdges(t.getSelectionCell()).length&&(9==N.which?aa=mxEvent.isShiftDown(N)?d(t.getSelectionCell()):f(t.getSelectionCell()):
+13==N.which&&(aa=P(t.getSelectionCell(),!mxEvent.isShiftDown(N))));if(null!=aa&&0<aa.length)1==aa.length&&t.model.isEdge(aa[0])?t.setSelectionCell(t.model.getTerminal(aa[0],!1)):t.setSelectionCell(aa[aa.length-1]),null!=y.hoverIcons&&y.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(N);else if(mxEvent.isAltDown(N)&&mxEvent.isShiftDown(N)){var V=M[N.keyCode];null!=V&&(V.funct(N),mxEvent.consume(N))}else 37==N.keyCode?(x(t.getSelectionCell(),
+mxConstants.DIRECTION_WEST),mxEvent.consume(N)):38==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(N)):39==N.keyCode?(x(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(N)):40==N.keyCode&&(x(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(N))}}catch(ha){y.handleError(ha)}mxEvent.isConsumed(N)||fa.apply(this,arguments)};var la=t.connectVertex;t.connectVertex=function(N,aa,V,ha,X,ia,q){var E=t.getIncomingTreeEdges(N);if(m(N)){var Q=L(N),
+Y=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=aa==mxConstants.DIRECTION_EAST||aa==mxConstants.DIRECTION_WEST;return Q==aa||0==E.length?f(N,aa):Y==R?d(N):P(N,aa!=mxConstants.DIRECTION_NORTH&&aa!=mxConstants.DIRECTION_WEST)}return la.apply(this,arguments)};t.getSubtree=function(N){var aa=[N];!C(N)&&!m(N)||F(N)||t.traverse(N,!0,function(V,ha){var X=null!=ha&&t.isTreeEdge(ha);X&&0>mxUtils.indexOf(aa,ha)&&aa.push(ha);(null==ha||X)&&0>mxUtils.indexOf(aa,V)&&aa.push(V);return null==ha||
+X});return aa};var ra=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ra.apply(this,arguments);(C(this.state.cell)||m(this.state.cell))&&!F(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(N){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(N),mxEvent.getClientY(N),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(N);this.graph.isMouseDown=!0;y.hoverIcons.reset();mxEvent.consume(N)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(N){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=N?"":"none")};var na=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(N,aa){na.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=k.apply(this,arguments),C=this.graph;return m.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=
+!0;var F=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var L=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);p.insert(P);p.insert(F);p.insert(L);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var F=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+F.vertex=!0;var L=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");P.geometry.relative=!0;P.edge=!0;
+F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+x.geometry.relative=!0;x.edge=!0;F.insertEdge(x,!0);g.insertEdge(x,!1);var y=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');y.vertex=!0;var t=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;F.insertEdge(t,!0);y.insertEdge(t,!1);p.insert(P);p.insert(f);p.insert(x);p.insert(t);p.insert(F);p.insert(L);p.insert(d);p.insert(g);p.insert(y);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.setTerminalPoint(new mxPoint(-40,40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var K=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"};');
-K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);K.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(K);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
+p.vertex=!0;var F=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(F,"treeRoot","1");F.vertex=!0;var L=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");P.geometry.relative=!0;P.edge=!0;F.insertEdge(P,!0);L.insertEdge(P,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+f.geometry.relative=!0;f.edge=!0;F.insertEdge(f,!0);d.insertEdge(f,!1);p.insert(P);p.insert(f);p.insert(F);p.insert(L);p.insert(d);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
F.geometry.setTerminalPoint(new mxPoint(0,0),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);return sb.createVertexTemplateFromCells([p,F],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var K=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");K.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
-!0;P.edge=!0;K.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,K],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.formatWindow){G="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var T="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;W="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,W.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),G,T,240,W,
-function(Z){D.createFormat(Z).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=G?G:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
-D.formatElt.style.right="0px"),W=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),W.style.right="0px"):(W.parentNode.appendChild(D.formatElt),W.style.right=D.formatElt.style.width)}function e(D,G){function W(qa,oa){var S=D.menus.get(qa);qa=N.addMenu(oa,mxUtils.bind(this,function(){S.funct.apply(this,arguments)}));qa.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;";
-qa.className="geTitle";G.appendChild(qa);return qa}var T=document.createElement("div");T.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;";T.className="geTitle";var Z=document.createElement("span");Z.style.fontSize="18px";Z.style.marginRight="5px";Z.innerHTML="+";T.appendChild(Z);mxUtils.write(T,mxResources.get("moreShapes"));G.appendChild(T);mxEvent.addListener(T,"click",function(){D.actions.get("shapes").funct()});
-var N=new Menubar(D,G);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?T.style.bottom="0":null!=D.actions.get("newLibrary")?(T=document.createElement("div"),T.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("newLibrary")),T.appendChild(Z),
-G.appendChild(T),mxEvent.addListener(T,"click",D.actions.get("newLibrary").funct),T=document.createElement("div"),T.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;",T.className="geTitle",Z=document.createElement("span"),Z.style.cssText="position:relative;top:6px;",mxUtils.write(Z,mxResources.get("openLibrary")),T.appendChild(Z),G.appendChild(T),mxEvent.addListener(T,
-"click",D.actions.get("openLibrary").funct)):(T=W("newLibrary",mxResources.get("newLibrary")),T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="0",T=W("openLibraryFrom",mxResources.get("openLibraryFrom")),T.style.borderLeft="1px solid lightgray",T.style.boxSizing="border-box",T.style.paddingRight="6px",T.style.paddingLeft="6px",T.style.height="32px",T.style.left="50%");G.appendChild(D.sidebar.container);G.style.overflow="hidden"}
-function k(D,G){if(EditorUi.windowed){var W=D.editor.graph;W.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){G=Math.min(W.container.clientWidth-10,218);var T="1"==urlParams.embedInline?650:Math.min(W.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(W.container.clientHeight-T)/2):56,G-6,T-6,function(Z){e(D,Z)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(Z){D.sidebar.showEntries(Z,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=G?G:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
-D.sidebarElt.style.borderRight="1px solid gray"),W=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),W.style.left="0px"):(W.parentNode.appendChild(D.sidebarElt),W.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
+F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;p.insertEdge(F,!1);var L=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");L.vertex=!0;var P=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");P.geometry.setTerminalPoint(new mxPoint(110,-40),!0);P.geometry.relative=
+!0;P.edge=!0;L.insertEdge(P,!1);return sb.createVertexTemplateFromCells([F,P,p,L],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.formatWindow){I="1"==urlParams.sketch?Math.max(10,D.diagramContainer.clientWidth-241):Math.max(10,D.diagramContainer.clientWidth-248);var S="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;H="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,H.container.clientHeight-10);D.formatWindow=new WrapperWindow(D,mxResources.get("format"),I,S,240,H,
+function(T){D.createFormat(T).init()});D.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){D.formatWindow.window.fit()}));D.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else D.formatWindow.window.setVisible(null!=I?I:!D.formatWindow.window.isVisible())}else null==D.formatElt&&(D.formatElt=D.createSidebarContainer(),D.createFormat(D.formatElt).init(),D.formatElt.style.border="none",D.formatElt.style.width="240px",D.formatElt.style.borderLeft="1px solid gray",
+D.formatElt.style.right="0px"),H=D.diagramContainer.parentNode,null!=D.formatElt.parentNode?(D.formatElt.parentNode.removeChild(D.formatElt),H.style.right="0px"):(H.parentNode.appendChild(D.formatElt),H.style.right=D.formatElt.style.width)}function e(D,I){function H(fa,la){var ra=D.menus.get(fa);fa=M.addMenu(la,mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}));fa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+fa.className="geTitle";I.appendChild(fa);return fa}var S=document.createElement("div");S.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";S.className="geTitle";var T=document.createElement("span");T.style.fontSize="18px";T.style.marginRight="5px";T.innerHTML="+";S.appendChild(T);mxUtils.write(S,mxResources.get("moreShapes"));I.appendChild(S);mxEvent.addListener(S,"click",function(){D.actions.get("shapes").funct()});
+var M=new Menubar(D,I);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?S.style.bottom="0":null!=D.actions.get("newLibrary")?(S=document.createElement("div"),S.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("newLibrary")),S.appendChild(T),
+I.appendChild(S),mxEvent.addListener(S,"click",D.actions.get("newLibrary").funct),S=document.createElement("div"),S.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",S.className="geTitle",T=document.createElement("span"),T.style.cssText="position:relative;top:6px;",mxUtils.write(T,mxResources.get("openLibrary")),S.appendChild(T),I.appendChild(S),mxEvent.addListener(S,
+"click",D.actions.get("openLibrary").funct)):(S=H("newLibrary",mxResources.get("newLibrary")),S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="0",S=H("openLibraryFrom",mxResources.get("openLibraryFrom")),S.style.borderLeft="1px solid lightgray",S.style.boxSizing="border-box",S.style.paddingRight="6px",S.style.paddingLeft="6px",S.style.height="32px",S.style.left="50%");I.appendChild(D.sidebar.container);I.style.overflow="hidden"}
+function k(D,I){if(EditorUi.windowed){var H=D.editor.graph;H.popupMenuHandler.hideMenu();if(null==D.sidebarWindow){I=Math.min(H.container.clientWidth-10,218);var S="1"==urlParams.embedInline?650:Math.min(H.container.clientHeight-40,650);D.sidebarWindow=new WrapperWindow(D,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(H.container.clientHeight-S)/2):56,I-6,S-6,function(T){e(D,T)});D.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){D.sidebarWindow.window.fit()}));D.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);D.sidebarWindow.window.setVisible(!0);isLocalStorage&&D.getLocalData("sidebar",function(T){D.sidebar.showEntries(T,null,!0)});D.restoreLibraries()}else D.sidebarWindow.window.setVisible(null!=I?I:!D.sidebarWindow.window.isVisible())}else null==D.sidebarElt&&(D.sidebarElt=D.createSidebarContainer(),e(D,D.sidebarElt),D.sidebarElt.style.border="none",D.sidebarElt.style.width="210px",
+D.sidebarElt.style.borderRight="1px solid gray"),H=D.diagramContainer.parentNode,null!=D.sidebarElt.parentNode?(D.sidebarElt.parentNode.removeChild(D.sidebarElt),H.style.left="0px"):(H.parentNode.appendChild(D.sidebarElt),H.style.left=D.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var m=0;try{m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(D){}Editor.checkmarkImage=
Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,G){null!=G.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",G.shortcut):F.apply(this,arguments)};var K=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){K.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
-D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var G=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var T=document.createElement("img");T.setAttribute("border","0");T.style.position="absolute";
-T.style.left="18px";T.style.top="2px";T.style.width="12px";T.style.height="12px";var Z=W.getRealtimeError();W=W.getRealtimeState();G+=" ("+mxResources.get("realtimeCollaboration");1==W?(T.src=Editor.syncImage,G+=mxResources.get("online")):(T.src=Editor.syncProblemImage,G=null!=Z&&null!=Z.message?G+Z.message:G+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(T);G+=")"}}D.setAttribute("title",G)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
-function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var G=document.createElement("a");G.className="geMenuItem gePrimaryBtn";G.style.marginLeft="8px";G.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
-urlParams.saveAndExit){var W="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(G,W);G.setAttribute("title",W);mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(G)}}else mxUtils.write(G,mxResources.get("save")),G.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(G),
-"1"==urlParams.saveAndExit&&(G=document.createElement("a"),mxUtils.write(G,mxResources.get("saveAndExit")),G.setAttribute("title",mxResources.get("saveAndExit")),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(G));"1"!=urlParams.noExitBtn&&(G=document.createElement("a"),W="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(G,
-W),G.setAttribute("title",W),G.className="geMenuItem",G.style.marginLeft="6px",G.style.padding="6px",mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(G));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(D,G){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,
-D)){var W=mxUtils.getOffset(this.editorUi.picker);W.x+=this.editorUi.picker.offsetWidth+4;W.y+=D.offsetTop-G.height/2+16;return W}var T=d.apply(this,arguments);W=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);T.x+=W.x-16;T.y+=W.y;return T};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,G,W){var T=this.editorUi.editor.graph;D.smartSeparators=!0;f.apply(this,arguments);"1"==urlParams.sketch?T.isEnabled()&&(D.addSeparator(),1==T.getSelectionCount()&&this.addMenuItems(D,
-["-","lockUnlock"],null,W)):1==T.getSelectionCount()?(T.isCellFoldable(T.getSelectionCell())&&this.addMenuItems(D,T.isCellCollapsed(G)?["expand"]:["collapse"],null,W),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,W),D.addSeparator(),this.addSubmenu("layout",D)):T.isSelectionEmpty()&&T.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,W),D.addSeparator(),this.addSubmenu("layout",D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,W)):
-T.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,W)};var g=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,G,W){g.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,W)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var x=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.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);x.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){y.apply(this,arguments);if(D){var G=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=G&&
-null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=G||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var D=this.editorUi,G=D.actions.put("togglePagesVisible",
-new Action(mxResources.get("pages"),function(S){D.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));G=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));G.shortcut=D.actions.get("formatPanel").shortcut;G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var S=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(S.container,620,420,!0,!1);S.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var S=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(S.container,620,420,!0,!1);S.init()}));var W=
-this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(S,fa){var ia=this.editorUi.editor.graph,M=ia.getSelectionCell();W.call(this,S,M,null,fa);this.addMenuItems(S,["editTooltip"],fa);ia.model.isVertex(M)&&this.addMenuItems(S,["editGeometry"],fa);this.addMenuItems(S,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(S,fa,ia,M){S.addSeparator();this.addSubmenu("editCell",S,M,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(S,fa){var ia=
-D.getCurrentFile();D.menus.addMenuItems(S,["new"],fa);D.menus.addSubmenu("openFrom",S,fa);isLocalStorage&&this.addSubmenu("openRecent",S,fa);S.addSeparator(fa);D.menus.addMenuItems(S,["-","save"],fa);null!=ia&&ia.constructor==DriveFile||D.menus.addMenuItems(S,["saveAs"],fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile&&null==ia.fileHandle||D.menus.addMenuItems(S,["synchronize"],fa);null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,"- rename makeCopy - moveToFolder openFolder".split(" "),
-fa):(D.menus.addMenuItems(S,["-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa);if(null!=ia){if(null!=D.fileNode&&"1"!=urlParams.embedInline){var M=null!=ia.getTitle()?ia.getTitle():D.defaultFilename;(ia.constructor==DriveFile&&null!=ia.sync&&ia.sync.isConnected()||!/(\.html)$/i.test(M)&&
-!/(\.svg)$/i.test(M))&&this.addMenuItems(S,["properties"],fa)}ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa)}D.menus.addMenuItems(S,["-","autosave"],fa)})));this.put("diagram",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();D.menus.addSubmenu("extras",S,fa,mxResources.get("preferences"));S.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)D.menus.addMenuItems(S,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||
-D.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&D.menus.addMenuItems(S,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||D.mode==App.MODE_ATLAS)D.menus.addMenuItems(S,["saveAndExit"],fa),null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["revisionHistory"],fa);S.addSeparator(fa)}else D.mode==App.MODE_ATLAS?D.menus.addMenuItems(S,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?
-(D.menus.addMenuItems(S,["new"],fa),D.menus.addSubmenu("openFrom",S,fa),isLocalStorage&&this.addSubmenu("openRecent",S,fa),S.addSeparator(fa),null!=ia&&(ia.constructor==DriveFile&&D.menus.addMenuItems(S,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ia.constructor==LocalFile||D.menus.addMenuItems(S,["synchronize"],fa)),S.addSeparator(fa),D.menus.addSubmenu("save",S,fa)):D.menus.addSubmenu("file",S,fa));D.menus.addSubmenu("exportAs",S,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-D.menus.addMenuItems(S,["import"],fa):"1"!=urlParams.noFileMenu&&D.menus.addSubmenu("importFrom",S,fa);D.menus.addMenuItems(S,["-","findReplace"],fa);D.commentsSupported()&&D.menus.addMenuItems(S,["comments","-"],fa);D.menus.addMenuItems(S,["toggleFormat","layers","tags","-","pageSetup"],fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||D.menus.addMenuItems(S,["print"],fa);"1"!=urlParams.sketch&&null!=ia&&null!=D.fileNode&&"1"!=urlParams.embedInline&&(ia=null!=ia.getTitle()?ia.getTitle():
-D.defaultFilename,/(\.html)$/i.test(ia)||/(\.svg)$/i.test(ia)||this.addMenuItems(S,["-","properties"]));S.addSeparator(fa);D.menus.addSubmenu("help",S,fa);"1"==urlParams.embed||D.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||D.mode==App.MODE_ATLAS)&&D.menus.addMenuItems(S,["-","exit"],fa):"1"!=urlParams.noFileMenu&&D.menus.addMenuItems(S,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(S,fa){var ia=D.getCurrentFile();null!=ia&&ia.constructor==DriveFile?D.menus.addMenuItems(S,
-["save","makeCopy","-","rename","moveToFolder"],fa):(D.menus.addMenuItems(S,["save","saveAs","-","rename"],fa),D.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(S,["upload"],fa):D.menus.addMenuItems(S,["makeCopy"],fa));D.menus.addMenuItems(S,["-","autosave"],fa);null!=ia&&ia.isRevisionHistorySupported()&&D.menus.addMenuItems(S,["-","revisionHistory"],fa)})));var T=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(S,fa){T.funct(S,
-fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||D.menus.addMenuItems(S,["publishLink"],fa);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(S.addSeparator(fa),D.menus.addSubmenu("embed",S,fa))})));var Z=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(S,fa){D.menus.addInsertTableCellItem(S,fa)})));var N=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(S,fa){N.funct(S,fa);this.addMenuItems(S,["-","ruler","-","pageScale"],fa)})));this.put("extras",new Menu(mxUtils.bind(this,
-function(S,fa){null==Z||"1"==urlParams.embed&&null!=urlParams.lang||D.menus.addSubmenu("language",S,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&D.mode!=App.MODE_ATLAS&&D.menus.addSubmenu("theme",S,fa);D.menus.addSubmenu("units",S,fa);S.addSeparator(fa);"1"!=urlParams.sketch&&D.menus.addMenuItems(S,["scrollbars","-","tooltips","copyConnect","collapseExpand"],fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&D.mode!=App.MODE_ATLAS&&
-D.menus.addMenuItems(S,["-","showStartScreen","search","scratchpad"],fa);S.addSeparator(fa);"1"==urlParams.sketch&&D.menus.addMenuItems(S,["copyConnect","collapseExpand","tooltips","-"],fa);EditorUi.isElectronApp&&D.menus.addMenuItems(S,["-","spellCheck","autoBkp","drafts","-"],fa);var ia=D.getCurrentFile();null!=ia&&ia.isRealtimeEnabled()&&ia.isRealtimeSupported()&&this.addMenuItems(S,["-","showRemoteCursors","shareCursor","-"],fa);Graph.translateDiagram&&D.menus.addMenuItems(S,["diagramLanguage"],
-fa);D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"configuration",fa);"1"!=urlParams.sketch&&!D.isOfflineApp()&&isLocalStorage&&D.mode!=App.MODE_ATLAS&&D.menus.addMenuItem(S,"plugins",fa);S.addSeparator(fa)})));mxUtils.bind(this,function(){var S=this.get("insert"),fa=S.funct;S.funct=function(ia,M){"1"==urlParams.sketch?(D.menus.addMenuItems(ia,["toggleShapes"],M),D.menus.addSubmenu("table",ia,M),ia.addSeparator(M),D.insertTemplateEnabled&&!D.isOffline()&&D.menus.addMenuItems(ia,["insertTemplate"],
-M),D.menus.addMenuItems(ia,["insertImage","insertLink","-"],M),D.menus.addSubmenu("insertAdvanced",ia,M,mxResources.get("advanced")),D.menus.addSubmenu("layout",ia,M)):(fa.apply(this,arguments),D.menus.addSubmenu("table",ia,M))}})();var qa="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),oa=function(S,fa,ia,M){S.addItem(ia,null,mxUtils.bind(this,function(){var aa=new CreateGraphDialog(D,ia,M);D.showDialog(aa.container,620,420,!0,!1);aa.init()}),fa)};
-this.put("insertLayout",new Menu(mxUtils.bind(this,function(S,fa){for(var ia=0;ia<qa.length;ia++)"-"==qa[ia]?S.addSeparator(fa):oa(S,fa,mxResources.get(qa[ia])+"...",qa[ia])})))};EditorUi.prototype.installFormatToolbar=function(D){var G=this.editor.graph,W=document.createElement("div");W.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";G.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(T,Z){0<G.getSelectionCount()?(D.appendChild(W),W.innerHTML="Selected: "+G.getSelectionCount()):null!=W.parentNode&&W.parentNode.removeChild(W)}))};var H=!1;EditorUi.prototype.initFormatWindow=function(){if(!H&&null!=this.formatWindow){H=!0;var D=this.formatWindow.window.toggleMinimized,G=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(G=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",
-this.div.style.left=parseInt(this.div.style.left)+G-140+"px"):(this.div.style.width=G+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-G+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var J=EditorUi.prototype.init;EditorUi.prototype.init=function(){function D(ua,za,Fa){var Ba=
-N.menus.get(ua),Ea=fa.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ba.funct.apply(this,arguments)}),S);Ea.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.top="6px";Ea.style.marginRight="6px";Ea.style.height="30px";Ea.style.paddingTop="6px";Ea.style.paddingBottom="6px";Ea.style.cursor="pointer";Ea.setAttribute("title",mxResources.get(ua));N.menus.menuCreated(Ba,Ea,"geMenuItem");null!=Fa?(Ea.style.backgroundImage=
-"url("+Fa+")",Ea.style.backgroundPosition="center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px",Ea.innerText=""):za||(Ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ea.style.backgroundPosition="right 6px center",Ea.style.backgroundRepeat="no-repeat",Ea.style.paddingRight="22px");return Ea}function G(ua,za,Fa,Ba,Ea,Oa){var Pa=document.createElement("a");Pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";
-Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.height="30px";Pa.style.padding="6px";Pa.style.position="relative";Pa.style.verticalAlign="top";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.borderStyle="none",Pa.style.boxShadow="none",Pa.style.padding="6px",Pa.style.margin="0px");null!=N.statusContainer?oa.insertBefore(Pa,N.statusContainer):oa.appendChild(Pa);null!=Oa?(Pa.style.backgroundImage="url("+Oa+")",Pa.style.backgroundPosition="center center",Pa.style.backgroundRepeat=
-"no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,ua);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(bb){bb.preventDefault()}));mxEvent.addListener(Pa,"click",function(bb){"disabled"!=Pa.getAttribute("disabled")&&za(bb);mxEvent.consume(bb)});null==Fa&&(Pa.style.marginRight="4px");null!=Ba&&Pa.setAttribute("title",Ba);null!=Ea&&(ua=function(){Ea.isEnabled()?(Pa.removeAttribute("disabled"),Pa.style.cursor="pointer"):
-(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ea.addListener("stateChanged",ua),qa.addListener("enabledChanged",ua),ua());return Pa}function W(ua,za,Fa){Fa=document.createElement("div");Fa.className="geMenuItem";Fa.style.display="inline-block";Fa.style.verticalAlign="top";Fa.style.marginRight="6px";Fa.style.padding="0 4px 0 4px";Fa.style.height="30px";Fa.style.position="relative";Fa.style.top="0px";"1"==urlParams.sketch&&(Fa.style.boxShadow="none");for(var Ba=0;Ba<ua.length;Ba++)null!=
-ua[Ba]&&("1"==urlParams.sketch&&(ua[Ba].style.padding="10px 8px",ua[Ba].style.width="30px"),ua[Ba].style.margin="0px",ua[Ba].style.boxShadow="none",Fa.appendChild(ua[Ba]));null!=za&&mxUtils.setOpacity(Fa,za);null!=N.statusContainer&&"1"!=urlParams.sketch?oa.insertBefore(Fa,N.statusContainer):oa.appendChild(Fa);return Fa}function T(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(E.style.left=58>q.offsetTop-q.offsetHeight/2?"70px":"10px");else{for(var ua=oa.firstChild;null!=ua;){var za=ua.nextSibling;
-"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}S=oa.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>m||"1"==urlParams.sketch;var Fa=null;ua||(Fa=D("diagram"));za=ua?D("diagram",null,Editor.menuImage):null;null!=za&&(Fa=za);W([Fa,G(mxResources.get("shapes"),N.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),N.actions.get("image"),ua?Editor.shapesImage:null),G(mxResources.get("format"),N.actions.get("toggleFormat").funct,
-null,mxResources.get("format")+" ("+N.actions.get("formatPanel").shortcut+")",N.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);var Ba=D("insert",!0,ua?ca:null);W([Ba,G(mxResources.get("delete"),N.actions.get("delete").funct,null,mxResources.get("delete"),N.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=m&&(W([Ta,Za],60),520<=m&&W([ha,640<=m?G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",La,Editor.zoomInImage):null,640<=m?G("",Da.funct,!0,mxResources.get("zoomOut")+
-" ("+Editor.ctrlKey+" -)",Da,Editor.zoomOutImage):null],60))}null!=Fa&&(mxEvent.disableContextMenu(Fa),mxEvent.addGestureListeners(Fa,mxUtils.bind(this,function(Ea){(mxEvent.isShiftDown(Ea)||mxEvent.isAltDown(Ea)||mxEvent.isMetaDown(Ea)||mxEvent.isControlDown(Ea)||mxEvent.isPopupTrigger(Ea))&&N.appIconClicked(Ea)}),null,null));za=N.menus.get("1"==urlParams["live-ui"]?"theme":"language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?
-(null==wa&&(Ba=fa.addMenu("",za.funct),Ba.setAttribute("title",mxResources.get("1"==urlParams["live-ui"]?"preferences":"language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="22px 22px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="12px",oa.appendChild(Ba),
-wa=Ba,"1"==urlParams["live-ui"]&&(za=mxUtils.bind(this,function(){Ba.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",za),za())),N.buttonContainer.style.paddingRight="34px"):(N.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}J.apply(this,arguments);var Z=document.createElement("div");Z.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-Z.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(Z);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
-!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var N=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==N.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Fa=N.embedViewport.x+N.embedViewport.width,Ba=parseInt(this.div.offsetTop),Ea=parseInt(this.div.offsetHeight),Oa=N.embedViewport.y+
-N.embedViewport.height;this.div.style.left=Math.max(N.embedViewport.x,Math.min(ua,Fa-za))+"px";this.div.style.top=Math.max(N.embedViewport.y,Math.min(Ba,Oa-Ea))+"px";this.div.style.height=Math.min(N.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(N.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
-(this.initFormatWindow(),Z=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>Z)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));N=this;var qa=N.editor.graph;N.toolbar=this.createToolbar(N.createDiv("geToolbar"));N.defaultLibraryName=mxResources.get("untitledLibrary");var oa=document.createElement("div");oa.className="geMenubarContainer";var S=null,
-fa=new Menubar(N,oa);N.statusContainer=N.createStatusContainer();N.statusContainer.style.position="relative";N.statusContainer.style.maxWidth="";N.statusContainer.style.marginTop="7px";N.statusContainer.style.marginLeft="6px";N.statusContainer.style.color="gray";N.statusContainer.style.cursor="default";var ia=N.hideCurrentMenu;N.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var M=N.descriptorChanged;N.descriptorChanged=function(){M.apply(this,arguments);
-var ua=N.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);oa.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else oa.removeAttribute("title")};N.setStatusText(N.editor.getStatus());oa.appendChild(N.statusContainer);N.buttonContainer=document.createElement("div");N.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-oa.appendChild(N.buttonContainer);N.menubarContainer=N.buttonContainer;N.tabContainer=document.createElement("div");N.tabContainer.className="geTabContainer";N.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";Z=N.diagramContainer.parentNode;var aa=document.createElement("div");aa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";N.diagramContainer.style.top="1"==
-urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){aa.style.top="20px";N.titlebar=document.createElement("div");N.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var X=document.createElement("div");X.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";N.titlebar.appendChild(X);
-Z.appendChild(N.titlebar)}X=N.menus.get("viewZoom");var ja=X.funct;X.funct=function(ua,za){ja.apply(this,arguments);N.menus.addMenuItems(ua,["-","outline","fullscreen"],za)};var ca="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ka="1"==urlParams.sketch?document.createElement("div"):null,q="1"==urlParams.sketch?document.createElement("div"):null,E="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)E.style.left="10px",E.style.top=
-"10px",q.style.left="10px",q.style.top="60px",ka.style.top="10px",ka.style.right="12px",ka.style.left="",N.diagramContainer.setAttribute("data-bounds",N.diagramContainer.style.top+" "+N.diagramContainer.style.left+" "+N.diagramContainer.style.width+" "+N.diagramContainer.style.height),N.diagramContainer.style.top="0px",N.diagramContainer.style.left="0px",N.diagramContainer.style.bottom="0px",N.diagramContainer.style.right="0px",N.diagramContainer.style.width="",N.diagramContainer.style.height="";
-else{var ua=N.diagramContainer.getAttribute("data-bounds");if(null!=ua){N.diagramContainer.style.background="transparent";N.diagramContainer.removeAttribute("data-bounds");var za=qa.getGraphBounds();ua=ua.split(" ");N.diagramContainer.style.top=ua[0];N.diagramContainer.style.left=ua[1];N.diagramContainer.style.width=za.width+50+"px";N.diagramContainer.style.height=za.height+46+"px";N.diagramContainer.style.bottom="";N.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:N.diagramContainer.getBoundingClientRect()}),"*");N.refresh()}E.style.left=N.diagramContainer.offsetLeft+"px";E.style.top=N.diagramContainer.offsetTop-E.offsetHeight-4+"px";q.style.display="";q.style.left=N.diagramContainer.offsetLeft-q.offsetWidth-4+"px";q.style.top=N.diagramContainer.offsetTop+"px";ka.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-ka.offsetWidth+"px";ka.style.top=E.style.top;ka.style.right="";N.bottomResizer.style.left=N.diagramContainer.offsetLeft+
-(N.diagramContainer.offsetWidth-N.bottomResizer.offsetWidth)/2+"px";N.bottomResizer.style.top=N.diagramContainer.offsetTop+N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight/2-1+"px";N.rightResizer.style.left=N.diagramContainer.offsetLeft+N.diagramContainer.offsetWidth-N.rightResizer.offsetWidth/2-1+"px";N.rightResizer.style.top=N.diagramContainer.offsetTop+(N.diagramContainer.offsetHeight-N.bottomResizer.offsetHeight)/2+"px"}N.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":
-"";N.rightResizer.style.visibility=N.bottomResizer.style.visibility;oa.style.display="none";E.style.visibility="";ka.style.visibility=""}),Y=N.actions.get("fullscreen"),R=G("",Y.funct,null,mxResources.get(""),Y,Editor.fullscreenImage),ba=mxUtils.bind(this,function(){R.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
-Q()});Y=mxUtils.bind(this,function(){b(N,!0);N.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y);ba()});N.addListener("inlineFullscreenChanged",ba);N.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&N.addListener("darkModeChanged",Y);N.addListener("editInlineStop",mxUtils.bind(this,function(ua){N.diagramContainer.style.width="10px";N.diagramContainer.style.height="10px";N.diagramContainer.style.border="";
-N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}));if(null!=N.hoverIcons){var ea=N.hoverIcons.update;N.hoverIcons.update=function(){qa.freehand.isDrawing()||ea.apply(this,arguments)}}if(null!=qa.freehand){var ra=qa.freehand.createStyle;qa.freehand.createStyle=function(ua){return ra.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){q.className="geToolbarContainer";ka.className=
-"geToolbarContainer";E.className="geToolbarContainer";oa.className="geToolbarContainer";N.picker=q;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=N.getServiceName()&&(mxEvent.addListener(oa,"mouseenter",function(){N.statusContainer.style.display="inline-block"}),mxEvent.addListener(oa,"mouseleave",function(){ta||(N.statusContainer.style.display="none")}));var la=mxUtils.bind(this,function(ua){null!=N.notificationBtn&&(null!=ua?N.notificationBtn.setAttribute("title",ua):N.notificationBtn.removeAttribute("title"))});
-if("1"!=urlParams.embed&&"1"==urlParams["live-ui"]){var pa=D("theme",null,Editor.darkModeImage);null!=pa&&(pa.style.position="relative",pa.style.backgroundPosition="top center",pa.style.backgroundSize="22px 22px",pa.style.width="24px",pa.style.height="28px",pa.style.top="4px",oa.appendChild(pa),Y=mxUtils.bind(this,function(){pa.style.backgroundImage="url('"+(Editor.isDarkMode()?Editor.lightModeImage:Editor.darkModeImage)+"')"}),N.addListener("darkModeChanged",Y),Y())}oa.style.visibility=20>oa.clientWidth?
-"hidden":"";N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=N.getServiceName())if(N.statusContainer.style.display="inline-block",ta=!0,1==N.statusContainer.children.length&&""==N.editor.getStatus())oa.style.visibility="hidden";else{if(0==N.statusContainer.children.length||1==N.statusContainer.children.length&&"function"===typeof N.statusContainer.firstChild.getAttribute&&null==N.statusContainer.firstChild.getAttribute("class")){var ua=
-null!=N.statusContainer.firstChild&&"function"===typeof N.statusContainer.firstChild.getAttribute?N.statusContainer.firstChild.getAttribute("title"):N.editor.getStatus();la(ua);var za=N.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(N.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',N.statusContainer.style.display="inline-block",ta=!0):6<N.buttonContainer.clientWidth&&
-(N.statusContainer.style.display="none",ta=!1)}else N.statusContainer.style.display="inline-block",la(null),ta=!0;oa.style.visibility=20>oa.clientWidth&&!ta?"hidden":""}}));U=D("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";E.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
-this.appIconClicked(ua)}),null,null);N.statusContainer.style.position="";N.statusContainer.style.display="none";N.statusContainer.style.margin="0px";N.statusContainer.style.padding="6px 0px";N.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";N.statusContainer.style.display="inline-block";N.statusContainer.style.textOverflow="ellipsis";N.buttonContainer.style.display="inline-block";N.buttonContainer.style.position="relative";N.buttonContainer.style.paddingRight="0px";N.buttonContainer.style.top=
-"0px";var xa=document.createElement("a");xa.style.padding="0px";xa.style.boxShadow="none";xa.className="geMenuItem";xa.style.display="inline-block";xa.style.width="40px";xa.style.height="12px";xa.style.marginBottom="-2px";xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";xa.style.backgroundPosition="top center";xa.style.backgroundRepeat="no-repeat";xa.setAttribute("title","Minimize");var Ca=!1,Ia=mxUtils.bind(this,function(){q.innerText="";if(!Ca){var ua=function(za,Fa,Ba,Ea){null!=
-Fa&&za.setAttribute("title",Fa);za.style.cursor=null!=Ba?Ba:"default";za.style.margin="2px 0px";q.appendChild(za);mxUtils.br(q);null!=Ea&&(za.style.position="relative",za.style.overflow="visible",Fa=document.createElement("div"),Fa.style.position="absolute",Fa.style.left="34px",Fa.style.top="28px",Fa.style.fontSize="8px",mxUtils.write(Fa,Ea),za.appendChild(Fa));return za};ua(N.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
-60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ua(N.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ua(N.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ua(N.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var za=new mxCell("",new mxGeometry(0,0,qa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");za.geometry.setTerminalPoint(new mxPoint(0,0),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-0),!1);za.geometry.points=[];za.geometry.relative=!0;za.edge=!0;ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,za.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");za=za.clone();za.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";za.geometry.width=qa.defaultEdgeLength+20;za.geometry.setTerminalPoint(new mxPoint(0,20),!0);za.geometry.setTerminalPoint(new mxPoint(za.geometry.width,
-20),!1);ua(N.sidebar.createEdgeTemplateFromCells([za],za.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(za,Fa,Ba,Ea){za=G("",za.funct,null,Fa,za,Ba);za.style.width="40px";za.style.height="34px";za.style.opacity="0.7";return ua(za,null,"pointer",Ea)})(N.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");U=D("insert",null,Editor.plusImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin=
-"0px";U.style.height="34px";U.style.width="37px";ua(U,null,"pointer")}"1"!=urlParams.embedInline&&q.appendChild(xa)});mxEvent.addListener(xa,"click",mxUtils.bind(this,function(){Ca?(mxUtils.setPrefixedStyle(q.style,"transform","translate(0, -50%)"),q.style.padding="8px 6px 4px",q.style.top="50%",q.style.bottom="",q.style.height="",xa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",xa.style.width="40px",xa.style.height="12px",xa.setAttribute("title","Minimize"),Ca=!1,Ia()):(q.innerText=
-"",q.appendChild(xa),mxUtils.setPrefixedStyle(q.style,"transform","translate(0, 0)"),q.style.top="",q.style.bottom="12px",q.style.padding="0px",q.style.height="24px",xa.style.height="24px",xa.style.backgroundImage="url("+Editor.plusImage+")",xa.setAttribute("title",mxResources.get("insert")),xa.style.width="24px",Ca=!0)}));Ia();N.addListener("darkModeChanged",Ia);N.addListener("sketchModeChanged",Ia)}else N.editor.addListener("statusChanged",mxUtils.bind(this,function(){N.setStatusText(N.editor.getStatus())}));
-if(null!=X){var Aa=function(ua){if(mxEvent.isAltDown(ua))N.hideCurrentMenu(),N.actions.get("customZoom").funct(),mxEvent.consume(ua);else if("geItem"!=mxEvent.getSource(ua).className||mxEvent.isShiftDown(ua))N.hideCurrentMenu(),N.actions.get("smartFit").funct(),mxEvent.consume(ua)},La=N.actions.get("zoomIn"),Da=N.actions.get("zoomOut");Y=N.actions.get("resetView");var Sa=N.actions.get("undo"),Ra=N.actions.get("redo"),Ta=G("",Sa.funct,null,mxResources.get("undo")+" ("+Sa.shortcut+")",Sa,Editor.undoImage),
-Za=G("",Ra.funct,null,mxResources.get("redo")+" ("+Ra.shortcut+")",Ra,Editor.redoImage);if(null!=ka){Y=function(){V.style.display=null!=N.pages&&("0"!=urlParams.pages||1<N.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Na=function(){V.innerText="";if(null!=N.currentPage){mxUtils.write(V,N.currentPage.getName());var ua=null!=N.pages?N.pages.length:1,za=N.getPageIndex(N.currentPage);za=null!=za?za+1:1;var Fa=N.currentPage.getId();V.setAttribute("title",N.currentPage.getName()+" ("+za+
-"/"+ua+")"+(null!=Fa?" ["+Fa+"]":""))}},z=N.actions.get("delete"),L=G("",z.funct,null,mxResources.get("delete"),z,Editor.trashImage);L.style.opacity="0.1";E.appendChild(L);z.addListener("stateChanged",function(){L.style.opacity=z.enabled?"":"0.1"});var O=function(){Ta.style.display=0<N.editor.undoManager.history.length||qa.isEditing()?"inline-block":"none";Za.style.display=Ta.style.display;Ta.style.opacity=Sa.enabled?"":"0.1";Za.style.opacity=Ra.enabled?"":"0.1"};E.appendChild(Ta);E.appendChild(Za);
-Sa.addListener("stateChanged",O);Ra.addListener("stateChanged",O);O();var V=this.createPageMenuTab(!1,!0);V.style.display="none";V.style.position="";V.style.marginLeft="";V.style.top="";V.style.left="";V.style.height="100%";V.style.lineHeight="";V.style.borderStyle="none";V.style.padding="3px 0";V.style.margin="0px";V.style.background="";V.style.border="";V.style.boxShadow="none";V.style.verticalAlign="top";V.style.width="auto";V.style.maxWidth="160px";V.style.position="relative";V.style.padding=
-"6px";V.style.textOverflow="ellipsis";V.style.opacity="0.8";ka.appendChild(V);N.editor.addListener("pagesPatched",Na);N.editor.addListener("pageSelected",Na);N.editor.addListener("pageRenamed",Na);N.editor.addListener("fileLoaded",Na);Na();N.addListener("fileDescriptorChanged",Y);N.addListener("pagesVisibleChanged",Y);N.editor.addListener("pagesPatched",Y);Y();Y=G("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);ka.appendChild(Y);var U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom"));U.innerHTML="100%";U.style.display="inline-block";U.style.color="inherit";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";ka.appendChild(U);X=G("",La.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",La,Editor.zoomInImage);
-ka.appendChild(X);"1"==urlParams.embedInline?(ka.appendChild(R),X=N.actions.get("exit"),ka.appendChild(G("",X.funct,null,mxResources.get("exit"),X,Editor.closeImage))):R.parentNode.removeChild(R);N.tabContainer.style.visibility="hidden";oa.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";E.style.cssText=
-"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ka.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";aa.appendChild(E);aa.appendChild(ka);q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(q.style.touchAction="none");aa.appendChild(q);window.setTimeout(function(){mxUtils.setPrefixedStyle(q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(aa)}else{var ha=G("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);oa.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";U=fa.addMenu("100%",
-X.funct);U.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(N.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(N.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px";
-U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";aa.appendChild(U)}(function(ua){mxEvent.addListener(ua,"click",Aa);var za=mxUtils.bind(this,function(){ua.innerText="";mxUtils.write(ua,Math.round(100*N.editor.graph.view.scale)+"%")});N.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);N.editor.addListener("resetGraphView",za);N.editor.addListener("pageSelected",
-za)})(U);var ma=N.setGraphEnabled;N.setGraphEnabled=function(){ma.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ka?this.tabContainerHeight+"px":"0px")}}aa.appendChild(oa);aa.appendChild(N.diagramContainer);Z.appendChild(aa);N.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ka&&aa.appendChild(N.tabContainer);
-var wa=null;T();mxEvent.addListener(window,"resize",function(){T();null!=N.sidebarWindow&&N.sidebarWindow.window.fit();null!=N.formatWindow&&N.formatWindow.window.fit();null!=N.actions.outlineWindow&&N.actions.outlineWindow.window.fit();null!=N.actions.layersWindow&&N.actions.layersWindow.window.fit();null!=N.menus.tagsWindow&&N.menus.tagsWindow.window.fit();null!=N.menus.findWindow&&N.menus.findWindow.window.fit();null!=N.menus.findReplaceWindow&&N.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";q.style.transform="";mxEvent.addGestureListeners(N.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==N.diagramContainer.parentNode&&(N.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),N.sendEmbeddedSvgExport())});Z=document.createElement("div");Z.style.position="absolute";Z.style.width="10px";Z.style.height="10px";Z.style.borderRadius="5px";Z.style.border="1px solid gray";Z.style.background="#ffffff";Z.style.cursor=
-"row-resize";N.diagramContainer.parentNode.appendChild(Z);N.bottomResizer=Z;var sa=null,ya=null,Ha=null,Qa=null;mxEvent.addGestureListeners(Z,function(ua){Qa=parseInt(N.diagramContainer.style.height);ya=mxEvent.getClientY(ua);qa.popupMenuHandler.hideMenu();mxEvent.consume(ua)});Z=Z.cloneNode(!1);Z.style.cursor="col-resize";N.diagramContainer.parentNode.appendChild(Z);N.rightResizer=Z;mxEvent.addGestureListeners(Z,function(ua){Ha=parseInt(N.diagramContainer.style.width);sa=mxEvent.getClientX(ua);qa.popupMenuHandler.hideMenu();
-mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=sa&&(N.diagramContainer.style.width=Math.max(20,Ha+mxEvent.getClientX(ua)-sa)+"px",za=!0);null!=ya&&(N.diagramContainer.style.height=Math.max(20,Qa+mxEvent.getClientY(ua)-ya)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:N.diagramContainer.getBoundingClientRect()}),"*"),Q(),N.refresh())},function(ua){null==sa&&null==
-ya||mxEvent.consume(ua);ya=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";N.bottomResizer.style.visibility="hidden";N.rightResizer.style.visibility="hidden";E.style.visibility="hidden";ka.style.visibility="hidden";q.style.display="none"}"1"==urlParams.prefetchFonts&&N.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+this.getCurrentFile()||"1"==urlParams.embed)};var F=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(D,I){null!=I.shortcut&&900>m&&!mxClient.IS_IOS?D.firstChild.nextSibling.setAttribute("title",I.shortcut):F.apply(this,arguments)};var L=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){L.apply(this,arguments);if(null!=this.userElement){var D=this.userElement;D.style.cssText="position:relative;cursor:pointer;display:"+D.style.display;D.className="geToolbarButton";
+D.innerText="";D.style.backgroundImage="url("+Editor.userImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="24px 24px";D.style.height="24px";D.style.width="24px";var I=mxResources.get("changeUser");if("none"!=D.style.display){D.style.display="inline-block";var H=this.getCurrentFile();if(null!=H&&H.isRealtimeEnabled()&&H.isRealtimeSupported()){var S=document.createElement("img");S.setAttribute("border","0");S.style.position="absolute";
+S.style.left="18px";S.style.top="2px";S.style.width="12px";S.style.height="12px";var T=H.getRealtimeError();H=H.getRealtimeState();I+=" ("+mxResources.get("realtimeCollaboration")+": ";1==H?(S.src=Editor.syncImage,I+=mxResources.get("online")):(S.src=Editor.syncProblemImage,I=null!=T&&null!=T.message?I+T.message:I+mxResources.get("disconnected"));D.style.marginRight="6px";D.appendChild(S);I+=")"}}D.setAttribute("title",I)}};var P=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=
+function(){P.apply(this,arguments);null!=this.shareButton&&(this.shareButton.style.display="none")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var D=document.createElement("div");D.style.display="inline-block";D.style.position="relative";D.style.marginTop="6px";D.style.marginRight="4px";var I=document.createElement("a");I.className="geMenuItem gePrimaryBtn";I.style.marginLeft="8px";I.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var H="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(I,H);I.setAttribute("title",H);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));D.appendChild(I)}}else mxUtils.write(I,mxResources.get("save")),I.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),D.appendChild(I),
+"1"==urlParams.saveAndExit&&(I=document.createElement("a"),mxUtils.write(I,mxResources.get("saveAndExit")),I.setAttribute("title",mxResources.get("saveAndExit")),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),D.appendChild(I));"1"!=urlParams.noExitBtn&&(I=document.createElement("a"),H="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(I,
+H),I.setAttribute("title",H),I.className="geMenuItem",I.style.marginLeft="6px",I.style.padding="6px",mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),D.appendChild(I));this.buttonContainer.appendChild(D);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(D,I,H){var S=this.editorUi.editor.graph;D.smartSeparators=!0;d.apply(this,arguments);
+"1"==urlParams.sketch?S.isEnabled()&&(D.addSeparator(),1==S.getSelectionCount()&&this.addMenuItems(D,["-","lockUnlock"],null,H)):1==S.getSelectionCount()?(S.isCellFoldable(S.getSelectionCell())&&this.addMenuItems(D,S.isCellCollapsed(I)?["expand"]:["collapse"],null,H),this.addMenuItems(D,["collapsible","-","lockUnlock","enterGroup"],null,H),D.addSeparator(),this.addSubmenu("layout",D)):S.isSelectionEmpty()&&S.isEnabled()?(D.addSeparator(),this.addMenuItems(D,["editData"],null,H),D.addSeparator(),this.addSubmenu("layout",
+D),this.addSubmenu("insert",D),this.addMenuItems(D,["-","exitGroup"],null,H)):S.isEnabled()&&this.addMenuItems(D,["-","lockUnlock"],null,H)};var f=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(D,I,H){f.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(D,["copyAsImage"],null,H)};EditorUi.prototype.toggleFormatPanel=function(D){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=D?D:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var g=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();g.apply(this,arguments)};var x=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(D){x.apply(this,arguments);if(D){var I=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=I&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);
+null!=this.formatWindow&&(1E3<=I||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var y=Menus.prototype.init;Menus.prototype.init=function(){y.apply(this,arguments);var D=this.editorUi,I=D.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(la){D.setPagesVisible(!Editor.pagesVisible)}));
+I.setToggleAction(!0);I.setSelectedCallback(function(){return Editor.pagesVisible});D.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(D)},null,null,Editor.ctrlKey+"+Shift+K"));I=D.actions.put("toggleFormat",new Action(mxResources.get("format"),function(){b(D)}));I.shortcut=D.actions.get("formatPanel").shortcut;I.setToggleAction(!0);I.setSelectedCallback(mxUtils.bind(this,function(){return null!=D.formatWindow&&D.formatWindow.window.isVisible()}));EditorUi.enablePlantUml&&
+!D.isOffline()&&D.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var la=new ParseDialog(D,mxResources.get("plantUml")+"...","plantUml");D.showDialog(la.container,620,420,!0,!1);la.init()}));D.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var la=new ParseDialog(D,mxResources.get("mermaid")+"...","mermaid");D.showDialog(la.container,620,420,!0,!1);la.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
+function(la,ra){var ba=this.editorUi.editor.graph,oa=ba.getSelectionCell();H.call(this,la,oa,null,ra);this.addMenuItems(la,["editTooltip"],ra);ba.model.isVertex(oa)&&this.addMenuItems(la,["editGeometry"],ra);this.addMenuItems(la,["-","edit"],ra)})));this.addPopupMenuCellEditItems=function(la,ra,ba,oa){la.addSeparator();this.addSubmenu("editCell",la,oa,mxResources.get("edit"))};var S=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(la,ra){S.funct(la,ra);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||D.menus.addMenuItems(la,["publishLink"],ra);D.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(la.addSeparator(ra),D.menus.addSubmenu("embed",la,ra))})));var T=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(la,ra){T.funct(la,ra);this.addMenuItems(la,["-","ruler","-","pageScale"],ra)})));var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),fa=function(la,ra,ba,oa){la.addItem(ba,null,mxUtils.bind(this,
+function(){var na=new CreateGraphDialog(D,ba,oa);D.showDialog(na.container,620,420,!0,!1);na.init()}),ra)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(la,ra){for(var ba=0;ba<M.length;ba++)"-"==M[ba]?la.addSeparator(ra):fa(la,ra,mxResources.get(M[ba])+"...",M[ba])})))};EditorUi.prototype.installFormatToolbar=function(D){var I=this.editor.graph,H=document.createElement("div");H.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+I.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,T){0<I.getSelectionCount()?(D.appendChild(H),H.innerHTML="Selected: "+I.getSelectionCount()):null!=H.parentNode&&H.parentNode.removeChild(H)}))};var t=!1;EditorUi.prototype.initFormatWindow=function(){if(!t&&null!=this.formatWindow){t=!0;var D=this.formatWindow.window.toggleMinimized,I=240;this.formatWindow.window.toggleMinimized=function(){D.apply(this,arguments);this.minimized?(I=parseInt(this.div.style.width),this.div.style.width=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+I-140+"px"):(this.div.style.width=I+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-I+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(H){mxEvent.getSource(H)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var G=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function D(pa,ua,Da){var Fa=M.menus.get(pa),Ma=ba.addMenu(mxResources.get(pa),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),ra);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(pa));M.menus.menuCreated(Fa,
+Ma,"geMenuItem");null!=Da?(Ma.style.backgroundImage="url("+Da+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerText=""):ua||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function I(pa,ua,Da,Fa,Ma,Qa){var Ba=document.createElement("a");Ba.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ba.style.display="inline-block";Ba.style.boxSizing="border-box";Ba.style.height="30px";Ba.style.padding="6px";Ba.style.position="relative";Ba.style.verticalAlign="top";Ba.style.top="0px";"1"==urlParams.sketch&&(Ba.style.borderStyle="none",Ba.style.boxShadow="none",Ba.style.padding="6px",Ba.style.margin="0px");null!=M.statusContainer?la.insertBefore(Ba,M.statusContainer):la.appendChild(Ba);null!=Qa?(Ba.style.backgroundImage="url("+Qa+")",Ba.style.backgroundPosition=
+"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.width="34px"):mxUtils.write(Ba,pa);mxEvent.addListener(Ba,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ka){Ka.preventDefault()}));mxEvent.addListener(Ba,"click",function(Ka){"disabled"!=Ba.getAttribute("disabled")&&ua(Ka);mxEvent.consume(Ka)});null==Da&&(Ba.style.marginRight="4px");null!=Fa&&Ba.setAttribute("title",Fa);null!=Ma&&(pa=function(){Ma.isEnabled()?(Ba.removeAttribute("disabled"),
+Ba.style.cursor="pointer"):(Ba.setAttribute("disabled","disabled"),Ba.style.cursor="default")},Ma.addListener("stateChanged",pa),fa.addListener("enabledChanged",pa),pa());return Ba}function H(pa,ua,Da){Da=document.createElement("div");Da.className="geMenuItem";Da.style.display="inline-block";Da.style.verticalAlign="top";Da.style.marginRight="6px";Da.style.padding="0 4px 0 4px";Da.style.height="30px";Da.style.position="relative";Da.style.top="0px";"1"==urlParams.sketch&&(Da.style.boxShadow="none");
+for(var Fa=0;Fa<pa.length;Fa++)null!=pa[Fa]&&("1"==urlParams.sketch&&(pa[Fa].style.padding="10px 8px",pa[Fa].style.width="30px"),pa[Fa].style.margin="0px",pa[Fa].style.boxShadow="none",Da.appendChild(pa[Fa]));null!=ua&&mxUtils.setOpacity(Da,ua);null!=M.statusContainer&&"1"!=urlParams.sketch?la.insertBefore(Da,M.statusContainer):la.appendChild(Da);return Da}function S(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ia.style.left=58>X.offsetTop-X.offsetHeight/2?"70px":"10px");else{for(var pa=
+la.firstChild;null!=pa;){var ua=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ua}ra=la.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;pa=1E3>m||"1"==urlParams.sketch;var Da=null;pa||(Da=D("diagram"));ua=pa?D("diagram",null,Editor.menuImage):null;null!=ua&&(Da=ua);H([Da,I(mxResources.get("shapes"),M.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),M.actions.get("image"),pa?Editor.shapesImage:
+null),I(mxResources.get("format"),M.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+M.actions.get("formatPanel").shortcut+")",M.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ua=D("insert",!0,pa?V:null);H([ua,I(mxResources.get("delete"),M.actions.get("delete").funct,null,mxResources.get("delete"),M.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=m&&(H([Ca,Sa],60),520<=m&&H([O,640<=m?I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",ya,Editor.zoomInImage):null,640<=m?I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Aa,Editor.zoomOutImage):null],60))}null!=Da&&(mxEvent.disableContextMenu(Da),mxEvent.addGestureListeners(Da,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&M.appIconClicked(Fa)}),null,null));ua=M.menus.get("language");null!=ua&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+m&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==W&&(ua=ba.addMenu("",ua.funct),ua.setAttribute("title","language"),ua.className="geToolbarButton",ua.style.backgroundImage="url("+Editor.globeImage+")",ua.style.backgroundPosition="center center",ua.style.backgroundRepeat="no-repeat",ua.style.backgroundSize="22px 22px",ua.style.position="absolute",ua.style.height="24px",ua.style.width="24px",ua.style.zIndex="1",ua.style.right="8px",ua.style.cursor="pointer",ua.style.top="12px",la.appendChild(ua),
+W=ua),M.buttonContainer.style.paddingRight="34px"):(M.buttonContainer.style.paddingRight="4px",null!=W&&(W.parentNode.removeChild(W),W=null))}G.apply(this,arguments);var T=document.createElement("div");T.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";T.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(T);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&
+!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
+var M=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==M.embedViewport)mxUtils.fit(this.div);else{var pa=parseInt(this.div.offsetLeft),ua=parseInt(this.div.offsetWidth),Da=M.embedViewport.x+M.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),Qa=M.embedViewport.y+M.embedViewport.height;this.div.style.left=Math.max(M.embedViewport.x,Math.min(pa,Da-ua))+"px";this.div.style.top=Math.max(M.embedViewport.y,Math.min(Fa,Qa-Ma))+"px";this.div.style.height=
+Math.min(M.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(M.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),T=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>m||708>T)?this.formatWindow.window.toggleMinimized():
+this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));M=this;var fa=M.editor.graph;M.toolbar=this.createToolbar(M.createDiv("geToolbar"));M.defaultLibraryName=mxResources.get("untitledLibrary");var la=document.createElement("div");la.className="geMenubarContainer";var ra=null,ba=new Menubar(M,la);M.statusContainer=M.createStatusContainer();M.statusContainer.style.position="relative";M.statusContainer.style.maxWidth="";M.statusContainer.style.marginTop="7px";M.statusContainer.style.marginLeft=
+"6px";M.statusContainer.style.color="gray";M.statusContainer.style.cursor="default";var oa=M.hideCurrentMenu;M.hideCurrentMenu=function(){oa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var na=M.descriptorChanged;M.descriptorChanged=function(){na.apply(this,arguments);var pa=M.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ua=pa.getMode();"google"==ua?ua="googleDrive":"github"==ua?ua="gitHub":"gitlab"==ua?ua="gitLab":"onedrive"==ua&&(ua="oneDrive");ua=mxResources.get(ua);
+la.setAttribute("title",pa.getTitle()+(null!=ua?" ("+ua+")":""))}else la.removeAttribute("title")};M.setStatusText(M.editor.getStatus());la.appendChild(M.statusContainer);M.buttonContainer=document.createElement("div");M.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";la.appendChild(M.buttonContainer);M.menubarContainer=M.buttonContainer;M.tabContainer=document.createElement("div");M.tabContainer.className=
+"geTabContainer";M.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";T=M.diagramContainer.parentNode;var N=document.createElement("div");N.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";M.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){N.style.top="20px";M.titlebar=document.createElement("div");M.titlebar.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var aa=document.createElement("div");aa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";M.titlebar.appendChild(aa);T.appendChild(M.titlebar)}var V="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,ha="1"==urlParams.sketch?document.createElement("div"):null,X="1"==
+urlParams.sketch?document.createElement("div"):null,ia="1"==urlParams.sketch?document.createElement("div"):null,q=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ia.style.left="10px",ia.style.top="10px",X.style.left="10px",X.style.top="60px",ha.style.top="10px",ha.style.right="12px",ha.style.left="",M.diagramContainer.setAttribute("data-bounds",M.diagramContainer.style.top+" "+M.diagramContainer.style.left+" "+M.diagramContainer.style.width+" "+M.diagramContainer.style.height),M.diagramContainer.style.top=
+"0px",M.diagramContainer.style.left="0px",M.diagramContainer.style.bottom="0px",M.diagramContainer.style.right="0px",M.diagramContainer.style.width="",M.diagramContainer.style.height="";else{var pa=M.diagramContainer.getAttribute("data-bounds");if(null!=pa){M.diagramContainer.style.background="transparent";M.diagramContainer.removeAttribute("data-bounds");var ua=fa.getGraphBounds();pa=pa.split(" ");M.diagramContainer.style.top=pa[0];M.diagramContainer.style.left=pa[1];M.diagramContainer.style.width=
+ua.width+50+"px";M.diagramContainer.style.height=ua.height+46+"px";M.diagramContainer.style.bottom="";M.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:M.diagramContainer.getBoundingClientRect()}),"*");M.refresh()}ia.style.left=M.diagramContainer.offsetLeft+"px";ia.style.top=M.diagramContainer.offsetTop-ia.offsetHeight-4+"px";X.style.display="";X.style.left=M.diagramContainer.offsetLeft-X.offsetWidth-4+"px";X.style.top=M.diagramContainer.offsetTop+
+"px";ha.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-ha.offsetWidth+"px";ha.style.top=ia.style.top;ha.style.right="";M.bottomResizer.style.left=M.diagramContainer.offsetLeft+(M.diagramContainer.offsetWidth-M.bottomResizer.offsetWidth)/2+"px";M.bottomResizer.style.top=M.diagramContainer.offsetTop+M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight/2-1+"px";M.rightResizer.style.left=M.diagramContainer.offsetLeft+M.diagramContainer.offsetWidth-M.rightResizer.offsetWidth/
+2-1+"px";M.rightResizer.style.top=M.diagramContainer.offsetTop+(M.diagramContainer.offsetHeight-M.bottomResizer.offsetHeight)/2+"px"}M.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";M.rightResizer.style.visibility=M.bottomResizer.style.visibility;la.style.display="none";ia.style.visibility="";ha.style.visibility=""});aa=M.actions.get("fullscreen");var E=I("",aa.funct,null,mxResources.get(""),aa,Editor.fullscreenImage),Q=mxUtils.bind(this,function(){E.style.backgroundImage="url("+
+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";q()});aa=mxUtils.bind(this,function(){b(M,!0);M.initFormatWindow();var pa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(pa.x+pa.width+4,pa.y);Q()});M.addListener("inlineFullscreenChanged",Q);M.addListener("editInlineStart",aa);"1"==urlParams.embedInline&&M.addListener("darkModeChanged",
+aa);M.addListener("editInlineStop",mxUtils.bind(this,function(pa){M.diagramContainer.style.width="10px";M.diagramContainer.style.height="10px";M.diagramContainer.style.border="";M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}));if(null!=M.hoverIcons){var Y=M.hoverIcons.update;M.hoverIcons.update=function(){fa.freehand.isDrawing()||Y.apply(this,arguments)}}if(null!=fa.freehand){var R=
+fa.freehand.createStyle;fa.freehand.createStyle=function(pa){return R.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){X.className="geToolbarContainer";ha.className="geToolbarContainer";ia.className="geToolbarContainer";la.className="geToolbarContainer";M.picker=X;M.sketchPickerMenuElt=X;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=M.getServiceName()&&(mxEvent.addListener(la,"mouseenter",function(){M.statusContainer.style.display="inline-block"}),mxEvent.addListener(la,"mouseleave",function(){Z||
+(M.statusContainer.style.display="none")}));var da=mxUtils.bind(this,function(pa){null!=M.notificationBtn&&(null!=pa?M.notificationBtn.setAttribute("title",pa):M.notificationBtn.removeAttribute("title"))});la.style.visibility=20>la.clientWidth?"hidden":"";M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=M.getServiceName())if(M.statusContainer.style.display="inline-block",Z=!0,1==M.statusContainer.children.length&&
+""==M.editor.getStatus())la.style.visibility="hidden";else{if(0==M.statusContainer.children.length||1==M.statusContainer.children.length&&"function"===typeof M.statusContainer.firstChild.getAttribute&&null==M.statusContainer.firstChild.getAttribute("class")){var pa=null!=M.statusContainer.firstChild&&"function"===typeof M.statusContainer.firstChild.getAttribute?M.statusContainer.firstChild.getAttribute("title"):M.editor.getStatus();da(pa);var ua=M.getCurrentFile();ua=null!=ua?ua.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+pa==mxResources.get(ua)+"..."?(M.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ua))+'..."src="'+Editor.tailSpin+'">',M.statusContainer.style.display="inline-block",Z=!0):6<M.buttonContainer.clientWidth&&(M.statusContainer.style.display="none",Z=!1)}else M.statusContainer.style.display="inline-block",da(null),Z=!0;la.style.visibility=20>la.clientWidth&&!Z?"hidden":""}}));J=D("diagram",null,Editor.menuImage);J.style.boxShadow="none";J.style.padding="6px";J.style.margin=
+"0px";ia.appendChild(J);mxEvent.disableContextMenu(J);mxEvent.addGestureListeners(J,mxUtils.bind(this,function(pa){(mxEvent.isShiftDown(pa)||mxEvent.isAltDown(pa)||mxEvent.isMetaDown(pa)||mxEvent.isControlDown(pa)||mxEvent.isPopupTrigger(pa))&&this.appIconClicked(pa)}),null,null);M.statusContainer.style.position="";M.statusContainer.style.display="none";M.statusContainer.style.margin="0px";M.statusContainer.style.padding="6px 0px";M.statusContainer.style.maxWidth=Math.min(m-240,280)+"px";M.statusContainer.style.display=
+"inline-block";M.statusContainer.style.textOverflow="ellipsis";M.buttonContainer.style.display="inline-block";M.buttonContainer.style.position="relative";M.buttonContainer.style.paddingRight="0px";M.buttonContainer.style.top="0px";var qa=document.createElement("a");qa.style.padding="0px";qa.style.boxShadow="none";qa.className="geMenuItem";qa.style.display="inline-block";qa.style.width="40px";qa.style.height="12px";qa.style.marginBottom="-2px";qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
+")";qa.style.backgroundPosition="top center";qa.style.backgroundRepeat="no-repeat";qa.setAttribute("title","Minimize");var va=!1,ja=mxUtils.bind(this,function(){X.innerText="";if(!va){var pa=function(ua,Da,Fa,Ma){null!=Da&&ua.setAttribute("title",Da);ua.style.cursor=null!=Fa?Fa:"default";ua.style.margin="2px 0px";X.appendChild(ua);mxUtils.br(X);null!=Ma&&(ua.style.position="relative",ua.style.overflow="visible",Da=document.createElement("div"),Da.style.position="absolute",Da.style.left="34px",Da.style.top=
+"28px",Da.style.fontSize="8px",mxUtils.write(Da,Ma),ua.appendChild(Da));return ua};pa(M.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");pa(M.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");pa(M.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");pa(M.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ua=new mxCell("",new mxGeometry(0,0,fa.defaultEdgeLength,
+0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ua.geometry.setTerminalPoint(new mxPoint(0,0),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,0),!1);ua.geometry.points=[];ua.geometry.relative=!0;ua.edge=!0;pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,ua.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ua=ua.clone();ua.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
+ua.geometry.width=fa.defaultEdgeLength+20;ua.geometry.setTerminalPoint(new mxPoint(0,20),!0);ua.geometry.setTerminalPoint(new mxPoint(ua.geometry.width,20),!1);pa(M.sidebar.createEdgeTemplateFromCells([ua],ua.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ua,Da,Fa,Ma){ua=I("",ua.funct,null,Da,ua,Fa);ua.style.width="40px";ua.style.height="34px";ua.style.opacity="0.7";return pa(ua,null,"pointer",Ma)})(M.actions.get("insertFreehand"),mxResources.get("freehand")+
+" (X)",Editor.freehandImage,"X");J=D("insert",null,Editor.plusImage);J.style.boxShadow="none";J.style.opacity="0.7";J.style.padding="6px";J.style.margin="0px";J.style.height="34px";J.style.width="37px";pa(J,null,"pointer")}"1"!=urlParams.embedInline&&X.appendChild(qa)});mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){va?(mxUtils.setPrefixedStyle(X.style,"transform","translate(0, -50%)"),X.style.padding="8px 6px 4px",X.style.top="50%",X.style.bottom="",X.style.height="",qa.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",qa.style.width="40px",qa.style.height="12px",qa.setAttribute("title","Minimize"),va=!1,ja()):(X.innerText="",X.appendChild(qa),mxUtils.setPrefixedStyle(X.style,"transform","translate(0, 0)"),X.style.top="",X.style.bottom="12px",X.style.padding="0px",X.style.height="24px",qa.style.height="24px",qa.style.backgroundImage="url("+Editor.plusImage+")",qa.setAttribute("title",mxResources.get("insert")),qa.style.width="24px",va=!0)}));ja();M.addListener("darkModeChanged",
+ja);M.addListener("sketchModeChanged",ja)}else M.editor.addListener("statusChanged",mxUtils.bind(this,function(){M.setStatusText(M.editor.getStatus())}));aa=M.menus.get("viewZoom");if(null!=aa){var sa=function(pa){if(mxEvent.isAltDown(pa))M.hideCurrentMenu(),M.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))M.hideCurrentMenu(),M.actions.get("smartFit").funct(),mxEvent.consume(pa)},ya=M.actions.get("zoomIn"),Aa=M.actions.get("zoomOut"),
+Ea=M.actions.get("resetView"),za=M.actions.get("undo"),Ia=M.actions.get("redo"),Ca=I("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Sa=I("",Ia.funct,null,mxResources.get("redo")+" ("+Ia.shortcut+")",Ia,Editor.redoImage);if(null!=ha){Ea=function(){z.style.display=null!=M.pages&&("0"!=urlParams.pages||1<M.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){z.innerText="";if(null!=M.currentPage){mxUtils.write(z,M.currentPage.getName());var pa=
+null!=M.pages?M.pages.length:1,ua=M.getPageIndex(M.currentPage);ua=null!=ua?ua+1:1;var Da=M.currentPage.getId();z.setAttribute("title",M.currentPage.getName()+" ("+ua+"/"+pa+")"+(null!=Da?" ["+Da+"]":""))}},Ta=M.actions.get("delete"),Za=I("",Ta.funct,null,mxResources.get("delete"),Ta,Editor.trashImage);Za.style.opacity="0.3";ia.appendChild(Za);Ta.addListener("stateChanged",function(){Za.style.opacity=Ta.enabled?"":"0.3"});var Na=function(){Ca.style.display=0<M.editor.undoManager.history.length||fa.isEditing()?
+"inline-block":"none";Sa.style.display=Ca.style.display;Ca.style.opacity=za.enabled?"":"0.3";Sa.style.opacity=Ia.enabled?"":"0.3"};ia.appendChild(Ca);ia.appendChild(Sa);za.addListener("stateChanged",Na);Ia.addListener("stateChanged",Na);Na();var z=this.createPageMenuTab(!1,!0);z.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";ha.appendChild(z);M.editor.addListener("pagesPatched",Pa);M.editor.addListener("pageSelected",
+Pa);M.editor.addListener("pageRenamed",Pa);M.editor.addListener("fileLoaded",Pa);Pa();M.addListener("fileDescriptorChanged",Ea);M.addListener("pagesVisibleChanged",Ea);M.editor.addListener("pagesPatched",Ea);Ea();Ea=I("",Aa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Aa,Editor.zoomOutImage);ha.appendChild(Ea);var J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom"));J.innerHTML="100%";J.style.display="inline-block";J.style.color="inherit";J.style.cursor=
+"pointer";J.style.textAlign="center";J.style.whiteSpace="nowrap";J.style.paddingRight="10px";J.style.textDecoration="none";J.style.verticalAlign="top";J.style.padding="6px 0";J.style.fontSize="14px";J.style.width="40px";ha.appendChild(J);aa=I("",ya.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",ya,Editor.zoomInImage);ha.appendChild(aa);"1"==urlParams.embedInline?(ha.appendChild(E),aa=M.actions.get("exit"),ha.appendChild(I("",aa.funct,null,mxResources.get("exit"),aa,Editor.closeImage))):
+E.parentNode.removeChild(E);M.tabContainer.style.visibility="hidden";la.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ia.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+ha.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";N.appendChild(ia);N.appendChild(ha);X.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(X.style.touchAction="none");N.appendChild(X);window.setTimeout(function(){mxUtils.setPrefixedStyle(X.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(N)}else{var O=I("",sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ea,Editor.zoomFitImage);la.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";J=ba.addMenu("100%",aa.funct);J.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");J.style.whiteSpace="nowrap";J.style.paddingRight=
+"10px";J.style.textDecoration="none";J.style.textDecoration="none";J.style.overflow="hidden";J.style.visibility="hidden";J.style.textAlign="center";J.style.cursor="pointer";J.style.height=parseInt(M.tabContainerHeight)-1+"px";J.style.lineHeight=parseInt(M.tabContainerHeight)+1+"px";J.style.position="absolute";J.style.display="block";J.style.fontSize="12px";J.style.width="59px";J.style.right="0px";J.style.bottom="0px";J.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";J.style.backgroundPosition=
+"right 6px center";J.style.backgroundRepeat="no-repeat";N.appendChild(J)}(function(pa){mxEvent.addListener(pa,"click",sa);var ua=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*M.editor.graph.view.scale)+"%")});M.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ua);M.editor.addListener("resetGraphView",ua);M.editor.addListener("pageSelected",ua)})(J);var U=M.setGraphEnabled;M.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(J.style.visibility=
+this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==ha?this.tabContainerHeight+"px":"0px")}}N.appendChild(la);N.appendChild(M.diagramContainer);T.appendChild(N);M.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=m)&&"1"!=urlParams.embedInline&&b(this,!0);null==ha&&N.appendChild(M.tabContainer);var W=null;S();mxEvent.addListener(window,"resize",function(){S();null!=M.sidebarWindow&&M.sidebarWindow.window.fit();
+null!=M.formatWindow&&M.formatWindow.window.fit();null!=M.actions.outlineWindow&&M.actions.outlineWindow.window.fit();null!=M.actions.layersWindow&&M.actions.layersWindow.window.fit();null!=M.menus.tagsWindow&&M.menus.tagsWindow.window.fit();null!=M.menus.findWindow&&M.menus.findWindow.window.fit();null!=M.menus.findReplaceWindow&&M.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";X.style.transform="";mxEvent.addGestureListeners(M.diagramContainer.parentNode,
+function(pa){mxEvent.getSource(pa)==M.diagramContainer.parentNode&&(M.embedExitPoint=new mxPoint(mxEvent.getClientX(pa),mxEvent.getClientY(pa)),M.sendEmbeddedSvgExport())});T=document.createElement("div");T.style.position="absolute";T.style.width="10px";T.style.height="10px";T.style.borderRadius="5px";T.style.border="1px solid gray";T.style.background="#ffffff";T.style.cursor="row-resize";M.diagramContainer.parentNode.appendChild(T);M.bottomResizer=T;var ea=null,ka=null,xa=null,ta=null;mxEvent.addGestureListeners(T,
+function(pa){ta=parseInt(M.diagramContainer.style.height);ka=mxEvent.getClientY(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});T=T.cloneNode(!1);T.style.cursor="col-resize";M.diagramContainer.parentNode.appendChild(T);M.rightResizer=T;mxEvent.addGestureListeners(T,function(pa){xa=parseInt(M.diagramContainer.style.width);ea=mxEvent.getClientX(pa);fa.popupMenuHandler.hideMenu();mxEvent.consume(pa)});mxEvent.addGestureListeners(document.body,null,function(pa){var ua=!1;null!=ea&&(M.diagramContainer.style.width=
+Math.max(20,xa+mxEvent.getClientX(pa)-ea)+"px",ua=!0);null!=ka&&(M.diagramContainer.style.height=Math.max(20,ta+mxEvent.getClientY(pa)-ka)+"px",ua=!0);ua&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:M.diagramContainer.getBoundingClientRect()}),"*"),q(),M.refresh())},function(pa){null==ea&&null==ka||mxEvent.consume(pa);ka=ea=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";
+M.bottomResizer.style.visibility="hidden";M.rightResizer.style.visibility="hidden";ia.style.visibility="hidden";ha.style.visibility="hidden";X.style.display="none"}"1"==urlParams.prefetchFonts&&M.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,m,C,p,F){this.file=b;this.id=e;this.content=k;this.modifiedDate=m;this.createdDate=C;this.isResolved=p;this.user=F;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,m,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,m,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=m;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var m=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var H=this.view.graphBounds,J=this.view.translate;F.setAttribute("viewBox",H.x+J.x-this.panDx+" "+(H.y+J.y-this.panDy)+
-" "+(H.width+1)+" "+(H.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",H))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(H){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var K=this;this.graph.getImageFromBundles=function(H){return K.getImageUrl(H)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
-P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;K=this;this.graph.getGlobalVariable=function(H){var J=P[K.currentPage];return"page"==H?J.getAttribute("name")||"Page-"+(K.currentPage+1):"pagenumber"==H?K.currentPage+1:"pagecount"==H?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(H){this.handlingResize||(this.currentPage=mxUtils.mod(H,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(H){H=this.getIndexById(H);var J=0<=H;J&&this.selectPage(H);return J};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(H){if(null!=H&&Graph.isPageLink(H.src)){var J=H.src,
-D=J.indexOf(",");0<D&&(D=K.getIndexById(J.substring(D+1)),0<=D&&(H=K.getImageForGraphModel(Editor.parseDiagramNode(K.diagrams[D])),H.originalSrc=J))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(H){var J=y.apply(this,arguments);H=this.backgroundImage;if(null!=H){var D=this.view.translate,G=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((D.x+H.x)*G,(D.y+H.y)*G,H.width*G,H.height*G))}return J};this.addListener("xmlNodeChanged",d);d();
-urlParams.page=K.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(H){return!mxEvent.isPopupTrigger(H.getEvent())&&"auto"==this.graph.container.style.overflow},
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var F=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?F.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(F.style.padding="8px");F.style.boxSizing="border-box";F.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var G=this.view.graphBounds,D=this.view.translate;F.setAttribute("viewBox",G.x+D.x-this.panDx+" "+(G.y+D.y-this.panDy)+
+" "+(G.width+1)+" "+(G.height+1));this.container.style.backgroundColor=F.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",G))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(G){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var L=this;this.graph.getImageFromBundles=function(G){return L.getImageUrl(G)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var P=this.xmlNode.getElementsByTagName("diagram");if(0<
+P.length){if(null!=this.pageId)for(var d=0;d<P.length;d++)if(this.pageId==P[d].getAttribute("id")){this.currentPage=d;break}var f=this.graph.getGlobalVariable;L=this;this.graph.getGlobalVariable=function(G){var D=P[L.currentPage];return"page"==G?D.getAttribute("name")||"Page-"+(L.currentPage+1):"pagenumber"==G?L.currentPage+1:"pagecount"==G?P.length:f.apply(this,arguments)}}}this.diagrams=[];var g=null;this.selectPage=function(G){this.handlingResize||(this.currentPage=mxUtils.mod(G,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(G){G=this.getIndexById(G);var D=0<=G;D&&this.selectPage(G);return D};d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=g&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),g=this.xmlNode)});var x=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(G){if(null!=G&&Graph.isPageLink(G.src)){var D=G.src,
+I=D.indexOf(",");0<I&&(I=L.getIndexById(D.substring(I+1)),0<=I&&(G=L.getImageForGraphModel(Editor.parseDiagramNode(L.diagrams[I])),G.originalSrc=D))}x.apply(this,arguments)};var y=this.graph.getGraphBounds;this.graph.getGraphBounds=function(G){var D=y.apply(this,arguments);G=this.backgroundImage;if(null!=G){var I=this.view.translate,H=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((I.x+G.x)*H,(I.y+G.y)*H,G.width*H,G.height*H))}return D};this.addListener("xmlNodeChanged",d);d();
+urlParams.page=L.currentPage;d=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,d=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(H){if(Graph.isPageLink(H)){var J=H.indexOf(",");K.selectPageById(H.substring(J+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(H);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=d&&this.setLayersVisible(d);this.graph.customLinkClicked=function(G){if(Graph.isPageLink(G)){var D=G.indexOf(",");L.selectPageById(G.substring(D+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(G);return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(F){0<b.offsetWidth&&(p.disconnect(),m())}));p.observe(C,{attributes:!0})}else m()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
@@ -4096,36 +4107,36 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],m=this.graph.getModel();m.beginUpdate();try{for(var C=0;C<m.getChildCount(m.root);C++){var p=m.getChildAt(m.root,C);e=e&&m.isVisible(p);k.push(m.isVisible(p));m.setVisible(p,null!=b?b[C]:!0)}}finally{m.endUpdate()}}return e?null:k};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var K=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?K.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){K=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
-P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};K={left:K.left-P.left,top:K.top-P.top,bottom:K.bottom-P.top,right:K.right-P.left};this.toolbar.style.left=K.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=K.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=K.top+1+"px"):this.toolbar.style.top=K.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(K){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=K?K:this.graphConfig.zoom||
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!k){k=!0;var L=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?L.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){L=b.getBoundingClientRect();var P=mxUtils.getScrollOrigin(document.body);
+P="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-P.x,top:-P.y};L={left:L.left-P.left,top:L.top-P.top,bottom:L.bottom-P.top,right:L.right-P.left};this.toolbar.style.left=L.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=L.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=L.top+1+"px"):this.toolbar.style.top=L.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(L){var P=b.offsetWidth;P==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=L?L:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=P,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;m=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
-m);var F=mxUtils.bind(this,function(K){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==K&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(K=null,null!=d&&e.height+2*this.graph.border>d-2&&(K=(d-2*this.graph.border-2)/e.height),this.fitGraph(K)):this.widthIsEmpty||
-null!=K||0!=this.graphConfig.resize||""==b.style.height?(K=null!=K?K:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+K.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+K.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(K){e=this.graph.getGraphBounds();C=null;F(K)}};
+m);var F=mxUtils.bind(this,function(L){var P=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var d=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==L&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>d)?(L=null,null!=d&&e.height+2*this.graph.border>d-2&&(L=(d-2*this.graph.border-2)/e.height),this.fitGraph(L)):this.widthIsEmpty||
+null!=L||0!=this.graphConfig.resize||""==b.style.height?(L=null!=L?L:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+L.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+L.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=P});8==document.documentMode?window.setTimeout(F,0):F();this.positionGraph=function(L){e=this.graph.getGraphBounds();C=null;F(L)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/m+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var K=0;K<m.length;K++){var P=b.getCell(m[K]);null!=P&&(e=!0,p[P.id]=!0)}else for(K=0;K<k.length;K++)P=b.getChildAt(b.root,parseInt(k[K])),null!=P&&(e=!0,p[P.id]=!0);for(K=0;e&&
-K<F;K++)P=b.getChildAt(b.root,K),b.setVisible(P,p[P.id]||!1)}else for(K=0;K<F;K++)b.setVisible(b.getChildAt(b.root,K),e.isVisible(e.getChildAt(e.root,K)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var m=this.graphConfig.layerIds,C=null!=m&&0<m.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var F=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var L=0;L<m.length;L++){var P=b.getCell(m[L]);null!=P&&(e=!0,p[P.id]=!0)}else for(L=0;L<k.length;L++)P=b.getChildAt(b.root,parseInt(k[L])),null!=P&&(e=!0,p[P.id]=!0);for(L=0;e&&
+L<F;L++)P=b.getChildAt(b.root,L),b.setVisible(P,p[P.id]||!1)}else for(L=0;L<F;L++)b.setVisible(b.getChildAt(b.root,L),e.isVisible(e.getChildAt(e.root,L)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
-e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
-m=null}),100)}),oa||200)}),p=mxUtils.bind(this,function(oa){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,oa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(oa){mxEvent.consume(oa)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(oa){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(oa){p(100);mxEvent.consume(oa)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(oa){mxEvent.isTouchEvent(oa)||p(30)}));var F=this.graph,K=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(oa,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(oa,
-S){},mouseUp:function(oa,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<K&&Math.abs(this.scrollTop-F.container.scrollTop)<K&&Math.abs(this.startX-S.getGraphX())<K&&Math.abs(this.startY-S.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(oa,S,fa,ia){oa=this.createToolbarButton(oa,S,fa,ia);e.appendChild(oa);d++;return oa}),g=null,x=null,y=null,u=null,H=0;H<P.length;H++){var J=P[H];if("pages"==
-J){u=b.ownerDocument.createElement("div");u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var G=f(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");G.style.paddingLeft="0px";G.style.paddingRight="0px";J=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;G.style.display=u.style.display});this.addListener("graphChanged",J);J()}else if("zoom"==J)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==J){if(this.layersEnabled){var W=this.graph.getModel(),T=f(mxUtils.bind(this,function(oa){if(null!=
-g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var fa=this.graph.getGraphBounds(),ia=this.graph.view;0>fa.x||0>fa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale}):null!=this.graph.originalViewState&&0<fa.x/ia.scale+this.graph.originalViewState.translate.x-ia.translate.x&&0<fa.y/ia.scale+this.graph.originalViewState.translate.y-
-ia.translate.y&&(ia.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ia.translate.clone(),scale:ia.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});oa=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
-g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var S=mxUtils.getDocumentScrollOrigin(document);g.style.left=S.x+oa.left-1+"px";g.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");W.addListener(mxEvent.CHANGE,function(){T.style.display=1<W.getChildCount(W.root)?"inline-block":"none"});T.style.display=
-1<W.getChildCount(W.root)?"inline-block":"none"}}else if("tags"==J){if(this.tagsEnabled){var Z=f(mxUtils.bind(this,function(oa){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
-x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});oa=Z.getBoundingClientRect();var S=mxUtils.getDocumentScrollOrigin(document);y.style.left=S.x+oa.left-1+"px";y.style.top=S.y+oa.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");W.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));Z.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==J?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(J=this.graphConfig["toolbar-buttons"][J],null!=J&&(J.elem=f(null==
-J.enabled||J.enabled?J.handler:function(){},J.image,J.title,J.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
-e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var N=b.style.border,qa=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 oa=b.getBoundingClientRect(),S=mxUtils.getScrollOrigin(document.body);S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};oa={left:oa.left-
-S.left,top:oa.top-S.top,bottom:oa.bottom-S.top,right:oa.right-S.left};e.style.left=oa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=oa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=oa.top+1+"px"):e.style.top=oa.top+"px";"1px solid transparent"==N&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var fa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=g&&
-(g.parentNode.removeChild(g),g=null);b.style.border=N});mxEvent.addListener(document,"mousemove",function(ia){for(ia=mxEvent.getSource(ia);null!=ia;){if(ia==b||ia==e||ia==g)return;ia=ia.parentNode}fa()});mxEvent.addListener(document.body,"mouseleave",function(ia){fa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",qa):qa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-e.parentNode&&qa()})).observe(b)};
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,m=null,C=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
+m=null}),100)}),ra||200)}),p=mxUtils.bind(this,function(ra){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ra||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ra){mxEvent.consume(ra)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ra){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ra){p(100);mxEvent.consume(ra)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ra){mxEvent.isTouchEvent(ra)||p(30)}));var F=this.graph,L=F.getTolerance();F.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ra,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=F.container.scrollLeft;this.scrollTop=F.container.scrollTop},mouseMove:function(ra,
+ba){},mouseUp:function(ra,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-F.container.scrollLeft)<L&&Math.abs(this.scrollTop-F.container.scrollTop)<L&&Math.abs(this.startX-ba.getGraphX())<L&&Math.abs(this.startY-ba.getGraphY())<L&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var P=this.toolbarItems,d=0,f=mxUtils.bind(this,function(ra,ba,oa,na){ra=this.createToolbarButton(ra,ba,oa,na);e.appendChild(ra);d++;return ra}),g=null,x=null,y=null,t=null,G=0;G<P.length;G++){var D=P[G];
+if("pages"==D){t=b.ownerDocument.createElement("div");t.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(t,70);var I=f(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");I.style.borderRightStyle="none";I.style.paddingLeft="0px";I.style.paddingRight="0px";e.appendChild(t);var H=f(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";D=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-block":"none";I.style.display=t.style.display;H.style.display=t.style.display});this.addListener("graphChanged",D);D()}else if("zoom"==D)this.zoomEnabled&&(f(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),f(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),f(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==D){if(this.layersEnabled){var S=this.graph.getModel(),T=f(mxUtils.bind(this,function(ra){if(null!=
+g)g.parentNode.removeChild(g),g=null;else{g=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),na=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale}):null!=this.graph.originalViewState&&0<oa.x/na.scale+this.graph.originalViewState.translate.x-na.translate.x&&0<oa.y/na.scale+this.graph.originalViewState.translate.y-
+na.translate.y&&(na.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:na.translate.clone(),scale:na.scale})}}));mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});ra=T.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily=Editor.defaultHtmlFont;
+g.style.fontSize="11px";g.style.overflowY="auto";g.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var ba=mxUtils.getDocumentScrollOrigin(document);g.style.left=ba.x+ra.left-1+"px";g.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");S.addListener(mxEvent.CHANGE,function(){T.style.display=1<S.getChildCount(S.root)?"inline-block":"none"});T.style.display=
+1<S.getChildCount(S.root)?"inline-block":"none"}}else if("tags"==D){if(this.tagsEnabled){var M=f(mxUtils.bind(this,function(ra){null==x&&(x=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),x.div.getElementsByTagName("div")[0].style.position="",x.div.style.maxHeight="160px",x.div.style.maxWidth="120px",x.div.style.padding="2px",x.div.style.overflow="auto",x.div.style.height="auto",x.div.style.position="fixed",x.div.style.fontFamily=Editor.defaultHtmlFont,x.div.style.fontSize="11px",
+x.div.style.backgroundColor="#eee",x.div.style.color="#000",x.div.style.border="1px solid #d0d0d0",x.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(x.div,80));if(null!=y)y.parentNode.removeChild(y),y=null;else{y=x.div;mxEvent.addListener(y,"mouseleave",function(){y.parentNode.removeChild(y);y=null});ra=M.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);y.style.left=ba.x+ra.left-1+"px";y.style.top=ba.y+ra.bottom-2+"px";document.body.appendChild(y);x.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");S.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));M.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==D?this.lightboxEnabled&&f(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(D=this.graphConfig["toolbar-buttons"][D],null!=D&&(D.elem=f(null==
+D.enabled||D.enabled?D.handler:function(){},D.image,D.title,D.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(P=b.ownerDocument.createElement("div"),P.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",P.setAttribute("title",this.graphConfig.title),mxUtils.write(P,this.graphConfig.title),mxUtils.setOpacity(P,70),
+e.appendChild(P),this.filename=P);this.minToolbarWidth=34*d;var fa=b.style.border,la=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ra=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ra={left:ra.left-
+ba.left,top:ra.top-ba.top,bottom:ra.bottom-ba.top,right:ra.right-ba.left};e.style.left=ra.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ra.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ra.top+1+"px"):e.style.top=ra.top+"px";"1px solid transparent"==fa&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+g&&(g.parentNode.removeChild(g),g=null);b.style.border=fa});mxEvent.addListener(document,"mousemove",function(na){for(na=mxEvent.getSource(na);null!=na;){if(na==b||na==e||na==g)return;na=na.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(na){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",la):la();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&la()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,k,m){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==m||m?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,m){if(null==m)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==m;)"a"==C.nodeName.toLowerCase()&&(m=C.getAttribute("href")),C=C.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(k):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
@@ -4136,10 +4147,10 @@ this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var K=m.editor.graph,P=K.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;K.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(K.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(K,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
-"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(K,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+m.refresh=function(){};var C=mxUtils.bind(this,function(g){27==g.keyCode&&m.destroy()}),p=this.initialOverflow,F=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;F.apply(this,arguments)};var L=m.editor.graph,P=L.container;P.style.overflow="hidden";this.lightboxChrome?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var d=this;L.getImageFromBundles=function(g){return d.getImageUrl(g)};var f=m.createTemporaryGraph;m.createTemporaryGraph=function(){var g=f.apply(this,arguments);g.getImageFromBundles=function(x){return d.getImageUrl(x)};return g};this.graphConfig.move&&(L.isMoveCellsEvent=function(g){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(P.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(P.style,"transition","all .25s ease-in-out"));this.addClickHandler(L,m);window.setTimeout(mxUtils.bind(this,function(){P.style.outline="none";P.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(P);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom=
+"60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});m.lightboxFit();m.chromelessResize();this.showLayers(L,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var m=document.getElementsByTagName("*");e=[];for(k=0;k<m.length;k++){var C=m[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(m[k]))}return e};
@@ -4148,7 +4159,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=k;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,m){function C(){this.q=[];this.add=function(y){this.q.push(y)};var g,x;this.call=function(){g=0;for(x=this.q.length;g<x;g++)this.q[g].call()}}function p(g,x){return g.currentStyle?g.currentStyle[x]:window.getComputedStyle?window.getComputedStyle(g,null).getPropertyValue(x):g.style[x]}function F(g,x){if(!g.resizedAttached)g.resizedAttached=
new C,g.resizedAttached.add(x);else if(g.resizedAttached){g.resizedAttached.add(x);return}g.resizeSensor=document.createElement("div");g.resizeSensor.className="resize-sensor";g.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";g.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],u=y.childNodes[0],H=g.resizeSensor.childNodes[1],J=function(){u.style.width="100000px";u.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};J();var D=!1,G=function(){g.resizedAttached&&(D&&(g.resizedAttached.call(),D=!1),b(G))};b(G);var W,T,Z,N;x=function(){if((Z=g.offsetWidth)!=W||(N=g.offsetHeight)!=T)D=!0,W=Z,T=N;J()};var qa=function(oa,
-S,fa){oa.attachEvent?oa.attachEvent("on"+S,fa):oa.addEventListener(S,fa)};qa(y,"scroll",x);qa(H,"scroll",x)}var K=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],K)}else F(k,K);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
+g.appendChild(g.resizeSensor);"static"==p(g,"position")&&(g.style.position="relative");var y=g.resizeSensor.childNodes[0],t=y.childNodes[0],G=g.resizeSensor.childNodes[1],D=function(){t.style.width="100000px";t.style.height="100000px";y.scrollLeft=1E5;y.scrollTop=1E5;G.scrollLeft=1E5;G.scrollTop=1E5};D();var I=!1,H=function(){g.resizedAttached&&(I&&(g.resizedAttached.call(),I=!1),b(H))};b(H);var S,T,M,fa;x=function(){if((M=g.offsetWidth)!=S||(fa=g.offsetHeight)!=T)I=!0,S=M,T=fa;D()};var la=function(ra,
+ba,oa){ra.attachEvent?ra.attachEvent("on"+ba,oa):ra.addEventListener(ba,oa)};la(y,"scroll",x);la(G,"scroll",x)}var L=function(){GraphViewer.resizeSensorEnabled&&m()},P=Object.prototype.toString.call(k),d="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===P||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(d){P=0;for(var f=k.length;P<f;P++)F(k[P],L)}else F(k,L);this.detach=function(){if(d)for(var g=0,x=k.length;g<x;g++)e.detach(k[g]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index c971901a..a6ec0af0 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"20.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index c5bacb06..239a9be3 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -735,7 +735,7 @@ templates=Vorlagen
text=Text
textAlignment=Text Ausrichtung
textOpacity=Text Deckkraft
-theme=Thema
+theme=Darstellung
timeout=ZeitĂĽberschreitung
title=Titel
to=bis
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index 2461bf1f..0a93988b 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -67,7 +67,7 @@ blockquote=Bloc de citation
blog=Blogue
bold=Gras
bootstrap=Bootstrap
-border=Border
+border=Bordure
borderColor=Couleur de la bordure
borderWidth=Largeur de la bordure
bottom=En bas
@@ -75,7 +75,7 @@ bottomAlign=Aligner en bas
bottomLeft=Aligner en bas Ă  gauche
bottomRight=Aligner en bas Ă  droite
bpmn=BPMN
-bringForward=Bring Forward
+bringForward=Faire avancer
browser=Navigateur
bulletedList=Liste Ă  puces
business=Entreprise
@@ -126,7 +126,7 @@ clearWaypoints=Effacer les repères
clipart=Clipart
close=Fermer
closingFile=Fermeture du fichier
-realtimeCollaboration=Real-Time Collaboration
+realtimeCollaboration=Collaboration en temps réel
collaborator=Collaborateur
collaborators=Collaborateurs
collapse=RĂ©duire
@@ -150,7 +150,7 @@ copiedToClipboard=Copié au presse-papier
copy=Copier
copyConnect=Copier Ă  la connexion
copyCreated=Une copie du fichier a été créée.
-copyData=Copy Data
+copyData=Copie des données
copyOf=Copie de {1}
copyOfDrawing=Copie d'un dessin
copySize=Copie de la taille
@@ -304,7 +304,7 @@ filetypeSvg=.svg causes file to save as SVG with embedded data
fileWillBeSavedInAppFolder={1} sera enregistré dans le dossier de l'application.
fill=Remplir
fillColor=Couleur de remplissage
-filterCards=Filter Cards
+filterCards=Cartes de filtre
find=Chercher
fit=Ajuster
fitContainer=Redimensionner le conteneur
@@ -354,7 +354,7 @@ fullscreen=Plein Ă©cran
gap=Espace
gcp=GCP
general=Général
-getNotionChromeExtension=Get the Notion Chrome Extension
+getNotionChromeExtension=Obtenir l'extension Notion pour Chrome
github=GitHub
gitlab=GitLab
gliffy=Gliffy
@@ -677,7 +677,7 @@ selectFont=SĂ©lectionner une police
selectNone=Tout désélectionner
selectTemplate=Choisir un modèle
selectVertices=SĂ©lectionner des sommets
-sendBackward=Send Backward
+sendBackward=Envoyer en arrière
sendMessage=Envoyer
sendYourFeedback=Envoyer votre commentaire
serviceUnavailableOrBlocked=Le service est indisponible ou bloqué
@@ -693,7 +693,7 @@ shareLink=Lien pour l'édition partagée
sharingAvailable=Sharing available for Google Drive and OneDrive files.
sharp=Dur
show=Montrer
-showRemoteCursors=Show Remote Mouse Cursors
+showRemoteCursors=Afficher les curseurs de la souris distante
showStartScreen=Montrer écran de démarrage
sidebarTooltip=Cliquer pour agrandir. Glisser et déposer les formes sur le diagramme. Maj+clic pour changer la sélection. Alt+clic pour insérer et connecter.
signs=Signes
@@ -728,7 +728,7 @@ sysml=SysML
tags=Tags
table=Tableau
tables=Tables
-takeOver=Take Over
+takeOver=Prendre le contrĂ´le
targetSpacing=Espacement de la cible
template=Modèle
templates=Modèles
@@ -775,7 +775,7 @@ updatingSelection=Mise à jour de la sélection. Veuillez patienter...
upload=Télécharger
url=URL
useOffline=Utiliser hors-ligne
-useRootFolder=Use root folder?
+useRootFolder=Utiliser le dossier racine ?
userManual=Manuel d'utilisation
vertical=Vertical
verticalFlow=Flux vertical
@@ -814,8 +814,8 @@ webLink=Hyperlien
wireframes=Maquettes conceptuelles
property=Propriétés
value=Valeur
-showMore=Show More
-showLess=Show Less
+showMore=Afficher plus
+showLess=Afficher moins
myDiagrams=My Diagrams
allDiagrams=All Diagrams
recentlyUsed=Recently used
@@ -860,7 +860,7 @@ selectSiblings=Sélectionner les co-latéraux
selectParent=SĂ©lectionner le parent
selectDescendants=SĂ©lectionner les descendants
lastSaved=Last saved {1} ago
-resolve=Resolve
+resolve=RĂ©soudre
reopen=RĂ©-ouvrir
showResolved=Show Resolved
reply=Reply
@@ -965,10 +965,10 @@ confAIndexDiagFailed=Indexing diagram "{1}" failed.
confASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!
confADiagUptoDate=Diagram "{1}" is up to date.
confACheckPagesWDraw=Checking pages having draw.io diagrams.
-confAErrOccured=An error occurred!
-savedSucc=Saved successfully
+confAErrOccured=Une erreur est survenue !
+savedSucc=Sauvegardé avec succès
confASaveFailedErr=Saving Failed (Unexpected Error)
-character=Character
+character=Caractère
confAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment
confALibPageDesc=This page contains draw.io custom libraries as attachments
confATempPageDesc=This page contains draw.io custom templates as attachments
@@ -1067,7 +1067,7 @@ confAReimportStarted=Re-import {1} diagrams started...
spaceFilter=Filter by spaces
curViewState=Current Viewer State
pageLayers=Page and Layers
-customize=Customize
+customize=Personnaliser
firstPage=First Page (All Layers)
curEditorState=Current Editor State
noAnchorsFound=No anchors found
@@ -1075,13 +1075,13 @@ attachment=Attachment
curDiagram=Current Diagram
recentDiags=Recent Diagrams
csvImport=CSV Import
-chooseFile=Choose a file...
-choose=Choose
+chooseFile=Choisir un fichier...
+choose=Choisir
gdriveFname=Google Drive filename
widthOfViewer=Width of the viewer (px)
heightOfViewer=Height of the viewer (px)
autoSetViewerSize=Automatically set the size of the viewer
-thumbnail=Thumbnail
+thumbnail=Miniature
prevInDraw=Preview in draw.io
onedriveFname=OneDrive filename
diagFname=Diagram filename
@@ -1109,7 +1109,7 @@ errGAuthWinBlocked=Error: Google Authentication window blocked
authDrawAccess=Authorize draw.io to access {1}
connTimeout=The connection has timed out
errAuthSrvc=Error authenticating to {1}
-plsSelectFile=Please select a file
+plsSelectFile=Veuillez sélectionner un fichier
mustBgtZ={1} must be greater than zero
cantLoadPrev=Cannot load file preview.
errAccessFile=Error: Access Denied. You do not have permission to access "{1}".
@@ -1144,7 +1144,7 @@ notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed
-contributors=Contributors
+contributors=Contributeurs
drawDiagrams=draw.io Diagrams
errFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.
confACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.
@@ -1182,7 +1182,7 @@ confPartialPageList=We couldn't fetch all pages due to an error in Confluence. C
spellCheck=Spell checker
noChange=No Change
lblToSvg=Convert labels to SVG
-txtSettings=Text Settings
+txtSettings=Paramètres du texte
LinksLost=Links will be lost
arcSize=Arc Size
editConnectionPoints=Edit Connection Points
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 1f22a41e..de0c1f7f 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,c,a)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(c.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=a(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"bd7965a97ad4dda04d5cc5112c0897e1"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"acea91d5b3b68fdec3f02c08a087aeb0"},{url:"index.html",revision:"ce45ae8650f5c256034bb1cb01a8278b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"74a0628d7ed019faac08680c1e5eda18"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"5cbc270aa83ca3972060fac0317d47aa"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"6028a57f97e49ee6fc173dcae2e9c8e8"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"3e57b80290703eb71edc942d86e2e385"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"c8411f9ffe8d33c461676508f1c2d388"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"75313e231874d093176e2e849b66c43f"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"98efe277ec681a6484f1d2e591cfeb8d"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,c,a)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(c.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=a(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-4768a546"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"cad0dba3fac4015470adfd8a7b7bc073"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"3d96d1eb82e1110df9f3a549d83d19db"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"ce45ae8650f5c256034bb1cb01a8278b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4cf52a1356b27d0709033f454e875f74"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"c52b2f8c9375bee16f723d685c8ab594"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"2295073c89ee8d856cc6ba12c4b9f4ca"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"51177342e9df51e133f05e61575131ee"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"15188e7f36099d5e2ad0fafe4f783f44"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"9835a94d469af27db7dbfecf6d434ebc"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"b955242f6e100ced4c965bfbc7aee610"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"1a42bea88b2eb89ae8261a0d11106e78"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"96eaa2f5b2f0adbe943994fce638b616"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"63ca63773f881838319bad29ad26511d"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"f0ef067bd037594e12fb8d51a82b4602"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"f798286d581a0e74fe1d5d9c6c396a41"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 50a0a899..bdc6649e 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/a2b08e7755f882c79d7f949f10b24de8/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"bd7965a97ad4dda04d5cc5112c0897e1\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"acea91d5b3b68fdec3f02c08a087aeb0\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"ce45ae8650f5c256034bb1cb01a8278b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"74a0628d7ed019faac08680c1e5eda18\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5cbc270aa83ca3972060fac0317d47aa\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"6028a57f97e49ee6fc173dcae2e9c8e8\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"3e57b80290703eb71edc942d86e2e385\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"c8411f9ffe8d33c461676508f1c2d388\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"75313e231874d093176e2e849b66c43f\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"98efe277ec681a6484f1d2e591cfeb8d\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/be9b51b408f0b83e06adad63bbefb661/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.20.0/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"cad0dba3fac4015470adfd8a7b7bc073\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"3d96d1eb82e1110df9f3a549d83d19db\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"ce45ae8650f5c256034bb1cb01a8278b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4cf52a1356b27d0709033f454e875f74\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"c52b2f8c9375bee16f723d685c8ab594\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"2295073c89ee8d856cc6ba12c4b9f4ca\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"51177342e9df51e133f05e61575131ee\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"15188e7f36099d5e2ad0fafe4f783f44\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"9835a94d469af27db7dbfecf6d434ebc\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"b955242f6e100ced4c965bfbc7aee610\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"1a42bea88b2eb89ae8261a0d11106e78\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"96eaa2f5b2f0adbe943994fce638b616\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"63ca63773f881838319bad29ad26511d\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f0ef067bd037594e12fb8d51a82b4602\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f798286d581a0e74fe1d5d9c6c396a41\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
diff --git a/src/main/webapp/styles/grapheditor.css b/src/main/webapp/styles/grapheditor.css
index c330a064..59ea2555 100644
--- a/src/main/webapp/styles/grapheditor.css
+++ b/src/main/webapp/styles/grapheditor.css
@@ -289,7 +289,7 @@
opacity: 0.6;
}
.geToolbarButton:active {
- opacity: 0.2;
+ opacity: 0.2 !important;
}
.mxDisabled:hover {
background:inherit !important;