14.3.1 release

This commit is contained in:
David Benson [draw.io] 2021-02-11 13:47:09 +00:00
parent c5646a5107
commit 7dbc1273e5
79 changed files with 793 additions and 592 deletions

View file

@ -1,4 +1,9 @@
08-Feb-2021: 14.3.0
11-FEB-2021: 14.3.1
- Adds support for regional direction to back-ends
- Adds grid option to export dialog
08-FEB-2021: 14.3.0
- Fixes external fonts in PDF export
- Fixes drag and drop for shapes with shadow

View file

@ -1 +1 @@
14.3.0
14.3.1

View file

@ -238,9 +238,9 @@ window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocal
function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"trello"==urlParams.mode&&(urlParams.tr="1");if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";"trello"==urlParams.mode&&(urlParams.tr="1");if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";"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.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:"14.2.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
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:"14.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>
navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=
@ -474,7 +474,8 @@ m.className="mxPopupMenuItem"+(null==f||f?"":" mxDisabled"),mxUtils.write(m,a),m
this.hideSubmenu(d),null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));null==document.selection||!mxClient.IS_QUIRKS&&8!=document.documentMode||(n=document.selection.createRange());mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=l&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));k||(l.className="mxPopupMenuItemHover")}),mxUtils.bind(this,function(a){if(this.eventReceiver==
l){d.activeRow!=l&&this.hideMenu();if(null!=n){try{n.select()}catch(q){}n=null}null!=c&&c(a)}this.eventReceiver=null;mxEvent.consume(a)}));k||mxEvent.addListener(l,"mouseout",mxUtils.bind(this,function(a){l.className="mxPopupMenuItem"}))}return l};mxPopupMenu.prototype.addCheckmark=function(a,b){var c=a.firstChild.nextSibling;c.style.backgroundImage="url('"+b+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="2px 50%"};
mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;c+d>e.x+(document.body.clientWidth||f.clientWidth)&&(b.div.style.left=Math.max(0,a.div.offsetLeft-d+(mxClient.IS_IE?6:-6))+"px");mxUtils.fit(b.div)}};
mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;c+d>e.x+(document.body.clientWidth||f.clientWidth)&&(b.div.style.left=Math.max(0,a.div.offsetLeft-d+(mxClient.IS_IE?6:-6))+"px");b.div.style.overflowY="auto";
b.div.style.overflowX="hidden";b.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px";mxUtils.fit(b.div)}};
mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1,this.fireEvent(new mxEventObject(mxEvent.HIDE)))};
@ -552,7 +553,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor)if(a=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),this.root.ownerDocument==document&&this.useAbsoluteIds){var b=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill","url("+b+"#"+a+")")}else this.node.setAttribute("fill",
"url(#"+a+")");else this.node.setAttribute("fill",String(a.fillColor).toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
@ -2272,13 +2273,13 @@ this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*
Math.round((f-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var D=a.view.getBackgroundPane(),B=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,E=null,H=null,I=null,J=null,F=function(d){null!=z&&window.clearTimeout(z);window.setTimeout(function(){if(!a.isMouseDown||I)z=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),B.style.transformOrigin="",D.style.transformOrigin="",mxClient.IS_SF?(B.style.transform="scale(1)",D.style.transform="scale(1)",window.setTimeout(function(){B.style.transform="";D.style.transform=""},0)):(B.style.transform="",D.style.transform=""),a.view.getDecoratorPane().style.opacity="",
a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),e=a.view.scale,g=0,h=0;null!=E&&(g=a.container.offsetWidth/2-E.x+f.x,h=a.container.offsetHeight/2-E.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=e&&(null!=H&&(g+=d.x-H.x,h+=d.y-H.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-
1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=J&&B.setAttribute("filter",J);a.cumulativeZoomFactor=1;J=I=E=H=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)};a.lazyZoom=function(c,d,f){(d=d||!a.scrollbars)&&(E=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=
this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==
J&&""!=B.getAttribute("filter")&&(J=B.getAttribute("filter"),B.removeAttribute("filter"));H=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:E.x+a.container.scrollLeft-a.container.offsetLeft;var e=d?a.container.scrollTop+a.container.clientHeight/2:E.y+a.container.scrollTop-a.container.offsetTop;B.style.transformOrigin=c+"px "+e+"px";B.style.transform="scale("+this.cumulativeZoomFactor+")";D.style.transformOrigin=c+"px "+e+"px";D.style.transform=
"scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":E.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":E.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,
"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}F(f)};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&F(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||F(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,f,e){if(null==
this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),f=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-f:f),d.y):a.view.setTranslate(d.x,d.y+(c?f:-f));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),E=null!=f&&null!=e?new mxPoint(f,e):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),I=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),
a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=J&&B.setAttribute("filter",J);a.cumulativeZoomFactor=1;J=I=E=H=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},P=Date.now();a.lazyZoom=function(c,d,f){(d=d||!a.scrollbars)&&(E=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(!(15>Date.now()-P)){P=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+
.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,
160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=B.getAttribute("filter")&&(J=B.getAttribute("filter"),B.removeAttribute("filter"));H=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:E.x+a.container.scrollLeft-a.container.offsetLeft;var e=d?a.container.scrollTop+a.container.clientHeight/2:E.y+a.container.scrollTop-a.container.offsetTop;B.style.transformOrigin=c+"px "+e+"px";B.style.transform="scale("+this.cumulativeZoomFactor+
")";D.style.transformOrigin=c+"px "+e+"px";D.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":E.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":E.y+a.container.scrollTop-c.offsetTop-
a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}F(f)}};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&F(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||F(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,
function(b,c,d,f,e){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),f=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-f:f),d.y):a.view.setTranslate(d.x,d.y+(c?f:-f));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),E=null!=f&&null!=e?new mxPoint(f,e):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),I=d,a.lazyZoom(c),mxEvent.consume(b),
!1;g=g.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,b=60;null!=c&&(b=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@ -2583,7 +2584,7 @@ Sidebar.prototype.addPalette=function(a,c,b,d){c=this.createTitle(c);this.contai
Sidebar.prototype.addFoldingHandler=function(a,c,b){var d=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(e){if("none"==c.style.display){if(d)c.style.display="block";else if(d=!0,null!=b){a.style.cursor="wait";var f=a.innerHTML;a.innerHTML=mxResources.get("loading")+
"...";window.setTimeout(function(){c.style.display="block";a.style.cursor="";a.innerHTML=f;var d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;b(c,a);mxClient.NO_FO=d},mxClient.IS_FF?20:0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(e)}));mxClient.IS_QUIRKS||mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
function(a){a.preventDefault()}))};Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
Sidebar.prototype.addImagePalette=function(a,c,b,d,e,f,g){for(var h=[],k=0;k<e.length;k++)mxUtils.bind(this,function(a,c,f){if(null==f){f=a.lastIndexOf("/");var e=a.lastIndexOf(".");f=a.substring(0<=f?f+1:0,0<=e?e:a.length).replace(/[-_]/g," ")}h.push(this.createVertexTemplateEntry("image;html=1;image="+b+a+d,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(f)))})(e[k],null!=f?f[k]:null,null!=g?g[e[k]]:null);this.addPaletteFunctions(a,c,!1,h)};
Sidebar.prototype.addImagePalette=function(a,c,b,d,e,f,g){for(var h=[],k=0;k<e.length;k++)mxUtils.bind(this,function(a,c,e){if(null==e){e=a.lastIndexOf("/");var f=a.lastIndexOf(".");e=a.substring(0<=e?e+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}h.push(this.createVertexTemplateEntry("image;html=1;image="+b+a+d,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(e)))})(e[k],null!=f?f[k]:null,null!=g?g[e[k]]:null);this.addPaletteFunctions(a,c,!1,h)};
Sidebar.prototype.getTagsForStencil=function(a,c,b){a=a.split(".");for(var d=1;d<a.length;d++)a[d]=a[d].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=b&&a.push(b);return a.slice(1,a.length)};
Sidebar.prototype.addStencilPalette=function(a,c,b,d,e,f,g,h,k,l){g=null!=g?g:1;if(this.addStencilsToIndex){var n=[];if(null!=k)for(l=0;l<k.length;l++)n.push(k[l]);mxStencilRegistry.loadStencilSet(b,mxUtils.bind(this,function(a,b,c,f,k){if(null==e||0>mxUtils.indexOf(e,b)){c=this.getTagsForStencil(a,b);var l=null!=h?h[b]:null;null!=l&&c.push(l);n.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+d,Math.round(f*g),Math.round(k*g),"",b.replace(/_/g," "),null,null,this.filterTags(c.join(" "))))}}),
!0,!0);this.addPaletteFunctions(a,c,!1,n)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==d&&(d="");null!=f&&f.call(this,a);if(null!=k)for(var c=0;c<k.length;c++)k[c](a);mxStencilRegistry.loadStencilSet(b,mxUtils.bind(this,function(b,c,f,h,k){(null==e||0>mxUtils.indexOf(e,c))&&a.appendChild(this.createVertexTemplate("shape="+b+c.toLowerCase()+d,Math.round(h*g),Math.round(k*g),"",c.replace(/_/g," "),!0))}),!0)}))};
@ -2662,11 +2663,11 @@ d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==m
mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph)}return null}};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 a=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var b=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(b,d,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/a.width)-b,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/a.height)-
d)};Graph.prototype.sanitizeHtml=function(a,c){return Graph.sanitizeHtml(a,c)};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var b=this.model.cells[c];this.isReplacePlaceholders(b)&&(this.view.invalidate(b,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
Graph.prototype.isSplitTarget=function(a,c,b){return!this.model.isEdge(c[0])&&!mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var c=mxGraph.prototype.getLabel.apply(this,arguments);null!=c&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(c=this.replacePlaceholders(a,c));return c};
Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
d)};Graph.prototype.sanitizeHtml=function(a,c){return Graph.sanitizeHtml(a,c)};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var b=this.model.cells[c];this.isReplacePlaceholders(b)&&(this.view.invalidate(b,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isControlDown(a)};
Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};Graph.prototype.isSplitTarget=function(a,c,b){return!this.model.isEdge(c[0])&&!mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Graph.prototype.getLabel=function(a){var c=mxGraph.prototype.getLabel.apply(this,arguments);null!=c&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(c=this.replacePlaceholders(a,c));return c};Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(c,"labelMovable","0")))};
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};
Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,b){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,g=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),b=!0);var h=b?"getUTC":"get",k=a[h+"Date"](),l=a[h+"Day"](),n=a[h+"Month"](),p=a[h+"FullYear"](),m=a[h+"Hours"](),q=a[h+"Minutes"](),v=a[h+"Seconds"](),h=a[h+"Milliseconds"](),u=b?0:a.getTimezoneOffset(),t={d:k,dd:g(k),ddd:d.i18n.dayNames[l],dddd:d.i18n.dayNames[l+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
@ -2787,7 +2788,7 @@ Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null
function(a,b,c){if(b||c)k.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,f=[],g=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),b==d)e=f.length-1;else if(a&&null==d&&0<f.length||null!=e&&a&&f.length>e||!a&&0<e)return;for(var c=0;c<this.model.getChildCount(b);c++)g(this.model.getChildAt(b,c))});g(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var l=Graph.prototype.moveCells;
Graph.prototype.moveCells=function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var h=[],k=0;k<a.length;k++)this.isTable(a[k])?h=h.concat(this.model.getChildCells(a[k],!0).reverse()):h.push(a[k]);a=h}this.model.beginUpdate();try{h=[];for(k=0;k<a.length;k++)if(null!=e&&this.isTableRow(a[k])){var G=this.model.getParent(a[k]),M=this.getCellGeometry(a[k]);this.isTable(G)&&h.push(G);if(null!=G&&null!=M&&this.isTable(G)&&this.isTable(e)&&(d||G!=e)){if(!d){var m=this.getCellGeometry(G);null!=m&&
(m=m.clone(),m.height-=M.height,this.model.setGeometry(G,m))}m=this.getCellGeometry(e);null!=m&&(m=m.clone(),m.height+=M.height,this.model.setGeometry(e,m));var n=this.model.getChildCells(e,!0);if(0<n.length){a[k]=d?this.cloneCell(a[k]):a[k];var R=this.model.getChildCells(a[k],!0),p=this.model.getChildCells(n[0],!0),X=p.length-R.length;if(0<X)for(var Q=0;Q<X;Q++){var q=this.cloneCell(R[R.length-1]);null!=q&&(q.value="",this.model.add(a[k],q))}else if(0>X)for(Q=0;Q>X;Q--)this.model.remove(R[R.length+
Q-1]);R=this.model.getChildCells(a[k],!0);for(Q=0;Q<p.length;Q++){var v=this.getCellGeometry(p[Q]),ja=this.getCellGeometry(R[Q]);null!=v&&null!=ja&&(ja=ja.clone(),ja.width=v.width,this.model.setGeometry(R[Q],ja))}}}}for(var t=l.apply(this,arguments),k=0;k<h.length;k++)!d&&this.model.contains(h[k])&&0==this.model.getChildCount(h[k])&&this.model.remove(h[k]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),t)}finally{this.model.endUpdate()}return t};var n=Graph.prototype.removeCells;
Q-1]);R=this.model.getChildCells(a[k],!0);for(Q=0;Q<p.length;Q++){var v=this.getCellGeometry(p[Q]),fa=this.getCellGeometry(R[Q]);null!=v&&null!=fa&&(fa=fa.clone(),fa.width=v.width,this.model.setGeometry(R[Q],fa))}}}}for(var t=l.apply(this,arguments),k=0;k<h.length;k++)!d&&this.model.contains(h[k])&&0==this.model.getChildCount(h[k])&&this.model.remove(h[k]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),t)}finally{this.model.endUpdate()}return t};var n=Graph.prototype.removeCells;
Graph.prototype.removeCells=function(a,b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)if(this.isTableCell(a[d])){var e=this.model.getParent(a[d]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),h=0,k=0;k<
g.length;k++)0<=mxUtils.indexOf(a,g[k])&&h++;h==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=
e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(wa){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=
@ -2829,12 +2830,12 @@ function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown
p?this.view.getBackgroundPageBounds():f||d||"diagram"==p?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==M)throw Error(mxResources.get("drawingEmpty"));var G=this.view.scale,R=mxUtils.createXmlDocument(),q=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"svg"):R.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==R.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",
mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/G;var v=Math.max(1,Math.ceil(M.width*a)+2*c)+(l?5:0),t=Math.max(1,Math.ceil(M.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",t+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+t);R.appendChild(q);var X=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"g"):R.createElement("g");q.appendChild(X);var r=
this.createSvgCanvas(X);r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-M.x)/G),Math.floor((c/b-M.y)/G));var Q=document.createElement("div"),u=r.getAlternateText;r.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(Q.innerHTML=f,f=mxUtils.extractTextWithWhitespace(Q.childNodes));for(var M=Math.ceil(2*d/this.state.fontSize),y=[],Y=0,Ha=0;(0==M||Y<M)&&Ha<f.length;){var oa=f.charCodeAt(Ha);
if(10==oa||13==oa){if(0<Y)break}else y.push(f.charAt(Ha)),255>oa&&Y++;Ha++}y.length<f.length&&1<f.length-y.length&&(f=mxUtils.trim(y.join(""))+"...");return f}catch($a){return u.apply(this,arguments)}else return u.apply(this,arguments)};var C=this.backgroundImage;if(null!=C){b=G/b;var x=this.view.translate,w=new mxRectangle(x.x*b,x.y*b,C.width*b,C.height*b);mxUtils.intersects(M,w)&&r.image(x.x,x.y,C.width,C.height,C.src,!0)}r.scale(a);r.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var D=
h.drawCellState,S=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=S.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&D.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);this.addForeignObjectWarning(r,q);return q}finally{m&&(this.useCssTransforms=
!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if("0"!=urlParams["svg-warning"]&&0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",
Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=
function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();
b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getSelectedEditingElement=function(){for(var a=this.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;null!=a&&a==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=this.cellEditor.textarea.firstChild);
if(10==oa||13==oa){if(0<Y)break}else y.push(f.charAt(Ha)),255>oa&&Y++;Ha++}y.length<f.length&&1<f.length-y.length&&(f=mxUtils.trim(y.join(""))+"...");return f}catch($a){return u.apply(this,arguments)}else return u.apply(this,arguments)};var C=this.backgroundImage;if(null!=C){b=G/b;var x=this.view.translate,w=new mxRectangle(x.x*b,x.y*b,C.width*b,C.height*b);mxUtils.intersects(M,w)&&r.image(x.x,x.y,C.width,C.height,C.src,!0)}r.scale(a);r.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var S=
h.drawCellState,fa=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=fa.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&S.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);this.addForeignObjectWarning(r,q);return q}finally{m&&
(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if("0"!=urlParams["svg-warning"]&&0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?
(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};
Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=
window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getSelectedEditingElement=function(){for(var a=this.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;null!=a&&a==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=this.cellEditor.textarea.firstChild);
return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&
"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.deleteCells=function(a,b){var c=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.model.getParent(a[d]);if(this.isTable(e)){var f=this.getCellGeometry(a[d]),g=this.getCellGeometry(e);null!=f&&null!=g&&(g=g.clone(),g.height-=f.height,this.model.setGeometry(e,g))}}var h=this.selectParentAfterDelete?this.model.getParents(a):
null;this.removeCells(a,b)}finally{this.model.endUpdate()}if(null!=h)for(c=[],d=0;d<h.length;d++)this.model.contains(h[d])&&(this.model.isVertex(h[d])||this.model.isEdge(h[d]))&&c.push(h[d])}return c};Graph.prototype.insertTableColumn=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=mxUtils.indexOf(c.getChildCells(f,!0),a);else this.isTableRow(a)?d=c.getParent(a):a=c.getChildCells(d,!0)[0],b||(e=c.getChildCells(a,!0).length-
@ -2910,22 +2911,22 @@ this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!
var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
this.secondDiv=null)),b.consume()}};var K=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);K.apply(this,arguments)};var L=(new Date).getTime(),S=0,fa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){fa.apply(this,arguments);c!=this.currentTerminalState?(L=(new Date).getTime(),S=0):S=(new Date).getTime()-L;this.currentTerminalState=
this.secondDiv=null)),b.consume()}};var K=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);K.apply(this,arguments)};var L=(new Date).getTime(),S=0,ga=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){ga.apply(this,arguments);c!=this.currentTerminalState?(L=(new Date).getTime(),S=0):S=(new Date).getTime()-L;this.currentTerminalState=
c};var la=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<S||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&la.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var ga=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ga.apply(this,arguments)};var V=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);
if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return V.apply(this,arguments)};var ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ha.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var pa=mxVertexHandler.prototype.getSelectionBounds;
mxConstants.HANDLE_STROKECOLOR)};var ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ha.apply(this,arguments)};var V=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);
if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return V.apply(this,arguments)};var ia=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ia.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var pa=mxVertexHandler.prototype.getSelectionBounds;
mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):pa.apply(this,arguments)};var ma=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,
b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ma.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);
this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var qa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){qa.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(a,b){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=
null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ja=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){ja.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 da=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){da.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var b=0;4>b;b++){var c=new mxRectangleShape(new mxRectangle(0,
0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);c.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;c.init(this.graph.view.getOverlayPane());this.cornerHandles.push(c)}}var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);b=this.graph.getLinkForCell(this.state.cell);c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};
mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),
this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));
var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=
document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(f)}}}catch(ja){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ea=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ea.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});
document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(f)}}}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ea=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ea.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});
var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var W=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){W.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ca=mxVertexHandler.prototype.redrawHandles;
mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),b=this.cornerHandles,c=b[0].bounds.height/2;b[0].bounds.x=this.state.x-b[0].bounds.width/2+a;b[0].bounds.y=
@ -3049,14 +3050,14 @@ a.appendChild(t),mxEvent.addListener(P,"change",function(a){d.setCellStyles(mxCo
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var b=function(b,e){null!=d.cellEditor.textarea&&b!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(b)&&(e||c.containsNode(b,!0))&&("FONT"==b.nodeName?(b.removeAttribute("size"),b.style.fontSize=a+"px"):mxUtils.getCurrentStyle(b).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(b.parentNode).fontSize!=a+"px"?b.style.fontSize=a+"px":b.style.fontSize=""))},c=window.getSelection(),e=0<c.rangeCount?c.getRangeAt(0).commonAncestorContainer:
d.cellEditor.textarea;e!=d.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=d.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");b(e);for(e=0;e<f.length;e++)b(f[e])}N.value=a+" pt"}else if(window.getSelection||document.selection)if(b=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():
(c=window.getSelection(),0<c.rangeCount&&(f=c.getRangeAt(0).commonAncestorContainer)),null!=f&&b(d.cellEditor.textarea,f))for(K=a,document.execCommand("fontSize",!1,"4"),f=d.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=K+"px";window.setTimeout(function(){N.value=K+" pt";K=null},0);break}},!0),p=this.createStepper(N,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=N.style.display;p.style.marginTop=
"4px";mxClient.IS_QUIRKS||(p.style.right="20px");h.appendChild(p);h=k.getElementsByTagName("div")[0];h.style.cssFloat="right";var L=null,S="#ffffff",fa=null,la="#000000",ga=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return S},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){d.updateLabelElements(d.getSelectionCells(),function(a){a.style.backgroundColor=null})});ga.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";h=1<=e.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();h=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
"4px";mxClient.IS_QUIRKS||(p.style.right="20px");h.appendChild(p);h=k.getElementsByTagName("div")[0];h.style.cssFloat="right";var L=null,S="#ffffff",ga=null,la="#000000",ha=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return S},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){d.updateLabelElements(d.getSelectionCells(),function(a){a.style.backgroundColor=null})});ha.style.fontWeight="bold";var V=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");V.style.fontWeight="bold";h=1<=e.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();h=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
function(){return la},function(a){if(mxClient.IS_FF){for(var b=d.cellEditor.textarea.getElementsByTagName("font"),c=[],e=0;e<b.length;e++)c.push({node:b[e],color:b[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=d.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=c.length||a[e]!=c[e].node||a[e]==c[e].node&&a[e].getAttribute("color")!=c[e].color){c=a[e].firstChild;if(null!=c&&"A"==c.nodeName&&null==c.nextSibling&&null!=
c.firstChild){a[e].parentNode.insertBefore(c,a[e]);for(b=c.firstChild;null!=b;){var f=b.nextSibling;a[e].appendChild(b);b=f}c.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:"#000000",{install:function(a){fa=a},destroy:function(){fa=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:
"#000000",function(a){ga.style.display=a==mxConstants.NONE?"none":"";V.style.display=ga.style.display},function(a){a==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells());d.updateCellStyles(mxConstants.STYLE_FONTCOLOR,a,d.getSelectionCells());d.updateLabelElements(d.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});h.style.fontWeight="bold";g.appendChild(h);g.appendChild(ga);
c.firstChild){a[e].parentNode.insertBefore(c,a[e]);for(b=c.firstChild;null!=b;){var f=b.nextSibling;a[e].appendChild(b);b=f}c.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:"#000000",{install:function(a){ga=a},destroy:function(){ga=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:
"#000000",function(a){ha.style.display=a==mxConstants.NONE?"none":"";V.style.display=ha.style.display},function(a){a==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells());d.updateCellStyles(mxConstants.STYLE_FONTCOLOR,a,d.getSelectionCells());d.updateLabelElements(d.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});h.style.fontWeight="bold";g.appendChild(h);g.appendChild(ha);
d.cellEditor.isContentEditing()||g.appendChild(V);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";h=d.filterSelectionCells(mxUtils.bind(this,function(a){var b=d.view.getState(a);return null==b||this.format.isAutoSizeState(b)||d.getModel().isEdge(a)||!d.isCellResizable(a)}));p=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,h);p.style.fontWeight="bold";0<h.length&&g.appendChild(p);h=this.createCellOption(mxResources.get("formattedText"),
"html","0",null,null,null,b.actions.get("formattedText"));h.style.fontWeight="bold";g.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,mxResources.get("spacing"));h.appendChild(p);var ha,pa,ma,qa,ia,da=this.addUnitInput(h,"pt",91,44,function(){ha.apply(this,arguments)}),ea=this.addUnitInput(h,
"pt",20,44,function(){pa.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),91);this.addLabel(h,mxResources.get("global"),20);mxUtils.br(h);mxUtils.br(h);var W=this.addUnitInput(h,"pt",162,44,function(){ma.apply(this,arguments)}),ca=this.addUnitInput(h,"pt",91,44,function(){qa.apply(this,arguments)}),ka=this.addUnitInput(h,"pt",20,44,function(){ia.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),
"html","0",null,null,null,b.actions.get("formattedText"));h.style.fontWeight="bold";g.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,mxResources.get("spacing"));h.appendChild(p);var ia,pa,ma,qa,ja,da=this.addUnitInput(h,"pt",91,44,function(){ia.apply(this,arguments)}),ea=this.addUnitInput(h,
"pt",20,44,function(){pa.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),91);this.addLabel(h,mxResources.get("global"),20);mxUtils.br(h);mxUtils.br(h);var W=this.addUnitInput(h,"pt",162,44,function(){ma.apply(this,arguments)}),ca=this.addUnitInput(h,"pt",91,44,function(){qa.apply(this,arguments)}),ka=this.addUnitInput(h,"pt",20,44,function(){ja.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),162);this.addLabel(h,mxResources.get("bottom"),
91);this.addLabel(h,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var Z=null,T=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=""==a.value?120:parseInt(a.value),b=Math.max(0,isNaN(b)?120:b);null!=Z&&(d.cellEditor.restoreSelection(Z),Z=null);for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&
(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),c=d.cellEditor.textarea.firstChild);null!=c&&null!=d.cellEditor.textarea&&c!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(c)&&(c.style.lineHeight=b+"%");a.value=b+" %"},function(a){T=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&(Z=d.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Z=d.cellEditor.saveSelection())});
a.value="120 %"}));g=f.cloneNode(!1);g.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],g,!0);p=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},g),this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(p);h=this.createPanel();
@ -3073,13 +3074,13 @@ mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=N)a=parseFloat(
c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&
b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(e.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.value="automatic");if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(e.style,
mxConstants.STYLE_SPACING,2)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_TOP,0)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ka)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_RIGHT,0)),ka.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=W)a=parseFloat(mxUtils.getValue(e.style,
mxConstants.STYLE_SPACING_LEFT,0)),W.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");ha=this.installInputHandler(da,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ia=this.installInputHandler(ka,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ma=this.installInputHandler(W,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(N,aa);this.addKeyHandler(ea,
mxConstants.STYLE_SPACING_LEFT,0)),W.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ea,mxConstants.STYLE_SPACING,2,-999,999," pt");ia=this.installInputHandler(da,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ja=this.installInputHandler(ka,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ma=this.installInputHandler(W,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(N,aa);this.addKeyHandler(ea,
aa);this.addKeyHandler(da,aa);this.addKeyHandler(ka,aa);this.addKeyHandler(ca,aa);this.addKeyHandler(W,aa);d.getModel().addListener(mxEvent.CHANGE,aa);this.listeners.push({destroy:function(){d.getModel().removeListener(aa)}});aa();if(d.cellEditor.isContentEditing()){var G=!1,f=function(){G||(G=!0,window.setTimeout(function(){var a=d.getSelectedEditingElement();if(null!=a){var b=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)==
"-"+b}return!1},f=function(b){if(null!=d.getParentByName(a,b,d.cellEditor.textarea))return!0;for(var c=a;null!=c&&1==c.childNodes.length;)if(c=c.childNodes[0],c.nodeName==b)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/
100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},m=mxUtils.getCurrentStyle(a),n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<r.length;w++)if(t.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),J=h(n,temp,r[w]);if(J!=p||isNaN(J))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||f("B")||f("STRONG")),c(l[1],"italic"==m.fontStyle||
f("I")||f("EM")),c(l[2],f("U")),c(C,f("SUP")),c(x,f("SUB")),d.cellEditor.isTableSelected()?(c(D,b(m.textAlign,"justify")),c(q,b(m.textAlign,"left")),c(v,b(m.textAlign,"center")),c(u,b(m.textAlign,"right"))):(f=d.cellEditor.align||mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),b(m.textAlign,"justify")?(c(D,b(m.textAlign,"justify")),c(q,!1),c(v,!1),c(u,!1)):(c(D,!1),c(q,f==mxConstants.ALIGN_LEFT),c(v,f==mxConstants.ALIGN_CENTER),c(u,f==mxConstants.ALIGN_RIGHT))),z=d.getParentByName(a,
"TABLE",d.cellEditor.textarea),H=null==z?null:d.getParentByName(a,"TR",z),E=null==z?null:d.getParentByNames(a,["TD","TH"],z),B.style.display=null!=z?"":"none",document.activeElement!=N&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=K?(a.removeAttribute("size"),a.style.fontSize=K+" pt",K=null):N.value=isNaN(n)?"":n+" pt",J=parseFloat(p),isNaN(J)?T.value="100 %":T.value=Math.round(100*J)+" %"),b=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+
("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=fa&&(la="#"==b.charAt(0)?b:"#000000",fa(la,!0)),null!=L&&(S="#"==n.charAt(0)?n:null,L(S,!0)),null!=k.firstChild&&(k.firstChild.nodeValue=Graph.stripQuotes(m.fontFamily)))}G=
("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=ga&&(la="#"==b.charAt(0)?b:"#000000",ga(la,!0)),null!=L&&(S="#"==n.charAt(0)?n:null,L(S,!0)),null!=k.firstChild&&(k.firstChild.nodeValue=Graph.stripQuotes(m.fontFamily)))}G=
!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",f);mxEvent.addListener(d.cellEditor.textarea,"input",f);mxEvent.addListener(d.cellEditor.textarea,"touchend",f);mxEvent.addListener(d.cellEditor.textarea,"mouseup",f);mxEvent.addListener(d.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};StyleFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
@ -3199,9 +3200,9 @@ DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxReso
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function b(){mxActor.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function h(){mxShape.call(this)}function k(){mxShape.call(this)}function l(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}
function q(){mxActor.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function t(){mxActor.call(this)}function w(){mxActor.call(this)}function r(){mxActor.call(this)}function A(){mxActor.call(this)}function x(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,x.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,
x.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,x.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,x.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,x.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,x.prototype.arcTo)}function C(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function B(){mxActor.call(this)}
function z(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function F(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxEllipse.call(this)}function U(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}
function ga(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ha(){mxCylinder.call(this)}function pa(){mxRectangleShape.call(this)}function ma(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ia(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ka(){mxActor.call(this)}function Z(){mxActor.call(this)}
function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function Q(){mxActor.call(this)}function ja(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ia(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}
function z(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxRectangleShape.call(this)}function I(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function F(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxEllipse.call(this)}function U(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function L(){mxShape.call(this)}function S(){mxShape.call(this)}function ga(){mxShape.call(this)}function la(){mxShape.call(this)}
function ha(){mxShape.call(this)}function V(){mxCylinder.call(this)}function ia(){mxCylinder.call(this)}function pa(){mxRectangleShape.call(this)}function ma(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function ja(){mxArrowConnector.call(this);this.spacing=0}function da(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ka(){mxActor.call(this)}function Z(){mxActor.call(this)}
function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function G(){mxActor.call(this)}function M(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function Q(){mxActor.call(this)}function fa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ia(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}
function Ca(){mxActor.call(this)}function ua(){mxActor.call(this)}function va(){mxActor.call(this)}function sa(){mxConnector.call(this)}function Na(a,b,c,d,e,f,g,h,k,l){g+=k;var y=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(y.x-e-g,y.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,
arguments)};a.prototype.paintVertexShape=function(a,b,c,d,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-c));this.paintForeground(a,b,c,d,e)};a.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.state){var f=this.flipH,y=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=f,f=y,y=g;a.rotate(-this.getShapeRotation(),
f,y,b+d/2,c+e/2);s=this.scale;b=this.bounds.x/s;c=this.bounds.y/s;d=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(a,b,c,d,e)}};a.prototype.paintTableForeground=function(a,b,c,d,e){var f=this.state.view.graph,y=f.getActualStartSize(this.state.cell),g=f.model.getChildCells(this.state.cell,!0);if(0<g.length){var h="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),k="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(h)for(h=1;h<g.length;h++){var Y=f.getCellGeometry(g[h]);
@ -3277,14 +3278,14 @@ e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+y),new mxPoint(g+
h+y),new mxPoint(g,h+y-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?E.prototype.fixedSize:E.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var g=a.x,h=a.y,k=a.width,y=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=
b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(y,f)):y*Math.max(0,Math.min(1,f)),h=[new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+y-e),new mxPoint(l,h+y),new mxPoint(g,h+y-e),new mxPoint(g,h+e),new mxPoint(l,h)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k-e,h),new mxPoint(g+k,a),new mxPoint(g+
k-e,h+y),new mxPoint(g+e,h+y),new mxPoint(g,a),new mxPoint(g+e,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();
a.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.inset=2;fa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();
a.stroke()};mxCellRenderer.registerShape("requires",fa);mxUtils.extend(la,mxShape);la.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",la);mxUtils.extend(ga,mxShape);ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,
e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ga);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,e-b),k=Math.min(h+2*b,
e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ha,mxCylinder);ha.prototype.jettyWidth=32;ha.prototype.jettyHeight=12;ha.prototype.redrawPath=function(a,b,c,d,e,f){var g=
a.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(ga,mxShape);ga.prototype.size=10;ga.prototype.inset=2;ga.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();
a.stroke()};mxCellRenderer.registerShape("requires",ga);mxUtils.extend(la,mxShape);la.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",la);mxUtils.extend(ha,mxShape);ha.prototype.inset=2;ha.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,
e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ha);mxUtils.extend(V,mxCylinder);V.prototype.jettyWidth=20;V.prototype.jettyHeight=10;V.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,e-b),k=Math.min(h+2*b,
e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",V);mxUtils.extend(ia,mxCylinder);ia.prototype.jettyWidth=32;ia.prototype.jettyHeight=12;ia.prototype.redrawPath=function(a,b,c,d,e,f){var g=
parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};
mxCellRenderer.registerShape("component",ha);mxUtils.extend(pa,mxRectangleShape);pa.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",pa);mxUtils.extend(ma,
mxDoubleEllipse);ma.prototype.outerStroke=!0;ma.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",ma);mxUtils.extend(qa,ma);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(ia,mxArrowConnector);ia.prototype.defaultWidth=4;ia.prototype.isOpenEnded=function(){return!0};
ia.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ia.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ia);mxUtils.extend(da,mxArrowConnector);da.prototype.defaultWidth=10;da.prototype.defaultArrowWidth=20;da.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};da.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+
mxCellRenderer.registerShape("component",ia);mxUtils.extend(pa,mxRectangleShape);pa.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",pa);mxUtils.extend(ma,
mxDoubleEllipse);ma.prototype.outerStroke=!0;ma.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",ma);mxUtils.extend(qa,ma);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(ja,mxArrowConnector);ja.prototype.defaultWidth=4;ja.prototype.isOpenEnded=function(){return!0};
ja.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ja.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ja);mxUtils.extend(da,mxArrowConnector);da.prototype.defaultWidth=10;da.prototype.defaultArrowWidth=20;da.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};da.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+
mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",da);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",ea);mxUtils.extend(W,mxRectangleShape);W.prototype.dx=20;W.prototype.dy=20;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",W);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=
@ -3296,8 +3297,8 @@ mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min
b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",aa);mxUtils.extend(G,mxActor);G.prototype.size=.1;G.prototype.fixedSize=20;G.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);
a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",G);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
R);mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
X);mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",Q);mxUtils.extend(ja,
mxEllipse);ja.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",ja);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);
X);mxUtils.extend(Q,mxActor);Q.prototype.size=.375;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",Q);mxUtils.extend(fa,
mxEllipse);fa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);
a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",za);mxUtils.extend(Ia,mxRhombus);Ia.prototype.paintVertexShape=function(a,
b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ia);mxUtils.extend(Ja,mxEllipse);Ja.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Ja);
mxUtils.extend(Ka,mxEllipse);Ka.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ka);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);
@ -3372,14 +3373,14 @@ null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.
"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};W.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Ba.prototype.constraints=
0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};W.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Ba.prototype.constraints=
mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;Ca.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};V.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",V.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,
"jettyHeight",V.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),
new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15*
a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};X.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ha.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,
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)];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(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
@ -3402,11 +3403,11 @@ function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mx
0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];R.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)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.9),!1)];R.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)];la.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){var a=this.editorUi,c=a.editor,b=c.graph,d=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(a.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";a.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){a.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,
function(a,b){try{var d=mxUtils.parseXml(a);c.graph.setSelectionCells(c.graph.importGraphModel(d.documentElement))}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}));a.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=d;this.addAction("save",function(){a.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=d;this.addAction("saveAs...",function(){a.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=d;
this.addAction("export...",function(){a.showDialog((new ExportDialog(a)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(a);a.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){a.showDialog((new PageSetupDialog(a)).container,320,220,!0,!0)}).isEnabled=d;this.addAction("print...",function(){a.showDialog((new PrintDialog(a)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",
this.addAction("export...",function(){a.showDialog((new ExportDialog(a)).container,300,304,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(a);a.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){a.showDialog((new PageSetupDialog(a)).container,320,220,!0,!0)}).isEnabled=d;this.addAction("print...",function(){a.showDialog((new PrintDialog(a)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",
function(){mxUtils.show(b,null,10,10)});this.addAction("undo",function(){a.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){a.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(b)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(b)}catch(g){a.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){b.isEnabled()&&
!b.isCellLocked(b.getDefaultParent())&&mxClipboard.paste(b)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){b.getModel().beginUpdate();try{var c=mxClipboard.paste(b);if(null!=c){a=!0;for(var d=0;d<c.length&&a;d++)a=a&&b.model.isEdge(c[d]);var e=b.view.translate,f=b.view.scale,g=e.x,m=e.y,e=null;if(1==c.length&&a){var q=b.getCellGeometry(c[0]);null!=q&&(e=q.getTerminalPoint(!0))}e=null!=e?e:b.getBoundingBoxFromGeometry(c,
a);if(null!=e){var v=Math.round(b.snap(b.popupMenuHandler.triggerX/f-g)),u=Math.round(b.snap(b.popupMenuHandler.triggerY/f-m));b.cellsMoved(c,v-e.x,u-e.y)}}}finally{b.getModel().endUpdate()}}});this.addAction("copySize",function(c){c=b.getSelectionCell();b.isEnabled()&&null!=c&&b.getModel().isVertex(c)&&(c=b.getCellGeometry(c),null!=c&&(a.copiedSize=new mxRectangle(c.x,c.y,c.width,c.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(c){if(b.isEnabled()&&!b.isSelectionEmpty()&&
@ -3581,22 +3582,23 @@ b.setAttribute("wrap","off");b.setAttribute("spellcheck","false");b.setAttribute
document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));e.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&e.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),e.appendChild(f));c.appendChild(e);
f=mxUtils.button(mxResources.get("ok"),function(){var c=Graph.zapGremlins(mxUtils.trim(b.value)),d=null;if("new"==e.value)a.hideDialog(),a.editor.editAsNew(c);else if("replace"==e.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(c).documentElement),a.hideDialog()}catch(p){d=p}finally{a.editor.graph.model.endUpdate()}}else if("import"==e.value){a.editor.graph.model.beginUpdate();try{var f=mxUtils.parseXml(c),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,
l);var n=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(n));a.hideDialog()}catch(p){d=p}finally{a.editor.graph.model.endUpdate()}}null!=d&&mxUtils.alert(d.message)});f.className="geBtn gePrimaryBtn";c.appendChild(f);a.editor.cancelFirst||c.appendChild(d);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function c(){var a=n.value,b=a.lastIndexOf(".");n.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(m.setAttribute("disabled","true"),q.setAttribute("disabled","true"),v.setAttribute("disabled","true"),A.setAttribute("disabled","true")):(m.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),A.removeAttribute("disabled"));"png"===p.value||"svg"===p.value||"pdf"===p.value?r.removeAttribute("disabled"):r.setAttribute("disabled",
"disabled");"png"===p.value?(u.removeAttribute("disabled"),t.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"))}function b(){q.style.backgroundColor=q.value*v.value>MAX_AREA||0>=q.value?"red":"";v.style.backgroundColor=q.value*v.value>MAX_AREA||0>=v.value?"red":""}var d=a.editor.graph,e=d.getGraphBounds(),f=d.view.scale,g=Math.ceil(e.width/f),h=Math.ceil(e.height/f),k,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",
mxClient.IS_SF?"0":"2");e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");e.appendChild(k);var n=document.createElement("input");n.setAttribute("value",a.editor.getOrCreateFilename());n.style.width="180px";k=document.createElement("td");k.appendChild(n);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+
":");e.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");
k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),p.appendChild(k));k=document.createElement("td");k.appendChild(p);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");e.appendChild(k);var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("value","100");m.style.width="180px";k=document.createElement("td");k.appendChild(m);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");e.appendChild(k);var q=document.createElement("input");q.setAttribute("value",
g);q.style.width="180px";k=document.createElement("td");k.appendChild(q);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");e.appendChild(k);var v=document.createElement("input");v.setAttribute("value",h);v.style.width="180px";k=document.createElement("td");k.appendChild(v);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize=
"10pt";mxUtils.write(k,mxResources.get("dpi")+":");e.appendChild(k);var u=document.createElement("select");u.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value",
"400");mxUtils.write(k,"400dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));u.appendChild(k);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step","50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):
(t.value=this.value,w||(m.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(m.value=a))});k=document.createElement("td");k.appendChild(u);k.appendChild(t);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");e.appendChild(k);var r=document.createElement("input");r.setAttribute("type",
"checkbox");r.checked=null==d.background||d.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("value",ExportDialog.lastBorderValue);A.style.width="180px";
k=document.createElement("td");k.appendChild(A);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(m,"change",function(){w=!0;var a=Math.max(0,parseFloat(m.value)||100)/100;m.value=parseFloat((100*a).toFixed(2));0<g?(q.value=Math.floor(g*a),v.value=Math.floor(h*a)):(m.value="100",q.value=g,v.value=h);b()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/g;0<a?(m.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(h*a)):
(m.value="100",q.value=g,v.value=h);b()});mxEvent.addListener(v,"change",function(){var a=parseInt(v.value)/h;0<a?(m.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(g*a)):(m.value="100",q.value=g,v.value=h);b()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(m.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=
n.value,c=p.value,e=Math.max(0,parseFloat(m.value)||100)/100,f=Math.max(0,parseInt(A.value)),g=d.background,h=Math.max(1,parseInt(t.value));if(("svg"==c||"png"==c||"pdf"==c)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(k.appendChild(C),k.appendChild(x)):(k.appendChild(x),
k.appendChild(C));e.appendChild(k);l.appendChild(e);f.appendChild(l);this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,b,d,e,f,g){var h=a.editor.graph;if("xml"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,b);else if("svg"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(d,e,f)),c,b);else{var k=h.getGraphBounds(),l=mxUtils.createXmlDocument(),n=l.createElement("output");l.appendChild(n);l=new mxXmlCanvas2D(n);l.translate(Math.floor((f/e-k.x)/h.view.scale),Math.floor((f/e-k.y)/h.view.scale));l.scale(e/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
var ExportDialog=function(a){function c(){var a=n.value,b=a.lastIndexOf(".");n.value=0<b?a.substring(0,b+1)+p.value:a+"."+p.value;"xml"===p.value?(m.setAttribute("disabled","true"),q.setAttribute("disabled","true"),v.setAttribute("disabled","true"),x.setAttribute("disabled","true")):(m.removeAttribute("disabled"),q.removeAttribute("disabled"),v.removeAttribute("disabled"),x.removeAttribute("disabled"));"png"===p.value||"svg"===p.value||"pdf"===p.value?r.removeAttribute("disabled"):r.setAttribute("disabled",
"disabled");"png"===p.value||"jpg"===p.value||"pdf"===p.value?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"png"===p.value?(u.removeAttribute("disabled"),t.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"))}function b(){q.style.backgroundColor=q.value*v.value>MAX_AREA||0>=q.value?"red":"";v.style.backgroundColor=q.value*v.value>MAX_AREA||0>=v.value?"red":""}var d=a.editor.graph,e=d.getGraphBounds(),f=d.view.scale,g=Math.ceil(e.width/
f),h=Math.ceil(e.height/f),k,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");e.appendChild(k);var n=document.createElement("input");n.setAttribute("value",a.editor.getOrCreateFilename());n.style.width="180px";k=document.createElement("td");k.appendChild(n);e.appendChild(k);
l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");e.appendChild(k);var p=document.createElement("select");p.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));p.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),p.appendChild(k));
k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));p.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),
p.appendChild(k));k=document.createElement("td");k.appendChild(p);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");e.appendChild(k);var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("value","100");m.style.width="180px";k=document.createElement("td");k.appendChild(m);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");e.appendChild(k);var q=document.createElement("input");q.setAttribute("value",g);q.style.width="180px";k=document.createElement("td");k.appendChild(q);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");e.appendChild(k);var v=document.createElement("input");v.setAttribute("value",h);v.style.width="180px";k=document.createElement("td");
k.appendChild(v);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");e.appendChild(k);var u=document.createElement("select");u.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");u.appendChild(k);k=document.createElement("option");
k.setAttribute("value","300");mxUtils.write(k,"300dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","400");mxUtils.write(k,"400dpi");u.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));u.appendChild(k);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step",
"50");var w=!1;mxEvent.addListener(u,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,w||(m.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",w||(m.value=a))});k=document.createElement("td");k.appendChild(u);k.appendChild(t);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize=
"10pt";mxUtils.write(k,mxResources.get("background")+":");e.appendChild(k);var r=document.createElement("input");r.setAttribute("type","checkbox");r.checked=null==d.background||d.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(r);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");e.appendChild(k);var A=document.createElement("input");
A.setAttribute("type","checkbox");A.checked=!1;k=document.createElement("td");k.appendChild(A);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("value",ExportDialog.lastBorderValue);x.style.width="180px";k=document.createElement("td");k.appendChild(x);e.appendChild(k);l.appendChild(e);
f.appendChild(l);mxEvent.addListener(p,"change",c);c();mxEvent.addListener(m,"change",function(){w=!0;var a=Math.max(0,parseFloat(m.value)||100)/100;m.value=parseFloat((100*a).toFixed(2));0<g?(q.value=Math.floor(g*a),v.value=Math.floor(h*a)):(m.value="100",q.value=g,v.value=h);b()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/g;0<a?(m.value=parseFloat((100*a).toFixed(2)),v.value=Math.floor(h*a)):(m.value="100",q.value=g,v.value=h);b()});mxEvent.addListener(v,"change",function(){var a=
parseInt(v.value)/h;0<a?(m.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(g*a)):(m.value="100",q.value=g,v.value=h);b()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var C=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(m.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=n.value,c=p.value,e=Math.max(0,parseFloat(m.value)||100)/100,f=Math.max(0,parseInt(x.value)),
g=d.background,h=Math.max(1,parseInt(t.value));if(("svg"==c||"png"==c||"pdf"==c)&&r.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,e,f,h,A.checked)}}));C.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(k.appendChild(D),k.appendChild(C)):(k.appendChild(C),k.appendChild(D));e.appendChild(k);l.appendChild(e);f.appendChild(l);
this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,c,b,d,e,f,g,h){h=a.editor.graph;if("xml"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,b);else if("svg"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(d,e,f)),c,b);else{var k=h.getGraphBounds(),l=mxUtils.createXmlDocument(),n=l.createElement("output");l.appendChild(n);l=new mxXmlCanvas2D(n);l.translate(Math.floor((f/e-k.x)/h.view.scale),Math.floor((f/e-k.y)/h.view.scale));l.scale(e/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
l);n="xml="+encodeURIComponent(mxUtils.getXml(n));l=Math.ceil(k.width*e/h.view.scale+2*f);e=Math.ceil(k.height*e/h.view.scale+2*f);n.length<=MAX_REQUEST_SIZE&&l*e<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+b+"&filename="+encodeURIComponent(c)+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+e+"&"+n+"&dpi="+g)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,c,b,d){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+"&format="+d)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
var EditDataDialog=function(a,c){function b(){0<r.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}var d=document.createElement("div"),e=a.editor.graph,f=e.getModel().getValue(c);if(!mxUtils.isNode(f)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",f||"");f=g}var h={};try{var k=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(c),"metaData",null);null!=k&&(h=JSON.parse(k))}catch(C){}var l=new mxForm("properties");l.table.style.width=
@ -5592,10 +5594,10 @@ null,null,"bpmn business process model event parallel multiple boundary non inte
a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Person")}),this.addEntry("c4 software system",function(){var a=new mxCell("",new mxGeometry(0,0,160,100*1.1),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#1168BD;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#1168BD;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type","Software System");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Software System")}),this.addEntry("c4 software system",function(){var a=new mxCell("",new mxGeometry(0,
0,160,100*1.1),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#999999;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#8A8A8A;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type",
"Software System");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Software System")}),this.addEntry("c4 component",function(){var a=new mxCell("",new mxGeometry(0,0,160,100*1.1),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#438DD5;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#3C7FC0;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type","Component");a.setAttribute("c4Technology","technology");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component")}),this.addEntry("c4 container",
"Software System");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Software System")}),this.addEntry("c4 container",function(){var a=new mxCell("",new mxGeometry(0,0,160,100*1.1),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#438DD5;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#3C7FC0;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type","Container");a.setAttribute("c4Technology","technology");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Container")}),this.addEntry("c4 component",
function(){var a=new mxCell("",new mxGeometry(0,0,160,100*1.1),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#85BBF0;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#78A8D8;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");
a.setAttribute("c4Name","name");a.setAttribute("c4Type","Container");a.setAttribute("c4Technology","technology");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Container")}),this.addEntry("c4 execution environment",function(){var a=new mxCell("",new mxGeometry(0,0,200,170),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffffff;fontColor=#000000;align=left;arcSize=5;strokeColor=#000000;verticalAlign=bottom;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');
a.setAttribute("c4Name","name");a.setAttribute("c4Type","Component");a.setAttribute("c4Technology","technology");a.setAttribute("c4Description","Description");a.setAttribute("label","<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>");return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component")}),this.addEntry("c4 execution environment",function(){var a=new mxCell("",new mxGeometry(0,0,200,170),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffffff;fontColor=#000000;align=left;arcSize=5;strokeColor=#000000;verticalAlign=bottom;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","name");a.setAttribute("c4Type","ExecutionEnvironment");a.setAttribute("c4Application","applicationAndVersion");a.setAttribute("label",'<div style="text-align: left">%c4Name%</div><div style="text-align: left">[%c4Application%]</div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Execution Environment")}),this.addEntry("c4 deployment node",
function(){var a=new mxCell("",new mxGeometry(0,0,240,100*2.3),'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#ffffff;fontColor=#000000;align=left;arcSize=5;strokeColor=#000000;verticalAlign=bottom;metaEdit=1;metaData={"c4Type":{"editable":false}};points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];');a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders",
"1");a.setAttribute("c4Name","hostname");a.setAttribute("c4Type","DeploymentNode");a.setAttribute("c4OperationSystem","operationSystem");a.setAttribute("c4ScalingFactor","scalingFactor");a.setAttribute("label",'<div style="text-align: left">%c4Name%</div><div style="text-align: left">[%c4OperationSystem%]</div><div style="text-align: right">%c4ScalingFactor%</div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Deployment Node")}),this.addEntry("c4 database",function(){var a=
@ -10136,8 +10138,8 @@ p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.classNa
(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(I.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 J=document.createElement("canvas"),E=new Image;E.onload=function(){try{J.getContext("2d").drawImage(E,0,0);var a=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(L){}};E.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(M){}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};a.afterDecode=function(a,b,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(a)})();
(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.3.0";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);a.beforeDecode=function(a,b,c){c.ui=a.ui;return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="14.3.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=
window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,l){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(y){}try{l||
@ -10148,15 +10150,15 @@ k;k+=e;return a.substring(b,k)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(t){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{b=
document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=e.spin;e.spin=function(c,k){var m=!1;this.active||(d.call(this,c),this.active=!0,null!=k&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize=
"9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=k.substring(k.length-3,k.length)&&"!"!=k.charAt(k.length-1)&&(k+="..."),m.innerHTML=k,c.appendChild(m),e.status=m,mxClient.IS_VML&&
(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),m=!0);return m};var k=e.stop;e.stop=function(){k.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};
e.pause=function(){return function(){}};return e};EditorUi.prototype.isCompatibleString=function(a){try{var e=mxUtils.parseXml(a),b=this.editor.extractGraphModel(e.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(e){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var c=b.getFunction,d=this.editor.graph,f=this;b.getFunction=function(a){if(d.isSelectionEmpty()&&null!=
f.pages&&0<f.pages.length){var e=f.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<e&&f.movePage(e,e-1)};if(38==a.keyCode)return function(){0<e&&f.movePage(e,0)};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,e+1)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,f.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<e&&f.selectNextPage(!1)};if(38==
a.keyCode)return function(){0<e&&f.selectPage(f.pages[0])};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.selectNextPage(!0)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.selectPage(f.pages[f.pages.length-1])}}}return c.apply(this,arguments)}}return b};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var e=d.apply(this,arguments);if(null==e)try{var b=a.indexOf("&lt;mxfile ");if(0<=b){var c=a.lastIndexOf("&lt;/mxfile&gt;");
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=e.spin;e.spin=function(c,k){var m=!1;this.active||(d.call(this,c),this.active=!0,null!=k&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",
m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=k.substring(k.length-3,k.length)&&"!"!=k.charAt(k.length-1)&&(k+="..."),m.innerHTML=k,c.appendChild(m),
e.status=m,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(m.style.left=Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,b+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,k)}));this.stop();return a}),m=!0);return m};var k=e.stop;e.stop=function(){k.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);
e.status=null};e.pause=function(){return function(){}};return e};EditorUi.prototype.isCompatibleString=function(a){try{var e=mxUtils.parseXml(a),b=this.editor.extractGraphModel(e.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==
a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&
108==a.charCodeAt(3))};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(e){var b=a.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var c=b.getFunction,d=this.editor.graph,f=this;b.getFunction=function(a){if(d.isSelectionEmpty()&&
null!=f.pages&&0<f.pages.length){var e=f.getSelectedPageIndex();if(mxEvent.isShiftDown(a)){if(37==a.keyCode)return function(){0<e&&f.movePage(e,e-1)};if(38==a.keyCode)return function(){0<e&&f.movePage(e,0)};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,e+1)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.movePage(e,f.pages.length-1)}}else if(mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)){if(37==a.keyCode)return function(){0<e&&f.selectNextPage(!1)};
if(38==a.keyCode)return function(){0<e&&f.selectPage(f.pages[0])};if(39==a.keyCode)return function(){e<f.pages.length-1&&f.selectNextPage(!0)};if(40==a.keyCode)return function(){e<f.pages.length-1&&f.selectPage(f.pages[f.pages.length-1])}}}return c.apply(this,arguments)}}return b};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var e=d.apply(this,arguments);if(null==e)try{var b=a.indexOf("&lt;mxfile ");if(0<=b){var c=a.lastIndexOf("&lt;/mxfile&gt;");
c>b&&(e=a.substring(b,c+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(q){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var e=a.indexOf('<meta charset="utf-8">');0<=e&&(a=a.slice(0,e)+'<meta charset="utf-8"/>'+a.slice(e+23-1,a.length));
a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var e=null!=a?this.editor.extractGraphModel(a,!0):null;null!=e&&(a=e);if(null!=a){e=this.editor.graph;e.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
this.pages:[];for(var d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));e.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,
@ -10397,7 +10399,7 @@ function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=thi
if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){if("1"!=urlParams["ext-fonts"])mxSettings.setCustomFonts(this.menus.customFonts);
else{var e=b.getProperty("customFonts");this.menus.customFonts=e;mxSettings.setCustomFonts(e)}mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",
mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(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",
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.copyCells=function(a,b){var e=this.editor.graph;if(e.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(e.model.getTopmostCells(e.getSelectionCells())),d=mxUtils.getXml(e.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(d));b?(e.removeCells(c,!1),e.lastPasteXml=null):(e.lastPasteXml=d,e.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=
function(a,b,c,d){if(!mxEvent.isConsumed(a)){var e=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){var k="<meta "==g.substring(0,6),e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(g);f=!0;g=e.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=
e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(g=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,g==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,g),f=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&
@ -10482,21 +10484,21 @@ function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActiv
!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
function(a,b,c,d,f,g,l){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),p=Math.floor(m.height*f/e.view.scale);if(k.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var t=
{globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<l?"&dpi="+l:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(k))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,l):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=
function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(a));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var d=document.createElement("div");d.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";d.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();
for(a=0;a<g.length;a++){var l=g[a];if("R"==l.substring(0,1)){var n=JSON.parse(decodeURIComponent(l.substring(1)));f[n[0]]={id:n[0],title:n[1],downloadUrl:n[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){d.innerHTML="";if(0==a.length)d.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var e=a[c];f[e.id]&&(b[e.id]=e);var g=this.addCheckbox(d,e.title,f[e.id]);
(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(e,g)}},mxUtils.bind(this,function(a){d.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));d.appendChild(b)}));c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));
0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,
a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);e&&d.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(g);e&&f.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,
error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var e={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?e.error={errResp:c}:null!=b&&(e.resp=b);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=a.funtionName,d=this.remoteInvokableFns[e];if(null!=d&&"function"===
typeof this[e]){if(d.allowedDomains){for(var f=!1,g=0;g<d.allowedDomains.length;g++)if(b=="https://"+d.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+e+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(d.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[e].apply(this,k);else{var l=this[e].apply(this,k);c([l])}}else c(null,"Invalid Call: "+e+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+
x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var e=c.open("database",2);e.onupgradeneeded=function(a){try{var c=e.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(q){null!=b&&b(q)}};e.onsuccess=
mxUtils.bind(this,function(b){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);
document.body.appendChild(b);var c=!0,e=!1,d,f=0,g=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=d.length)g();else{var a=d[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
function(a,b,c,d,f,g,l,n){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),m=e.getGraphBounds(),p=Math.floor(m.width*f/e.view.scale),t=Math.floor(m.height*f/e.view.scale);if(k.length<=MAX_REQUEST_SIZE&&p*t<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q=
{globalVars:e.getExportVariables()};n&&(q.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<l?"&dpi="+l:"")+"&bg="+(null!=d?d:"none")+"&w="+p+"&h="+t+"&border="+g+"&xml="+encodeURIComponent(k))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,n,l):a.exportImage(f,
!1,!0,!1,!1,g,!0,!1,"jpeg",n);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();
this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(a));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var d=document.createElement("div");d.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";d.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
IMAGE_PATH+'/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var l=g[a];if("R"==l.substring(0,1)){var n=JSON.parse(decodeURIComponent(l.substring(1)));f[n[0]]={id:n[0],title:n[1],downloadUrl:n[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){d.innerHTML="";if(0==a.length)d.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<
a.length;c++){var e=a[c];f[e.id]&&(b[e.id]=e);var g=this.addCheckbox(d,e.title,f[e.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(e,g)}},mxUtils.bind(this,function(a){d.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));d.appendChild(b)}));c.appendChild(d);c=new CustomDialog(this,
c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));
for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):
c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);e&&d.apply(this,arguments)}),l=mxUtils.bind(this,function(){window.clearTimeout(g);e&&f.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;
this.remoteInvokeCallbacks.push({callback:k,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var e={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?e.error={errResp:c}:null!=b&&(e.resp=b);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=a.funtionName,d=
this.remoteInvokableFns[e];if(null!=d&&"function"===typeof this[e]){if(d.allowedDomains){for(var f=!1,g=0;g<d.allowedDomains.length;g++)if(b=="https://"+d.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+e+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(d.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[e].apply(this,k);else{var l=this[e].apply(this,k);c([l])}}else c(null,"Invalid Call: "+
e+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var e=c.open("database",2);e.onupgradeneeded=function(a){try{var c=e.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
isLocalStorage)}catch(q){null!=b&&b(q)}};e.onsuccess=mxUtils.bind(this,function(b){var c=e.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
urlParams.forceMigration);document.body.appendChild(b);var c=!0,e=!1,d,f=0,g=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=d.length)g();else{var a=d[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(H){console.log(H)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(H){console.log(H)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(I){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||e||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(d=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(I){console.log(I)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});e.onerror=b;e.onblocked=function(){}}catch(u){null!=b&&b(u)}else null!=b&&b()}else a(this.database)};
EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,
@ -10584,8 +10586,8 @@ DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=
DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var a=mxUtils.bind(this,function(a){mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.enabled=!this.enabled;this.ui.updateButtonContainer();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus();!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if("min"==uiTheme&&null!=this.ui.buttonContainer){if(null==this.collaboratorsElement){var d=document.createElement("a");
d.className="geToolbarButton";d.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;float:left;";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="24px 24px";d.style.height="24px";d.style.width="24px";a(d);this.ui.buttonContainer.appendChild(d);this.collaboratorsElement=d}}else null!=this.ui.toolbarContainer&&null==this.collaboratorsElement&&(d=document.createElement("a"),d.className="geButton",
d.style.position="absolute",d.style.display="inline-block",d.style.verticalAlign="bottom",d.style.color="#666",d.style.top="6px",d.style.right="atlas"!=uiTheme?"70px":"50px",d.style.padding="2px",d.style.fontSize="8pt",d.style.verticalAlign="middle",d.style.textDecoration="none",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="16px 16px",d.style.width="16px",d.style.height="16px",mxUtils.setOpacity(d,60),"dark"==uiTheme&&(d.style.filter="invert(100%)"),
mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(d),this.ui.toolbarContainer.appendChild(d),this.collaboratorsElement=d);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline()||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",
a),this.collaboratorsElement.style.backgroundImage="url("+(this.enabled?this.ui.isOffline()||!this.isConnected()||this.file.invalidChecksum?Editor.syncProblemImage:Editor.syncImage:Editor.syncDisabledImage)+")")}};
mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})),a(d),this.ui.toolbarContainer.appendChild(d),this.collaboratorsElement=d);null!=this.collaboratorsElement&&(a="",a=this.enabled?this.file.invalidChecksum?mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?mxResources.get("offline"):mxResources.get("online"):mxResources.get("disconnected"),this.collaboratorsElement.setAttribute("title",
a),this.collaboratorsElement.style.backgroundImage="url("+(this.enabled?this.ui.isOffline(!0)||!this.isConnected()||this.file.invalidChecksum?Editor.syncProblemImage:Editor.syncImage:Editor.syncDisabledImage)+")")}};
DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&((new Date).getTime()-this.lastActivity.getTime())/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var a=this.ui.timeSince(new Date(this.lastModified));null==a&&(a=mxResources.get("lessThanAMinute"));var d=this.file.isRevisionHistorySupported(),
b=this.lastMessage;this.lastMessage=null;null!=b&&40<b.length&&(b=b.substring(0,40)+"...");a=mxResources.get("lastChange",[a]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(a)+'" style="display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+(null!=b?' <span style="opacity:0;" title="'+mxUtils.htmlEntities(b)+'">('+mxUtils.htmlEntities(b)+")</span>":"")+(this.file.isEditable()?"":'<div class="geStatusAlert" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
"</div>")+(this.isConnected()?"":'<div class="geStatusAlert geBlink" style="margin-left:8px;display:inline-block;">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>"));b=this.ui.statusContainer.getElementsByTagName("div");0<b.length&&d&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()})));d=this.ui.statusContainer.getElementsByTagName("span");if(0<d.length){var c=
@ -10597,10 +10599,11 @@ DrawioFileSync.prototype.fileChangedNotify=function(){if(this.isValidState())if(
DrawioFileSync.prototype.fileChanged=function(a,d,b,c){return this.notifyThread=c=window.setTimeout(mxUtils.bind(this,function(){null!=b&&b()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(c){null!=b&&b()||(this.isValidState()?this.catchup(c,a,d,b):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))};
DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(a,d,b,c){if(null!=a&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a);if(null==l)this.reload(d,b,c);else{var n=0,e=!1,k=mxUtils.bind(this,function(){if(null==c||!c())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=!0,p=window.setTimeout(mxUtils.bind(this,
function(){m=!1;this.reload(d,b,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(p);if(m&&(null==c||!c()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var l=null,q=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var u=
JSON.parse(g.getText());if(null!=u&&0<u.length)for(var y=0;y<u.length;y++){var x=this.stringToObject(u[y]);if(x.v>DrawioFileSync.PROTOCOL){e=!0;q=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)l=x.d.checksum,q.push(x.d.patch);else{e=!0;q=[];break}}}catch(A){q=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,l,a,d,b,c)):n<=this.maxCacheReadyRetries-1&&!e&&401!=g.getStatus()&&503!=g.getStatus()?(n++,this.file.stats.cacheMiss++,
window.setTimeout(k,(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,b,c))}catch(A){null!=b&&b(A)}}else null!=b&&b()}))}else null!=b&&b()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=b&&b()}};DrawioFileSync.prototype.reload=function(a,d,b,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),b,c)};
DrawioFileSync.prototype.catchup=function(a,d,b,c){if(null!=a&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var l=this.file.getDescriptorSecret(a);if(null==l||"1"==urlParams.lockdown)this.reload(d,b,c);else{var n=0,e=!1,k=mxUtils.bind(this,function(){if(null==c||!c())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var m=
!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;this.reload(d,b,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=l?"&secret="+encodeURIComponent(l):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(p);if(m&&(null==c||!c()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var l=null,q=[];if(200<=
g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var u=JSON.parse(g.getText());if(null!=u&&0<u.length)for(var y=0;y<u.length;y++){var x=this.stringToObject(u[y]);if(x.v>DrawioFileSync.PROTOCOL){e=!0;q=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)l=x.d.checksum,q.push(x.d.patch);else{e=!0;q=[];break}}}catch(A){q=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<q.length?(this.file.stats.cacheHits++,this.merge(q,l,a,d,b,c)):n<=this.maxCacheReadyRetries-1&&!e&&
401!=g.getStatus()&&503!=g.getStatus()?(n++,this.file.stats.cacheMiss++,window.setTimeout(k,(n+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,b,c))}catch(A){null!=b&&b(A)}}else null!=b&&b()}))}else null!=b&&b()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=b&&b()}};
DrawioFileSync.prototype.reload=function(a,d,b,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),b,c)};
DrawioFileSync.prototype.merge=function(a,d,b,c,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var l=this.file.ignorePatches(a),n=this.file.getDescriptorRevisionId(b);if(!l){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
a[f]);var e=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",n,"etag",this.file.getDescriptorEtag(b),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==e,d);if(null!=d&&d!=e){var k=this.ui.hashValue(this.file.getCurrentRevisionId()),m=this.ui.hashValue(n);this.file.checksumError(g,a,"From: "+k+"\nTo: "+m+"\nChecksum: "+d+"\nCurrent: "+e,n,"merge");
return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.backupPatch=null;null!=c&&c()}catch(t){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(t);try{if(this.file.errorReportsEnabled)k=this.ui.hashValue(this.file.getCurrentRevisionId()),m=this.ui.hashValue(n),this.file.sendErrorReport("Error in merge",
@ -10608,10 +10611,10 @@ return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))};
DrawioFileSync.prototype.createToken=function(a,d,b){var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(a),mxUtils.bind(this,function(a){window.clearTimeout(g);c&&(200<=a.getStatus()&&299>=a.getStatus()?d(a.getText()):b({code:a.getStatus(),message:"Token Error "+a.getStatus()}))}))};
DrawioFileSync.prototype.fileSaved=function(a,d,b,c,g){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor()),n=this.file.getDescriptorRevisionId(d),e=this.file.getCurrentRevisionId();if(null==
l)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=b&&b(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),"notify");else{var k=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.file.getDescriptorSecret(d);var m=this.ui.getHashValueForPages(a),k=this.ui.diffPages(k,a),p=this.objectToString(this.createMessage({patch:k,
checksum:m}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var u=!0,t=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(p.length<this.maxCacheEntrySize?"&data="+
encodeURIComponent(p):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){window.clearTimeout(t);u&&(200<=a.getStatus()&&299>=a.getStatus()?null!=b&&b():c({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",k,"checksum",m)}}this.file.shadowPages=a};
DrawioFileSync.prototype.fileSaved=function(a,d,b,c,g){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 f=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),l=this.file.getDescriptorSecret(this.file.getDescriptor()),n=this.file.getDescriptorRevisionId(d),e=this.file.getCurrentRevisionId();if(null==
l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(f),function(){}),null!=b&&b(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),"notify");else{var k=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);d=this.file.getDescriptorSecret(d);var m=this.ui.getHashValueForPages(a),k=this.ui.diffPages(k,
a),p=this.objectToString(this.createMessage({patch:k,checksum:m}));this.file.stats.bytesSent+=p.length;this.file.stats.msgSent++;var u=!0,t=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(f)+(null!=l?"&secret="+encodeURIComponent(l):"")+(null!=d?"&last-secret="+encodeURIComponent(d):
"")+(p.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(p):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(a){window.clearTimeout(t);u&&(200<=a.getStatus()&&299>=a.getStatus()?null!=b&&b():c({code:a.getStatus(),message:a.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",n,"to",e,"etag",this.file.getCurrentEtag(),p.length,"bytes","diff",k,"checksum",m)}}this.file.shadowPages=a};
DrawioFileSync.prototype.getIdParameters=function(){var a="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(a+="&sid="+this.pusher.connection.socket_id);return a};DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTOCOL,d:a,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(a,d,b){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=a?this.catchup(a,d,b):this.fileChanged(d,b)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=b&&b({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
@ -10692,8 +10695,8 @@ a&&null!=c&&this.executeRequest(this.createDriveRequest(a,{title:c}),d,f)};Drive
c,d,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,c,d,f){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=f?f:this.allFields)},c,d)};DriveClient.prototype.getCustomProperty=function(a,c){var b=a.properties,d=null;if(null!=b)for(var l=0;l<b.length;l++)if(b[l].key==c){d=b[l].value;break}return d};DriveClient.prototype.getFile=function(b,c,d,f,l){f=null!=f?f:!1;l=null!=l?l:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+b+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
mxUtils.bind(this,function(a){a.title=a.originalFilename;a.headRevisionId=a.id;a.id=b;this.getXmlFile(a,c,d)}),d):this.loadDescriptor(b,mxUtils.bind(this,function(b){try{if(null!=this.user){var e=/\.png$/i.test(b.title);/\.v(dx|sdx?)$/i.test(b.title)||/\.gliffy$/i.test(b.title)||!this.ui.useCanvasForExport&&e?this.ui.convertFile(b.downloadUrl,b.title,b.mimeType,this.extension,c,d,null,{Authorization:"Bearer "+a}):f||l||b.mimeType==this.libraryMimeType||b.mimeType==this.xmlMimeType?this.getXmlFile(b,
c,d,!0,l):this.getXmlFile(b,c,d)}else d({message:mxResources.get("loggedOut")})}catch(k){if(null!=d)d(k);else throw k;}}),d)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};DriveClient.prototype.getXmlFile=function(b,c,d,f,l){try{var g={Authorization:"Bearer "+a},e=b.downloadUrl;if(null==e)null!=d&&d({message:mxResources.get("exportOptionsDisabledDetails")});else{var k=0,m=mxUtils.bind(this,function(){this.ui.editor.loadUrl(e,
mxUtils.bind(this,function(a){try{if(null==a)d({message:mxResources.get("invalidOrMissingFile")});else if(b.mimeType==this.libraryMimeType||l)b.mimeType!=this.libraryMimeType||l?c(new DriveLibrary(this.ui,a,b)):d({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(b.title)){var g=a.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(a);if(null!=k&&0<k.length)a=k;else try{var k=a.substring(g+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):
atob(k),n=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==n||0<n.getElementsByTagName("parsererror").length?f=!0:a=m}catch(x){f=!0}}}else/\.pdf$/i.test(b.title)?(k=Editor.extractGraphModelFromPdf(a),null!=k&&0<k.length&&(f=!0,a=k)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(m=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,e)?this.ui.parseFile(new Blob([a],
mxUtils.bind(this,function(a){try{if(null==a)d({message:mxResources.get("invalidOrMissingFile")});else if(b.mimeType==this.libraryMimeType||l)b.mimeType!=this.libraryMimeType||l?c(new DriveLibrary(this.ui,a,b)):d({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(b.title)){var g=a.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(a);if(null!=k&&0<k.length)a=k;else try{var k=a.substring(g+1),n=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):
atob(k),m=this.ui.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0);null==m||0<m.getElementsByTagName("parsererror").length?f=!0:a=n}catch(x){f=!0}}}else/\.pdf$/i.test(b.title)?(k=Editor.extractGraphModelFromPdf(a),null!=k&&0<k.length&&(f=!0,a=k)):"data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)&&(n=a.substring(22),a=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(a,e)?this.ui.parseFile(new Blob([a],
{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?c(new LocalFile(this.ui,a.responseText,b.title+this.extension,!0)):null!=d&&d({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=d)d(A);else throw A;}}),b.title):c(f?new LocalFile(this.ui,a,b.title,!0):new DriveFile(this.ui,a,b))}}catch(x){if(null!=d)d(x);else throw x;}}),mxUtils.bind(this,function(a,b){if(k<this.maxRetries&&null!=b&&403==b.getStatus())k++,window.setTimeout(m,
2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=d)d(a);else throw a;}),null!=b.mimeType&&"image/"==b.mimeType.substring(0,6)&&"image/svg"!=b.mimeType.substring(0,9)||/\.png$/i.test(b.title)||/\.jpe?g$/i.test(b.title)||/\.pdf$/i.test(b.title),null,null,null,g)});m()}}catch(p){if(null!=d)d(p);else throw p;}};DriveClient.prototype.saveFile=function(a,c,d,f,l,n,e,k,m){try{var b=0;a.saveLevel=1;var g=mxUtils.bind(this,function(b){if(null!=f)f(b);else throw b;try{if(!a.isConflict(b)){var c="sl_"+
a.saveLevel+"-error_"+(a.getErrorMessage(b)||"unknown");null!=b&&null!=b.error&&null!=b.error.code&&(c+="-code_"+b.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:c,label:(null!=this.user?
@ -10702,11 +10705,11 @@ this.xmlMimeType,z=a.desc,B=c=!0;else if("application/octet-stream"==C.mimeType|
l=this.placeholderMimeType),null!=f&&null!=l&&(C.thumbnail={image:f,mimeType:l}));var u=a.getData(),F=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-q,a.saveLevel=11,null==b)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var e=(new Date(b.modifiedDate)).getTime()-(new Date(y)).getTime();if(0>=e||v==b.etag||c&&x==b.headRevisionId){a.saveLevel=12;var f=[];0>=e&&f.push("invalid modified time");v==b.etag&&f.push("stale etag");c&&x==b.headRevisionId&&f.push("stale revision");
var k=f.join(", ");g({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+x+"."+y+"-"+this.ui.hashValue(v)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(S){}}else if(a.saveLevel=null,d(b,u),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+
z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(S){}}}}catch(S){t(S)}}),E=
mxUtils.bind(this,function(d,l){a.saveLevel=4;try{null!=k&&(C.properties=k);var m=e||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),n=mxUtils.bind(this,function(e){a.saveLevel=5;try{var f=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,n=null;try{n=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(V){}this.executeRequest(this.createUploadRequest(a.getId(),
C,d,c||e||f,l,e?null:m,B),mxUtils.bind(this,function(a){window.clearTimeout(n);k&&F(a)}),mxUtils.bind(this,function(c){window.clearTimeout(n);if(k){a.saveLevel=6;try{a.isConflict(c)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){a.saveLevel=7;try{if(null!=e&&e.etag==m)if(b<this.staleEtagMaxRetries){b++;var d=2*b*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected",
mxUtils.bind(this,function(d,l){a.saveLevel=4;try{null!=k&&(C.properties=k);var n=e||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(e){a.saveLevel=5;try{var f=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,k=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(V){}this.executeRequest(this.createUploadRequest(a.getId(),
C,d,c||e||f,l,e?null:n,B),mxUtils.bind(this,function(a){window.clearTimeout(m);k&&F(a)}),mxUtils.bind(this,function(c){window.clearTimeout(m);if(k){a.saveLevel=6;try{a.isConflict(c)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){a.saveLevel=7;try{if(null!=e&&e.etag==n)if(b<this.staleEtagMaxRetries){b++;var d=2*b*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected",
"retry",b,"delay",d)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(O){}}else"1"==
urlParams.test&&e.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",m,"remote",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g(c,e)}catch(O){t(O)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(fa){t(fa)}}}))}catch(V){t(V)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==m)n(b);else{var c=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(W){}this.executeRequest({url:"/files/"+
a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){window.clearTimeout(e);if(c){a.saveLevel=10;try{null!=d&&d.headRevisionId==x?("1"==urlParams.test&&m!=d.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),m=d.etag,n(b)):g({error:{code:412}},d)}catch(V){t(V)}}}),mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(a.saveLevel=11,g(b))}))}});if(A&&null==f){a.saveLevel=8;
urlParams.test&&e.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,"remote",e.etag,"rev",a.desc.headRevisionId,"response",[e],"file",[a]),g(c,e)}catch(O){t(O)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(fa){t(fa)}}}))}catch(V){t(V)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b||null==n)m(b);else{var c=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){c=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(W){}this.executeRequest({url:"/files/"+
a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(d){window.clearTimeout(e);if(c){a.saveLevel=10;try{null!=d&&d.headRevisionId==x?("1"==urlParams.test&&n!=d.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",d.etag,"rev",a.desc.headRevisionId,"response",[d],"file",[a]),n=d.etag,m(b)):g({error:{code:412}},d)}catch(V){t(V)}}}),mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(a.saveLevel=11,g(b))}))}});if(A&&null==f){a.saveLevel=8;
var z=new Image;z.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/z.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(z.height*a);b.getContext("2d").drawImage(z,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");C.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(W){try{p(!1)}catch(V){t(V)}}});z.src="data:image/png;base64,"+d}else p(!1)}catch(X){t(X)}});if(A){var D=this.ui.getPngFileProperties(this.ui.fileNode);
this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),g,this.ui.getCurrentFile()!=a?u:null,D.scale,D.border)}else E(u,!1)}catch(L){t(L)}});try{a.saveLevel=2,(n||A||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=C.mimeType&&"application/vnd.jgraph.mxfile"!=C.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:
b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){b=null}F(b,"image/png")}catch(H){t(H)}})))&&F(null,null,a.constructor!=DriveLibrary)}catch(D){t(D)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(D){t(D)}};DriveClient.prototype.insertFile=function(a,c,d,f,l,n,e){n=null!=n?n:this.xmlMimeType;a={mimeType:n,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,c,!1,e),mxUtils.bind(this,
@ -10842,15 +10845,15 @@ GitHubClient.prototype.showGitHubDialog=function(a,d){var b=null,c=null,g=null,f
mxUtils.bind(this,function(a,b,c,e){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);e&&(d.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(b+"/"+c,mxUtils.bind(this,function(){f=null;A()}),null,!0));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),
mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()}),null,!0))})(a)}e.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,A()):this.ui.hideDialog()}),null,{})}),q=null,v=null,y=mxUtils.bind(this,function(l){null==
l&&(e.innerHTML="",l=1);var n=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+l,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var z=mxUtils.bind(this,
function(){y(l+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(m){this.ui.spinner.stop();1==l&&(u(),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(m.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var z=!0,B=0;m=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,function(m,n){if(l==
("dir"==m.type)){var t=k.cloneNode();t.style.backgroundColor=z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var q=document.createElement("img");q.src=IMAGE_PATH+"/"+("dir"==m.type?"folder.png":"file.png");q.setAttribute("align","absmiddle");q.style.marginRight="4px";q.style.marginTop="-4px";q.width=20;t.appendChild(q);t.appendChild(p(m.name+("dir"==m.type?"/":""),mxUtils.bind(this,function(){"dir"==m.type?(f=m.path,y()):a&&"file"==m.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+
m.path))})));e.appendChild(t);B++}})(n[m],m)});m(!0);a&&m(!1)}}),t,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var l=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor=
function(){y(l+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();1==l&&(u(),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var m=JSON.parse(n.getText());if(null==m||0==m.length)mxUtils.write(e,mxResources.get("noFiles"));else{var z=!0,B=0;n=mxUtils.bind(this,function(l){for(var n=0;n<m.length;n++)mxUtils.bind(this,function(n,m){if(l==
("dir"==n.type)){var q=k.cloneNode();q.style.backgroundColor=z?"dark"==uiTheme?"#000000":"#eeeeee":"";z=!z;var t=document.createElement("img");t.src=IMAGE_PATH+"/"+("dir"==n.type?"folder.png":"file.png");t.setAttribute("align","absmiddle");t.style.marginRight="4px";t.style.marginTop="-4px";t.width=20;q.appendChild(t);q.appendChild(p(n.name+("dir"==n.type?"/":""),mxUtils.bind(this,function(){"dir"==n.type?(f=n.path,y()):a&&"file"==n.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+encodeURIComponent(g)+"/"+
n.path))})));e.appendChild(q);B++}})(m[n],n)});n(!0);a&&n(!1)}}),t,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var l=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+c+"/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor=
"pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",n);this.executeRequest(l,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",y();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=
k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=a.name;f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",v))}}),t)}),A=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled",
"disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&mxEvent.removeListener(e,"scroll",v);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,"click",l);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(e,
mxResources.get("noFiles"));else{1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var k=d[1];3>d.length?(b=a,c=k,f=g=null,x()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+k+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();
b=a.meta.org;c=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var m=0;m<d.length;m++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;c=a.name;f="";x(null,!0)})));e.appendChild(g)})(d[m],m)}100==d.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&l()},mxEvent.addListener(e,"scroll",v))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,b){DrawioFile.call(this,a,d);this.meta=b;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};
b=a.meta.org;c=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var n=0;n<d.length;n++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.full_name,mxUtils.bind(this,function(){b=a.owner.login;c=a.name;f="";x(null,!0)})));e.appendChild(g)})(d[n],n)}100==d.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&l()},mxEvent.addListener(e,"scroll",v))}),t)});A()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,b){DrawioFile.call(this,a,d);this.meta=b;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(a,d,b){this.doSave(this.getTitle(),d,b)};TrelloFile.prototype.saveAs=function(a,d,b){this.doSave(a,d,b)};TrelloFile.prototype.doSave=function(a,d,b){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(a,!1,d,b)}),b])};
TrelloFile.prototype.saveFile=function(a,d,b,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()==a?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=b&&b();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,b,c))}),mxUtils.bind(this,
function(a){this.savingFile=!1;null!=c&&c(a)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=b&&b();this.ui.fileLoaded(f);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,b,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,g)}))):null!=b&&b()};TrelloLibrary=function(a,d,b){TrelloFile.call(this,a,d,b)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,d,b){this.saveFile(a,!1,d,b)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@ -10886,8 +10889,8 @@ GitLabClient.prototype.getFile=function(a,d,b,c,g,f){c=null!=c?c:!1;this.getRefI
e,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(k,l,p,JSON.parse(a.getText()),c,n))}catch(q){b(q)}}),b)}),b,f)};
GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,b=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(d)?b="data:image/gif;base64,"+b:/\.pdf$/i.test(d)?b="data:application/pdf;base64,"+b:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(b),b=null!=a&&0<a.length?a:"data:image/png;base64,"+b):b=Base64.decode(b));return b};
GitLabClient.prototype.createGitLabFile=function(a,d,b,c,g,f){var l=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:b,name:c.file_name,path:c.file_path,html_url:l+a+"/"+d+"/blob/"+b+"/"+c.file_path,download_url:l+a+"/"+d+"/raw/"+b+"/"+c.file_path+"?inline=false",last_commit_id:c.last_commit_id,refPos:f};c=this.getFileContent(c);return g?new GitLabLibrary(this.ui,c,a):new GitLabFile(this.ui,c,a)};
GitLabClient.prototype.insertFile=function(a,d,b,c,g,f,l){g=null!=g?g:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(f,e){var k=Math.max(e-1,0),m=f.slice(0,k).join("/"),n=f[k],u=f[e];path=f.slice(e+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(m+"/"+n+"/"+u+"/"+path,!0,mxUtils.bind(this,function(f,k){if(f)if(g)l||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,n,u,path,a,d,k,mxUtils.bind(this,function(a){try{var d=
JSON.parse(a.getText());b(this.createGitLabFile(m,n,u,d.content,g,e))}catch(z){c(z)}}),c)}),c);else{var p=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,d,{org:m,repo:n,ref:u,name:a,path:path,html_url:p+m+"/"+n+"/blob/"+u+"/"+path,download_url:p+m+"/"+n+"/raw/"+u+"/"+path+"?inline=false",refPos:e,last_commit_id:k,isNew:!0}))}else c()}))}),c,null,4>=f.length)};
GitLabClient.prototype.insertFile=function(a,d,b,c,g,f,l){g=null!=g?g:!1;f=f.split("/");this.getRefIndex(f,!0,mxUtils.bind(this,function(f,e){var k=Math.max(e-1,0),n=f.slice(0,k).join("/"),p=f[k],u=f[e];path=f.slice(e+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(n+"/"+p+"/"+u+"/"+path,!0,mxUtils.bind(this,function(f,k){if(f)if(g)l||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,p,u,path,a,d,k,mxUtils.bind(this,function(a){try{var d=
JSON.parse(a.getText());b(this.createGitLabFile(n,p,u,d.content,g,e))}catch(z){c(z)}}),c)}),c);else{var m=DRAWIO_GITLAB_URL+"/";b(new GitLabFile(this.ui,d,{org:n,repo:p,ref:u,name:a,path:path,html_url:m+n+"/"+p+"/blob/"+u+"/"+path,download_url:m+n+"/"+p+"/raw/"+u+"/"+path+"?inline=false",refPos:e,last_commit_id:k,isNew:!0}))}else c()}))}),c,null,4>=f.length)};
GitLabClient.prototype.checkExists=function(a,d,b){this.getFile(a,mxUtils.bind(this,function(c){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();b(!0,c.getCurrentEtag())},function(){g();b(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){b(!1)})}),mxUtils.bind(this,function(a){b(!0)}),null,!0)};
GitLabClient.prototype.writeFile=function(a,d,b,c,g,f,l,n,e){if(f.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 10 MB)"});else{var k="POST";b={path:encodeURIComponent(c),branch:decodeURIComponent(b),commit_message:g,content:f,encoding:"base64"};null!=l&&(b.last_commit_id=l,k="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(c);k=new mxXmlRequest(a,JSON.stringify(b),k);this.executeRequest(k,
mxUtils.bind(this,function(a){n(a)}),e)}};
@ -10899,17 +10902,17 @@ GitLabClient.prototype.showGitLabDialog=function(a,d){var b=null,c=null,g=null,f
mxUtils.bind(this,function(a,b,c,e){var d=document.createElement("a");d.setAttribute("title",a);d.style.cursor="pointer";mxUtils.write(d,a);mxEvent.addListener(d,"click",b);e&&(d.style.textDecoration="underline");null!=c&&(a=k.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),u=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(p(b+"/"+c,mxUtils.bind(this,function(){f=null;A()}),null,!0));a||(mxUtils.write(d," / "),d.appendChild(p(decodeURIComponent(g),
mxUtils.bind(this,function(){f=null;x()}),null,!0)));if(null!=f&&0<f.length){var k=f.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(p(k[a],mxUtils.bind(this,function(){f=k.slice(0,a+1).join("/");y()}),null,!0))})(a)}e.appendChild(d)}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=c=b=null,A()):this.ui.hideDialog()}))}),q=null,v=null,y=mxUtils.bind(this,function(l){null==
l&&(e.innerHTML="",l=1);var n=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+l,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");
var z=mxUtils.bind(this,function(){y(l+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(m){this.ui.spinner.stop();1==l&&(u(!g),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var n=JSON.parse(m.getText());if(null==n||0==n.length)mxUtils.write(e,mxResources.get("noFiles"));else{var B=!0,t=0;m=mxUtils.bind(this,function(l){for(var m=0;m<n.length;m++)mxUtils.bind(this,
function(m){if(l==("tree"==m.type)){var n=k.cloneNode();n.style.backgroundColor=B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==m.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(p(m.name+("tree"==m.type?"/":""),mxUtils.bind(this,function(){"tree"==m.type?(f=m.path,y()):a&&"blob"==m.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+g+
"/"+m.path))})));e.appendChild(n);t++}})(n[m])});m(!0);a&&m(!1);100==t&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&z()},mxEvent.addListener(e,"scroll",v))}}),t,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var l=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&
var z=mxUtils.bind(this,function(){y(l+1)});mxEvent.addListener(q,"click",z);this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();1==l&&(u(!g),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,A();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var m=JSON.parse(n.getText());if(null==m||0==m.length)mxUtils.write(e,mxResources.get("noFiles"));else{var B=!0,t=0;n=mxUtils.bind(this,function(l){for(var n=0;n<m.length;n++)mxUtils.bind(this,
function(n){if(l==("tree"==n.type)){var m=k.cloneNode();m.style.backgroundColor=B?"dark"==uiTheme?"#000000":"#eeeeee":"";B=!B;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==n.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(p(n.name+("tree"==n.type?"/":""),mxUtils.bind(this,function(){"tree"==n.type?(f=n.path,y()):a&&"blob"==n.type&&(this.ui.hideDialog(),d(b+"/"+c+"/"+g+
"/"+n.path))})));e.appendChild(m);t++}})(m[n])});n(!0);a&&n(!1);100==t&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&z()},mxEvent.addListener(e,"scroll",v))}}),t,!0)}),x=mxUtils.bind(this,function(a,d){null==a&&(e.innerHTML="",a=1);var l=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+c)+"/repository/branches?per_page=100&page="+a,null,"GET");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=v&&
(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(q,"click",n);this.executeRequest(l,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(u(!0),e.appendChild(p("../ [Up]",mxUtils.bind(this,function(){f=null;A()}),"4px")));b=JSON.parse(b.getText());if(null==
b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else if(1==b.length&&d)g=b[0].name,f="",y();else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=k.cloneNode();c.style.backgroundColor=0==b%2?"dark"==uiTheme?"#000000":"#eeeeee":"";c.appendChild(p(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";y()})));e.appendChild(c)})(b[c],c);100==b.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&n()},mxEvent.addListener(e,"scroll",
v))}}),t)});m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));var A=mxUtils.bind(this,function(a){this.ui.spinner.stop();null==a&&(e.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(e,"scroll",v),v=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){A(a+1)});mxEvent.addListener(q,
"click",d);var l=mxUtils.bind(this,function(a){this.ui.spinner.spin(e,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),t)}),m=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(e,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();
b(a,JSON.parse(c.getText()))}),t)});l(mxUtils.bind(this,function(l){var n=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(n,mxUtils.bind(this,function(n){this.ui.spinner.stop();n=JSON.parse(n.getText());if(null!=n&&0!=n.length||null!=l&&0!=l.length){1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",
mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],c=a[1],g=f=null,2<a.length?(g=encodeURIComponent(a.slice(2,a.length).join("/")),y()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var z=0;z<n.length;z++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;c=a.path;f="";x(null,!0)})));e.appendChild(g)})(n[z],z);for(z=0;z<l.length;z++)m(l[z],mxUtils.bind(this,function(a,d){for(var g=0;g<d.length;g++){var l=k.cloneNode();l.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;c=d.path;f="";x(null,
!0)})));e.appendChild(l)})(d[g])}}))}else mxUtils.write(e,mxResources.get("noFiles"));100==n.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",v))}),t)}))});this.token?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,b,c,g,f,l){this.file=a;this.id=d;this.content=b;this.modifiedDate=c;this.createdDate=g;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,b,c,g){d()};DrawioComment.prototype.editComment=function(a,d,b){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,b,c,g,f,l,n){DrawioComment.call(this,a,d,b,c,g,f,l);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,b,c,g){a={content:a.content};c?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),b)};
"click",d);var l=mxUtils.bind(this,function(a){this.ui.spinner.spin(e,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),t)}),n=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(e,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();
b(a,JSON.parse(c.getText()))}),t)});l(mxUtils.bind(this,function(l){var m=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(m,mxUtils.bind(this,function(m){this.ui.spinner.stop();m=JSON.parse(m.getText());if(null!=m&&0!=m.length||null!=l&&0!=l.length){1==a&&(e.appendChild(p(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",
mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(b=a[0],c=a[1],g=f=null,2<a.length?(g=encodeURIComponent(a.slice(2,a.length).join("/")),y()):x(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var z=0;z<m.length;z++)mxUtils.bind(this,function(a,d){var g=k.cloneNode();g.style.backgroundColor=
0==d%2?"dark"==uiTheme?"#000000":"#eeeeee":"";g.appendChild(p(a.name_with_namespace,mxUtils.bind(this,function(){b=a.owner.username;c=a.path;f="";x(null,!0)})));e.appendChild(g)})(m[z],z);for(z=0;z<l.length;z++)n(l[z],mxUtils.bind(this,function(a,d){for(var g=0;g<d.length;g++){var l=k.cloneNode();l.style.backgroundColor=0==idx%2?"dark"==uiTheme?"#000000":"#eeeeee":"";mxUtils.bind(this,function(d){l.appendChild(p(d.name_with_namespace,mxUtils.bind(this,function(){b=a.full_path;c=d.path;f="";x(null,
!0)})));e.appendChild(l)})(d[g])}}))}else mxUtils.write(e,mxResources.get("noFiles"));100==m.length&&(e.appendChild(q),v=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&d()},mxEvent.addListener(e,"scroll",v))}),t)}))});this.token?this.user?A():this.updateUser(function(){A()},t,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){A()},t,!0)}),t)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,b,c,g,f,l){this.file=a;this.id=d;this.content=b;this.modifiedDate=c;this.createdDate=g;this.isResolved=f;this.user=l;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,b,c,g){d()};DrawioComment.prototype.editComment=function(a,d,b){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,b,c,g,f,l,n){DrawioComment.call(this,a,d,b,c,g,f,l);this.pCommentId=n};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,b,c,g){a={content:a.content};c?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),b)};
DriveComment.prototype.editComment=function(a,d,b){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,b)};
DriveComment.prototype.deleteComment=function(a,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,d)};App=function(a,d,b){EditorUi.call(this,a,d,null!=b?b:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var b={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"};
@ -10964,9 +10967,9 @@ this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(f){
this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,a),window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(f){null!=window.console&&console.error(f)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(a){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){a.prompt()})})),mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile(),a=null!=a?a.getMode():null;a==App.MODE_DEVICE||a==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&"draw.io"==this.getServiceName()&&this.showNameConfBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=
DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",
label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile(),a=null!=a?a.getMode():null;a==App.MODE_DEVICE||a==App.MODE_BROWSER?this.showDownloadDesktopBanner():"1"!=urlParams.embed&&this.getServiceName()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||
"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var a=this.getCurrentFile();null!=a&&null!=a.sync&&(a.sync.destroy(),a.sync=null,a=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+a+'" class="geStatusAlert" style="overflow:hidden;">'+a+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(a){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)})),mxClient.IS_QUIRKS&&(this.icon.style.marginTop=
"12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};
App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
@ -11075,8 +11078,8 @@ null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1));StorageFile.get
null!=c&&c();else if("S"==a.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supportd, go to https://www.draw.io/?desc="+a.substring(1).substring(0,10)+"...",mxUtils.bind(this,function(){window.location.href="https://www.draw.io/?desc="+a.substring(1)}));else if("R"==a.charAt(0)){this.spinner.stop();var f=decodeURIComponent(a.substring(1));"<"!=f.charAt(0)&&(f=Graph.decompress(f));f=new LocalFile(this,f,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
!0);f.getHash=function(){return a};this.fileLoaded(f);null!=c&&c()}else if("E"==a.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(a,b){this.spinner.stop();this.fileLoaded(new EmbedFile(this,a,b));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
else if("U"==a.charAt(0)){var g=decodeURIComponent(a.substring(1)),l=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=g.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=g.substring(31,g.lastIndexOf("&ex"));this.loadFile("G"+a,d,null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&this.editor.chromeless&&!this.editor.editable&&(b.getHash=
function(){return"G"+a},window.location.hash="#"+b.getHash());null!=c&&c()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=g,f=g.lastIndexOf("."),k=e.lastIndexOf("/");f>k&&0<k&&(e=e.substring(k+1,f),f=g.substring(f),this.useCanvasForExport||
".png"!=f||(f=".drawio"),".svg"===f||".xml"===f||".html"===f||".png"===f||".drawio"===f)&&(d=e+f)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)?null!=c&&c():l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
function(){return"G"+a},window.location.hash="#"+b.getHash());null!=c&&c()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(g,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=g,f=g.lastIndexOf("."),k=d.lastIndexOf("/");f>k&&0<k&&(d=d.substring(k+1,f),f=g.substring(f),this.useCanvasForExport||
".png"!=f||(f=".drawio"),".svg"===f||".xml"===f||".html"===f||".png"===f||".drawio"===f)&&(e=d+f)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)?null!=c&&c():l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else l()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){l()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(f=null,"G"==a.charAt(0)?f=this.drive:"D"==a.charAt(0)?f=this.dropbox:"W"==a.charAt(0)?f=this.oneDrive:"H"==a.charAt(0)?f=this.gitHub:"A"==a.charAt(0)?f=this.gitLab:"T"==a.charAt(0)&&(f=this.trello),null==f)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),
mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else{var n=a.charAt(0);a=decodeURIComponent(a.substring(1));f.getFile(a,mxUtils.bind(this,function(b){this.spinner.stop();this.fileLoaded(b);var d=this.getCurrentFile();null==d?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(d.getHash=function(){return n+a},window.location.hash="#"+d.getHash()):b==d&&null==b.getMode()&&(b=mxResources.get("copyCreated"),
this.editor.setStatus('<div title="'+b+'" class="geStatusAlert" style="overflow:hidden;">'+b+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash="#"+a.getHash()}),null,null,"#"+n+a)}))}}),l=this.getCurrentFile(),n=mxUtils.bind(this,
@ -11275,20 +11278,20 @@ null,null,null,"user",function(a,b){setTimeout(function(){b?a([{url:"123",title:
a,b),this.addSubmenu("exportAs",a,b),this.addSubmenu("embed",a,b),"1"==urlParams.libraries&&(this.addMenuItems(a,["-"],b),this.addSubmenu("newLibrary",a,b),this.addSubmenu("openLibraryFrom",a,b)),c.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],b),this.addMenuItems(a,["-","pageSetup","print","-","rename"],b),"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],b):(this.addMenuItems(a,["save"],b),"1"==urlParams.saveAndExit&&this.addMenuItems(a,
["saveAndExit"],b)),"1"!=urlParams.noExitBtn&&this.addMenuItems(a,["exit"],b);else{var d=this.editorUi.getCurrentFile();if(null!=d&&d.constructor==DriveFile){d.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],b);this.addMenuItems(a,["save","-","share"],b);var e=this.addMenuItem(a,"synchronize",b);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/synchronize");a.addSeparator(b)}else this.addMenuItems(a,["new"],b);this.addSubmenu("openFrom",
a,b);isLocalStorage&&this.addSubmenu("openRecent",a,b);null!=d&&d.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],b):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile&&null==d.fileHandle||(a.addSeparator(b),e=this.addMenuItem(a,"synchronize",b),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(e,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(a,["-","save","saveAs","-"],b),
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==d||this.addMenuItems(a,["share","-"],b),this.addMenuItems(a,["rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):(this.addMenuItems(a,["makeCopy"],b),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],b)));a.addSeparator(b);this.addSubmenu("importFrom",a,b);this.addSubmenu("exportAs",a,b);a.addSeparator(b);this.addSubmenu("embed",
a,b);this.addSubmenu("publish",a,b);a.addSeparator(b);this.addSubmenu("newLibrary",a,b);this.addSubmenu("openLibraryFrom",a,b);c.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],b);null!=d&&null!=c.fileNode&&(d=null!=d.getTitle()?d.getTitle():c.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));this.addMenuItems(a,["-","pageSetup"],b);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],b);this.addMenuItems(a,
["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=[];for(c=0;null!=this.previousExtFonts&&c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,
this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,d){for(var e=mxUtils.bind(this,function(e,f,g,k,l){var n=this.editorUi.editor.graph;k=this.styleChange(b,k||e,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[e,null!=f?encodeURIComponent(f):null,null]:[e],null,d,function(){"1"!=urlParams["ext-fonts"]?n.setFont(e,f):(document.execCommand("fontname",
!1,e),n.addExtFont(e,f))},function(){n.updateLabelElements(n.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&n.replaceElement(a,"div")});"1"==urlParams["ext-fonts"]&&n.addExtFont(e,f)});g&&(g=document.createElement("span"),g.className="geSprite geSprite-delete",g.style.cursor="pointer",g.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(g),mxEvent.addListener(g,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
function(b){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[e.toLowerCase()];for(var d=0;d<this.customFonts.length;d++)if(this.customFonts[d].name==e&&this.customFonts[d].url==f){this.customFonts.splice(d,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var g=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=g&&0<g.length)for(d=0;d<g.length;d++)if(g[d].name==e){g.splice(d,1);break}for(var k=mxUtils.clone(this.customFonts),d=0;d<k.length;d++)if(k[d].name==
e){k.splice(d,1);break}d=new a(this.editorUi,g,k);this.editorUi.editor.graph.model.execute(d)}this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));Graph.addFont(e,f);k.firstChild.nextSibling.style.fontFamily=e;null!=l&&k.setAttribute("title",l)}),f=0;f<this.defaultFonts.length;f++)e(this.defaultFonts[f]);b.addSeparator(d);if("1"!=urlParams["ext-fonts"]){for(var g=function(a){for(var b=encodeURIComponent(a.name)+(null==a.url?"":"@"+encodeURIComponent(a.url)),c=a.name,d=0;null!=l[c.toLowerCase()];)c=
a.name+" ("+ ++d+")";null==k[b]&&(n.push({name:a.name,url:a.url,label:c,title:a.url}),l[c.toLowerCase()]=a,k[b]=a)},k={},l={},n=[],f=0;f<this.customFonts.length;f++)g(this.customFonts[f],!1);for(var m in Graph.recentCustomFonts)g(Graph.recentCustomFonts[m],!0);n.sort(function(a,b){return a.label<b.label?-1:a.label>b.label?1:0});if(0<n.length){for(f=0;f<n.length;f++)e(n[f].name,n[f].url,!0,n[f].label,n[f].url);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts=
{};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),d);b.addSeparator(d)}else{g=this.editorUi.editor.graph.extFonts;if(null!=g&&0<g.length){m={};for(var p=!1,f=0;f<this.customFonts.length;f++)m[this.customFonts[f].name]=!0;for(f=0;f<g.length;f++)m[g[f].name]||(this.customFonts.push(g[f]),p=!0);p&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(f=0;f<this.customFonts.length;f++)g=this.customFonts[f].name,
m=this.customFonts[f].url,e(g,m,!0),this.editorUi.editor.graph.addExtFont(g,m,!0);b.addSeparator(d);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=new a(this.editorUi,[],[]);c.editor.graph.model.execute(b)}),d);b.addSeparator(d)}}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=a.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],c="s",d=null;if("1"!=urlParams["ext-fonts"]&&a.isEditing()){var e=
a.getSelectedEditingElement();null!=e&&(e=mxUtils.getCurrentStyle(e),null!=e&&(b=Graph.stripQuotes(e.fontFamily),d=Graph.getFontUrl(b,null),null!=d&&(Graph.isGoogleFontUrl(d)?(d=null,c="g"):c="w")))}else e=a.getView().getState(a.getSelectionCell()),null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,"1"!=urlParams["ext-fonts"]?(e=e.style.fontSource,null!=e&&(e=decodeURIComponent(e),Graph.isGoogleFontUrl(e)?c="g":(c="w",d=e))):(c=e.style.FType||c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,
null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=d&&d.substring(0,PROXY_URL.length)==PROXY_URL&&(d=decodeURIComponent(d.substr((PROXY_URL+"?url=").length)));var f=null;document.activeElement==a.cellEditor.textarea&&(f=a.cellEditor.saveSelection());c=new FontDialog(this.editorUi,b,d,c,mxUtils.bind(this,function(b,c,d){null!=f&&(a.cellEditor.restoreSelection(f),f=null);if(null!=b&&0<b.length)if("1"!=urlParams["ext-fonts"]&&
a.isEditing())a.setFont(b,c);else{a.getModel().beginUpdate();try{a.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b),a.setCellStyles("fontSource",null!=c?encodeURIComponent(c):null),a.setCellStyles("FType",null)):(a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b),"s"!=d&&(a.setCellStyles("FType",d),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,c)));d=!0;for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==
b){d=!1;break}d&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{a.getModel().endUpdate()}}}));this.editorUi.showDialog(c.container,380,250,!0,!0);c.init()}),d,null,!0)})))}})();function DiagramPage(a,d){this.node=a;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==d||this.addMenuItems(a,["share","-"],b),this.addMenuItems(a,["rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(a,["upload"],b):(this.addMenuItems(a,["makeCopy"],b),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],b)));a.addSeparator(b);this.addSubmenu("importFrom",a,b);this.addSubmenu("exportAs",a,b);a.addSeparator(b);
this.addSubmenu("embed",a,b);this.addSubmenu("publish",a,b);a.addSeparator(b);this.addSubmenu("newLibrary",a,b);this.addSubmenu("openLibraryFrom",a,b);c.isRevisionHistorySupported()&&this.addMenuItems(a,["-","revisionHistory"],b);null!=d&&null!=c.fileNode&&(d=null!=d.getTitle()?d.getTitle():c.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));this.addMenuItems(a,["-","pageSetup"],b);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],
b);this.addMenuItems(a,["-","close"])}})));a.prototype.execute=function(){var a=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var b=a.extFonts,c=0;null!=b&&c<b.length;c++){var d=document.getElementById("extFont_"+b[c].name);null!=d&&d.parentNode.removeChild(d)}a.extFonts=[];for(c=0;null!=this.previousExtFonts&&
c<this.previousExtFonts.length;c++)this.ui.editor.graph.addExtFont(this.previousExtFonts[c].name,this.previousExtFonts[c].url);this.previousExtFonts=b};this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,d){for(var e=mxUtils.bind(this,function(e,f,g,k,l){var n=this.editorUi.editor.graph;k=this.styleChange(b,k||e,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[e,null!=f?encodeURIComponent(f):null,null]:
[e],null,d,function(){"1"!=urlParams["ext-fonts"]?n.setFont(e,f):(document.execCommand("fontname",!1,e),n.addExtFont(e,f))},function(){n.updateLabelElements(n.getSelectionCells(),function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&n.replaceElement(a,"div")});"1"==urlParams["ext-fonts"]&&n.addExtFont(e,f)});g&&(g=document.createElement("span"),g.className="geSprite geSprite-delete",g.style.cursor="pointer",g.style.display="inline-block",k.firstChild.nextSibling.nextSibling.appendChild(g),
mxEvent.addListener(g,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(b){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[e.toLowerCase()];for(var d=0;d<this.customFonts.length;d++)if(this.customFonts[d].name==e&&this.customFonts[d].url==f){this.customFonts.splice(d,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var g=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=g&&0<g.length)for(d=0;d<g.length;d++)if(g[d].name==e){g.splice(d,
1);break}for(var k=mxUtils.clone(this.customFonts),d=0;d<k.length;d++)if(k[d].name==e){k.splice(d,1);break}d=new a(this.editorUi,g,k);this.editorUi.editor.graph.model.execute(d)}this.editorUi.menubar.hideMenu();mxEvent.consume(b)})));Graph.addFont(e,f);k.firstChild.nextSibling.style.fontFamily=e;null!=l&&k.setAttribute("title",l)}),f=0;f<this.defaultFonts.length;f++)e(this.defaultFonts[f]);b.addSeparator(d);if("1"!=urlParams["ext-fonts"]){for(var g=function(a){for(var b=encodeURIComponent(a.name)+
(null==a.url?"":"@"+encodeURIComponent(a.url)),c=a.name,d=0;null!=l[c.toLowerCase()];)c=a.name+" ("+ ++d+")";null==k[b]&&(n.push({name:a.name,url:a.url,label:c,title:a.url}),l[c.toLowerCase()]=a,k[b]=a)},k={},l={},n=[],f=0;f<this.customFonts.length;f++)g(this.customFonts[f],!1);for(var m in Graph.recentCustomFonts)g(Graph.recentCustomFonts[m],!0);n.sort(function(a,b){return a.label<b.label?-1:a.label>b.label?1:0});if(0<n.length){for(f=0;f<n.length;f++)e(n[f].name,n[f].url,!0,n[f].label,n[f].url);
b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),d);b.addSeparator(d)}else{g=this.editorUi.editor.graph.extFonts;if(null!=g&&0<g.length){m={};for(var p=!1,f=0;f<this.customFonts.length;f++)m[this.customFonts[f].name]=!0;for(f=0;f<g.length;f++)m[g[f].name]||(this.customFonts.push(g[f]),p=!0);p&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
this.customFonts))}if(0<this.customFonts.length){for(f=0;f<this.customFonts.length;f++)g=this.customFonts[f].name,m=this.customFonts[f].url,e(g,m,!0),this.editorUi.editor.graph.addExtFont(g,m,!0);b.addSeparator(d);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var b=new a(this.editorUi,[],[]);c.editor.graph.model.execute(b)}),d);b.addSeparator(d)}}b.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=a.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],
c="s",d=null;if("1"!=urlParams["ext-fonts"]&&a.isEditing()){var e=a.getSelectedEditingElement();null!=e&&(e=mxUtils.getCurrentStyle(e),null!=e&&(b=Graph.stripQuotes(e.fontFamily),d=Graph.getFontUrl(b,null),null!=d&&(Graph.isGoogleFontUrl(d)?(d=null,c="g"):c="w")))}else e=a.getView().getState(a.getSelectionCell()),null!=e&&(b=e.style[mxConstants.STYLE_FONTFAMILY]||b,"1"!=urlParams["ext-fonts"]?(e=e.style.fontSource,null!=e&&(e=decodeURIComponent(e),Graph.isGoogleFontUrl(e)?c="g":(c="w",d=e))):(c=e.style.FType||
c,"w"==c&&(d=this.editorUi.editor.graph.extFonts,e=null,null!=d&&(e=d.find(function(a){return a.name==b})),d=null!=e?e.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=d&&d.substring(0,PROXY_URL.length)==PROXY_URL&&(d=decodeURIComponent(d.substr((PROXY_URL+"?url=").length)));var f=null;document.activeElement==a.cellEditor.textarea&&(f=a.cellEditor.saveSelection());c=new FontDialog(this.editorUi,b,d,c,mxUtils.bind(this,function(b,c,d){null!=f&&(a.cellEditor.restoreSelection(f),f=null);
if(null!=b&&0<b.length)if("1"!=urlParams["ext-fonts"]&&a.isEditing())a.setFont(b,c);else{a.getModel().beginUpdate();try{a.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b),a.setCellStyles("fontSource",null!=c?encodeURIComponent(c):null),a.setCellStyles("FType",null)):(a.setCellStyles(mxConstants.STYLE_FONTFAMILY,b),"s"!=d&&(a.setCellStyles("FType",d),0==c.indexOf("http://")&&(c=PROXY_URL+"?url="+encodeURIComponent(c)),this.editorUi.editor.graph.addExtFont(b,
c)));d=!0;for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==b){d=!1;break}d&&(this.customFonts.push({name:b,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{a.getModel().endUpdate()}}}));this.editorUi.showDialog(c.container,380,250,!0,!0);c.init()}),d,null,!0)})))}})();function DiagramPage(a,d){this.node=a;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,d,b){this.ui=a;this.page=d;this.previous=this.name=b}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,d,b){this.ui=a;this.oldIndex=d;this.newIndex=b}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,d,b){this.ui=a;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=b&&(d.viewState=b,this.neverShown=!1))}
@ -11370,10 +11373,10 @@ t.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelect
[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",function(a,b){var c=q.getSelectionCell();if(q.isEnabled()&&q.model.isVertex(c)){if(null!=b&&mxEvent.isAltDown(b))q.setSelectionCells(q.model.getEdges(c,
null==b||!mxEvent.isShiftDown(b),null==b||!mxEvent.isControlDown(b)));else{var d=[];q.traverse(c,!0,function(a,c){null!=c&&d.push(c);null!=b&&mxEvent.isShiftDown(b)||d.push(a);return!0})}q.setSelectionCells(d)}},null,null,"Alt+Shift+D");var x=q.removeCells;q.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,
!1));if(a(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=q.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return x.apply(this,arguments)};t.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var A=q.duplicateCells;q.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=
f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();
try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var t=q.getIncomingEdges(b[0]);if(0<t.length){var v=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=v){var u=q.view.getState(m);null!=u&&(c=(u.getCenterX()-v.getCenterX())/q.view.scale,d=(u.getCenterY()-v.getCenterY())/
q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==q.getIncomingEdges(l[p]).length){n=m;if(null==n||n==q.model.getParent(b[p]))n=q.model.getTerminal(t[0],!0);
e=this.cloneCell(t[0]);this.addEdge(e,q.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C=
f&&a(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=A.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=q.moveCells;q.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();
try{var n=f,m=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||q.model.isEdge(b[p])&&null==q.model.getTerminal(b[p],!0)){f=q.model.getParent(b[p]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var t=q.getIncomingEdges(b[0]);if(0<t.length){var v=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=v){var u=q.view.getState(n);null!=u&&(c=(u.getCenterX()-v.getCenterX())/q.view.scale,d=(u.getCenterY()-v.getCenterY())/
q.view.scale)}}}}l=z.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],n,!0);else if(a(b[p])&&(t=q.getIncomingEdges(b[p]),0<t.length))if(!e)a(n)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==q.getIncomingEdges(l[p]).length){m=n;if(null==m||m==q.model.getParent(b[p]))m=q.model.getTerminal(t[0],!0);
e=this.cloneCell(t[0]);this.addEdge(e,q.getDefaultParent(),m,l[p])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(b,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C=
{88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},F=t.onKeyDown;t.onKeyDown=function(b){try{if(q.isEnabled()&&!q.isEditing()&&a(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?k(q.getSelectionCell()):m(q.getSelectionCell()):13==b.which&&(c=e(q.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==
c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=C[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),
mxEvent.consume(b)):39==b.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(N){t.handleError(N)}mxEvent.isConsumed(b)||F.apply(this,arguments)};var D=q.connectVertex;q.connectVertex=function(b,c,d,f,g,l,p){var t=q.getIncomingEdges(b);if(a(b)){var v=n(b),u=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,x=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;
@ -11429,34 +11432,34 @@ function(){d(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("form
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
["new"],c),b.menus.addSubmenu("openFrom",a,c),isLocalStorage&&this.addSubmenu("openRecent",a,c),a.addSeparator(c),null!=d&&d.constructor==DriveFile&&b.menus.addMenuItems(a,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==d||d.constructor==LocalFile||b.menus.addMenuItems(a,["synchronize"],c),a.addSeparator(c),b.menus.addSubmenu("save",a,c));b.menus.addSubmenu("exportAs",a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,["import"],c):b.menus.addSubmenu("importFrom",
a,c);b.menus.addMenuItems(a,["-","outline","layers"],c);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c);b.menus.addMenuItems(a,["-","find","tags"],c);null!=d&&null!=b.fileNode&&(d=null!=d.getTitle()?d.getTitle():b.defaultFilename,/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||this.addMenuItems(a,["-","properties"]));mxClient.IS_IOS&&navigator.standalone||b.menus.addMenuItems(a,["-","print","-"],c);b.menus.addSubmenu("help",a,c);"1"==urlParams.embed?b.menus.addMenuItems(a,["-","exit"],c):
b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&
b.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null!=d&&d.constructor==DriveFile?b.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],c):(b.menus.addMenuItems(a,["save","saveAs","-","rename"],c),b.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(a,["upload"],c):b.menus.addMenuItems(a,["makeCopy"],c));b.menus.addMenuItems(a,["-","autosave"],c);null!=d&&d.isRevisionHistorySupported()&&
b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,c){e.funct(a,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||b.menus.addMenuItems(a,["publishLink"],c);a.addSeparator(c);b.menus.addSubmenu("embed",a,c)})));var f=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(a,c){b.menus.addInsertTableCellItem(a,c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&
b.menus.addSubmenu("theme",a,c);null!=f&&b.menus.addSubmenu("language",a,c);b.menus.addSubmenu("units",a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,
function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);b.menus.addSubmenu("table",a,d);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
c);b.menus.addLinkToItem(d,"https://www.diagrams.net/doc/faq/math-typesetting")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c){var d=l.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
"no-repeat",e.style.paddingRight="22px");return e}function e(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",e.style.paddingRight="22px");return e}function e(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?m.insertBefore(g,l.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var d=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=d}p=n.firstChild;b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>b)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
m.insertBefore(c,l.statusContainer):m.appendChild(c);return c}function g(){for(var a=m.firstChild;null!=a;){var d=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=d}p=m.firstChild;b=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>b)||c("diagram");f([a?c("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,e(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);d=c("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);f([d,e(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=b&&(d=l.actions.get("undo"),a=l.actions.get("redo"),d=e("",d.funct,null,mxResources.get("undo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=e("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),f([d,a],60),480<=b)){var a=l.actions.get("zoomIn"),d=l.actions.get("zoomOut"),g=l.actions.get("resetView");
f([e("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
f([e("",function(){n.popupMenuHandler.hideMenu();var a=n.view.scale,b=n.view.translate.x,c=n.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-n.view.scale)&&b==n.view.translate.x&&c==n.view.translate.y&&l.actions.get(n.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=b?e("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=b?e("",d.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=b?(null==L&&(d=t.addMenu("",a.funct),d.setAttribute("title",mxResources.get("language")),d.className="geToolbarButton",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="24px 24px",d.style.position="absolute",d.style.height="24px",d.style.width="24px",d.style.zIndex="1",d.style.right="8px",d.style.cursor=
"pointer",d.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(d),L=d),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=L&&(L.parentNode.removeChild(L),L=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);if(1E3<=b||null!=
urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])d(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));1E3<=b&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";
var p=null,t=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);
var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
n.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";
"pointer",d.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(d),L=d),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=L&&(L.parentNode.removeChild(L),L=null))}q.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);if(1E3<=b||null!=
urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])d(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));1E3<=b&&a(this,!0);var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";
var p=null,t=new Menubar(l,m);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position="relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var u=l.descriptorChanged;l.descriptorChanged=function(){u.apply(this,arguments);
var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};l.setStatusText(l.editor.getStatus());m.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
m.appendChild(l.buttonContainer);l.menubarContainer=l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";
l.diagramContainer.style.top="47px";var J=l.menus.get("viewZoom");if(null!=J){this.tabContainer.style.right="70px";var E=t.addMenu("100%",J.funct);E.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");E.style.whiteSpace="nowrap";E.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";E.style.backgroundPosition="right 6px center";E.style.backgroundRepeat="no-repeat";E.style.backgroundColor="#ffffff";E.style.paddingRight="10px";E.style.display="block";E.style.position="absolute";
E.style.textDecoration="none";E.style.textDecoration="none";E.style.right="0px";E.style.bottom="0px";E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(l.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";I.appendChild(E);
J=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);l.editor.addListener("resetGraphView",J);l.editor.addListener("pageSelected",J);var M=l.setGraphEnabled;l.setGraphEnabled=function(){M.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}I.appendChild(l.tabContainer);
I.appendChild(n);I.appendChild(l.diagramContainer);k.appendChild(I);l.updateTabContainer();var L=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
I.appendChild(m);I.appendChild(l.diagramContainer);k.appendChild(I);l.updateTabContainer();var L=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,d,f,l){var c=d.y,e=d.x,g=!1,m=!1;if(null!=this.states&&null!=b&&null!=d){var p=this,u=new mxCellState,t=this.graph.getView().scale,q=Math.max(2,this.getGuideTolerance()/2);u.x=b.x+e;u.y=b.y+c;u.width=b.width;u.height=b.height;for(var v=[],y=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(l||!this.graph.isCellSelected(A.cell))&&((u.x>=A.x&&u.x<=A.x+A.width||A.x>=u.x&&A.x<=u.x+u.width)&&(u.y>
A.y+A.height+4||u.y+u.height+4<A.y)?v.push(A):(u.y>=A.y&&u.y<=A.y+A.height||A.y>=u.y&&A.y<=u.y+u.height)&&(u.x>A.x+A.width+4||u.x+u.width+4<A.x)&&y.push(A))}var z=0,B=0,C=A=0,F=0,D=0,G=0,H=0,I=5*t;if(1<v.length){v.push(u);v.sort(function(a,b){return a.y-b.y});var J=!1,x=u==v[0],t=u==v[v.length-1];if(!x&&!t)for(x=1;x<v.length-1;x++)if(u==v[x]){t=v[x-1];x=v[x+1];A=B=C=(x.y-t.y-t.height-u.height)/2;break}for(x=0;x<v.length-1;x++){var t=v[x],E=v[x+1],M=u==t||u==E,E=E.y-t.y-t.height,J=J|u==t;if(0==B&&
0==z)B=E,z=1;else if(Math.abs(B-E)<=(M||1==x&&J?q:0))z+=1;else if(1<z&&J){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!J)z=0,A=B=0!=C?C:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||M||(B=A=E)}3==v.length&&v[1]==u&&(A=0)}if(1<y.length){y.push(u);y.sort(function(a,b){return a.x-b.x});J=!1;x=u==y[0];t=u==y[y.length-1];if(!x&&!t)for(x=1;x<y.length-1;x++)if(u==y[x]){t=y[x-1];x=y[x+1];G=D=H=(x.x-t.x-t.width-u.width)/2;break}for(x=0;x<y.length-1;x++){t=y[x];E=y[x+1];M=u==t||u==E;E=E.x-t.x-t.width;J|=u==
@ -11484,9 +11487,9 @@ function mxDualRuler(a,d){var b=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mx
function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var f=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);a.resetCurrentMenu();f.destroy()});var e=mxEvent.getClientX(d),g=mxEvent.getClientY(d);f.popup(e,g,null,d);a.setCurrentMenu(f,b)}mxEvent.consume(d)}}))});c(this.hRuler.container);c(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)};
mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var b=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,g=[],f,l=[],n,e=!1,k=!0,m=[],p=!1,u=!0;this.setClosedPath=function(a){e=a};this.setAutoClose=function(a){k=a};this.setStopClickEnabled=function(a){u=a};this.setSmoothing=function(a){b=a};var t=function(b){p=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor=
b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){t(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(c){var b=u&&0<l.length&&null!=n&&2>n.length;b||l.push.apply(l,n);n=[];l.push(null);g.push(c);c=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=l[0].x,d=l[0].x,f=l[0].y,m=l[0].y,n=1;n<l.length;n++)null!=l[n]&&(b=Math.max(b,l[n].x),d=Math.min(d,l[n].x),f=Math.max(f,
l[n].y),m=Math.min(m,l[n].y));b-=d;f-=m;if(0<b&&0<f){var p=100/b,q=100/f;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-m)*q;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,n=0;n<l.length;n++){var x=l[n];if(null==x){var x=!1,v=l[v],y=l[n-1];!e&&k&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(e||x)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(e||x?"<fillstroke/>":"<stroke/>");v=n+1}else u=n==v?u+('<path><move x="'+x.x.toFixed(2)+
'" y="'+x.y.toFixed(2)+'"/>'):u+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var n=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,M=new mxCell("",new mxGeometry(d/u-v.x,m/u-v.y,b/u,f/u),n);M.vertex=1;a.model.beginUpdate();try{M=a.addCell(M)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[M]));a.fireEvent(new mxEventObject("freehandInserted","cell",M));setTimeout(function(){a.setSelectionCells([M])},
10)}for(n=0;n<g.length;n++)g[n].parentNode.removeChild(g[n]);c=null;g=[];l=[]}t(!1)};mxEvent.addGestureListeners(d,function(b){if(p){var e=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),e=Math.max(1,e*a.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill","none");c.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");c.setAttribute("stroke-width",e);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var g=
b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){t(!0)};this.isDrawing=function(){return p};var q=mxUtils.bind(this,function(a){if(c){var b=u&&0<l.length&&null!=n&&2>n.length;b||l.push.apply(l,n);n=[];l.push(null);g.push(c);c=null;b&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var b=l[0].x,d=l[0].x,f=l[0].y,n=l[0].y,m=1;m<l.length;m++)null!=l[m]&&(b=Math.max(b,l[m].x),d=Math.min(d,l[m].x),f=Math.max(f,
l[m].y),n=Math.min(n,l[m].y));b-=d;f-=n;if(0<b&&0<f){var p=100/b,q=100/f;l.map(function(a){if(null==a)return a;a.x=(a.x-d)*p;a.y=(a.y-n)*q;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,m=0;m<l.length;m++){var x=l[m];if(null==x){var x=!1,v=l[v],y=l[m-1];!e&&k&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(e||x)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(e||x?"<fillstroke/>":"<stroke/>");v=m+1}else u=m==v?u+('<path><move x="'+x.x.toFixed(2)+
'" y="'+x.y.toFixed(2)+'"/>'):u+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var m=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,M=new mxCell("",new mxGeometry(d/u-v.x,n/u-v.y,b/u,f/u),m);M.vertex=1;a.model.beginUpdate();try{M=a.addCell(M)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[M]));a.fireEvent(new mxEventObject("freehandInserted","cell",M));setTimeout(function(){a.setSelectionCells([M])},
10)}for(m=0;m<g.length;m++)g[m].parentNode.removeChild(g[m]);c=null;g=[];l=[]}t(!1)};mxEvent.addGestureListeners(d,function(b){if(p){var e=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),e=Math.max(1,e*a.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill","none");c.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");c.setAttribute("stroke-width",e);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var g=
a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",g=g.split(" ").map(function(a){return parseFloat(a)*e}).join(" ");c.setAttribute("stroke-dasharray",g)}m=[];g=v(b);y(g);f="M"+g.x+" "+g.y;l.push(g);n=[];c.setAttribute("d",f);d.appendChild(c);mxEvent.consume(b)}},function(a){if(c){y(v(a));var b=x(0);if(b){f+=" L"+b.x+" "+b.y;l.push(b);var d="";n=[];for(var e=2;e<m.length;e+=2)b=x(e),d+=" L"+b.x+" "+b.y,n.push(b);c.setAttribute("d",f+d)}mxEvent.consume(a)}},q);var v=function(b){return mxUtils.convertPoint(a.container,
mxEvent.getClientX(b),mxEvent.getClientY(b))},y=function(a){for(m.push(a);m.length>b;)m.shift()},x=function(a){var c=m.length;if(1===c%2||c>=b){var d=0,e=0,f,g=0;for(f=a;f<c;f++)g++,a=m[f],d+=a.x,e+=a.y;return{x:d/g,y:e/g}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;

View file

@ -1604,7 +1604,8 @@ App.prototype.init = function()
else if (urlParams['embed'] != '1' && this.getServiceName() == 'draw.io')
{
this.showNameConfBanner();
// just app.diagrams.net users
// this.showNameConfBanner();
}
}));
}

