From c58969fb3932ecade29081608a335a30f0003aa3 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Mon, 12 Feb 2018 15:07:58 +0100 Subject: [PATCH] 8.1.2 release --- ChangeLog | 5 + VERSION | 2 +- etc/mxgraph/mxClient.js | 2 +- src/main/webapp/cache.manifest | 2 +- src/main/webapp/export3.html | 50 +- src/main/webapp/js/app.min.js | 1233 +++++++++---------- src/main/webapp/js/atlas-viewer.min.js | 867 +++++++------ src/main/webapp/js/atlas.min.js | 977 ++++++++------- src/main/webapp/js/diagramly/Dialogs.js | 61 +- src/main/webapp/js/diagramly/DriveClient.js | 16 +- src/main/webapp/js/diagramly/EditorUi.js | 3 +- src/main/webapp/js/embed-static.min.js | 46 +- src/main/webapp/js/mxgraph/Editor.js | 2 +- src/main/webapp/js/mxgraph/Graph.js | 9 +- src/main/webapp/js/reader.min.js | 46 +- src/main/webapp/js/viewer.min.js | 867 +++++++------ 16 files changed, 2086 insertions(+), 2102 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58ccd1ee..dc3a3961 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +12-FEB-2018: 8.1.2 + +- Adds resize option in image dialog +- Uses mxGraph 3.9.2 beta 6 + 11-FEB-2018: 8.1.1 - Handles markup is invalid XML diff --git a/VERSION b/VERSION index 42ed2d77..c29b3b5d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.1.1 \ No newline at end of file +8.1.2 \ No newline at end of file diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 4bb87616..891ca8f7 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -1057,7 +1057,7 @@ mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.con mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.canvas.style.overflow="hidden";this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.decoratorPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);this.canvas.appendChild(this.decoratorPane); a.appendChild(this.canvas)}};mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c}; mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);this.decoratorPane=document.createElementNS(mxConstants.NS_SVG, -"g");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow="hidden";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))}; +"g");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,"svg");b.style.position="absolute";b.style.left="0px";b.style.top="0px";b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow="hidden";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))}; mxGraphView.prototype.updateContainerStyle=function(a){var b=mxUtils.getCurrentStyle(a);null!=b&&"static"==b.position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.touchAction="none")}; mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.decoratorPane=this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)}; function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}} diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index 4cded0a2..f1069b24 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 02/11/2018 06:11 PM +# 02/12/2018 02:49 PM app.html index.html?offline=1 diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html index 4c66dfe4..9100c304 100644 --- a/src/main/webapp/export3.html +++ b/src/main/webapp/export3.html @@ -25,35 +25,6 @@ // but produces larger output with clipping problems Editor.initMath(); - // Workaround for varphi vs. phi export in MathJax on Phantom - // see https://github.com/mathjax/MathJax/issues/353 - (function() - { - var authInit = MathJax.AuthorInit; - - MathJax.AuthorInit = function() - { - authInit(); - - MathJax.Hub.Register.StartupHook('AsciiMath Jax Config', function() - { - var symbols = MathJax.InputJax.AsciiMath.AM.symbols; - - for (var i = 0, m = symbols.length; i < m; i++) - { - if (symbols[i].input === 'phi') - { - symbols[i].output = '\u03C6' - } - else if (symbols[i].input === 'varphi') - { - symbols[i].output = '\u03D5'; i = m - } - } - }); - }; - })(); - function render(data) { var graph = new Graph(document.getElementById('graph')); @@ -112,10 +83,10 @@ mxClient.NO_FO = true; } - // Createa graph instance + // Configure graph graph.foldingEnabled = false; graph.setEnabled(false); - + // Sets background image var bgImg = xmlDoc.documentElement.getAttribute('backgroundImage'); @@ -268,6 +239,7 @@ { var doneDiv = document.createElement("div"); doneDiv.id = 'LoadingComplete'; + doneDiv.style.display = 'none'; doneDiv.setAttribute('bounds', JSON.stringify(bounds)); document.body.appendChild(doneDiv); } @@ -353,7 +325,8 @@ graph.container.parentNode.removeChild(graph.container); // Adds shadow - if (mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1') + // NOTE: Shadow rasterizes output + /*if (mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1') { var svgs = document.getElementsByTagName('svg'); @@ -368,7 +341,7 @@ } border = 7; - } + }*/ bounds = new mxRectangle(0, 0, pf.width, pf.height); renderMath(graph.container.parentNode); @@ -376,7 +349,8 @@ else { // Adds shadow - if (mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1') + // NOTE: PDF shadow rasterizes output so it's disabled + if (data.format != 'pdf' && mxClient.IS_SVG && xmlDoc.documentElement.getAttribute('shadow') == '1') { graph.addSvgShadow(graph.view.canvas.ownerSVGElement, null, true); graph.setShadowVisible(true); @@ -385,12 +359,8 @@ } renderMath(graph.container); - - if (data.format != 'pdf') - { - document.body.style.width = Math.ceil(bounds.x + bounds.width) + 'px'; - document.body.style.height = (Math.ceil(bounds.y + bounds.height) + 1) + 'px'; - } + document.body.style.width = Math.ceil(bounds.x + bounds.width) + 'px'; + document.body.style.height = Math.ceil(bounds.y + bounds.height) + 'px'; } // Immediate return if not waiting for any content diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index dfcaa719..bc8d0ac4 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -1163,7 +1163,7 @@ mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.con mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.canvas.style.overflow="hidden";this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.decoratorPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);this.canvas.appendChild(this.decoratorPane); a.appendChild(this.canvas)}};mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c}; mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);this.decoratorPane=document.createElementNS(mxConstants.NS_SVG, -"g");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow="hidden";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))}; +"g");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,"svg");b.style.position="absolute";b.style.left="0px";b.style.top="0px";b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow="hidden";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))}; mxGraphView.prototype.updateContainerStyle=function(a){var b=mxUtils.getCurrentStyle(a);null!=b&&"static"==b.position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.touchAction="none")}; mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.decoratorPane=this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)}; function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}} @@ -2021,22 +2021,21 @@ x();return{set:function(a){d=a;f(null,null,!0)},get:function(){return A},widthIn PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)", format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]}; (function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= -mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(b){a.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}), -mxUtils.bind(this,function(b){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= -null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",e="";if(a.isGridEnabled()){e=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",e=a.gridSize*this.scale*this.gridSteps): -d="url("+this.gridImage+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor= -b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d= -this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,k=this.view.getBackgroundPageBounds();b=k.width;c=k.height;var h= -new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),l=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,v=a?Math.ceil(b/h.width)-1:0,u=k.x+b,A=k.y+c;null==this.horizontalPageBreaks&&0'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!= +d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,k=this.view.getBackgroundPageBounds();b=k.width;c=k.height;var h=new mxRectangle(d*e.x,d* +e.y,f.width*g,f.height*g),l=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,v=a?Math.ceil(b/h.width)-1:0,u=k.x+b,A=k.y+c;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):b.panningHandler.usePopupTrigger=!1;b.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer); @@ -2050,8 +2049,8 @@ c){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};b.popu A="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],e=[],f;for(f in c.style)a[f]!=c.style[f]&&(d.push(c.style[f]),e.push(f));f=b.getModel().getStyle(c.cell);for(var g=null!=f?f.split(";"):[],k=0;kmxUtils.indexOf(u,A[a])&&u.push(A[a]);var y=function(a,c){var d=b.getModel();d.beginUpdate();try{if(c)for(var e=d.isEdge(h),f=e?b.currentEdgeStyle:b.currentVertexStyle,e=["fontSize","fontFamily","fontColor"],g=0;gmxUtils.indexOf(A,n))||(x=mxUtils.setStyle(x,n,C))}d.setStyle(h,x)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a, +f[e[g]];null!=k&&b.setCellStyles(e[g],k,a)}else for(k=0;kmxUtils.indexOf(A,n))||(x=mxUtils.setStyle(x,n,C))}d.setStyle(h,x)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){y(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){y(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));y(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a, c){var d=c.getProperty("cells"),e=!1,f=!1;if(0F&&null!=h&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(G,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(G,mxConstants.STYLE_SHAPE)|| -1500this.dropTargetDelay&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(b[0]))){v=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);k(c,d,l,y)}else null== -v||!mxUtils.contains(v,c,d)||1500E&&null!=h&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(F,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(F,mxConstants.STYLE_SHAPE)|| +1500this.dropTargetDelay&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(b[0]))){v=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);k(c,d,l,y)}else null== +v||!mxUtils.contains(v,c,d)||1500F&&F>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=r&&l){g=[L,J,A,x,C,B];for(l=0;lE&&E>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=r&&l){g=[L,J,A,x,C,B];for(l=0;l=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(G);this.getAllCells(a,b,c,d,G,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)? +var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(F);this.getAllCells(a,b,c,d,F,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)? !1:C.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();B=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=B?this.addSelectionCells(B):1b&& @@ -2549,7 +2548,7 @@ mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+= c);this.textarea.clientWidth"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"
").replace(/\n/g,"
"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= -function(){try{this.graph.container.focus()}catch(D){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], +function(){try{this.graph.container.focus()}catch(G){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell], !1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells; mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width- this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return!this.graph.isSwimlane(a.cell)&&0"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){la=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));k=e.cloneNode(!1); +"0",null,null,null,d.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight="normal";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("spacing"));h.appendChild(g);var X,U,ka,da,la,ea=this.addUnitInput(h,"pt",91,44,function(){X.apply(this,arguments)}),Y=this.addUnitInput(h,"pt", +20,44,function(){U.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 Z=this.addUnitInput(h,"pt",162,44,function(){ka.apply(this,arguments)}),fa=this.addUnitInput(h,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",20,44,function(){la.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(b.cellEditor.isContentEditing()){var ba=null,ma=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ba&&(b.cellEditor.restoreSelection(ba),ba=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&& +(b.cellEditor.textarea.innerHTML="

"+b.cellEditor.textarea.innerHTML+"

"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ma=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(ba=b.cellEditor.saveSelection())});a.value="120 %"}));k=e.cloneNode(!1); k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);g=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(h);this.styleButtons(g);h=this.createPanel();h.style.paddingTop="10px"; h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);mxClient.IS_QUIRKS&&(h.style.height="70");h=e.cloneNode(!1);h.style.paddingLeft="0px";g=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex:0))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"), function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex+1:-1))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=I&&b.deleteColumn(y,I.cellIndex)}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex))}catch(S){alert(S)}},h),this.editorUi.toolbar.addButton("geSprite-insertrowafter", @@ -2714,18 +2713,18 @@ a||a==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.bo ("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){y.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.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",N);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.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",Q);mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.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",O);mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0=d&&(mxUtils.br(m),h=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1=d&&(mxUtils.br(m),k=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1 '+mxResources.get("googleDriveMissingClickHere")+"",e.appendChild(n))}, 5E3);this.container=e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop= -"8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&h.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(f);g.appendChild(h);m?(h.style.marginTop="10px",h=document.createElement("p"), -h.style.marginTop="20px",h.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),g.appendChild(h),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,k,l,m){m=null!=m?m:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var h=document.createElement("div");h.style.padding="0px";h.style.margin="0px"; -h.style.fontSize="18px";h.style.paddingBottom="16px";h.style.marginBottom="16px";h.style.borderBottom="1px solid #c0c0c0";h.style.color="gray";mxUtils.write(h,b);g.appendChild(h)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n= -mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});n.className="geBtn";d.appendChild(n);null!=k&&(c=mxUtils.button(k,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c); -var k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,a.formatFileSize(b.length));c.appendChild(k);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value= -mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var m= +f=mxResources.get("device"));var h=document.createElement("div");h.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(h.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):(c.appendChild(e),mxUtils.write(c,f),b.appendChild(c),h.style.border="1px solid #d3d3d3",h.style.borderWidth="1px 0px 1px 0px",h.style.padding="18px 0px 24px 0px",l.style.marginBottom= +"8px");mxClient.IS_QUIRKS&&(h.style.whiteSpace="nowrap",h.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});h.appendChild(l);mxUtils.br(h);l=document.createElement("button");l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram")); +mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});h.appendChild(l);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP|| +EditorUi.isElectronApp||(e=function(b){l.style.marginBottom="24px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0)");c.style.display="block";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));l.style.marginBottom="16px";h.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});h.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(l.style.marginBottom= +"24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),l.style.marginBottom="16px",h.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog(); +a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),h.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout(); +a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),h.appendChild(e));b.appendChild(h);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,h,l,m){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("div"); +k.style.padding="6px";k.style.overflow="auto";k.style.maxHeight="44px";mxClient.IS_QUIRKS&&(k.style.height="60px");mxUtils.write(k,b);g.appendChild(k);k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"
"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop= +"8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&k.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});k.appendChild(e);null!=h?(e.innerHTML=h+"
"+e.innerHTML+"
",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);m?(k.style.marginTop="10px",k=document.createElement("p"), +k.style.marginTop="20px",k.appendChild(n),h=document.createElement("span"),mxUtils.write(h," "+mxResources.get("rememberThisSetting")),k.appendChild(h),g.appendChild(k),mxEvent.addListener(h,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):k.style.marginTop="16px";this.container=g},ErrorDialog=function(a,b,d,c,e,f,h,l,m){m=null!=m?m:!0;var g=document.createElement("div");g.style.textAlign="center";if(null!=b){var k=document.createElement("div");k.style.padding="0px";k.style.margin="0px"; +k.style.fontSize="18px";k.style.paddingBottom="16px";k.style.marginBottom="16px";k.style.borderBottom="1px solid #c0c0c0";k.style.color="gray";mxUtils.write(k,b);g.appendChild(k)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;g.appendChild(b);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");var n= +mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});n.className="geBtn";d.appendChild(n);null!=h&&(c=mxUtils.button(h,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};g.appendChild(d);this.container=g},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c); +var h=document.createElement("div");h.style.position="absolute";h.style.top="30px";h.style.right="30px";h.style.color="gray";mxUtils.write(h,a.formatFileSize(b.length));c.appendChild(h);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value= +mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};h=document.createElement("div");h.style.position="absolute";h.style.bottom="36px";h.style.right="32px";var m= null;mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0"+encodeURIComponent(mxResources.get("preview"))+''+b+"");h.close()}}),m.className="geBtn",k.appendChild(m));if(!f||7500b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");h.appendChild(g);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ -" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth="46px";h.className="geBtn";k.appendChild(h)}7168>b.length&&(h=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width", -"18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",h.appendChild(g),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign="bottom",h.style.paddingTop="4px",h.style.minWidth="46px",h.className="geBtn",k.appendChild(h))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(g);h=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| -mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(k.appendChild(h),h.className="geBtn gePrimaryBtn",g.className="geBtn"):(k.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=B.getTitle()?B.getTitle(): -this.defaultFilename;if(x.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0"+encodeURIComponent(mxResources.get("preview"))+''+b+"");k.close()}}),m.className="geBtn",h.appendChild(m));if(!f||7500b.length){var k=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");k.appendChild(g);k.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+ +" max)");k.style.verticalAlign="bottom";k.style.paddingTop="4px";k.style.minWidth="46px";k.className="geBtn";h.appendChild(k)}7168>b.length&&(k=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width", +"18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",k.appendChild(g),k.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),k.style.verticalAlign="bottom",k.style.paddingTop="4px",k.style.minWidth="46px",k.className="geBtn",h.appendChild(k))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.appendChild(g);k=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode|| +mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?g.className="geBtn gePrimaryBtn":(h.appendChild(k),k.className="geBtn gePrimaryBtn",g.className="geBtn"):(h.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(h);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=B.getTitle()?B.getTitle(): +this.defaultFilename;if(x.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=h(c4&63)},f= +function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",h);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url,h()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}); +g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var k=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}); +k.className="geBtn";c.appendChild(k);null!=a.drive&&"1"==urlParams.photos&&(k=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD); +a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),k.className="geBtn",c.appendChild(k))}k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});k.className="geBtn gePrimaryBtn";c.appendChild(k);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b){function d(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"== +c){var d="plantUmlPng"==c?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},n=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=k(c1&63);r+=k(c2&63);r+=k(c3&63);return r+=k(c4&63)},f= new XMLHttpRequest;f.open("GET",d+function(a){r="";for(q=0;qthis.status?(c=new FileReader,c.readAsDataURL(this.response),c.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop(); -var h=d.width,n=d.height;if(0==h&&0==n){var u=c.target.result,f=u.indexOf(","),u=decodeURIComponent(escape(atob(u.substring(f+1)))),u=mxUtils.parseXml(u).getElementsByTagName("svg");0");if(2<=D.length){var k=l(D[0]),E=l(D[D.length-1]),D=new mxCell(2");if(2<=D.length){var h=l(D[0]),E=l(D[D.length-1]),D=new mxCell(2 Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":"plantUmlSvg"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml": -";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height="354px";k.style.marginBottom="16px";var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option"); +";Example:\na->b\nb->edge label->c\nc->a\n"}var e=a.editor.graph.getFreeInsertPoint(),f=document.createElement("div");f.style.textAlign="right";var h=document.createElement("textarea");h.style.resize="none";h.style.width="100%";h.style.height="354px";h.style.marginBottom="16px";var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");m.setAttribute("selected","selected");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);m=document.createElement("option"); m.setAttribute("value","table");mxUtils.write(m,mxResources.get("table"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","diagram");mxUtils.write(m,mxResources.get("diagram"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+ -mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(g));var h=c();k.value=h;f.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0=a.getStatus()&&(y(n,a.getText(),b),u&&v())}))});mxEvent.addListener(n,"dblclick",function(a){u=!0})}else n.innerHTML='
'+mxResources.get(c)+"
",g&&y(n),mxEvent.addListener(n,"click",function(a){y(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}); -J.appendChild(n)}function u(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(p(),mxEvent.consume(a))});var a=null,b;for(b in N){var c=document.createElement("div"),d=mxResources.get(b),h=N[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>h){var c=null!=c?c:B.value,e="";c==App.MODE_GOOGLE?e=a.drive.extension:c== -App.MODE_GITHUB?e=a.gitHub.extension:c==App.MODE_TRELLO?e=a.trello.extension:c==App.MODE_DROPBOX?e=a.dropbox.extension:c==App.MODE_ONEDRIVE?e=a.oneDrive.extension:c==App.MODE_DEVICE&&(e=".xml");0<=h&&(d=d.substring(0,h));w.value=d+e}}y(g)})}var u=document.createElement("a");u.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var t=document.createElement("div");u.appendChild(t);mxUtils.write(t,d);if(null!=h&&null==a[h]){f.style.visibility="hidden";mxUtils.setOpacity(t,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, -color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(u);var l=window.setTimeout(function(){null==a[h]&&(q.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(l),mxUtils.setOpacity(t,100),f.style.visibility="",q.stop(),e())}))}else e();x.appendChild(u);++A==n&&(mxUtils.br(x),A=0)}function y(b){var c=w.value;if(null==b||null!=c&&0=a.getStatus()&&(z(n,a.getText(),b),u&&v())}))});mxEvent.addListener(n,"dblclick",function(a){u=!0})}else n.innerHTML='
'+mxResources.get(c)+"
",g&&z(n),mxEvent.addListener(n,"click",function(a){z(n)}),mxEvent.addListener(n,"dblclick",function(a){v()}); +J.appendChild(n)}function u(){mxEvent.addListener(J,"scroll",function(a){J.scrollTop+J.clientHeight>=J.scrollHeight&&(p(),mxEvent.consume(a))});var a=null,b;for(b in N){var c=document.createElement("div"),d=mxResources.get(b),k=N[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18b.lastIndexOf(".")&&0>k){var c=null!=c?c:B.value,e="";c==App.MODE_GOOGLE?e=a.drive.extension:c== +App.MODE_GITHUB?e=a.gitHub.extension:c==App.MODE_TRELLO?e=a.trello.extension:c==App.MODE_DROPBOX?e=a.dropbox.extension:c==App.MODE_ONEDRIVE?e=a.oneDrive.extension:c==App.MODE_DEVICE&&(e=".xml");0<=k&&(d=d.substring(0,k));w.value=d+e}}z(g)})}var u=document.createElement("a");u.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";u.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block";u.className="geBaseButton";u.style.position="relative";u.style.margin="4px";u.style.padding="8px 8px 10px 8px";u.style.whiteSpace="nowrap";u.appendChild(f);mxClient.IS_QUIRKS&&(u.style.cssFloat="left",u.style.zoom="1");u.style.color="gray";u.style.fontSize="11px";var t=document.createElement("div");u.appendChild(t);mxUtils.write(t,d);if(null!=k&&null==a[k]){f.style.visibility="hidden";mxUtils.setOpacity(t,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0, +color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(u);var l=window.setTimeout(function(){null==a[k]&&(q.stop(),u.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[k]&&(window.clearTimeout(l),mxUtils.setOpacity(t,100),f.style.visibility="",q.stop(),e())}))}else e();x.appendChild(u);++y==n&&(mxUtils.br(x),y=0)}function z(b){var c=w.value;if(null==b||null!=c&&0JGraph Ltd.
All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container= b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"), -function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b), +function(){var b=(h.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b), function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change", -function(){0':(f.innerHTML="
",mxUtils.write(f,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});l.push(function(){return h.checked? -b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var h=document.createElement("input");h.setAttribute("type", -"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(h),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),h.checked=!0,h.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=h&&(h.checked=!h.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= -"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c':(f.innerHTML="
",mxUtils.write(f,mxResources.get("noPreview"))),null!=h&&(h.style.backgroundColor=""),h=c,h.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){k.checked=!k.checked;mxEvent.consume(a)});l.push(function(){return k.checked? +b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var k=document.createElement("input");k.setAttribute("type", +"checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(k),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),k.checked=!0,k.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=k&&(k.checked=!k.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className= +"geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;cmxUtils.indexOf(e,n[a])&&e.push(n[a]);b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+ -")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=document.createElement("div");m.style.marginTop="14px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(k),m.appendChild(f), -m.appendChild(l)):(m.appendChild(f),m.appendChild(l),m.appendChild(k));d.appendChild(m);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);f.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"), -g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();h.select()};g.appendChild(h);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type", -"text");n.style.width="100px";n.value="0";g.appendChild(n);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td"); -mxUtils.write(m,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);k.appendChild(g);f.appendChild(k);e.appendChild(f); -c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=v.width,e=v.height,f=parseInt(h.value),k=parseInt(n.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-k-parseInt(t.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation= -"source-in");c.drawImage(v,f,k,g,e,0,0,g,e);d(b.toDataURL())});y.setAttribute("disabled","disabled");v.onload=function(){y.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&y.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(y)):(b.appendChild(y), -b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px"; -h.value=null!=c?c.x:"";this.init=function(){h.focus();h.select()};g.appendChild(h);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td"); -g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!= -c?c.height:"";g.appendChild(t);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);l.appendChild(m);l.appendChild(g);k.appendChild(l);f.appendChild(k);e.appendChild(f); -var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;ca.maxImageSize||n>a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=B;n*=B}A>C?(C=Math.round(100*C/A),A=100):(A=Math.round(100*A/C),C=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move"; -mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",w.convert(b));I.style.width=A+"px";I.style.height=C+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-C)/2)+"px";I.style.paddingLeft=Math.floor((100-A)/2)+"px";F.appendChild(I)}else if(null!=f){var K=a.stringToCells(a.editor.graph.decompress(f.xml));0a.maxImageSize||n>a.maxImageSize){var B=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=B;n*=B}y>C?(C=Math.round(100*C/y),y=100):(y=Math.round(100*y/C),C=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";F.style.position="relative";F.style.cursor="move"; +mxUtils.setPrefixedStyle(F.style,"transition","transform .1s ease-in-out");if(null!=b){var I=document.createElement("img");I.setAttribute("src",w.convert(b));I.style.width=y+"px";I.style.height=C+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-C)/2)+"px";I.style.paddingLeft=Math.floor((100-y)/2)+"px";F.appendChild(I)}else if(null!=f){var K=a.stringToCells(a.editor.graph.decompress(f.xml));0y?z-1:z,0,h.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[z])):(h.push(h.splice(y,1)[0]),t.appendChild(t.children[y])); -else if(0z?A-1:A,0,k.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[A])):(k.push(k.splice(z,1)[0]),t.appendChild(t.children[z])); +else if(0=c.status&&(l(c.responseText,d,g,h,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,h,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0, +5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p= +document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var v={},z=null,A=null,u=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=u&&(u(),u=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",b);mxEvent.addListener(t,"pointerdown",b);mxEvent.addListener(t,"touchstart", +b);var w=new mxUrlConverter,x=!1;if(null!=c)for(b=0;b=c.status&&(l(c.responseText,d,g,k,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(l(c,d,g,k,e,n,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0, f.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"), -function(){var b=a.createLibraryDataFromImages(h),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B, -"change",function(b){x=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,c,d,g,h,e,n,f,u){A(b)(a,c,d,g,h,e,n,f,u);B.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);B.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=u&&(u(),u=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){x=!1;if(null!=a){if("data:image/"== -a.substring(0,11)){var d=a.indexOf(",");0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor= a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML="";for(var c=0;c'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage= -function(a,b,c,d,g,h){var e=t.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=k;c.appendGraph(b,u,e,n,g,!0)}return c}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,h=t.value,e=p.value,n=!q.checked,u=null;n&&(n=h==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var k=0,n=a.pages.length-1;q.checked|| -(k=parseInt(h)-1,n=parseInt(e)-1);for(var l=k;l<=n;l++){var m=a.pages[l],h=m==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),e=!0,k=!1,w=null,v=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,k=m.viewState.mathEnabled,w=m.viewState.background,v=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(k="0"!=m.mapping.diagramMap.get("mathEnabled"),w=m.mapping.diagramMap.get("background"), -v=m.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0'),b.writeln(a.editor.fontCss),b.writeln(""))};if("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage= +function(a,b,c,d,g,k){var e=t.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=h;c.appendGraph(b,u,e,n,g,!0)}return c}var d=parseInt(W.value)/100;isNaN(d)&&(d=1,W.value="100 %");var d=.75*d,k=t.value,e=p.value,n=!q.checked,u=null;n&&(n=k==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var h=0,n=a.pages.length-1;q.checked|| +(h=parseInt(k)-1,n=parseInt(e)-1);for(var l=h;l<=n;l++){var m=a.pages[l],k=m==a.currentPage?g:null;if(null==k){var k=a.createTemporaryGraph(g.getStylesheet()),e=!0,h=!1,w=null,v=null;null==m.viewState&&null==m.mapping&&null==m.root&&a.updatePageRoot(m);null!=m.viewState?(e=m.viewState.pageVisible,h=m.viewState.mathEnabled,w=m.viewState.background,v=m.viewState.backgroundImage):null!=m.mapping&&null!=m.mapping.diagramMap&&(h="0"!=m.mapping.diagramMap.get("mathEnabled"),w=m.mapping.diagramMap.get("background"), +v=m.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"), -n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('