View file

@ -399,7 +399,7 @@ DrawioFileSync.prototype.updateOnlineState = function()
{
status = mxResources.get('error') + ': ' + mxResources.get('checksum');
}
else if (this.ui.isOffline() || !this.isConnected())
else if (this.ui.isOffline(true) || !this.isConnected())
{
status = mxResources.get('offline');
}
@ -410,7 +410,7 @@ DrawioFileSync.prototype.updateOnlineState = function()
this.collaboratorsElement.setAttribute('title', status);
this.collaboratorsElement.style.backgroundImage = 'url(' + ((!this.enabled) ? Editor.syncDisabledImage :
((!this.ui.isOffline() && this.isConnected() && !this.file.invalidChecksum) ?
((!this.ui.isOffline(true) && this.isConnected() && !this.file.invalidChecksum) ?
Editor.syncImage : Editor.syncProblemImage)) + ')';
}
};
@ -730,7 +730,7 @@ DrawioFileSync.prototype.catchup = function(desc, success, error, abort)
{
var secret = this.file.getDescriptorSecret(desc);
if (secret == null)
if (secret == null || urlParams['lockdown'] == '1')
{
this.reload(success, error, abort);
}
@ -1139,7 +1139,7 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error, t
this.resetUpdateStatusThread();
this.catchupRetryCount = 0;
if (!this.ui.isOffline() && !this.file.inConflictState && !this.file.redirectDialogShowing)
if (!this.ui.isOffline(true) && !this.file.inConflictState && !this.file.redirectDialogShowing)
{
this.start();
@ -1151,7 +1151,7 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error, t
var etag = this.file.getDescriptorRevisionId(lastDesc);
var current = this.file.getCurrentRevisionId();
if (secret == null)
if (secret == null || urlParams['lockdown'] == '1')
{
this.file.stats.msgSent++;

View file

@ -27,7 +27,7 @@
/**
* Switch to disable logging for mode and search terms.
*/
EditorUi.enableLogging = urlParams['stealth'] != '1' &&
EditorUi.enableLogging = urlParams['stealth'] != '1' && urlParams['lockdown'] != '1' &&
(/.*\.draw\.io$/.test(window.location.hostname) ||
/.*\.diagrams\.net$/.test(window.location.hostname)) &&
window.location.hostname != 'support.draw.io';
@ -594,7 +594,7 @@
*/
EditorUi.prototype.isOffline = function(ignoreStealth)
{
return this.isOfflineApp() || !navigator.onLine || (!ignoreStealth && urlParams['stealth'] == '1');
return this.isOfflineApp() || !navigator.onLine || (!ignoreStealth && (urlParams['stealth'] == '1' || urlParams['lockdown'] == '1'));
};
/**
@ -9913,7 +9913,7 @@
{
if (urlParams['search-shapes'] != null && this.sidebar.searchShapes != null)
{
this.sidebar.searchShapes(urlParams['search-shapes']);
this.sidebar.searchShapes(decodeURIComponent(urlParams['search-shapes']));
this.sidebar.showEntries('search');
}
else
@ -13012,7 +13012,7 @@
ExportDialog.showXmlOption = false;
ExportDialog.showGifOption = false;
ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi)
ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi, grid)
{
var graph = editorUi.editor.graph;
@ -13042,18 +13042,27 @@
if (format == 'png')
{
editorUi.exportImage(s, bg == null || bg == 'none', true,
false, false, b, true, false, null, null, dpi);
false, false, b, true, false, null, grid, dpi);
}
else
{
editorUi.exportImage(s, false, true,
false, false, b, true, false, 'jpeg');
false, false, b, true, false, 'jpeg', grid);
}
}
else
{
var extras = {globalVars: graph.getExportVariables()};
if (grid)
{
extras.grid = {
size: graph.gridSize,
steps: graph.view.gridSteps,
color: graph.view.gridColor
};
}
editorUi.saveRequest(name, format,
function(newTitle, base64)
{

View file

@ -4400,7 +4400,7 @@ LucidImporter = {};
{
for (var i = 0; i < m.length; i++)
{
if (m[i].s > 0 || (m[i].e != null && m[i].e < txt.length) || m[i].n == 't' || m[i].n == 'ac')
if (m[i].s > 0 || (m[i].e != null && m[i].e < txt.length) || m[i].n == 't' || m[i].n == 'ac' || m[i].n == 'lk')
{
isLastLblHTML = true;
break;
@ -4723,23 +4723,6 @@ LucidImporter = {};
}
};
function getLinkFromM(m)
{
if (m != null)
{
for (var i = 0; i < m.length; i++)
{
if (m[i].n == 'lk' && m[i].v != null &&
m[i].v.length > 0)
{
return getLink(m[i].v[0]);
}
}
}
return null;
}
function getFontColor(properties)
{
//adds font color
@ -5289,44 +5272,44 @@ LucidImporter = {};
// Stroke style
if (properties.StrokeStyle == 'dotted')
{
return 'dashed=1;dashPattern=1 4;';
return 'dashed=1;fixDash=1;dashPattern=1 4;';
}
else if (properties.StrokeStyle == 'dashdot')
{
return 'dashed=1;dashPattern=10 5 1 5;';
return 'dashed=1;fixDash=1;dashPattern=10 5 1 5;';
}
else if (properties.StrokeStyle == 'dashdotdot')
{
return 'dashed=1;dashPattern=10 5 1 5 1 5;';
return 'dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;';
}
else if (properties.StrokeStyle == 'dotdotdot')
{
return 'dashed=1;dashPattern=1 2;';
return 'dashed=1;fixDash=1;dashPattern=1 2;';
}
else if (properties.StrokeStyle == 'longdash')
{
return 'dashed=1;dashPattern=16 6;';
return 'dashed=1;fixDash=1;dashPattern=16 6;';
}
else if (properties.StrokeStyle == 'dashlongdash')
{
return 'dashed=1;dashPattern=10 6 16 6;';
return 'dashed=1;fixDash=1;dashPattern=10 6 16 6;';
}
else if (properties.StrokeStyle == 'dashed24')
{
return 'dashed=1;dashPattern=3 8;';
return 'dashed=1;fixDash=1;dashPattern=3 8;';
}
else if (properties.StrokeStyle == 'dashed32')
{
return 'dashed=1;dashPattern=6 5;';
return 'dashed=1;fixDash=1;dashPattern=6 5;';
}
else if (properties.StrokeStyle == 'dashed44')
{
return 'dashed=1;dashPattern=8 8;';
return 'dashed=1;fixDash=1;dashPattern=8 8;';
}
else if (properties.StrokeStyle != null && properties.
StrokeStyle.substring(0, 6) == 'dashed')
{
return 'dashed=1;';
return 'dashed=1;fixDash=1;';
}
return '';
@ -5399,16 +5382,6 @@ LucidImporter = {};
{
graph.setAttributeForCell(cell, 'link', getLink(p.Link[0]));
}
//If the text has a link, it will be handled by html labels
/*else if (p.Text != null)
{
var link = getLinkFromM(getTextM(p.Text));
if (link != null)
{
graph.setAttributeForCell(cell, 'link', link);
}
}*/
replacePlaceholders(cell, graph);

View file

@ -348,7 +348,8 @@ function setCurrentXml(data, filename)
})();
// Enables offline mode
if (urlParams['offline'] == '1' || urlParams['demo'] == '1' || urlParams['stealth'] == '1' || urlParams['local'] == '1')
if (urlParams['offline'] == '1' || urlParams['demo'] == '1' ||
urlParams['stealth'] == '1' || urlParams['local'] == '1' || urlParams['lockdown'] == '1')
{
urlParams['picker'] = '0';
urlParams['gapi'] = '0';

View file

@ -3491,7 +3491,7 @@
if (editorUi.isOfflineApp())
{
if (navigator.onLine && urlParams['stealth'] != '1')
if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
{
this.addMenuItems(menu, ['upload'], parent);
}

View file

@ -859,7 +859,7 @@ EditorUi.initMinimalTheme = function()
if (ui.isOfflineApp())
{
if (navigator.onLine && urlParams['stealth'] != '1')
if (navigator.onLine && urlParams['stealth'] != '1' && urlParams['lockdown'] != '1')
{
this.addMenuItems(menu, ['upload'], parent);
}

View file

@ -53,25 +53,10 @@
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Software System');
}),
this.addEntry(dt + 'component', function()
{
var bg = new mxCell('',
new mxGeometry(0, 0, w * 1.6, h * 1.1), 'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#438DD5;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#3C7FC0;metaEdit=1;metaData={"c4Type":{"editable":false}};' + pts);
bg.vertex = true;
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Name', 'name');
bg.setAttribute('c4Type', 'Component');
bg.setAttribute('c4Technology', 'technology');
bg.setAttribute('c4Description', 'Description');
bg.setAttribute('label', '<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Component');
}),
this.addEntry(dt + 'container', function()
{
var bg = new mxCell('',
new mxGeometry(0, 0, w * 1.6, h * 1.1), 'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#85BBF0;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#78A8D8;metaEdit=1;metaData={"c4Type":{"editable":false}};' + pts);
new mxGeometry(0, 0, w * 1.6, h * 1.1), 'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#438DD5;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#3C7FC0;metaEdit=1;metaData={"c4Type":{"editable":false}};' + pts);
bg.vertex = true;
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
@ -83,6 +68,21 @@
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Container');
}),
this.addEntry(dt + 'component', function()
{
var bg = new mxCell('',
new mxGeometry(0, 0, w * 1.6, h * 1.1), 'rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#85BBF0;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#78A8D8;metaEdit=1;metaData={"c4Type":{"editable":false}};' + pts);
bg.vertex = true;
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Name', 'name');
bg.setAttribute('c4Type', 'Component');
bg.setAttribute('c4Technology', 'technology');
bg.setAttribute('c4Description', 'Description');
bg.setAttribute('label', '<b>%c4Name%</b><div>[%c4Type%: %c4Technology%]</div><br><div>%c4Description%</div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Component');
}),
this.addEntry(dt + 'execution environment', function()
{
var bg = new mxCell('',

View file

@ -8,7 +8,7 @@ break}b+="</"+d+">"}while(0<oa.length);return b}function y(a,b,d,h){a=a?a.substr
for(var p=[0],fa=0;0<(fa=a.indexOf("\n",fa));)fa++,p.push(fa);for(var C=0,fa=0;fa<b.length;fa++){if(b[fa].s>p[C])b.splice(fa,0,{s:p[C],n:"a",v:d.TextAlign||"center"});else{for(var n=0;fa+n<b.length&&b[fa+n].s==p[C];)n++;1<n&&(fa+=n-1)}C++}null!=p[C]&&b.push({s:p[C],n:"a",v:d.TextAlign||"center"});p="";C=e.slice();C.sort(function(a,b){return a.e-b.e});for(var u=n=fa=0,D={},B={},A=[],z=[],oa=[],S=!1,E=!1,l,ia=0,N=0,R=a.length,ea=!0;u<b.length||ea;){ea=!1;if(u<b.length){var U=b[u],G=b[u].s;S&&(B={},
p+=y(a,ia,R,!0),N=ia=R,p+=c());for(;null!=U&&U.s==G;)B[U.n]=U,U=b[++u];R=null!=U?U.s:a.length;p+=h(B,D);S&&(p+=g(D));S=!0}for(;fa>=n&&(fa<e.length||n<C.length);)if(U=e[fa],G=C[n],U&&G&&U.s<G.e){if(U.s>=R)break;ia=U.s;0<ia-N&&(p+=g(D)+y(a,N,ia),N=ia);for(;null!=U&&U.s==ia;)D[U.n]=U,U=e[++fa];p+=g(D)}else if(G){if(G.e>R)break;N=G.e;do delete D[G.n],G=C[++n];while(null!=G&&G.e==N);p+=y(a,ia,N);ia=N;0!=z.length||null!=U&&U.s==N||(e.splice(fa,0,{s:N,n:"dummy",v:""}),C.splice(n,0,{e:U?U.s:R,n:"dummy",v:""}))}else break}p+=
y(null,null,null,!0);S&&(N!=R&&(p+=a.substring(N,R)),p+=c(!0));return p}function e(a,b){z=!1;var d=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==d&&null!=a.State?null!=a.State.t&&(d=a.State):null==d&&null!=a.Note?null!=a.Note.t&&(d=a.Note):null==d&&null!=a.Title?null!=a.Title.t&&(d=a.Title):null!=a.t&&(d=a);null==d&&null!=a.TextAreas?null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(d=a.TextAreas.Text.Value):null==d&&null!=a.t0&&null!=a.t0.t&&(d=a.t0);
if(null!=d){if(null!=d.t){var h=d.t,h=h.replace(/\u2028/g,"\n"),d=d.m;try{for(var g=0;g<d.length;g++)if(0<d[g].s||null!=d[g].e&&d[g].e<h.length||"t"==d[g].n||"ac"==d[g].n){z=!0;break}if(z=z||b)return n(h,d,a)}catch(cf){console.log(cf)}h=h.replace(/</g,"&lt;");return h=h.replace(/>/g,"&gt;")}if(null!=d.Value&&null!=d.Value.t)return d.Value.t=d.Value.t.replace(/</g,"&lt;"),d.Value.t=d.Value.t.replace(/>/g,"&gt;"),d.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function p(a){if(null!=
if(null!=d){if(null!=d.t){var h=d.t,h=h.replace(/\u2028/g,"\n"),d=d.m;try{for(var g=0;g<d.length;g++)if(0<d[g].s||null!=d[g].e&&d[g].e<h.length||"t"==d[g].n||"ac"==d[g].n||"lk"==d[g].n){z=!0;break}if(z=z||b)return n(h,d,a)}catch(cf){console.log(cf)}h=h.replace(/</g,"&lt;");return h=h.replace(/>/g,"&gt;")}if(null!=d.Value&&null!=d.Value.t)return d.Value.t=d.Value.t.replace(/</g,"&lt;"),d.Value.t=d.Value.t.replace(/>/g,"&gt;"),d.Value.t}return""}function u(a){return null!=a.Action?a.Action:a}function p(a){if(null!=
a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else{if(null!=a.m)return a.m;if(null!=a.Title&&null!=a.Title.m)return a.Title.m}return null}function c(a,b){var m="whiteSpace=wrap;"+(b?"overflow=block;blockSpacing=1;html=1;fontSize=11;"+Aa:d(a)+h(a)+y(a)+w(a)+C(a)+B(a)+D(a)+A(a)+E(a))+H(a)+N(a)+$a(mxConstants.STYLE_ALIGN,a.TextAlign,"center");Aa="";return m}function a(a,
d,h,m,g){var c="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(c=";");c+="whiteSpace=wrap;"+(g?(uc(a,"overflow")?"":"overflow=block;blockSpacing=1;")+(uc(a,"html")?"":"html=1;")+"fontSize=11;"+Aa:b(mxConstants.STYLE_FONTSIZE,a,d,h,m)+b(mxConstants.STYLE_FONTFAMILY,a,d,h,m)+b(mxConstants.STYLE_FONTCOLOR,a,d,h,m)+b(mxConstants.STYLE_FONTSTYLE,a,d,h,m)+b(mxConstants.STYLE_ALIGN,a,d,h,m)+b(mxConstants.STYLE_SPACING_LEFT,a,d,h,m)+b(mxConstants.STYLE_SPACING_RIGHT,a,d,h,m)+b(mxConstants.STYLE_SPACING_TOP,
a,d,h,m)+b(mxConstants.STYLE_SPACING_BOTTOM,a,d,h,m))+b(mxConstants.STYLE_ALIGN+"Global",a,d,h,m)+b(mxConstants.STYLE_SPACING,a,d,h,m)+b(mxConstants.STYLE_VERTICAL_ALIGN,a,d,h,m)+b(mxConstants.STYLE_STROKECOLOR,a,d,h,m)+b(mxConstants.STYLE_OPACITY,a,d,h,m)+b(mxConstants.STYLE_ROUNDED,a,d,h,m)+b(mxConstants.STYLE_ROTATION,a,d,h,m)+b(mxConstants.STYLE_FLIPH,a,d,h,m)+b(mxConstants.STYLE_FLIPV,a,d,h,m)+b(mxConstants.STYLE_SHADOW,a,d,h,m)+b(mxConstants.STYLE_FILLCOLOR,a,d,h,m)+b(mxConstants.STYLE_DASHED,
@ -23,46 +23,46 @@ function G(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":$a(
Math.round(parseInt(h)/2.55)+";")}"string"===typeof a.FillColor&&(a.FillColor=Y(a.FillColor),7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";")));return b}function U(a,b,d){var h="";if(null!=a.Rotation){a=mxUtils.toDegree(parseFloat(a.Rotation));var g=!0;0!=a&&b.Class&&("UMLSwimLaneBlockV2"==b.Class||(0<=b.Class.indexOf("Rotated")||-90==a||270==a)&&(0<=b.Class.indexOf("Pool")||
0<=b.Class.indexOf("SwimLane")))?(a+=90,d.geometry.rotate90(),d.geometry.isRotated=!0,g=!1):0<=mxUtils.indexOf(Md,b.Class)?(a-=90,d.geometry.rotate90()):0<=mxUtils.indexOf(Nd,b.Class)&&(a+=180);0!=a&&(h+="rotation="+a+";");g||(h+="horizontal=0;")}return h}function pa(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function Y(a){a&&("rgb"==a.substring(0,3)?a="#"+a.match(/\d+/g).map(function(a){a=parseInt(a).toString(16);return(1==a.length?"0":"")+a}).join(""):"#"!=a.charAt(0)&&(a="#"+a));
return a}function Z(a){return(a=Y(a))?a.substring(0,7):null}function Wa(a,b){return(a=Y(a))&&7<a.length?b+"="+Math.round(parseInt("0x"+a.substr(7))/2.55)+";":""}function aa(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return $a(mxConstants.STYLE_FILLCOLOR,Z(a.FillColor.cs[0].c))+$a(mxConstants.STYLE_GRADIENTCOLOR,Z(a.FillColor.cs[1].c))}else return"string"===typeof a.FillColor?$a(mxConstants.STYLE_FILLCOLOR,Z(a.FillColor),"#FFFFFF"):
$a(mxConstants.STYLE_FILLCOLOR,"none");return""}function vc(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dashdotdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;dashPattern=16 6;":"dashlongdash"==a.StrokeStyle?"dashed=1;dashPattern=10 6 16 6;":"dashed24"==a.StrokeStyle?"dashed=1;dashPattern=3 8;":"dashed32"==a.StrokeStyle?"dashed=1;dashPattern=6 5;":
"dashed44"==a.StrokeStyle?"dashed=1;dashPattern=8 8;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function cc(a){return null!=a.LineWidth?$a(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(a.LineWidth)),"1"):""}function Ld(a,b,d){var h="";a.FillColor&&a.FillColor.url?(d=a.FillColor.url,"fill"==a.FillColor.pos&&(h="imageAspect=0;")):"ImageSearchBlock2"==b.Class?d=a.URL:"UserImage2Block"==b.Class&&null!=a.ImageFillProps&&null!=a.ImageFillProps.url&&(d=a.ImageFillProps.url);
if(null!=d){if(null!=LucidImporter.imgSrcRepl)for(a=0;a<LucidImporter.imgSrcRepl.length;a++)b=LucidImporter.imgSrcRepl[a],d=d.replace(b.searchVal,b.replVal);return"image="+d+";"+h}return""}function jb(a,b,d,h){for(var g=b,m=0;null!=h.getAttributeForCell(a,g);)m++,g=b+"_"+m;h.setAttributeForCell(a,g,null!=d?d:"")}function Lb(b,d,h,f,g,y){var w=u(d);if(null!=w){var k=Sb[w.Class];null!=k?b.style+=k+";":b.edge||(console.log("No mapping found for: "+w.Class),LucidImporter.hasUnknownShapes=!0);k=null!=
w.Properties?w.Properties:w;if(null!=k){b.value=y?"":e(k);b.style+=a(b.style,k,w,b,z);b.style.includes("strokeColor")||(b.style+=G(k,w));null!=k.Link&&0<k.Link.length&&h.setAttributeForCell(b,"link",m(k.Link[0]));y=[];var p=h.convertValueToString(b),C=!1;if(null!=p){for(var Ib=0;match=Od.exec(p);){var n=match[0],C=!0;if(2<n.length){var D=n.substring(2,n.length-2);"documentName"==D?D="filename":"pageName"==D?D="page":"totalPages"==D?D="pagecount":"page"==D?D="pagenumber":"date:"==D.substring(0,5)?
D="date{"+D.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==D.substring(0,16)?D=D.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==D.substring(0,9)&&(D="date{"+D.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");D="%"+D+"%";y.push(p.substring(Ib,match.index)+(null!=D?D:n));Ib=match.index+n.length}}C&&(y.push(p.substring(Ib)),h.setAttributeForCell(b,"label",
y.join("")),h.setAttributeForCell(b,"placeholders","1"))}for(var B in k)if(k.hasOwnProperty(B)&&B.toString().startsWith("ShapeData_"))try{var A=k[B],E=mxUtils.trim(A.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");jb(b,E,A.Value,h)}catch(Kb){window.console&&console.log("Ignored "+B+":",Kb)}k.Title&&k.Text&&"ExtShape"!=w.Class.substr(0,8)&&(w=b.geometry,w=new mxCell(e(k.Title),new mxGeometry(0,w.height,w.width,10),"strokeColor=none;fillColor=none;"),w.vertex=!0,b.insert(w),
w.style+=c(k.Title,z));if(b.edge){b.style=null!=k.Rounding&&"diagonal"!=k.Shape?b.style+("rounded=1;arcSize="+k.Rounding+";"):b.style+"rounded=0;";if("diagonal"!=k.Shape)if(null!=k.ElbowPoints&&0<k.ElbowPoints.length)for(b.geometry.points=[],w=0;w<k.ElbowPoints.length;w++)b.geometry.points.push(new mxPoint(Math.round(.75*k.ElbowPoints[w].x+Tb),Math.round(.75*k.ElbowPoints[w].y+Ub)));else"elbow"==k.Shape?b.style+="edgeStyle=orthogonalEdgeStyle;":null!=k.Endpoint1.Block&&null!=k.Endpoint2.Block&&(b.style+=
"edgeStyle=orthogonalEdgeStyle;","curve"==k.Shape&&(b.style+="curved=1;"));if(k.LineJumps||LucidImporter.globalProps.LineJumps)b.style+="jumpStyle=arc;";null!=k.Endpoint1.Style&&(w=Lc[k.Endpoint1.Style],null!=w?(w=w.replace(/xyz/g,"start"),b.style+="startArrow="+w+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+k.Endpoint1.Style)));null!=k.Endpoint2.Style&&(w=Lc[k.Endpoint2.Style],null!=w?(w=w.replace(/xyz/g,"end"),b.style+="endArrow="+w+";"):(LucidImporter.hasUnknownShapes=
!0,window.console&&console.log("Unknown endpoint style: "+k.Endpoint2.Style)));B=null!=k.ElbowControlPoints&&0<k.ElbowControlPoints.length?k.ElbowControlPoints:null!=k.BezierJoints&&0<k.BezierJoints.length?k.BezierJoints:k.Joints;if(null!=B)for(b.geometry.points=[],w=0;w<B.length;w++)A=B[w].p?B[w].p:B[w],b.geometry.points.push(new mxPoint(Math.round(.75*A.x+Tb),Math.round(.75*A.y+Ub)));w=!1;if((null==b.geometry.points||0==b.geometry.points.length)&&null!=k.Endpoint1.Block&&k.Endpoint1.Block==k.Endpoint2.Block&&
null!=f&&null!=g){w=new mxPoint(Math.round(f.geometry.x+f.geometry.width*k.Endpoint1.LinkX),Math.round(f.geometry.y+f.geometry.height*k.Endpoint1.LinkY));B=new mxPoint(Math.round(g.geometry.x+g.geometry.width*k.Endpoint2.LinkX),Math.round(g.geometry.y+g.geometry.height*k.Endpoint2.LinkY));Tb=w.x==B.x?Math.abs(w.x-f.geometry.x)<f.geometry.width/2?-20:20:0;Ub=w.y==B.y?Math.abs(w.y-f.geometry.y)<f.geometry.height/2?-20:20:0;var S=new mxPoint(w.x+Tb,w.y+Ub),fa=new mxPoint(B.x+Tb,B.y+Ub);S.generated=!0;
fa.generated=!0;b.geometry.points=[S,fa];w=w.x==B.x}null!=f&&f.geometry.isRotated||(S=Mc(b,k.Endpoint1,!0,w));null!=f&&null!=S&&(null==f.stylePoints&&(f.stylePoints=[]),f.stylePoints.push(S),LucidImporter.stylePointsSet.add(f));null!=g&&g.geometry.isRotated||(fa=Mc(b,k.Endpoint2,!1,w));null!=g&&null!=fa&&(null==g.stylePoints&&(g.stylePoints=[]),g.stylePoints.push(fa),LucidImporter.stylePointsSet.add(g))}}}null!=d.id&&jb(b,"lucidchartObjectId",d.id,h)}function dc(b,d){var h=u(b),m=h.Properties,g=m.BoundingBox;
null==b.Class||"AWS"!==b.Class.substring(0,3)&&"Amazon"!==b.Class.substring(0,6)||b.Class.includes("AWS19")||(g.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*g.x+Tb),Math.round(.75*g.y+Ub),Math.round(.75*g.w),Math.round(.75*g.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Lb(v,b,d);v.zOrder=m.ZOrder;null!=v&&0<=v.style.indexOf(";grIcon=")&&(g=new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;"),
g.vertex=!0,g.style+=a(g.style,m,h,g),v.geometry.x=0,v.geometry.y=0,v.style+="part=1;",g.insert(v),v=g);re(v,m);return v}function rd(a,b,d,h){var m=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");m.geometry.relative=!0;m.edge=!0;Lb(m,a,b,d,h,!0);b=u(a).Properties;d=null!=b?b.TextAreas:a.TextAreas;if(null!=d){for(h=0;null!=d["t"+h];){var c=d["t"+h],m=kb(c,m,a);h++}for(h=0;null!=d["m"+h]||1>h;)c=d["m"+h],null!=c&&(m=kb(c,m,a)),h++;null!=d.Text&&(m=kb(d.Text,m,a));d=null!=b?b.TextAreas:
a.TextAreas;null!=d.Message&&(m=kb(d.Message,m,a))}return m}function kb(a,b,d){var m=2*(parseFloat(a.Location)-.5);isNaN(m)&&null!=a.Text&&null!=a.Text.Location&&(m=2*(parseFloat(a.Text.Location)-.5));var g=mxCell,c=e(a),m=new mxGeometry(isNaN(m)?0:m,0,0,0),f=Nc;if(z)a=Aa;else{var y="11",w="";if(null!=a&&null!=a.Value&&null!=a.Value.m){for(var w=k(a.Value.m),p=0;p<a.Value.m.length;p++)if("s"==a.Value.m[p].n)y=.75*parseFloat(a.Value.m[p].v);else if("c"==a.Value.m[p].n){var C=Y(a.Value.m[p].v);null!=
C&&(C=C.substring(0,7));w+="fontColor="+C+";"}w+=h(d);Aa=""}a=w+";fontSize="+y+";"}g=new g(c,m,f+a);g.geometry.relative=!0;g.vertex=!0;b.insert(g);return b}function $a(a,b,d,h){null!=b&&null!=h&&(b=h(b));return null!=b&&b!=d?a+"="+b+";":""}function Mc(a,b,d,h,m){if(null!=b&&null!=b.LinkX&&null!=b.LinkY&&(b.LinkX=Math.round(1E3*b.LinkX)/1E3,b.LinkY=Math.round(1E3*b.LinkY)/1E3,a.style+=(h?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(m?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+
"=0;",b.Inside))return"["+b.LinkX+","+b.LinkY+",0]"}function sd(a,b,d,h){try{var m=function(a,b){if(null!=a)if(Array.isArray(a))for(var d=0;d<a.length;d++)m(a[d],b);else d=b?.75:1,f=Math.min(f,a.x*d),y=Math.min(y,a.y*d),w=Math.max(w,(a.x+(a.width?a.width:0))*d),k=Math.max(k,(a.y+(a.height?a.height:0))*d)};null!=a.Action&&null!=a.Action.Properties&&(a=a.Action.Properties);var c=new mxCell("",new mxGeometry,"group;dropTarget=0;");c.vertex=!0;c.zOrder=a.ZOrder;var f=Infinity,y=Infinity,w=-Infinity,k=
-Infinity,p=a.Members,e=[],C;for(C in p){var n=b[C];null!=n?e.push(n):null!=h[C]&&(e.push(h[C]),d[C]=c)}e.sort(function(a,b){var d=a.zOrder,h=b.zOrder;return null!=d&&null!=h?d>h?1:d<h?-1:0:0});for(d=b=0;d<e.length;d++)if(n=e[d],n.vertex)m(n.geometry),n.parent=c,c.insert(n,b++);else{var u=null!=n.Action&&n.Action.Properties?n.Action.Properties:n;m(u.Endpoint1,!0);m(u.Endpoint2,!0);m(u.ElbowPoints,!0);m(u.ElbowControlPoints,!0);m(u.BezierJoints,!0);m(u.Joints,!0)}c.geometry.x=f;c.geometry.y=y;c.geometry.width=
w-f;c.geometry.height=k-y;if(null!=c.children)for(d=0;d<c.children.length;d++){var Ib=c.children[d].geometry;Ib.x-=f;Ib.y-=y}a.IsState?c.lucidLayerInfo={name:a.Name,visible:!a.Hidden,locked:a.Restrictions.b&&a.Restrictions.p&&a.Restrictions.c}:a.Hidden&&(c.visible=!1);return c}catch(ef){console.log(ef)}}function Pd(a,b,d){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;a.getModel().beginUpdate();try{var h=function(b,d){function h(a,b,d){null==a||a.generated||(a.x-=b,a.y-=d)}var g=null!=
d.Endpoint1.Block?c[d.Endpoint1.Block]:null,y=null!=d.Endpoint2.Block?c[d.Endpoint2.Block]:null,w=rd(b,a,g,y);null==g&&null!=d.Endpoint1&&w.geometry.setTerminalPoint(new mxPoint(Math.round(.75*d.Endpoint1.x),Math.round(.75*d.Endpoint1.y)),!0);null==y&&null!=d.Endpoint2&&w.geometry.setTerminalPoint(new mxPoint(Math.round(.75*d.Endpoint2.x),Math.round(.75*d.Endpoint2.y)),!1);var k=f[b.id];if(null!=k){for(var e=w.geometry,p=0,r=0,t=k;null!=t&&null!=t.geometry;)p+=t.geometry.x,r+=t.geometry.y,t=t.parent;
h(e.sourcePoint,p,r);h(e.targetPoint,p,r);h(e.offset,p,r);e=e.points;if(null!=e)for(t=0;t<e.length;t++)h(e[t],p,r)}m.push(a.addCell(w,k,null,g,y))},m=[],c={},f={},y={},w=[];null!=b.Lines&&(y=b.Lines);if(null!=b.Blocks){Object.assign(y,b.Blocks);for(var k in b.Blocks){var e=b.Blocks[k];e.id=k;var p=!1;null!=Sb[e.Class]&&"mxCompositeShape"==Sb[e.Class]&&(c[e.id]=Oc(e,m,a),w.push(e),p=!0);p||(c[e.id]=dc(e,a),w.push(e))}if(null!=b.Generators)for(k in b.Generators)"OrgChart2018"==b.Generators[k].ClassName&&
(LucidImporter.hasUnknownShapes=!0,console.log("Lucid diagram has an Org Chart!"))}else{for(var C=0;C<b.Objects.length;C++)e=b.Objects[C],y[e.id]=e,null!=e.Action&&"mxCompositeShape"==Sb[e.Action.Class]?c[e.id]=Oc(e,m,a):e.IsBlock&&null!=e.Action&&null!=e.Action.Properties?c[e.id]=dc(e,a):e.IsGenerator&&e.GeneratorData&&e.GeneratorData.p&&"OrgChart2018"==e.GeneratorData.p.ClassName&&(LucidImporter.hasUnknownShapes=!0,console.log("Lucid diagram has an Org Chart!")),w.push(e);for(C=0;C<b.Objects.length;C++)if(e=
b.Objects[C],e.IsGroup){var n=sd(e,c,f,y);n&&(c[e.id]=n,w.push(e))}}if(null!=b.Groups)try{for(k in b.Groups)if(e=b.Groups[k],e.id=k,n=sd(e,c,f,y))c[e.id]=n,w.push(e)}catch(Kb){console.log(Kb)}if(null!=b.Lines)for(k in b.Lines)e=b.Lines[k],e.id=k,w.push(e);w.sort(function(a,b){a=u(a);b=u(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,h=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=h?d>h?1:d<h?-1:0:0});for(C=0;C<w.length;C++){var e=w[C],D=c[e.id];if(null!=D){if(null==
D.parent)if(D.lucidLayerInfo){var B=new mxCell;a.addCell(B,a.model.root);B.setVisible(D.lucidLayerInfo.visible);D.lucidLayerInfo.locked&&B.setStyle("locked=1;");B.setValue(D.lucidLayerInfo.name);delete D.lucidLayerInfo;a.addCell(D,B)}else m.push(a.addCell(D))}else e.IsLine&&null!=e.Action&&null!=e.Action.Properties?h(e,e.Action.Properties):null!=e.StrokeStyle&&h(e,e)}LucidImporter.stylePointsSet.forEach(function(a){a.style="points=["+a.stylePoints.join(",")+"];"+a.style;delete a.stylePoints});try{var A=
a.getModel().cells,z;for(z in A)delete A[z].zOrder}catch(Kb){}d||a.setSelectionCells(m)}finally{a.getModel().endUpdate()}}function Qd(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function ec(a,b,d,h,m,c,f,y){this.nurbsValues=[1,3,0,0,100*(a+d),100-100*(1-(b+h)),0,1,100*(m+f),100-100*(1-(c+y)),0,1]}function se(a,b){try{for(var d=[],h=b.BoundingBox.w,m=b.BoundingBox.h,c=0;c<b.Shapes.length;c++){var f=
b.Shapes[c],y=f.FillColor,w=f.StrokeColor,k=f.LineWidth,e=f.Points,p=f.Lines,C=['<shape strokewidth="inherit"><foreground>'];C.push("<path>");for(var n=null,u=0;u<p.length;u++){var D=p[u];if(n!=D.p1){var B=e[D.p1].x,A=e[D.p1].y,B=100*B/h,A=100*A/m,B=Math.round(100*B)/100,A=Math.round(100*A)/100;C.push('<move x="'+B+'" y="'+A+'"/>')}if(null!=D.n1){var z;var E=e[D.p2].x,S=e[D.p2].y,N=h,l=m,R=new ec(e[D.p1].x,e[D.p1].y,D.n1.x,D.n1.y,e[D.p2].x,e[D.p2].y,D.n2.x,D.n2.y);if(2<=R.getSize()){R.getX(0);R.getY(0);
R.getX(1);R.getY(1);for(var E=Math.round(100*E/N*100)/100,S=Math.round(100*S/l*100)/100,N=[],l=[],ea=[],U=R.getSize(),G=0;G<U-1;G+=3)N.push(new mxPoint(R.getX(G),R.getY(G))),l.push(new mxPoint(R.getX(G+1),R.getY(G+1))),G<U-2?ea.push(new mxPoint(R.getX(G+2),R.getY(G+2))):ea.push(new mxPoint(E,S));for(var fa="",G=0;G<N.length;G++)fa+='<curve x1="'+N[G].x+'" y1="'+N[G].y+'" x2="'+l[G].x+'" y2="'+l[G].y+'" x3="'+ea[G].x+'" y3="'+ea[G].y+'"/>';z=fa}else z=void 0;C.push(z)}else B=e[D.p2].x,A=e[D.p2].y,
B=100*B/h,A=100*A/m,B=Math.round(100*B)/100,A=Math.round(100*A)/100,C.push('<line x="'+B+'" y="'+A+'"/>');n=D.p2}C.push("</path>");C.push("<fillstroke/>");C.push("</foreground></shape>");d.push({shapeStencil:"stencil("+Graph.compress(C.join(""))+")",FillColor:y,LineColor:w,LineWidth:k})}LucidImporter.stencilsMap[a]={text:b.Text,w:h,h:m,stencils:d}}catch(Kd){console.log("Stencil parsing error:",Kd)}}function Db(a,b,d,h,m,c,f,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");
a.vertex=!0;f.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);h.push(m.addCell(d,null,null,null,null))}function va(a,b,d,h,m,c,f,y,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;w.insert(a);d=new mxCell("",new mxGeometry(d,h,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;w.insert(d);y=[d];m=m.clone();a.insertEdge(m,!0);d.insertEdge(m,!1);y.push(m);c.push(f.addCell(m,null,null,null,null))}function ja(b,d,h,m,g,c){m.style=
"rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";m.style+=a(m.style,g,c,m);d=e(g);m.vertex=!0;b=new mxCell(d,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+b+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");b.style+=a(b.style,g,c,b,z);b.geometry.relative=!0;b.geometry.offset=new mxPoint(5,-12);b.vertex=!0;m.insert(b)}function ma(b,
d,h,m,g,c,f,y){g="transparent"!=b?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";c.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";c.style+=a(c.style,f,y,c);c.value=e(f);c.vertex=!0;b=new mxCell(null,new mxGeometry(.5,0,.7*m*d,.7*m*h),g+b+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");b.geometry.relative=!0;b.geometry.offset=new mxPoint(-d*m*.35,10+(1-h)*m*.35);b.vertex=!0;b.style+=
a(b.style,f,y,b,z);c.insert(b)}function uc(a,b){return null==a||null==b||!a.includes(";"+b+"=")&&a.substring(0,b.length+1)!=b+"="?!1:!0}function Rd(a,b){function d(a){a=Math.round(parseInt("0x"+a)*b).toString(16);return 1==a.length?"0"+a:a}return"#"+d(a.substr(1,2))+d(a.substr(3,2))+d(a.substr(5,2))}function Oc(b,m,f){var k=u(b),g=k.Properties,p=g.BoundingBox,t=Math.round(.75*p.w),r=Math.round(.75*p.h),n=Math.round(.75*p.x+Tb),Y=Math.round(.75*p.y+Ub);null==b.Class||"GCPInputDatabase"!==b.Class&&
"GCPInputRecord"!==b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&&"GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==
b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(n,Y,t,r),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=g.ZOrder;var fa=null!=b.Class?b.Class:null!=k?k.Class:null;switch(fa){case "BraceNoteBlock":case "UI2BraceNoteBlock":var dc=!1;null!=g.BraceDirection&&"Right"==g.BraceDirection&&(dc=!0);var jb=null,ia=
null;dc?(jb=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),ia=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(jb=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),ia=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=a(v.style,g,k,v);jb.vertex=!0;v.insert(jb);jb.style+=a(jb.style,g,k,jb);ia.vertex=!0;ia.value=
e(g);v.insert(ia);ia.style+=a(ia.style,g,k,ia,z);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var oa="MainText",kb=null,rd="HeaderFill_",Mc="BodyFill_",Kb=25,Sb=25,Kc=0;if(null!=g.Lanes)Kc=g.Lanes.length;else if(null!=g.PrimaryLane){for(var ec=function(a){if(a)32>a?a=32:208<a&&(a=208);else return 0;return.75*a},Kc=g.PrimaryLane.length,
l=r=t=0;l<Kc;l++)t+=g.PrimaryLane[l];for(l=0;l<g.SecondaryLane.length;l++)r+=g.SecondaryLane[l];Kb=ec(g.PrimaryPoolTitleHeight);Sb=ec(g.PrimaryLaneTitleHeight);t*=.75;r=.75*r+Kb+Sb;v.geometry.width=t;v.geometry.height=r;oa="poolPrimaryTitleKey";rd="PrimaryLaneHeaderFill_";Mc="CellFill_0,";kb=g.PrimaryLaneTextAreaIds;if(null==kb)for(kb=[],l=0;l<Kc;l++)kb.push("Primary_"+l)}if(0==g.IsPrimaryLaneVertical){g.Rotation=-1.5707963267948966;var uc=v.geometry.x,Nc=v.geometry.y}var Jd=0!=g.Rotation,Lc=0<fa.indexOf("Pool"),
sd=0==fa.indexOf("BPMN"),Kd=null!=g[oa];v.style=(Lc?"swimlane;startSize="+Kb+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Jd?"horizontalStack=0;":"");v.style+=a(v.style,g,k,v);Kd&&(v.value=e(g[oa]),v.style+=(z?"overflow=block;blockSpacing=1;fontSize=11;"+Aa:d(g[oa])+y(g[oa])+h(g[oa])+w(g[oa])+C(g[oa],v)+B(g[oa])+D(g[oa])+A(g[oa])+E(g[oa]))+H(g[oa])+N(g[oa]));for(var Oc=0,
Jb=[],Md="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Sb+";dropTarget=0;rounded=0;"+(Jd?"horizontal=0;":"")+(sd?"swimlaneLine=0;fillColor=none;":""),P=g.Rotation=0;P<Kc;P++){if(null==kb)var qd=parseFloat(g.Lanes[P].p),l=parseInt(g.Lanes[P].tid)||P,ab="Lane_"+l;else qd=.75*g.PrimaryLane[P]/t,l=P,ab=kb[P];var te=t*Oc,td=Lc?Kb:0;Jb.push(new mxCell("",Jd?new mxGeometry(td,te,r-td,t*qd):new mxGeometry(te,td,t*qd,r-td),Md));Jb[P].vertex=!0;v.insert(Jb[P]);
Jb[P].value=e(g[ab]);Jb[P].style+=a(Jb[P].style,g,k,Jb[P],z)+(z?"fontSize=11;":d(g[ab])+y(g[ab])+w(g[ab])+C(g[ab],Jb[P])+B(g[ab])+D(g[ab])+A(g[ab])+E(g[ab]))+H(g[ab])+N(g[ab])+S(g[rd+l])+ea(g[Mc+l]);Oc+=qd}null!=uc&&(v.geometry.x=uc,v.geometry.y=Nc);break;case "UMLMultidimensionalSwimlane":var fc=0,gc=0,Sd=null,Td=null;if(null!=g.Rows&&null!=g.Columns)var fc=g.Rows.length,gc=g.Columns.length,Pc=.75*g.TitleHeight||25,Qc=.75*g.TitleWidth||25;else if(null!=g.PrimaryLane&&null!=g.SecondaryLane){fc=g.SecondaryLane.length;
gc=g.PrimaryLane.length;Qc=.75*g.SecondaryLaneTitleHeight||25;Pc=.75*g.PrimaryLaneTitleHeight||25;for(l=r=t=0;l<fc;l++)r+=g.SecondaryLane[l];for(l=0;l<gc;l++)t+=g.PrimaryLane[l];t=.75*t+Qc;r=.75*r+Pc;v.geometry.width=t;v.geometry.height=r;Sd=g.SecondaryLaneTextAreaIds;Td=g.PrimaryLaneTextAreaIds}v.style="group;";var Ud=new mxCell("",new mxGeometry(0,Pc,t,r-Pc),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");
$a(mxConstants.STYLE_FILLCOLOR,"none");return""}function vc(a){return"dotted"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==a.StrokeStyle?
"dashed=1;fixDash=1;dashPattern=3 8;":"dashed32"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==a.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function cc(a){return null!=a.LineWidth?$a(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(a.LineWidth)),"1"):""}function Ld(a,b,d){var h="";a.FillColor&&a.FillColor.url?(d=a.FillColor.url,"fill"==a.FillColor.pos&&(h="imageAspect=0;")):"ImageSearchBlock2"==
b.Class?d=a.URL:"UserImage2Block"==b.Class&&null!=a.ImageFillProps&&null!=a.ImageFillProps.url&&(d=a.ImageFillProps.url);if(null!=d){if(null!=LucidImporter.imgSrcRepl)for(a=0;a<LucidImporter.imgSrcRepl.length;a++)b=LucidImporter.imgSrcRepl[a],d=d.replace(b.searchVal,b.replVal);return"image="+d+";"+h}return""}function jb(a,b,d,h){for(var g=b,m=0;null!=h.getAttributeForCell(a,g);)m++,g=b+"_"+m;h.setAttributeForCell(a,g,null!=d?d:"")}function Lb(b,d,h,f,g,y){var w=u(d);if(null!=w){var k=Sb[w.Class];
null!=k?b.style+=k+";":b.edge||(console.log("No mapping found for: "+w.Class),LucidImporter.hasUnknownShapes=!0);k=null!=w.Properties?w.Properties:w;if(null!=k){b.value=y?"":e(k);b.style+=a(b.style,k,w,b,z);b.style.includes("strokeColor")||(b.style+=G(k,w));null!=k.Link&&0<k.Link.length&&h.setAttributeForCell(b,"link",m(k.Link[0]));y=[];var p=h.convertValueToString(b),C=!1;if(null!=p){for(var Ib=0;match=Od.exec(p);){var n=match[0],C=!0;if(2<n.length){var D=n.substring(2,n.length-2);"documentName"==
D?D="filename":"pageName"==D?D="page":"totalPages"==D?D="pagecount":"page"==D?D="pagenumber":"date:"==D.substring(0,5)?D="date{"+D.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==D.substring(0,16)?D=D.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==D.substring(0,9)&&(D="date{"+D.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");D="%"+D+"%";y.push(p.substring(Ib,
match.index)+(null!=D?D:n));Ib=match.index+n.length}}C&&(y.push(p.substring(Ib)),h.setAttributeForCell(b,"label",y.join("")),h.setAttributeForCell(b,"placeholders","1"))}for(var B in k)if(k.hasOwnProperty(B)&&B.toString().startsWith("ShapeData_"))try{var A=k[B],E=mxUtils.trim(A.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");jb(b,E,A.Value,h)}catch(Kb){window.console&&console.log("Ignored "+B+":",Kb)}k.Title&&k.Text&&"ExtShape"!=w.Class.substr(0,8)&&(w=b.geometry,w=new mxCell(e(k.Title),
new mxGeometry(0,w.height,w.width,10),"strokeColor=none;fillColor=none;"),w.vertex=!0,b.insert(w),w.style+=c(k.Title,z));if(b.edge){b.style=null!=k.Rounding&&"diagonal"!=k.Shape?b.style+("rounded=1;arcSize="+k.Rounding+";"):b.style+"rounded=0;";if("diagonal"!=k.Shape)if(null!=k.ElbowPoints&&0<k.ElbowPoints.length)for(b.geometry.points=[],w=0;w<k.ElbowPoints.length;w++)b.geometry.points.push(new mxPoint(Math.round(.75*k.ElbowPoints[w].x+Tb),Math.round(.75*k.ElbowPoints[w].y+Ub)));else"elbow"==k.Shape?
b.style+="edgeStyle=orthogonalEdgeStyle;":null!=k.Endpoint1.Block&&null!=k.Endpoint2.Block&&(b.style+="edgeStyle=orthogonalEdgeStyle;","curve"==k.Shape&&(b.style+="curved=1;"));if(k.LineJumps||LucidImporter.globalProps.LineJumps)b.style+="jumpStyle=arc;";null!=k.Endpoint1.Style&&(w=Lc[k.Endpoint1.Style],null!=w?(w=w.replace(/xyz/g,"start"),b.style+="startArrow="+w+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+k.Endpoint1.Style)));null!=k.Endpoint2.Style&&
(w=Lc[k.Endpoint2.Style],null!=w?(w=w.replace(/xyz/g,"end"),b.style+="endArrow="+w+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+k.Endpoint2.Style)));B=null!=k.ElbowControlPoints&&0<k.ElbowControlPoints.length?k.ElbowControlPoints:null!=k.BezierJoints&&0<k.BezierJoints.length?k.BezierJoints:k.Joints;if(null!=B)for(b.geometry.points=[],w=0;w<B.length;w++)A=B[w].p?B[w].p:B[w],b.geometry.points.push(new mxPoint(Math.round(.75*A.x+Tb),Math.round(.75*A.y+
Ub)));w=!1;if((null==b.geometry.points||0==b.geometry.points.length)&&null!=k.Endpoint1.Block&&k.Endpoint1.Block==k.Endpoint2.Block&&null!=f&&null!=g){w=new mxPoint(Math.round(f.geometry.x+f.geometry.width*k.Endpoint1.LinkX),Math.round(f.geometry.y+f.geometry.height*k.Endpoint1.LinkY));B=new mxPoint(Math.round(g.geometry.x+g.geometry.width*k.Endpoint2.LinkX),Math.round(g.geometry.y+g.geometry.height*k.Endpoint2.LinkY));Tb=w.x==B.x?Math.abs(w.x-f.geometry.x)<f.geometry.width/2?-20:20:0;Ub=w.y==B.y?
Math.abs(w.y-f.geometry.y)<f.geometry.height/2?-20:20:0;var S=new mxPoint(w.x+Tb,w.y+Ub),fa=new mxPoint(B.x+Tb,B.y+Ub);S.generated=!0;fa.generated=!0;b.geometry.points=[S,fa];w=w.x==B.x}null!=f&&f.geometry.isRotated||(S=Mc(b,k.Endpoint1,!0,w));null!=f&&null!=S&&(null==f.stylePoints&&(f.stylePoints=[]),f.stylePoints.push(S),LucidImporter.stylePointsSet.add(f));null!=g&&g.geometry.isRotated||(fa=Mc(b,k.Endpoint2,!1,w));null!=g&&null!=fa&&(null==g.stylePoints&&(g.stylePoints=[]),g.stylePoints.push(fa),
LucidImporter.stylePointsSet.add(g))}}}null!=d.id&&jb(b,"lucidchartObjectId",d.id,h)}function dc(b,d){var h=u(b),m=h.Properties,g=m.BoundingBox;null==b.Class||"AWS"!==b.Class.substring(0,3)&&"Amazon"!==b.Class.substring(0,6)||b.Class.includes("AWS19")||(g.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*g.x+Tb),Math.round(.75*g.y+Ub),Math.round(.75*g.w),Math.round(.75*g.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Lb(v,b,d);v.zOrder=m.ZOrder;null!=v&&0<=v.style.indexOf(";grIcon=")&&
(g=new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;"),g.vertex=!0,g.style+=a(g.style,m,h,g),v.geometry.x=0,v.geometry.y=0,v.style+="part=1;",g.insert(v),v=g);re(v,m);return v}function rd(a,b,d,h){var m=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");m.geometry.relative=!0;m.edge=!0;Lb(m,a,b,d,h,!0);b=u(a).Properties;d=null!=b?b.TextAreas:a.TextAreas;if(null!=d){for(h=0;null!=d["t"+h];){var c=
d["t"+h],m=kb(c,m,a);h++}for(h=0;null!=d["m"+h]||1>h;)c=d["m"+h],null!=c&&(m=kb(c,m,a)),h++;null!=d.Text&&(m=kb(d.Text,m,a));d=null!=b?b.TextAreas:a.TextAreas;null!=d.Message&&(m=kb(d.Message,m,a))}return m}function kb(a,b,d){var m=2*(parseFloat(a.Location)-.5);isNaN(m)&&null!=a.Text&&null!=a.Text.Location&&(m=2*(parseFloat(a.Text.Location)-.5));var g=mxCell,c=e(a),m=new mxGeometry(isNaN(m)?0:m,0,0,0),f=Nc;if(z)a=Aa;else{var y="11",w="";if(null!=a&&null!=a.Value&&null!=a.Value.m){for(var w=k(a.Value.m),
p=0;p<a.Value.m.length;p++)if("s"==a.Value.m[p].n)y=.75*parseFloat(a.Value.m[p].v);else if("c"==a.Value.m[p].n){var C=Y(a.Value.m[p].v);null!=C&&(C=C.substring(0,7));w+="fontColor="+C+";"}w+=h(d);Aa=""}a=w+";fontSize="+y+";"}g=new g(c,m,f+a);g.geometry.relative=!0;g.vertex=!0;b.insert(g);return b}function $a(a,b,d,h){null!=b&&null!=h&&(b=h(b));return null!=b&&b!=d?a+"="+b+";":""}function Mc(a,b,d,h,m){if(null!=b&&null!=b.LinkX&&null!=b.LinkY&&(b.LinkX=Math.round(1E3*b.LinkX)/1E3,b.LinkY=Math.round(1E3*
b.LinkY)/1E3,a.style+=(h?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(m?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=0;",b.Inside))return"["+b.LinkX+","+b.LinkY+",0]"}function sd(a,b,d,h){try{var m=function(a,b){if(null!=a)if(Array.isArray(a))for(var d=0;d<a.length;d++)m(a[d],b);else d=b?.75:1,f=Math.min(f,a.x*d),y=Math.min(y,a.y*d),w=Math.max(w,(a.x+(a.width?a.width:0))*d),k=Math.max(k,(a.y+(a.height?a.height:0))*d)};null!=a.Action&&null!=a.Action.Properties&&(a=a.Action.Properties);
var c=new mxCell("",new mxGeometry,"group;dropTarget=0;");c.vertex=!0;c.zOrder=a.ZOrder;var f=Infinity,y=Infinity,w=-Infinity,k=-Infinity,p=a.Members,e=[],C;for(C in p){var n=b[C];null!=n?e.push(n):null!=h[C]&&(e.push(h[C]),d[C]=c)}e.sort(function(a,b){var d=a.zOrder,h=b.zOrder;return null!=d&&null!=h?d>h?1:d<h?-1:0:0});for(d=b=0;d<e.length;d++)if(n=e[d],n.vertex)m(n.geometry),n.parent=c,c.insert(n,b++);else{var u=null!=n.Action&&n.Action.Properties?n.Action.Properties:n;m(u.Endpoint1,!0);m(u.Endpoint2,
!0);m(u.ElbowPoints,!0);m(u.ElbowControlPoints,!0);m(u.BezierJoints,!0);m(u.Joints,!0)}c.geometry.x=f;c.geometry.y=y;c.geometry.width=w-f;c.geometry.height=k-y;if(null!=c.children)for(d=0;d<c.children.length;d++){var Ib=c.children[d].geometry;Ib.x-=f;Ib.y-=y}a.IsState?c.lucidLayerInfo={name:a.Name,visible:!a.Hidden,locked:a.Restrictions.b&&a.Restrictions.p&&a.Restrictions.c}:a.Hidden&&(c.visible=!1);return c}catch(ef){console.log(ef)}}function Pd(a,b,d){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=
new Set;a.getModel().beginUpdate();try{var h=function(b,d){function h(a,b,d){null==a||a.generated||(a.x-=b,a.y-=d)}var g=null!=d.Endpoint1.Block?c[d.Endpoint1.Block]:null,y=null!=d.Endpoint2.Block?c[d.Endpoint2.Block]:null,w=rd(b,a,g,y);null==g&&null!=d.Endpoint1&&w.geometry.setTerminalPoint(new mxPoint(Math.round(.75*d.Endpoint1.x),Math.round(.75*d.Endpoint1.y)),!0);null==y&&null!=d.Endpoint2&&w.geometry.setTerminalPoint(new mxPoint(Math.round(.75*d.Endpoint2.x),Math.round(.75*d.Endpoint2.y)),!1);
var k=f[b.id];if(null!=k){for(var e=w.geometry,p=0,r=0,t=k;null!=t&&null!=t.geometry;)p+=t.geometry.x,r+=t.geometry.y,t=t.parent;h(e.sourcePoint,p,r);h(e.targetPoint,p,r);h(e.offset,p,r);e=e.points;if(null!=e)for(t=0;t<e.length;t++)h(e[t],p,r)}m.push(a.addCell(w,k,null,g,y))},m=[],c={},f={},y={},w=[];null!=b.Lines&&(y=b.Lines);if(null!=b.Blocks){Object.assign(y,b.Blocks);for(var k in b.Blocks){var e=b.Blocks[k];e.id=k;var p=!1;null!=Sb[e.Class]&&"mxCompositeShape"==Sb[e.Class]&&(c[e.id]=Oc(e,m,a),
w.push(e),p=!0);p||(c[e.id]=dc(e,a),w.push(e))}if(null!=b.Generators)for(k in b.Generators)"OrgChart2018"==b.Generators[k].ClassName&&(LucidImporter.hasUnknownShapes=!0,console.log("Lucid diagram has an Org Chart!"))}else{for(var C=0;C<b.Objects.length;C++)e=b.Objects[C],y[e.id]=e,null!=e.Action&&"mxCompositeShape"==Sb[e.Action.Class]?c[e.id]=Oc(e,m,a):e.IsBlock&&null!=e.Action&&null!=e.Action.Properties?c[e.id]=dc(e,a):e.IsGenerator&&e.GeneratorData&&e.GeneratorData.p&&"OrgChart2018"==e.GeneratorData.p.ClassName&&
(LucidImporter.hasUnknownShapes=!0,console.log("Lucid diagram has an Org Chart!")),w.push(e);for(C=0;C<b.Objects.length;C++)if(e=b.Objects[C],e.IsGroup){var n=sd(e,c,f,y);n&&(c[e.id]=n,w.push(e))}}if(null!=b.Groups)try{for(k in b.Groups)if(e=b.Groups[k],e.id=k,n=sd(e,c,f,y))c[e.id]=n,w.push(e)}catch(Kb){console.log(Kb)}if(null!=b.Lines)for(k in b.Lines)e=b.Lines[k],e.id=k,w.push(e);w.sort(function(a,b){a=u(a);b=u(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,h=null!=b.Properties?b.Properties.ZOrder:
b.ZOrder;return null!=d&&null!=h?d>h?1:d<h?-1:0:0});for(C=0;C<w.length;C++){var e=w[C],D=c[e.id];if(null!=D){if(null==D.parent)if(D.lucidLayerInfo){var B=new mxCell;a.addCell(B,a.model.root);B.setVisible(D.lucidLayerInfo.visible);D.lucidLayerInfo.locked&&B.setStyle("locked=1;");B.setValue(D.lucidLayerInfo.name);delete D.lucidLayerInfo;a.addCell(D,B)}else m.push(a.addCell(D))}else e.IsLine&&null!=e.Action&&null!=e.Action.Properties?h(e,e.Action.Properties):null!=e.StrokeStyle&&h(e,e)}LucidImporter.stylePointsSet.forEach(function(a){a.style=
"points=["+a.stylePoints.join(",")+"];"+a.style;delete a.stylePoints});try{var A=a.getModel().cells,z;for(z in A)delete A[z].zOrder}catch(Kb){}d||a.setSelectionCells(m)}finally{a.getModel().endUpdate()}}function Qd(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function ec(a,b,d,h,m,c,f,y){this.nurbsValues=[1,3,0,0,100*(a+d),100-100*(1-(b+h)),0,1,100*(m+f),100-100*(1-(c+y)),0,1]}function se(a,
b){try{for(var d=[],h=b.BoundingBox.w,m=b.BoundingBox.h,c=0;c<b.Shapes.length;c++){var f=b.Shapes[c],y=f.FillColor,w=f.StrokeColor,k=f.LineWidth,e=f.Points,p=f.Lines,C=['<shape strokewidth="inherit"><foreground>'];C.push("<path>");for(var n=null,u=0;u<p.length;u++){var D=p[u];if(n!=D.p1){var B=e[D.p1].x,A=e[D.p1].y,B=100*B/h,A=100*A/m,B=Math.round(100*B)/100,A=Math.round(100*A)/100;C.push('<move x="'+B+'" y="'+A+'"/>')}if(null!=D.n1){var z;var E=e[D.p2].x,S=e[D.p2].y,N=h,l=m,R=new ec(e[D.p1].x,e[D.p1].y,
D.n1.x,D.n1.y,e[D.p2].x,e[D.p2].y,D.n2.x,D.n2.y);if(2<=R.getSize()){R.getX(0);R.getY(0);R.getX(1);R.getY(1);for(var E=Math.round(100*E/N*100)/100,S=Math.round(100*S/l*100)/100,N=[],l=[],ea=[],U=R.getSize(),G=0;G<U-1;G+=3)N.push(new mxPoint(R.getX(G),R.getY(G))),l.push(new mxPoint(R.getX(G+1),R.getY(G+1))),G<U-2?ea.push(new mxPoint(R.getX(G+2),R.getY(G+2))):ea.push(new mxPoint(E,S));for(var fa="",G=0;G<N.length;G++)fa+='<curve x1="'+N[G].x+'" y1="'+N[G].y+'" x2="'+l[G].x+'" y2="'+l[G].y+'" x3="'+ea[G].x+
'" y3="'+ea[G].y+'"/>';z=fa}else z=void 0;C.push(z)}else B=e[D.p2].x,A=e[D.p2].y,B=100*B/h,A=100*A/m,B=Math.round(100*B)/100,A=Math.round(100*A)/100,C.push('<line x="'+B+'" y="'+A+'"/>');n=D.p2}C.push("</path>");C.push("<fillstroke/>");C.push("</foreground></shape>");d.push({shapeStencil:"stencil("+Graph.compress(C.join(""))+")",FillColor:y,LineColor:w,LineWidth:k})}LucidImporter.stencilsMap[a]={text:b.Text,w:h,h:m,stencils:d}}catch(Kd){console.log("Stencil parsing error:",Kd)}}function Db(a,b,d,
h,m,c,f,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);h.push(m.addCell(d,null,null,null,null))}function va(a,b,d,h,m,c,f,y,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;w.insert(a);d=new mxCell("",new mxGeometry(d,h,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;w.insert(d);y=[d];m=m.clone();a.insertEdge(m,!0);d.insertEdge(m,
!1);y.push(m);c.push(f.addCell(m,null,null,null,null))}function ja(b,d,h,m,g,c){m.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";m.style+=a(m.style,g,c,m);d=e(g);m.vertex=!0;b=new mxCell(d,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+b+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");b.style+=a(b.style,g,c,b,z);b.geometry.relative=
!0;b.geometry.offset=new mxPoint(5,-12);b.vertex=!0;m.insert(b)}function ma(b,d,h,m,g,c,f,y){g="transparent"!=b?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";c.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";c.style+=a(c.style,f,y,c);c.value=e(f);c.vertex=!0;b=new mxCell(null,new mxGeometry(.5,0,.7*m*d,.7*m*h),g+b+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");b.geometry.relative=
!0;b.geometry.offset=new mxPoint(-d*m*.35,10+(1-h)*m*.35);b.vertex=!0;b.style+=a(b.style,f,y,b,z);c.insert(b)}function uc(a,b){return null==a||null==b||!a.includes(";"+b+"=")&&a.substring(0,b.length+1)!=b+"="?!1:!0}function Rd(a,b){function d(a){a=Math.round(parseInt("0x"+a)*b).toString(16);return 1==a.length?"0"+a:a}return"#"+d(a.substr(1,2))+d(a.substr(3,2))+d(a.substr(5,2))}function Oc(b,m,f){var k=u(b),g=k.Properties,p=g.BoundingBox,t=Math.round(.75*p.w),r=Math.round(.75*p.h),n=Math.round(.75*
p.x+Tb),Y=Math.round(.75*p.y+Ub);null==b.Class||"GCPInputDatabase"!==b.Class&&"GCPInputRecord"!==b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&&"GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==
b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(n,Y,t,r),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=g.ZOrder;var fa=null!=b.Class?b.Class:null!=k?k.Class:null;switch(fa){case "BraceNoteBlock":case "UI2BraceNoteBlock":var dc=
!1;null!=g.BraceDirection&&"Right"==g.BraceDirection&&(dc=!0);var jb=null,ia=null;dc?(jb=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),ia=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(jb=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),ia=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=a(v.style,g,k,
v);jb.vertex=!0;v.insert(jb);jb.style+=a(jb.style,g,k,jb);ia.vertex=!0;ia.value=e(g);v.insert(ia);ia.style+=a(ia.style,g,k,ia,z);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var oa="MainText",kb=null,rd="HeaderFill_",Mc="BodyFill_",Kb=25,Sb=25,Kc=0;if(null!=g.Lanes)Kc=g.Lanes.length;else if(null!=g.PrimaryLane){for(var ec=
function(a){if(a)32>a?a=32:208<a&&(a=208);else return 0;return.75*a},Kc=g.PrimaryLane.length,l=r=t=0;l<Kc;l++)t+=g.PrimaryLane[l];for(l=0;l<g.SecondaryLane.length;l++)r+=g.SecondaryLane[l];Kb=ec(g.PrimaryPoolTitleHeight);Sb=ec(g.PrimaryLaneTitleHeight);t*=.75;r=.75*r+Kb+Sb;v.geometry.width=t;v.geometry.height=r;oa="poolPrimaryTitleKey";rd="PrimaryLaneHeaderFill_";Mc="CellFill_0,";kb=g.PrimaryLaneTextAreaIds;if(null==kb)for(kb=[],l=0;l<Kc;l++)kb.push("Primary_"+l)}if(0==g.IsPrimaryLaneVertical){g.Rotation=
-1.5707963267948966;var uc=v.geometry.x,Nc=v.geometry.y}var Jd=0!=g.Rotation,Lc=0<fa.indexOf("Pool"),sd=0==fa.indexOf("BPMN"),Kd=null!=g[oa];v.style=(Lc?"swimlane;startSize="+Kb+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Jd?"horizontalStack=0;":"");v.style+=a(v.style,g,k,v);Kd&&(v.value=e(g[oa]),v.style+=(z?"overflow=block;blockSpacing=1;fontSize=11;"+Aa:d(g[oa])+y(g[oa])+
h(g[oa])+w(g[oa])+C(g[oa],v)+B(g[oa])+D(g[oa])+A(g[oa])+E(g[oa]))+H(g[oa])+N(g[oa]));for(var Oc=0,Jb=[],Md="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Sb+";dropTarget=0;rounded=0;"+(Jd?"horizontal=0;":"")+(sd?"swimlaneLine=0;fillColor=none;":""),P=g.Rotation=0;P<Kc;P++){if(null==kb)var qd=parseFloat(g.Lanes[P].p),l=parseInt(g.Lanes[P].tid)||P,ab="Lane_"+l;else qd=.75*g.PrimaryLane[P]/t,l=P,ab=kb[P];var te=t*Oc,td=Lc?Kb:0;Jb.push(new mxCell("",Jd?
new mxGeometry(td,te,r-td,t*qd):new mxGeometry(te,td,t*qd,r-td),Md));Jb[P].vertex=!0;v.insert(Jb[P]);Jb[P].value=e(g[ab]);Jb[P].style+=a(Jb[P].style,g,k,Jb[P],z)+(z?"fontSize=11;":d(g[ab])+y(g[ab])+w(g[ab])+C(g[ab],Jb[P])+B(g[ab])+D(g[ab])+A(g[ab])+E(g[ab]))+H(g[ab])+N(g[ab])+S(g[rd+l])+ea(g[Mc+l]);Oc+=qd}null!=uc&&(v.geometry.x=uc,v.geometry.y=Nc);break;case "UMLMultidimensionalSwimlane":var fc=0,gc=0,Sd=null,Td=null;if(null!=g.Rows&&null!=g.Columns)var fc=g.Rows.length,gc=g.Columns.length,Pc=.75*
g.TitleHeight||25,Qc=.75*g.TitleWidth||25;else if(null!=g.PrimaryLane&&null!=g.SecondaryLane){fc=g.SecondaryLane.length;gc=g.PrimaryLane.length;Qc=.75*g.SecondaryLaneTitleHeight||25;Pc=.75*g.PrimaryLaneTitleHeight||25;for(l=r=t=0;l<fc;l++)r+=g.SecondaryLane[l];for(l=0;l<gc;l++)t+=g.PrimaryLane[l];t=.75*t+Qc;r=.75*r+Pc;v.geometry.width=t;v.geometry.height=r;Sd=g.SecondaryLaneTextAreaIds;Td=g.PrimaryLaneTextAreaIds}v.style="group;";var Ud=new mxCell("",new mxGeometry(0,Pc,t,r-Pc),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");
Ud.vertex=!0;var Rc=new mxCell("",new mxGeometry(Qc,0,t-Qc,r),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Rc.vertex=!0;v.insert(Ud);v.insert(Rc);for(var Y=0,Nd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+Qc+";",P=0;P<fc;P++){if(null==Sd)var Vd=.75*parseInt(g.Rows[P].height),l=parseInt(g.Rows[P].id)||P,bb="Row_"+l;else Vd=.75*g.SecondaryLane[P],
bb=Sd[P];var Vb=new mxCell("",new mxGeometry(0,Y,t,Vd),Nd),Y=Y+Vd;Vb.vertex=!0;Ud.insert(Vb);Vb.value=e(g[bb]);Vb.style+=a(Vb.style,g,k,Vb,z)+(z?"fontSize=11;":d(g[bb])+y(g[bb])+w(g[bb])+C(g[bb],Vb)+B(g[bb])+D(g[bb])+A(g[bb])+E(g[bb]))+H(g[bb])+N(g[bb])}for(var Od="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Pc+";",P=n=0;P<gc;P++){if(null==Td)var wc=.75*parseInt(g.Columns[P].width),l=parseInt(g.Columns[P].id)||P,cb="Column_"+l;else wc=
.75*g.PrimaryLane[P],cb=Td[P];var Wb=new mxCell("",new mxGeometry(n,0,wc,r),Od),n=n+wc;Wb.vertex=!0;Rc.insert(Wb);Wb.value=e(g[cb]);Wb.style+=a(Wb.style,g,k,Wb,z)+(z?"fontSize=11;":d(g[cb])+y(g[cb])+w(g[cb])+C(g[cb],Wb)+B(g[cb])+D(g[cb])+A(g[cb])+E(g[cb]))+H(g[cb])+N(g[cb])}break;case "UMLStateBlock":if(0==g.Composite)v.style="rounded=1;arcSize=20",v.value=e(g.State,!0),v.style+=a(v.style,g,k,v,z);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";

View file

@ -65,7 +65,7 @@ Actions.prototype.init = function()
}).isEnabled = isGraphEnabled;
this.addAction('save', function() { ui.saveFile(false); }, null, null, Editor.ctrlKey + '+S').isEnabled = isGraphEnabled;
this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, Editor.ctrlKey + '+Shift+S').isEnabled = isGraphEnabled;
this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 296, true, true); });
this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 304, true, true); });
this.addAction('editDiagram...', function()
{
var dlg = new EditDiagramDialog(ui);

View file

@ -954,6 +954,25 @@ var ExportDialog = function(editorUi)
row = document.createElement('tr');
td = document.createElement('td');
td.style.fontSize = '10pt';
mxUtils.write(td, mxResources.get('grid') + ':');
row.appendChild(td);
var gridCheckbox = document.createElement('input');
gridCheckbox.setAttribute('type', 'checkbox');
gridCheckbox.checked = false;
td = document.createElement('td');
td.appendChild(gridCheckbox);
row.appendChild(td);
tbody.appendChild(row);
row = document.createElement('tr');
td = document.createElement('td');
td.style.fontSize = '10pt';
mxUtils.write(td, mxResources.get('borderWidth') + ':');
@ -1011,6 +1030,15 @@ var ExportDialog = function(editorUi)
transparentCheckbox.setAttribute('disabled', 'disabled');
}
if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'jpg' || imageFormatSelect.value === 'pdf')
{
gridCheckbox.removeAttribute('disabled');
}
else
{
gridCheckbox.setAttribute('disabled', 'disabled');
}
if (imageFormatSelect.value === 'png')
{
dpiSelect.removeAttribute('disabled');
@ -1137,7 +1165,7 @@ var ExportDialog = function(editorUi)
}
ExportDialog.lastBorderValue = b;
ExportDialog.exportFile(editorUi, name, format, bg, s, b, dpi);
ExportDialog.exportFile(editorUi, name, format, bg, s, b, dpi, gridCheckbox.checked);
}
}));
saveBtn.className = 'geBtn gePrimaryBtn';
@ -1186,7 +1214,7 @@ ExportDialog.showXmlOption = true;
* parameter and value to be used in the request in the form
* key=value, where value should be URL encoded.
*/
ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi)
ExportDialog.exportFile = function(editorUi, name, format, bg, s, b, dpi, grid)
{
var graph = editorUi.editor.graph;

View file

@ -2534,6 +2534,8 @@ EditorUi.prototype.initCanvas = function()
}, 0);
};
var lastZoomEvent = Date.now();
graph.lazyZoom = function(zoomIn, ignoreCursorPosition, delay)
{
// TODO: Fix ignored cursor position if scrollbars are disabled
@ -2546,6 +2548,14 @@ EditorUi.prototype.initCanvas = function()
graph.container.offsetTop + graph.container.clientHeight / 2);
}
// Ignores events to reduce touch and magic mouse zoom speed
if (Date.now() - lastZoomEvent < 15)
{
return;
}
lastZoomEvent = Date.now();
// Switches to 5% zoom steps below 15%
if (zoomIn)
{

View file

@ -2752,8 +2752,7 @@ Graph.prototype.isReplacePlaceholders = function(cell)
*/
Graph.prototype.isZoomWheelEvent = function(evt)
{
return mxEvent.isAltDown(evt) || (mxEvent.isMetaDown(evt) && mxClient.IS_MAC) ||
mxEvent.isControlDown(evt);
return mxEvent.isAltDown(evt) || mxEvent.isControlDown(evt);
};
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
var mxClient={VERSION:"14.3.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
var mxClient={VERSION:"14.3.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&
8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>
navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=

View file

@ -17,8 +17,6 @@ Draw.loadPlugin(function(ui)
'PLANT_URL': 'plant',
'VSD_CONVERT_URL': 'vsd',
'EMF_CONVERT_URL': 'emf',
'REALTIME_URL': 'cache',
'SAVE_URL': 'save',
'OPEN_URL': 'import'
};
@ -31,8 +29,6 @@ Draw.loadPlugin(function(ui)
window[key] = '/region-' + urls[key] + '-' + region;
}
}
EditorUi.cacheUrl = window.REALTIME_URL;
}
// Extracts macro data from JSON protocol

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1110,16 +1110,19 @@ embedDrawDiag=draw.io Diagramm einbetten
addDiagram=Add Diagram
embedDiagram=Embed Diagram
editOwningPg=Original-Seite öffnen
deepIndexing=Deep Indexing (Index diagrams that aren't used in any page also)
confADeepIndexStarted=Deep Indexing Started
confADeepIndexDone=Deep Indexing Done
officeNoDiagramsSelected=No diagrams found in the selection
officeNoDiagramsInDoc=No diagrams found in the document
officeNotSupported=This feature is not supported in this host application
someImagesFailed={1} out of {2} failed due to the following errors
importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
notifications=Notifications
deepIndexing=Vertiefte Indexierung (indexiert auch Diagramme, die in keinen Seiten verwendet werden)
confADeepIndexStarted=Vertiefte Indexierung gestartet
confADeepIndexDone=Vertiefte Indexierung abgeschlossen
officeNoDiagramsSelected=Keine Diagramme in der Markierung gefunden
officeNoDiagramsInDoc=Keine Diagramme im Dokument gefunden
officeNotSupported=Diese Funktion ist in dieser Host-Applikation sind verfügbar
someImagesFailed={1} von {2} wegen folgenden Fehlern fehlgeschlagen
importingNoUsedDiagrams=Importiere {1} Diagramm(e) die nicht in Seiten verwendet werden
importingDrafts=Importiere {1} Diagramm(e) in Entwürfen
processingDrafts=Entwürfe werden verarbeitet
updatingDrafts=Entwürfe werden aktualisiert
updateDrafts=Aktualisiere Entwürfe
notifications=Benachrichtigungen
drawioImp=draw.io Import
confALibsImp=Importiere draw.io Bibliotheken
confALibsImpFailed=Import von {1} Bibliothek(en) fehlgeschlagen

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1123,3 +1123,6 @@ processingDrafts=processingDrafts
updatingDrafts=updatingDrafts
updateDrafts=updateDrafts
notifications=notifications
drawioImp=drawioImp
confALibsImp=confALibsImp
confALibsImpFailed=confALibsImpFailed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -1121,5 +1121,8 @@ importingNoUsedDiagrams=Importing {1} Diagrams not used in pages
importingDrafts=Importing {1} Diagrams in drafts
processingDrafts=Processing drafts
updatingDrafts=Updating drafts
updateDrafts=Update Drafts
updateDrafts=Update drafts
notifications=Notifications
drawioImp=draw.io Import
confALibsImp=Importing draw.io Libraries
confALibsImpFailed=Importing {1} library failed

View file

@ -6,11 +6,11 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "34f498797fbb0a88315b4d4814a889e9"
"revision": "a2325780f416a14a1c9f3f06f8ed6c2d"
},
{
"url": "js/extensions.min.js",
"revision": "4b1fe462b12d14cb66a41e72353c24dd"
"revision": "55851b6a2150f678be7c76e2ed22ab65"
},
{
"url": "js/stencils.min.js",
@ -58,7 +58,7 @@ if (workbox)
},
{
"url": "js/viewer-static.min.js",
"revision": "63c1dc945eff0960cbbe074bcfdaf302"
"revision": "ca5d647f27aa8841f962bcf260fed362"
},
{
"url": "connect/jira/editor-1-3-3.html",
@ -74,7 +74,7 @@ if (workbox)
},
{
"url": "connect/jira/viewerPanel.js",
"revision": "d632930efc15a750f1c8c2d22c62aa5a"
"revision": "e855467cfe258b0acdacca54dd71cd69"
},
{
"url": "connect/jira/spinner.gif",
@ -102,11 +102,11 @@ if (workbox)
},
{
"url": "plugins/cConf-1-4-8.js",
"revision": "1f821d59718fc7e0d87dbb27ae781800"
"revision": "5c95b786643a1ac77b77af773ea0d428"
},
{
"url": "connect/confluence/connectUtils-1-4-8.js",
"revision": "894e07934070f2d77fe7636ce4c0e690"
"revision": "057a22aa1322514a72d488cefac57c92"
},
{
"url": "connect/new_common/cac.js",
@ -126,7 +126,7 @@ if (workbox)
},
{
"url": "connect/confluence/viewer.js",
"revision": "43c2b73df894d7a52706206f720a2451"
"revision": "13a998bf7cd4b3ce20988de54a24f781"
},
{
"url": "connect/confluence/viewer-1-4-42.html",
@ -178,231 +178,231 @@ if (workbox)
},
{
"url": "resources/dia.txt",
"revision": "8b601dc162344f5931295a0273cee36d"
"revision": "af588f1b467a317db3c7cd2d4529d0d2"
},
{
"url": "resources/dia_am.txt",
"revision": "81c007c71d74d4210bc816293fef8add"
"revision": "c6d4c22312336802cc68595443d3cca4"
},
{
"url": "resources/dia_ar.txt",
"revision": "ef8bb6d5453c117b2c376c570bb781d7"
"revision": "51617b17a59eb0789586dcd01849ecfa"
},
{
"url": "resources/dia_bg.txt",
"revision": "57a61fb793446b735487a9e8cc9d8d7f"
"revision": "dfd66f121b05edd232b160d224b287b1"
},
{
"url": "resources/dia_bn.txt",
"revision": "edc1e7d3c68b22e3c3d685a781a08943"
"revision": "2f3fb02abebee0760d748f64b0683c65"
},
{
"url": "resources/dia_bs.txt",
"revision": "3a141de0b9b2447db366405c88ee8565"
"revision": "4a0009393c5905e4f809655e720f3656"
},
{
"url": "resources/dia_ca.txt",
"revision": "825b1ce9fce73eb078fe3c9d4ecc76d0"
"revision": "c82b76a5529ee1524f9867ffd3f159ba"
},
{
"url": "resources/dia_cs.txt",
"revision": "e4b8c35dbeb60b20e90d7088613fff3d"
"revision": "340f004b86eceac3fd25e8e264ee719e"
},
{
"url": "resources/dia_da.txt",
"revision": "604ea664f2f3587100f1cbb86570864d"
"revision": "5448cd89d46d65a34bc98ed0eda3c424"
},
{
"url": "resources/dia_de.txt",
"revision": "c551936cd113c9495cffe40524b1804e"
"revision": "8efd94ebb1cb6ce5a31bf84373330359"
},
{
"url": "resources/dia_el.txt",
"revision": "4574634f3619e7bb27e86e0f3bdb0628"
"revision": "9b8c9795895e986ea5f6ef91a1f7f6a8"
},
{
"url": "resources/dia_eo.txt",
"revision": "f21cfe9383241482118fce67e72b403a"
"revision": "0e461312e5e7dc69d028ba3975951cc5"
},
{
"url": "resources/dia_es.txt",
"revision": "09158843515d8b4de3f1ad761ea44754"
"revision": "6f6b55cd9066f4b322d592d8e65be803"
},
{
"url": "resources/dia_et.txt",
"revision": "4017b199d2d73c1737446263e508b453"
"revision": "1bbc6fd751185766bf3e46bfd2bbd86b"
},
{
"url": "resources/dia_eu.txt",
"revision": "43b0afc5ebb11821c43516ab349a72cc"
"revision": "8e85432e3a0523e295f1ffb24f184a2b"
},
{
"url": "resources/dia_fa.txt",
"revision": "c17a065239e8c342841da6d087a26f3f"
"revision": "31dbcab7f5f8d669beec8b30c6e31d9a"
},
{
"url": "resources/dia_fi.txt",
"revision": "6d6aa4c67d976256c6119b0a38316aae"
"revision": "2b8de24d3b752a2529901dfe45c35fa1"
},
{
"url": "resources/dia_fil.txt",
"revision": "3da0c3da7ffcf3f9c51164f199a7d32e"
"revision": "2fa5248ec20ea932d335c19c7e5f41a5"
},
{
"url": "resources/dia_fr.txt",
"revision": "898146a3a6e190ce0e7605117cfc3bbf"
"revision": "25ab20aaba64c3c547111d0c340ec734"
},
{
"url": "resources/dia_gl.txt",
"revision": "0c8043ec6d6929572e68bd2745ca4180"
"revision": "90f3cbc69987bc092f5e28381eed629b"
},
{
"url": "resources/dia_gu.txt",
"revision": "b6915097bbd603818c8c0cc1eb69dc56"
"revision": "8fb4cd6c5cdd54b6f10c7bb03c4679f4"
},
{
"url": "resources/dia_he.txt",
"revision": "09027312e006ba1c17859dadc1295f97"
"revision": "e710a60d5277e32d4d39af99e530edd0"
},
{
"url": "resources/dia_hi.txt",
"revision": "3b8f348e23b6ed5d726625c9fade269b"
"revision": "ddf680f27606cec2efaa30a82a6ed3bd"
},
{
"url": "resources/dia_hr.txt",
"revision": "3f85add21c2601db9f2f520c3ec9fab0"
"revision": "6f5731ddcaa4f0efbf13587513b23ca5"
},
{
"url": "resources/dia_hu.txt",
"revision": "b1fb1673066bbe6e231d2699d5d9974e"
"revision": "8d9d440a1f4ca50754928f6fc846102e"
},
{
"url": "resources/dia_id.txt",
"revision": "6160c2bee633cf760bfa124421336f53"
"revision": "bd48c3effff1c6acbfbd7daf40210afe"
},
{
"url": "resources/dia_it.txt",
"revision": "5a4eff93e8db1302d0b8c0754acc1b11"
"revision": "f0aff5b5b4c06906d55c03c907b97012"
},
{
"url": "resources/dia_ja.txt",
"revision": "2c54c9b4f93b4115dd6563a8aae89b2f"
"revision": "83a0da6b3609afc78e0bb7295bef21a6"
},
{
"url": "resources/dia_kn.txt",
"revision": "3bae85c22224dfe3d2ef7ac7ac2a8f05"
"revision": "e1edfb7b0a8e4221801c5444e2c8d6ab"
},
{
"url": "resources/dia_ko.txt",
"revision": "0e793aeb30cc7a0913def2460e70c70c"
"revision": "6303fb0491072096008116669605e0c5"
},
{
"url": "resources/dia_lt.txt",
"revision": "bc036476d139f3da345c341563325f4c"
"revision": "7f9b27935551a02b9b3442f9cd3dd635"
},
{
"url": "resources/dia_lv.txt",
"revision": "50c35d16ce98cfee05780e7a7fcbdc4f"
"revision": "678a81e80e3dd0a0fd74bc3dd817001c"
},
{
"url": "resources/dia_ml.txt",
"revision": "46c82d9550e37b29dfc1aea84ac17392"
"revision": "378d390d34c9b6141e5069058e4db398"
},
{
"url": "resources/dia_mr.txt",
"revision": "c8e75642b08dee614de01525619bd83c"
"revision": "c653c6e30be36d5807c9e63f400ad8fb"
},
{
"url": "resources/dia_ms.txt",
"revision": "e118a53f59f3073f697ddf93adb0e211"
"revision": "8938aed7d051c7e2e48cbdedcc535061"
},
{
"url": "resources/dia_my.txt",
"revision": "8b601dc162344f5931295a0273cee36d"
"revision": "af588f1b467a317db3c7cd2d4529d0d2"
},
{
"url": "resources/dia_nl.txt",
"revision": "651dec6eed61f55ebaf05c7c3bd2d611"
"revision": "faae76dd923c4a8567bca2e16bab06b9"
},
{
"url": "resources/dia_no.txt",
"revision": "6aafbf8f90a34ae72ae7cd15162bb9cf"
"revision": "e58a8efe37d6d6734aa6fdd36654e871"
},
{
"url": "resources/dia_pl.txt",
"revision": "bda92d1226ca3d54a8260bf55de2abec"
"revision": "37bdc4cf4b0e4ff31b8da54d0a462d03"
},
{
"url": "resources/dia_pt-br.txt",
"revision": "5b556ad3d32065a2073c994cf072789b"
"revision": "3e4dd5dd5ad51040927477c90d4b605d"
},
{
"url": "resources/dia_pt.txt",
"revision": "0a2069db667afed80dd65d9b4e47cd9e"
"revision": "2a3f980e5a033b64c07b183a48bba23e"
},
{
"url": "resources/dia_ro.txt",
"revision": "71289967d82ca5935874775dd0912b53"
"revision": "fd2e2f91295645a1dcaff74943d8326f"
},
{
"url": "resources/dia_ru.txt",
"revision": "53029880611ded37a081ea8d22b74d03"
"revision": "a5776def368223f8f9d92cf10f0f6e3c"
},
{
"url": "resources/dia_si.txt",
"revision": "8b601dc162344f5931295a0273cee36d"
"revision": "af588f1b467a317db3c7cd2d4529d0d2"
},
{
"url": "resources/dia_sk.txt",
"revision": "46f22a0fca9bdba7a1ce143015613f8e"
"revision": "ac8a63d881473eba2d2c9feb05001fa3"
},
{
"url": "resources/dia_sl.txt",
"revision": "b3605c6402e79e9af37ac0c52ad370d8"
"revision": "f1ada0e34b7a3669c7beea49d5074bc2"
},
{
"url": "resources/dia_sr.txt",
"revision": "cdeb9ee69af48b517b4a56ca4779fe78"
"revision": "16a56c4330ae46a4c233a0d23cbfd677"
},
{
"url": "resources/dia_sv.txt",
"revision": "67d55d668d2ddca3c52baf95aae0f9b1"
"revision": "19a7fdd449ac944aa44cdaee5c630c5d"
},
{
"url": "resources/dia_sw.txt",
"revision": "ffe1c86408728668ebae9f947197b637"
"revision": "d3fb7687fc2f8568cae2064da906ac25"
},
{
"url": "resources/dia_ta.txt",
"revision": "32ce0222db5eb9acf6002d3539e76a91"
"revision": "caedb5c11db41f78a4361deeece3a3a7"
},
{
"url": "resources/dia_te.txt",
"revision": "42fe1400f565ab4fd3d51578fe7a8381"
"revision": "1299d9199426cff9671dce5aeb8ed5ba"
},
{
"url": "resources/dia_th.txt",
"revision": "1bfcf9c1a57c0a9107623fd80e0fbf46"
"revision": "3a14f1ae52ce410953431b44c795d7bf"
},
{
"url": "resources/dia_tr.txt",
"revision": "075540063050940c2546336644c90b5c"
"revision": "1a631e24bafc58e1bd997e2565e613cc"
},
{
"url": "resources/dia_uk.txt",
"revision": "6fabec5373ed5fc72b28a5806e9be13f"
"revision": "8ccc4350373d855c9b38eeb8bd4e942e"
},
{
"url": "resources/dia_vi.txt",
"revision": "ab1ff1886f64b0c7ef50f9a7faca7296"
"revision": "94c1e6f8adc65acffb93ac821fe749fe"
},
{
"url": "resources/dia_zh-tw.txt",
"revision": "b1705007d8366130e4077e286a0fda25"
"revision": "5b9c9aa367dae8b73ac3c1215c529d34"
},
{
"url": "resources/dia_zh.txt",
"revision": "8ef30b3744eb483f6758e1f7bd65572a"
"revision": "9711f6d5af6254ed41ca30b7c329b089"
},
{
"url": "favicon.ico",